Skip to content
Alchemy Logo

Permission

type Permission =
  | {
      data: {
        allowance: Hex;
      };
      type: typeof NATIVE_TOKEN_TRANSFER;
    }
  | {
      data: {
        address: Address;
        allowance: Hex;
      };
      type: typeof ERC20_TOKEN_TRANSFER;
    }
  | {
      data: {
        limit: Hex;
      };
      type: typeof GAS_LIMIT;
    }
  | {
      data: {
        address: Address;
      };
      type: typeof CONTRACT_ACCESS;
    }
  | {
      data: {
        functions: Hex[];
      };
      type: typeof ACCOUNT_FUNCTIONS;
    }
  | {
      data: {
        functions: Hex[];
      };
      type: typeof FUNCTIONS_ON_ALL_CONTRACTS;
    }
  | {
      data: {
        address: Address;
        functions: Hex[];
      };
      type: typeof FUNCTIONS_ON_CONTRACT;
    }
  | {
      data?: never;
      type: typeof ROOT;
    };

Defined in: packages/smart-accounts/src/ma-v2/permissionBuilder.ts:159

Was this page helpful?