diff --git a/.changeset/young-carrots-burn.md b/.changeset/young-carrots-burn.md new file mode 100644 index 00000000000..d5edf4799bf --- /dev/null +++ b/.changeset/young-carrots-burn.md @@ -0,0 +1,5 @@ +--- +"thirdweb": patch +--- + +ERC20 assets diff --git a/packages/thirdweb/package.json b/packages/thirdweb/package.json index 0605d6d0922..849a1d9fcc8 100644 --- a/packages/thirdweb/package.json +++ b/packages/thirdweb/package.json @@ -97,128 +97,133 @@ }, "exports": { ".": { - "types": "./dist/types/exports/thirdweb.d.ts", + "default": "./dist/cjs/exports/thirdweb.js", "import": "./dist/esm/exports/thirdweb.js", - "default": "./dist/cjs/exports/thirdweb.js" + "types": "./dist/types/exports/thirdweb.d.ts" }, "./adapters/*": { - "types": "./dist/types/exports/adapters/*.d.ts", + "default": "./dist/cjs/exports/adapters/*.js", "import": "./dist/esm/exports/adapters/*.js", - "default": "./dist/cjs/exports/adapters/*.js" + "types": "./dist/types/exports/adapters/*.d.ts" }, "./ai": { - "types": "./dist/types/exports/ai.d.ts", + "default": "./dist/cjs/exports/ai.js", "import": "./dist/esm/exports/ai.js", - "default": "./dist/cjs/exports/ai.js" + "types": "./dist/types/exports/ai.d.ts" + }, + "./tokens": { + "default": "./dist/cjs/exports/tokens.js", + "import": "./dist/esm/exports/tokens.js", + "types": "./dist/types/exports/tokens.d.ts" }, "./auth": { - "types": "./dist/types/exports/auth.d.ts", + "default": "./dist/cjs/exports/auth.js", "import": "./dist/esm/exports/auth.js", - "default": "./dist/cjs/exports/auth.js" + "types": "./dist/types/exports/auth.d.ts" }, "./bridge": { - "types": "./dist/types/exports/bridge.d.ts", + "default": "./dist/cjs/exports/bridge.js", "import": "./dist/esm/exports/bridge.js", - "default": "./dist/cjs/exports/bridge.js" + "types": "./dist/types/exports/bridge.d.ts" }, "./chains": { - "types": "./dist/types/exports/chains.d.ts", + "default": "./dist/cjs/exports/chains.js", "import": "./dist/esm/exports/chains.js", - "default": "./dist/cjs/exports/chains.js" + "types": "./dist/types/exports/chains.d.ts" }, "./contract": { - "types": "./dist/types/exports/contract.d.ts", + "default": "./dist/cjs/exports/contract.js", "import": "./dist/esm/exports/contract.js", - "default": "./dist/cjs/exports/contract.js" + "types": "./dist/types/exports/contract.d.ts" }, "./deploys": { - "types": "./dist/types/exports/deploys.d.ts", + "default": "./dist/cjs/exports/deploys.js", "import": "./dist/esm/exports/deploys.js", - "default": "./dist/cjs/exports/deploys.js" + "types": "./dist/types/exports/deploys.d.ts" }, "./engine": { - "types": "./dist/types/exports/engine.d.ts", + "default": "./dist/cjs/exports/engine.js", "import": "./dist/esm/exports/engine.js", - "default": "./dist/cjs/exports/engine.js" + "types": "./dist/types/exports/engine.d.ts" }, "./event": { - "types": "./dist/types/exports/event.d.ts", + "default": "./dist/cjs/exports/event.js", "import": "./dist/esm/exports/event.js", - "default": "./dist/cjs/exports/event.js" + "types": "./dist/types/exports/event.d.ts" }, "./extensions/*": { - "types": "./dist/types/exports/extensions/*.d.ts", + "default": "./dist/cjs/exports/extensions/*.js", "import": "./dist/esm/exports/extensions/*.js", - "default": "./dist/cjs/exports/extensions/*.js" + "types": "./dist/types/exports/extensions/*.d.ts" }, "./insight": { - "types": "./dist/types/exports/insight.d.ts", + "default": "./dist/cjs/exports/insight.js", "import": "./dist/esm/exports/insight.js", - "default": "./dist/cjs/exports/insight.js" + "types": "./dist/types/exports/insight.d.ts" }, "./modules": { - "types": "./dist/types/exports/modules.d.ts", + "default": "./dist/cjs/exports/modules.js", "import": "./dist/esm/exports/modules.js", - "default": "./dist/cjs/exports/modules.js" + "types": "./dist/types/exports/modules.d.ts" }, "./package.json": "./package.json", "./pay": { - "types": "./dist/types/exports/pay.d.ts", + "default": "./dist/cjs/exports/pay.js", "import": "./dist/esm/exports/pay.js", - "default": "./dist/cjs/exports/pay.js" + "types": "./dist/types/exports/pay.d.ts" }, "./react": { - "types": "./dist/types/exports/react.d.ts", - "react-native": "./dist/esm/exports/react.native.js", + "default": "./dist/cjs/exports/react.js", "import": "./dist/esm/exports/react.js", - "default": "./dist/cjs/exports/react.js" + "react-native": "./dist/esm/exports/react.native.js", + "types": "./dist/types/exports/react.d.ts" }, "./react-native": { - "types": "./dist/types/exports/react.native.d.ts", + "default": "./dist/cjs/exports/react.native.js", "import": "./dist/esm/exports/react.native.js", - "default": "./dist/cjs/exports/react.native.js" + "types": "./dist/types/exports/react.native.d.ts" }, "./rpc": { - "types": "./dist/types/exports/rpc.d.ts", + "default": "./dist/cjs/exports/rpc.js", "import": "./dist/esm/exports/rpc.js", - "default": "./dist/cjs/exports/rpc.js" + "types": "./dist/types/exports/rpc.d.ts" }, "./social": { - "types": "./dist/types/exports/social.d.ts", + "default": "./dist/cjs/exports/social.js", "import": "./dist/esm/exports/social.js", - "default": "./dist/cjs/exports/social.js" + "types": "./dist/types/exports/social.d.ts" }, "./storage": { - "types": "./dist/types/exports/storage.d.ts", + "default": "./dist/cjs/exports/storage.js", "import": "./dist/esm/exports/storage.js", - "default": "./dist/cjs/exports/storage.js" + "types": "./dist/types/exports/storage.d.ts" }, "./transaction": { - "types": "./dist/types/exports/transaction.d.ts", + "default": "./dist/cjs/exports/transaction.js", "import": "./dist/esm/exports/transaction.js", - "default": "./dist/cjs/exports/transaction.js" + "types": "./dist/types/exports/transaction.d.ts" }, "./utils": { - "types": "./dist/types/exports/utils.d.ts", + "default": "./dist/cjs/exports/utils.js", "import": "./dist/esm/exports/utils.js", - "default": "./dist/cjs/exports/utils.js" + "types": "./dist/types/exports/utils.d.ts" }, "./wallets": { - "types": "./dist/types/exports/wallets.d.ts", - "react-native": "./dist/esm/exports/wallets.native.js", + "default": "./dist/cjs/exports/wallets.js", "import": "./dist/esm/exports/wallets.js", - "default": "./dist/cjs/exports/wallets.js" + "react-native": "./dist/esm/exports/wallets.native.js", + "types": "./dist/types/exports/wallets.d.ts" }, "./wallets/*": { - "types": "./dist/types/exports/wallets/*.d.ts", + "default": "./dist/cjs/exports/wallets/*.js", "import": "./dist/esm/exports/wallets/*.js", - "default": "./dist/cjs/exports/wallets/*.js" + "types": "./dist/types/exports/wallets/*.d.ts" }, "./wallets/in-app": { - "types": "./dist/types/exports/wallets/in-app.d.ts", - "react-native": "./dist/esm/exports/wallets/in-app.native.js", + "default": "./dist/cjs/exports/wallets/in-app.js", "import": "./dist/esm/exports/wallets/in-app.js", - "default": "./dist/cjs/exports/wallets/in-app.js" + "react-native": "./dist/esm/exports/wallets/in-app.native.js", + "types": "./dist/types/exports/wallets/in-app.d.ts" } }, "files": [ @@ -347,6 +352,9 @@ "ai": [ "./dist/types/exports/ai.d.ts" ], + "tokens": [ + "./dist/types/exports/tokens.d.ts" + ], "auth": [ "./dist/types/exports/auth.d.ts" ], diff --git a/packages/thirdweb/scripts/generate/abis/tokens/ERC20Asset.json b/packages/thirdweb/scripts/generate/abis/tokens/ERC20Asset.json new file mode 100644 index 00000000000..9d9bcc9bf3a --- /dev/null +++ b/packages/thirdweb/scripts/generate/abis/tokens/ERC20Asset.json @@ -0,0 +1,49 @@ +[ + "constructor()", + "function DOMAIN_SEPARATOR() view returns (bytes32 result)", + "function allowance(address owner, address spender) view returns (uint256 result)", + "function approve(address spender, uint256 amount) returns (bool)", + "function balanceOf(address owner) view returns (uint256 result)", + "function burn(uint256 amount)", + "function burnFrom(address from, uint256 amount)", + "function cancelOwnershipHandover() payable", + "function completeOwnershipHandover(address pendingOwner) payable", + "function contractURI() view returns (string)", + "function decimals() view returns (uint8)", + "function initialize(string _name, string _symbol, string _contractURI, uint256 _maxSupply, address _owner)", + "function name() view returns (string)", + "function nonces(address owner) view returns (uint256 result)", + "function owner() view returns (address result)", + "function ownershipHandoverExpiresAt(address pendingOwner) view returns (uint256 result)", + "function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)", + "function renounceOwnership() payable", + "function requestOwnershipHandover() payable", + "function setContractURI(string _contractURI)", + "function supportsInterface(bytes4 interfaceId) pure returns (bool)", + "function symbol() view returns (string)", + "function totalSupply() view returns (uint256 result)", + "function transfer(address to, uint256 amount) returns (bool)", + "function transferFrom(address from, address to, uint256 amount) returns (bool)", + "function transferOwnership(address newOwner) payable", + "event Approval(address indexed owner, address indexed spender, uint256 amount)", + "event ContractURIUpdated()", + "event Initialized(uint64 version)", + "event OwnershipHandoverCanceled(address indexed pendingOwner)", + "event OwnershipHandoverRequested(address indexed pendingOwner)", + "event OwnershipTransferred(address indexed oldOwner, address indexed newOwner)", + "event Transfer(address indexed from, address indexed to, uint256 amount)", + "error AllowanceOverflow()", + "error AllowanceUnderflow()", + "error AlreadyInitialized()", + "error InsufficientAllowance()", + "error InsufficientBalance()", + "error InvalidInitialization()", + "error InvalidPermit()", + "error NewOwnerIsZeroAddress()", + "error NoHandoverRequest()", + "error NotInitializing()", + "error Permit2AllowanceIsFixedAtInfinity()", + "error PermitExpired()", + "error TotalSupplyOverflow()", + "error Unauthorized()" +] \ No newline at end of file diff --git a/packages/thirdweb/scripts/generate/abis/tokens/ERC20Entrypoint.json b/packages/thirdweb/scripts/generate/abis/tokens/ERC20Entrypoint.json new file mode 100644 index 00000000000..34c21a775a7 --- /dev/null +++ b/packages/thirdweb/scripts/generate/abis/tokens/ERC20Entrypoint.json @@ -0,0 +1,65 @@ +[ + "constructor()", + "function addImplementation((bytes32 contractId, address implementation, uint8 implementationType, uint8 createHook, bytes createHookData) config, bool isDefault)", + "function buy(address asset, (address recipient, address referrer, address tokenIn, uint256 amountIn, uint256 minAmountOut, uint256 deadline, bytes hookData) params) payable returns (uint256 amountIn, uint256 amountOut)", + "function cancelOwnershipHandover() payable", + "function claimReward(address asset)", + "function completeOwnershipHandover(address pendingOwner) payable", + "function create(address creator, (address referrer, bytes32 salt, bytes data, bytes hookData) createParams) payable returns (address asset)", + "function createById(bytes32 contractId, address creator, (address referrer, bytes32 salt, bytes data, bytes hookData) params) payable returns (address asset)", + "function createByImplementationConfig((bytes32 contractId, address implementation, uint8 implementationType, uint8 createHook, bytes createHookData) config, address creator, (address referrer, bytes32 salt, bytes data, bytes hookData) params) payable returns (address asset)", + "function distribute(address asset, (uint256 amount, address recipient)[] contents) payable", + "function getAirdrop() view returns (address airdrop)", + "function getImplementation(bytes32 contractId) view returns ((bytes32 contractId, address implementation, uint8 implementationType, uint8 createHook, bytes createHookData) config)", + "function getReward(address asset) view returns ((address positionManager, uint256 tokenId, address recipient, address referrer, uint16 referrerBps))", + "function getRewardLocker() view returns (address rewardLocker)", + "function getRouter() view returns (address router)", + "function guardSalt(bytes32 salt, address creator, bytes contractInitData, bytes hookInitData) view returns (bytes32)", + "function initialize(address owner, address router, address rewardLocker, address airdrop)", + "function owner() view returns (address result)", + "function ownershipHandoverExpiresAt(address pendingOwner) view returns (uint256 result)", + "function predictAddress(bytes32 contractId, address creator, (address referrer, bytes32 salt, bytes data, bytes hookData) params) view returns (address predicted)", + "function predictAddressByConfig((bytes32 contractId, address implementation, uint8 implementationType, uint8 createHook, bytes createHookData) config, address creator, (address referrer, bytes32 salt, bytes data, bytes hookData) params) view returns (address predicted)", + "function proxiableUUID() view returns (bytes32)", + "function renounceOwnership() payable", + "function requestOwnershipHandover() payable", + "function sell(address asset, (address recipient, address tokenOut, uint256 amountIn, uint256 minAmountOut, uint256 deadline, bytes hookData) params) returns (uint256 amountIn, uint256 amountOut)", + "function setAirdrop(address airdrop)", + "function setRewardLocker(address rewardLocker)", + "function setRouter(address router)", + "function transferOwnership(address newOwner) payable", + "function upgradeToAndCall(address newImplementation, bytes data) payable", + "event AirdropUpdated(address airdrop)", + "event Created(bytes32 contractId, address indexed creator, address indexed asset, address referrer, bytes aux)", + "event Distributed(address asset, uint256 recipientCount, uint256 totalAmount)", + "event ImplementationAdded(bytes32 contractId, address indexed implementation, uint8 implementationType, uint8 createHook, bytes createHookData)", + "event Initialized(uint64 version)", + "event OwnershipHandoverCanceled(address indexed pendingOwner)", + "event OwnershipHandoverRequested(address indexed pendingOwner)", + "event OwnershipTransferred(address indexed oldOwner, address indexed newOwner)", + "event RewardClaimed(address asset, address claimer)", + "event RewardLockerUpdated(address locker)", + "event RouterUpdated(address router)", + "event Upgraded(address indexed implementation)", + "error AlreadyInitialized()", + "error ArrayLengthMismatch()", + "error ImplementationAlreadyExists()", + "error InvalidAmount()", + "error InvalidContractId()", + "error InvalidCreateHook()", + "error InvalidCreator()", + "error InvalidDeploymentCall()", + "error InvalidImplementation()", + "error InvalidInitialization()", + "error InvalidPoolAmount()", + "error InvalidSaltFlags()", + "error InvalidValue()", + "error NewOwnerIsZeroAddress()", + "error NoHandoverRequest()", + "error NotInitializing()", + "error NotRegistered()", + "error Unauthorized()", + "error UnauthorizedCallContext()", + "error UpgradeFailed()", + "error ValueTransferFailed()" +] \ No newline at end of file diff --git a/packages/thirdweb/scripts/generate/abis/tokens/FeeManager.json b/packages/thirdweb/scripts/generate/abis/tokens/FeeManager.json new file mode 100644 index 00000000000..71e2b7a570b --- /dev/null +++ b/packages/thirdweb/scripts/generate/abis/tokens/FeeManager.json @@ -0,0 +1,47 @@ +[ + "constructor(address _owner, address _feeRecipient)", + "function ROLE_FEE_MANAGER() view returns (uint256)", + "function calculateFee(address payer, bytes4 action, uint256 amount, uint256 maxFeeAmount) view returns (address recipient, uint256 feeAmount)", + "function cancelOwnershipHandover() payable", + "function completeOwnershipHandover(address pendingOwner) payable", + "function domainSeparator() view returns (bytes32)", + "function eip712Domain() view returns (bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions)", + "function feeConfigs(address target, bytes4 action) view returns (address recipient, uint8 feeType, uint256 value)", + "function feeRecipient() view returns (address)", + "function getFeeConfig(address target, bytes4 action) view returns ((address recipient, uint8 feeType, uint256 value) config)", + "function grantRoles(address user, uint256 roles) payable", + "function hasAllRoles(address user, uint256 roles) view returns (bool)", + "function hasAnyRole(address user, uint256 roles) view returns (bool)", + "function owner() view returns (address result)", + "function ownershipHandoverExpiresAt(address pendingOwner) view returns (uint256 result)", + "function renounceOwnership() payable", + "function renounceRoles(uint256 roles) payable", + "function requestOwnershipHandover() payable", + "function revokeRoles(address user, uint256 roles) payable", + "function rolesOf(address user) view returns (uint256 roles)", + "function setFeeConfig(bytes4 action, uint8 feeType, uint256 value)", + "function setFeeConfigBySignature(address target, bytes4 action, address recipient, uint8 feeType, uint256 value, uint256 nonce, uint256 deadline, bytes signature)", + "function setFeeRecipient(address _feeRecipient)", + "function setTargetFeeConfig(address target, bytes4 action, address recipient, uint8 feeType, uint256 value)", + "function transferOwnership(address newOwner) payable", + "function usedNonces(bytes32 signerNonce) view returns (bool used)", + "event FeeConfigUpdated(address indexed target, bytes4 indexed action, address recipient, uint8 feeType, uint256 value)", + "event FeeConfigUpdatedBySignature(address indexed signer, address indexed target, bytes4 indexed action, address recipient, uint8 feeType, uint256 value)", + "event FeeRecipientUpdated(address feeRecipient)", + "event OwnershipHandoverCanceled(address indexed pendingOwner)", + "event OwnershipHandoverRequested(address indexed pendingOwner)", + "event OwnershipTransferred(address indexed oldOwner, address indexed newOwner)", + "event RolesUpdated(address indexed user, uint256 indexed roles)", + "error AlreadyInitialized()", + "error InvalidConfig()", + "error InvalidFeeType()", + "error InvalidModule()", + "error InvalidNonce()", + "error InvalidRecipient()", + "error InvalidSignature()", + "error InvalidValue()", + "error NewOwnerIsZeroAddress()", + "error NoHandoverRequest()", + "error SignatureExpired()", + "error Unauthorized()" +] \ No newline at end of file diff --git a/packages/thirdweb/scripts/generate/abis/tokens/RewardLocker.json b/packages/thirdweb/scripts/generate/abis/tokens/RewardLocker.json new file mode 100644 index 00000000000..8de59c3cb79 --- /dev/null +++ b/packages/thirdweb/scripts/generate/abis/tokens/RewardLocker.json @@ -0,0 +1,16 @@ +[ + "constructor(address _feeManager, address _v3PositionManager, address _v4PositionManager)", + "function collectReward(address owner, address asset) returns (address token0, address token1, uint256 amount0, uint256 amount1)", + "function feeManager() view returns (address)", + "function lockPosition(address asset, address positionManager, uint256 tokenId, address recipient, address referrer, uint16 referrerBps)", + "function positions(address owner, address asset) view returns (address positionManager, uint256 tokenId, address recipient, address referrer, uint16 referrerBps)", + "function v3PositionManager() view returns (address)", + "function v4PositionManager() view returns (address)", + "event PositionLocked(address indexed owner, address indexed asset, address positionManager, uint256 tokenId, address recipient, address referrer)", + "event RewardCollected(address indexed owner, address indexed asset, address positionManager, uint256 tokenId, uint256 amount0, uint256 amount1)", + "error InvalidPosition()", + "error InvalidPositionManager()", + "error InvalidReferrerBps()", + "error InvalidRewardRecipient()", + "error TokenAlreadyLocked()" +] \ No newline at end of file diff --git a/packages/thirdweb/scripts/generate/abis/tokens/Router.json b/packages/thirdweb/scripts/generate/abis/tokens/Router.json new file mode 100644 index 00000000000..f31ba9e4fa8 --- /dev/null +++ b/packages/thirdweb/scripts/generate/abis/tokens/Router.json @@ -0,0 +1,52 @@ +[ + "constructor()", + "function NATIVE_TOKEN() view returns (address)", + "function cancelOwnershipHandover() payable", + "function completeOwnershipHandover(address pendingOwner) payable", + "function createPool((address recipient, address referrer, address tokenA, address tokenB, uint256 amountA, uint256 amountB, bytes data) createPoolConfig) payable returns (address pool, address position, uint256 positionId, uint256 refundAmount0, uint256 refundAmount1)", + "function disableAdapter(uint8 adapterType)", + "function enableAdapter(uint8 adapterType, bytes config)", + "function initialize(address owner)", + "function owner() view returns (address result)", + "function ownershipHandoverExpiresAt(address pendingOwner) view returns (uint256 result)", + "function proxiableUUID() view returns (bytes32)", + "function renounceOwnership() payable", + "function requestOwnershipHandover() payable", + "function swap((address tokenIn, address tokenOut, uint256 amountIn, uint256 minAmountOut, address recipient, address refundRecipient, uint256 deadline, bytes data) config) payable returns ((uint256 amountIn, uint256 amountOut, address source) result)", + "function transferOwnership(address newOwner) payable", + "function upgradeToAndCall(address newImplementation, bytes data) payable", + "event AdapterDisabled(uint8 adapterType)", + "event AdapterEnabled(uint8 adapterType)", + "event Initialized(uint64 version)", + "event OwnershipHandoverCanceled(address indexed pendingOwner)", + "event OwnershipHandoverRequested(address indexed pendingOwner)", + "event OwnershipTransferred(address indexed oldOwner, address indexed newOwner)", + "event SwapExecuted(address indexed sender, address indexed tokenIn, address indexed tokenOut, uint256 amountIn, uint256 amountOut, uint8 adapterUsed)", + "event Upgraded(address indexed implementation)", + "error AdapterNotFound()", + "error AlreadyInitialized()", + "error DeadlineExceeded()", + "error InvalidAdapterType()", + "error InvalidAmount()", + "error InvalidConfiguration()", + "error InvalidETHAmount()", + "error InvalidFee()", + "error InvalidFee()", + "error InvalidInitialization()", + "error InvalidPoolConfig()", + "error InvalidTick()", + "error InvalidTick()", + "error NewOwnerIsZeroAddress()", + "error NoHandoverRequest()", + "error NotInitializing()", + "error PoolAlreadyExists()", + "error PoolAlreadyExists()", + "error PoolNotFound()", + "error PoolNotFound()", + "error Reentrancy()", + "error SwapFailed()", + "error Unauthorized()", + "error UnauthorizedCallContext()", + "error UpgradeFailed()", + "error ZeroAddress()" +] \ No newline at end of file diff --git a/packages/thirdweb/src/exports/tokens.ts b/packages/thirdweb/src/exports/tokens.ts new file mode 100644 index 00000000000..53b16fc8776 --- /dev/null +++ b/packages/thirdweb/src/exports/tokens.ts @@ -0,0 +1,28 @@ +export { getReward } from "../extensions/tokens/__generated__/ERC20Entrypoint/read/getReward.js"; +export { getRewardLocker } from "../extensions/tokens/__generated__/ERC20Entrypoint/read/getRewardLocker.js"; +export { claimReward } from "../extensions/tokens/__generated__/ERC20Entrypoint/write/claimReward.js"; +export { positions } from "../extensions/tokens/__generated__/RewardLocker/read/positions.js"; +export { v3PositionManager } from "../extensions/tokens/__generated__/RewardLocker/read/v3PositionManager.js"; +export { v4PositionManager } from "../extensions/tokens/__generated__/RewardLocker/read/v4PositionManager.js"; +export { + DEFAULT_INFRA_ADMIN, + DEFAULT_REFERRER_ADDRESS, + DEFAULT_REFERRER_REWARD_BPS, +} from "../tokens/constants.js"; +export { createToken } from "../tokens/create-token.js"; +export { distributeToken } from "../tokens/distribute-token.js"; +export { getDeployedEntrypointERC20 } from "../tokens/get-entrypoint-erc20.js"; +export { isRouterEnabled } from "../tokens/is-router-enabled.js"; +export { + generateSalt, + SaltFlag, + type SaltFlagType, +} from "../tokens/token-utils.js"; +export type { + CreateTokenByImplementationConfigOptions, + CreateTokenOptions, + DistributeContent, + PoolConfig, + TokenParams, +} from "../tokens/types.js"; +export { getInitBytecodeWithSalt } from "../utils/any-evm/get-init-bytecode-with-salt.js"; diff --git a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/events/OwnerUpdated.ts b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/events/OwnerUpdated.ts index 0f9bbb7c89a..15223a95af0 100644 --- a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/events/OwnerUpdated.ts +++ b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/events/OwnerUpdated.ts @@ -40,8 +40,8 @@ export type OwnerUpdatedEventFilters = Partial<{ */ export function ownerUpdatedEvent(filters: OwnerUpdatedEventFilters = {}) { return prepareEvent({ - filters, signature: "event OwnerUpdated(address indexed prevOwner, address indexed newOwner)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/eip712Domain.ts b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/eip712Domain.ts index 896cf83855c..24655af712b 100644 --- a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/eip712Domain.ts +++ b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/eip712Domain.ts @@ -8,32 +8,32 @@ export const FN_SELECTOR = "0x84b0196e" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "fields", type: "bytes1", + name: "fields", }, { - name: "name", type: "string", + name: "name", }, { - name: "version", type: "string", + name: "version", }, { - name: "chainId", type: "uint256", + name: "chainId", }, { - name: "verifyingContract", type: "address", + name: "verifyingContract", }, { - name: "salt", type: "bytes32", + name: "salt", }, { - name: "extensions", type: "uint256[]", + name: "extensions", }, ] as const; diff --git a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/isClaimed.ts b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/isClaimed.ts index 3bd9646dbe2..46b4bcdfdd2 100644 --- a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/isClaimed.ts +++ b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/isClaimed.ts @@ -18,16 +18,16 @@ export type IsClaimedParams = { export const FN_SELECTOR = "0xd12acf73" as const; const FN_INPUTS = [ { - name: "_receiver", type: "address", + name: "_receiver", }, { - name: "_token", type: "address", + name: "_token", }, { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/tokenConditionId.ts b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/tokenConditionId.ts index 2bd9a328687..c2ce62b7098 100644 --- a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/tokenConditionId.ts +++ b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/tokenConditionId.ts @@ -19,8 +19,8 @@ export type TokenConditionIdParams = { export const FN_SELECTOR = "0x3dc28d49" as const; const FN_INPUTS = [ { - name: "tokenAddress", type: "address", + name: "tokenAddress", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/tokenMerkleRoot.ts b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/tokenMerkleRoot.ts index 770d310d660..5d50983fac2 100644 --- a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/tokenMerkleRoot.ts +++ b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/tokenMerkleRoot.ts @@ -19,8 +19,8 @@ export type TokenMerkleRootParams = { export const FN_SELECTOR = "0x95f5c120" as const; const FN_INPUTS = [ { - name: "tokenAddress", type: "address", + name: "tokenAddress", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC1155.ts b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC1155.ts index bd6efbf659d..e05aab2b4a4 100644 --- a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC1155.ts +++ b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC1155.ts @@ -30,26 +30,26 @@ export type AirdropERC1155Params = WithOverrides<{ export const FN_SELECTOR = "0x2d89e38b" as const; const FN_INPUTS = [ { - name: "_tokenAddress", type: "address", + name: "_tokenAddress", }, { + type: "tuple[]", + name: "_contents", components: [ { - name: "recipient", type: "address", + name: "recipient", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "amount", type: "uint256", + name: "amount", }, ], - name: "_contents", - type: "tuple[]", }, ] as const; const FN_OUTPUTS = [] as const; @@ -153,23 +153,23 @@ export function airdropERC1155( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenAddress, resolvedOptions.contents] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC1155WithSignature.ts b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC1155WithSignature.ts index 5a726f92b7e..eae334d39f6 100644 --- a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC1155WithSignature.ts +++ b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC1155WithSignature.ts @@ -36,44 +36,44 @@ export type AirdropERC1155WithSignatureParams = WithOverrides<{ export const FN_SELECTOR = "0xd0d4afd6" as const; const FN_INPUTS = [ { + type: "tuple", + name: "req", components: [ { - name: "uid", type: "bytes32", + name: "uid", }, { - name: "tokenAddress", type: "address", + name: "tokenAddress", }, { - name: "expirationTimestamp", type: "uint256", + name: "expirationTimestamp", }, { + type: "tuple[]", + name: "contents", components: [ { - name: "recipient", type: "address", + name: "recipient", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "amount", type: "uint256", + name: "amount", }, ], - name: "contents", - type: "tuple[]", }, ], - name: "req", - type: "tuple", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [] as const; @@ -180,23 +180,23 @@ export function airdropERC1155WithSignature( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.req, resolvedOptions.signature] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC20.ts b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC20.ts index 941d0cbfc9a..c3be854e05e 100644 --- a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC20.ts +++ b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC20.ts @@ -29,22 +29,22 @@ export type AirdropERC20Params = WithOverrides<{ export const FN_SELECTOR = "0x56b0b449" as const; const FN_INPUTS = [ { - name: "_tokenAddress", type: "address", + name: "_tokenAddress", }, { + type: "tuple[]", + name: "_contents", components: [ { - name: "recipient", type: "address", + name: "recipient", }, { - name: "amount", type: "uint256", + name: "amount", }, ], - name: "_contents", - type: "tuple[]", }, ] as const; const FN_OUTPUTS = [] as const; @@ -148,23 +148,23 @@ export function airdropERC20( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenAddress, resolvedOptions.contents] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC20WithSignature.ts b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC20WithSignature.ts index e2c906fb5b6..072a582ec09 100644 --- a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC20WithSignature.ts +++ b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC20WithSignature.ts @@ -35,40 +35,40 @@ export type AirdropERC20WithSignatureParams = WithOverrides<{ export const FN_SELECTOR = "0xaaba07f6" as const; const FN_INPUTS = [ { + type: "tuple", + name: "req", components: [ { - name: "uid", type: "bytes32", + name: "uid", }, { - name: "tokenAddress", type: "address", + name: "tokenAddress", }, { - name: "expirationTimestamp", type: "uint256", + name: "expirationTimestamp", }, { + type: "tuple[]", + name: "contents", components: [ { - name: "recipient", type: "address", + name: "recipient", }, { - name: "amount", type: "uint256", + name: "amount", }, ], - name: "contents", - type: "tuple[]", }, ], - name: "req", - type: "tuple", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [] as const; @@ -175,23 +175,23 @@ export function airdropERC20WithSignature( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.req, resolvedOptions.signature] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC721.ts b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC721.ts index 9645483e334..18da4c5fe0d 100644 --- a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC721.ts +++ b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC721.ts @@ -29,22 +29,22 @@ export type AirdropERC721Params = WithOverrides<{ export const FN_SELECTOR = "0x6d582ebe" as const; const FN_INPUTS = [ { - name: "_tokenAddress", type: "address", + name: "_tokenAddress", }, { + type: "tuple[]", + name: "_contents", components: [ { - name: "recipient", type: "address", + name: "recipient", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, ], - name: "_contents", - type: "tuple[]", }, ] as const; const FN_OUTPUTS = [] as const; @@ -148,23 +148,23 @@ export function airdropERC721( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenAddress, resolvedOptions.contents] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC721WithSignature.ts b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC721WithSignature.ts index ac6a84f3ce4..a2c687402e0 100644 --- a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC721WithSignature.ts +++ b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC721WithSignature.ts @@ -35,40 +35,40 @@ export type AirdropERC721WithSignatureParams = WithOverrides<{ export const FN_SELECTOR = "0xb654a6f3" as const; const FN_INPUTS = [ { + type: "tuple", + name: "req", components: [ { - name: "uid", type: "bytes32", + name: "uid", }, { - name: "tokenAddress", type: "address", + name: "tokenAddress", }, { - name: "expirationTimestamp", type: "uint256", + name: "expirationTimestamp", }, { + type: "tuple[]", + name: "contents", components: [ { - name: "recipient", type: "address", + name: "recipient", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, ], - name: "contents", - type: "tuple[]", }, ], - name: "req", - type: "tuple", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [] as const; @@ -175,23 +175,23 @@ export function airdropERC721WithSignature( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.req, resolvedOptions.signature] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropNativeToken.ts b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropNativeToken.ts index 65534cf1849..4d8b5529030 100644 --- a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropNativeToken.ts +++ b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropNativeToken.ts @@ -25,18 +25,18 @@ export type AirdropNativeTokenParams = WithOverrides<{ export const FN_SELECTOR = "0x0d5818f7" as const; const FN_INPUTS = [ { + type: "tuple[]", + name: "_contents", components: [ { - name: "recipient", type: "address", + name: "recipient", }, { - name: "amount", type: "uint256", + name: "amount", }, ], - name: "_contents", - type: "tuple[]", }, ] as const; const FN_OUTPUTS = [] as const; @@ -136,23 +136,23 @@ export function airdropNativeToken( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.contents] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/claimERC1155.ts b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/claimERC1155.ts index 1ae536a592f..16dc6eba70d 100644 --- a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/claimERC1155.ts +++ b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/claimERC1155.ts @@ -22,24 +22,24 @@ export type ClaimERC1155Params = WithOverrides<{ export const FN_SELECTOR = "0xc6fa26ab" as const; const FN_INPUTS = [ { - name: "_token", type: "address", + name: "_token", }, { - name: "_receiver", type: "address", + name: "_receiver", }, { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, { - name: "_quantity", type: "uint256", + name: "_quantity", }, { - name: "_proofs", type: "bytes32[]", + name: "_proofs", }, ] as const; const FN_OUTPUTS = [] as const; @@ -155,19 +155,8 @@ export function claimERC1155( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -179,5 +168,16 @@ export function claimERC1155( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/claimERC20.ts b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/claimERC20.ts index a2c0c7bcb5e..6b9a8eec9ba 100644 --- a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/claimERC20.ts +++ b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/claimERC20.ts @@ -21,20 +21,20 @@ export type ClaimERC20Params = WithOverrides<{ export const FN_SELECTOR = "0xecf3d3d4" as const; const FN_INPUTS = [ { - name: "_token", type: "address", + name: "_token", }, { - name: "_receiver", type: "address", + name: "_receiver", }, { - name: "_quantity", type: "uint256", + name: "_quantity", }, { - name: "_proofs", type: "bytes32[]", + name: "_proofs", }, ] as const; const FN_OUTPUTS = [] as const; @@ -146,19 +146,8 @@ export function claimERC20( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -169,5 +158,16 @@ export function claimERC20( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/claimERC721.ts b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/claimERC721.ts index 49d0b1720f8..acc2fcc4d1b 100644 --- a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/claimERC721.ts +++ b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/claimERC721.ts @@ -21,20 +21,20 @@ export type ClaimERC721Params = WithOverrides<{ export const FN_SELECTOR = "0x1290be10" as const; const FN_INPUTS = [ { - name: "_token", type: "address", + name: "_token", }, { - name: "_receiver", type: "address", + name: "_receiver", }, { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, { - name: "_proofs", type: "bytes32[]", + name: "_proofs", }, ] as const; const FN_OUTPUTS = [] as const; @@ -146,19 +146,8 @@ export function claimERC721( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -169,5 +158,16 @@ export function claimERC721( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/initialize.ts b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/initialize.ts index 32cb05823bb..e53174e9118 100644 --- a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/initialize.ts +++ b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/initialize.ts @@ -21,8 +21,8 @@ export type InitializeParams = WithOverrides<{ export const FN_SELECTOR = "0xc4d66de8" as const; const FN_INPUTS = [ { - name: "_defaultAdmin", type: "address", + name: "_defaultAdmin", }, ] as const; const FN_OUTPUTS = [] as const; @@ -120,23 +120,23 @@ export function initialize( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.defaultAdmin] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/setMerkleRoot.ts b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/setMerkleRoot.ts index ade70c41f0c..c0c704d7b6d 100644 --- a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/setMerkleRoot.ts +++ b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/setMerkleRoot.ts @@ -26,16 +26,16 @@ export type SetMerkleRootParams = WithOverrides<{ export const FN_SELECTOR = "0x8259a87b" as const; const FN_INPUTS = [ { - name: "_token", type: "address", + name: "_token", }, { - name: "_tokenMerkleRoot", type: "bytes32", + name: "_tokenMerkleRoot", }, { - name: "_resetClaimStatus", type: "bool", + name: "_resetClaimStatus", }, ] as const; const FN_OUTPUTS = [] as const; @@ -143,19 +143,8 @@ export function setMerkleRoot( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -165,5 +154,16 @@ export function setMerkleRoot( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/setOwner.ts b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/setOwner.ts index 95f071a6d30..ac3e96fb68e 100644 --- a/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/setOwner.ts +++ b/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/setOwner.ts @@ -18,8 +18,8 @@ export type SetOwnerParams = WithOverrides<{ export const FN_SELECTOR = "0x13af4035" as const; const FN_INPUTS = [ { - name: "_newOwner", type: "address", + name: "_newOwner", }, ] as const; const FN_OUTPUTS = [] as const; @@ -115,23 +115,23 @@ export function setOwner( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.newOwner] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/common/__generated__/IClaimConditionsSinglePhase/write/setClaimConditions.ts b/packages/thirdweb/src/extensions/common/__generated__/IClaimConditionsSinglePhase/write/setClaimConditions.ts index de478f3c8be..4566ae533d4 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IClaimConditionsSinglePhase/write/setClaimConditions.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IClaimConditionsSinglePhase/write/setClaimConditions.ts @@ -35,46 +35,46 @@ export type SetClaimConditionsParams = WithOverrides<{ export const FN_SELECTOR = "0x426cfaf3" as const; const FN_INPUTS = [ { + type: "tuple", + name: "phase", components: [ { - name: "startTimestamp", type: "uint256", + name: "startTimestamp", }, { - name: "maxClaimableSupply", type: "uint256", + name: "maxClaimableSupply", }, { - name: "supplyClaimed", type: "uint256", + name: "supplyClaimed", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "merkleRoot", type: "bytes32", + name: "merkleRoot", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "metadata", type: "string", + name: "metadata", }, ], - name: "phase", - type: "tuple", }, { - name: "resetClaimEligibility", type: "bool", + name: "resetClaimEligibility", }, ] as const; const FN_OUTPUTS = [] as const; @@ -180,19 +180,8 @@ export function setClaimConditions( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -201,5 +190,16 @@ export function setClaimConditions( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/common/__generated__/IContractMetadata/write/setContractURI.ts b/packages/thirdweb/src/extensions/common/__generated__/IContractMetadata/write/setContractURI.ts index b2bda000fe3..f7240e15589 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IContractMetadata/write/setContractURI.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IContractMetadata/write/setContractURI.ts @@ -18,8 +18,8 @@ export type SetContractURIParams = WithOverrides<{ export const FN_SELECTOR = "0x938e3d7b" as const; const FN_INPUTS = [ { - name: "_uri", type: "string", + name: "_uri", }, ] as const; const FN_OUTPUTS = [] as const; @@ -117,23 +117,23 @@ export function setContractURI( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.uri] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/common/__generated__/IMulticall/write/multicall.ts b/packages/thirdweb/src/extensions/common/__generated__/IMulticall/write/multicall.ts index 74199738d5d..d88bb911cfe 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IMulticall/write/multicall.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IMulticall/write/multicall.ts @@ -18,14 +18,14 @@ export type MulticallParams = WithOverrides<{ export const FN_SELECTOR = "0xac9650d8" as const; const FN_INPUTS = [ { - name: "data", type: "bytes[]", + name: "data", }, ] as const; const FN_OUTPUTS = [ { - name: "results", type: "bytes[]", + name: "results", }, ] as const; @@ -122,23 +122,23 @@ export function multicall( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.data] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/common/__generated__/IOwnable/events/OwnerUpdated.ts b/packages/thirdweb/src/extensions/common/__generated__/IOwnable/events/OwnerUpdated.ts index dcbeaf28259..08af112996e 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IOwnable/events/OwnerUpdated.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IOwnable/events/OwnerUpdated.ts @@ -40,8 +40,8 @@ export type OwnerUpdatedEventFilters = Partial<{ */ export function ownerUpdatedEvent(filters: OwnerUpdatedEventFilters = {}) { return prepareEvent({ - filters, signature: "event OwnerUpdated(address indexed prevOwner, address indexed newOwner)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/common/__generated__/IOwnable/write/setOwner.ts b/packages/thirdweb/src/extensions/common/__generated__/IOwnable/write/setOwner.ts index c6f3df7afa6..5e69d08ca21 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IOwnable/write/setOwner.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IOwnable/write/setOwner.ts @@ -18,8 +18,8 @@ export type SetOwnerParams = WithOverrides<{ export const FN_SELECTOR = "0x13af4035" as const; const FN_INPUTS = [ { - name: "_newOwner", type: "address", + name: "_newOwner", }, ] as const; const FN_OUTPUTS = [] as const; @@ -115,23 +115,23 @@ export function setOwner( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.newOwner] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/common/__generated__/IPlatformFee/events/PlatformFeeInfoUpdated.ts b/packages/thirdweb/src/extensions/common/__generated__/IPlatformFee/events/PlatformFeeInfoUpdated.ts index f0d95180ea3..dbe8285a417 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IPlatformFee/events/PlatformFeeInfoUpdated.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IPlatformFee/events/PlatformFeeInfoUpdated.ts @@ -36,8 +36,8 @@ export function platformFeeInfoUpdatedEvent( filters: PlatformFeeInfoUpdatedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event PlatformFeeInfoUpdated(address indexed platformFeeRecipient, uint256 platformFeeBps)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/common/__generated__/IPlatformFee/write/setPlatformFeeInfo.ts b/packages/thirdweb/src/extensions/common/__generated__/IPlatformFee/write/setPlatformFeeInfo.ts index 8de7bf51263..efa7ad2fe4d 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IPlatformFee/write/setPlatformFeeInfo.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IPlatformFee/write/setPlatformFeeInfo.ts @@ -25,12 +25,12 @@ export type SetPlatformFeeInfoParams = WithOverrides<{ export const FN_SELECTOR = "0x1e7ac488" as const; const FN_INPUTS = [ { - name: "_platformFeeRecipient", type: "address", + name: "_platformFeeRecipient", }, { - name: "_platformFeeBps", type: "uint256", + name: "_platformFeeBps", }, ] as const; const FN_OUTPUTS = [] as const; @@ -136,19 +136,8 @@ export function setPlatformFeeInfo( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -157,5 +146,16 @@ export function setPlatformFeeInfo( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/common/__generated__/IPrimarySale/events/PrimarySaleRecipientUpdated.ts b/packages/thirdweb/src/extensions/common/__generated__/IPrimarySale/events/PrimarySaleRecipientUpdated.ts index e247a3f1119..ad050c4dd3a 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IPrimarySale/events/PrimarySaleRecipientUpdated.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IPrimarySale/events/PrimarySaleRecipientUpdated.ts @@ -36,7 +36,7 @@ export function primarySaleRecipientUpdatedEvent( filters: PrimarySaleRecipientUpdatedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event PrimarySaleRecipientUpdated(address indexed recipient)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/common/__generated__/IPrimarySale/write/setPrimarySaleRecipient.ts b/packages/thirdweb/src/extensions/common/__generated__/IPrimarySale/write/setPrimarySaleRecipient.ts index b80fe119c12..66173a2a58e 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IPrimarySale/write/setPrimarySaleRecipient.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IPrimarySale/write/setPrimarySaleRecipient.ts @@ -21,8 +21,8 @@ export type SetPrimarySaleRecipientParams = WithOverrides<{ export const FN_SELECTOR = "0x6f4f2837" as const; const FN_INPUTS = [ { - name: "_saleRecipient", type: "address", + name: "_saleRecipient", }, ] as const; const FN_OUTPUTS = [] as const; @@ -126,23 +126,23 @@ export function setPrimarySaleRecipient( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.saleRecipient] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/events/DefaultRoyalty.ts b/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/events/DefaultRoyalty.ts index e99421c5576..3ddbd97fa3b 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/events/DefaultRoyalty.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/events/DefaultRoyalty.ts @@ -34,8 +34,8 @@ export type DefaultRoyaltyEventFilters = Partial<{ */ export function defaultRoyaltyEvent(filters: DefaultRoyaltyEventFilters = {}) { return prepareEvent({ - filters, signature: "event DefaultRoyalty(address indexed newRoyaltyRecipient, uint256 newRoyaltyBps)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/events/RoyaltyForToken.ts b/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/events/RoyaltyForToken.ts index 435be15ef77..55dc7b798a4 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/events/RoyaltyForToken.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/events/RoyaltyForToken.ts @@ -42,8 +42,8 @@ export function royaltyForTokenEvent( filters: RoyaltyForTokenEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event RoyaltyForToken(uint256 indexed tokenId, address indexed royaltyRecipient, uint256 royaltyBps)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/read/getRoyaltyInfoForToken.ts b/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/read/getRoyaltyInfoForToken.ts index fd5e7a63dd9..aa5aa6ebb79 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/read/getRoyaltyInfoForToken.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/read/getRoyaltyInfoForToken.ts @@ -16,8 +16,8 @@ export type GetRoyaltyInfoForTokenParams = { export const FN_SELECTOR = "0x4cc157df" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/read/royaltyInfo.ts b/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/read/royaltyInfo.ts index d697e3822da..7d580f21ede 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/read/royaltyInfo.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/read/royaltyInfo.ts @@ -20,22 +20,22 @@ export type RoyaltyInfoParams = { export const FN_SELECTOR = "0x2a55205a" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "salePrice", type: "uint256", + name: "salePrice", }, ] as const; const FN_OUTPUTS = [ { - name: "receiver", type: "address", + name: "receiver", }, { - name: "royaltyAmount", type: "uint256", + name: "royaltyAmount", }, ] as const; diff --git a/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/read/supportsInterface.ts b/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/read/supportsInterface.ts index f24fc2d98c7..407137179d0 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/read/supportsInterface.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/read/supportsInterface.ts @@ -19,8 +19,8 @@ export type SupportsInterfaceParams = { export const FN_SELECTOR = "0x01ffc9a7" as const; const FN_INPUTS = [ { - name: "interfaceId", type: "bytes4", + name: "interfaceId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/write/setDefaultRoyaltyInfo.ts b/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/write/setDefaultRoyaltyInfo.ts index 560af965e80..fdce2d9c969 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/write/setDefaultRoyaltyInfo.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/write/setDefaultRoyaltyInfo.ts @@ -25,12 +25,12 @@ export type SetDefaultRoyaltyInfoParams = WithOverrides<{ export const FN_SELECTOR = "0x600dd5ea" as const; const FN_INPUTS = [ { - name: "_royaltyRecipient", type: "address", + name: "_royaltyRecipient", }, { - name: "_royaltyBps", type: "uint256", + name: "_royaltyBps", }, ] as const; const FN_OUTPUTS = [] as const; @@ -138,19 +138,8 @@ export function setDefaultRoyaltyInfo( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -159,5 +148,16 @@ export function setDefaultRoyaltyInfo( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/write/setRoyaltyInfoForToken.ts b/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/write/setRoyaltyInfoForToken.ts index a429c655018..148ebb62fa3 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/write/setRoyaltyInfoForToken.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/write/setRoyaltyInfoForToken.ts @@ -23,16 +23,16 @@ export type SetRoyaltyInfoForTokenParams = WithOverrides<{ export const FN_SELECTOR = "0x9bcf7a15" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "recipient", type: "address", + name: "recipient", }, { - name: "bps", type: "uint256", + name: "bps", }, ] as const; const FN_OUTPUTS = [] as const; @@ -146,19 +146,8 @@ export function setRoyaltyInfoForToken( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -168,5 +157,16 @@ export function setRoyaltyInfoForToken( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/events/RoyaltyEngineUpdated.ts b/packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/events/RoyaltyEngineUpdated.ts index 9c938a8bc7c..9fe313c9645 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/events/RoyaltyEngineUpdated.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/events/RoyaltyEngineUpdated.ts @@ -42,8 +42,8 @@ export function royaltyEngineUpdatedEvent( filters: RoyaltyEngineUpdatedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event RoyaltyEngineUpdated(address indexed previousAddress, address indexed newAddress)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/read/supportsInterface.ts b/packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/read/supportsInterface.ts index f24fc2d98c7..407137179d0 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/read/supportsInterface.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/read/supportsInterface.ts @@ -19,8 +19,8 @@ export type SupportsInterfaceParams = { export const FN_SELECTOR = "0x01ffc9a7" as const; const FN_INPUTS = [ { - name: "interfaceId", type: "bytes4", + name: "interfaceId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/write/getRoyalty.ts b/packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/write/getRoyalty.ts index 10b2fa5dba7..8c871ee8dc9 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/write/getRoyalty.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/write/getRoyalty.ts @@ -23,26 +23,26 @@ export type GetRoyaltyParams = WithOverrides<{ export const FN_SELECTOR = "0xf533b802" as const; const FN_INPUTS = [ { - name: "tokenAddress", type: "address", + name: "tokenAddress", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "value", type: "uint256", + name: "value", }, ] as const; const FN_OUTPUTS = [ { - name: "recipients", type: "address[]", + name: "recipients", }, { - name: "amounts", type: "uint256[]", + name: "amounts", }, ] as const; @@ -149,19 +149,8 @@ export function getRoyalty( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -171,5 +160,16 @@ export function getRoyalty( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/write/setRoyaltyEngine.ts b/packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/write/setRoyaltyEngine.ts index fd34974caa0..668627644da 100644 --- a/packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/write/setRoyaltyEngine.ts +++ b/packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/write/setRoyaltyEngine.ts @@ -21,8 +21,8 @@ export type SetRoyaltyEngineParams = WithOverrides<{ export const FN_SELECTOR = "0x21ede032" as const; const FN_INPUTS = [ { - name: "_royaltyEngineAddress", type: "address", + name: "_royaltyEngineAddress", }, ] as const; const FN_OUTPUTS = [] as const; @@ -120,23 +120,23 @@ export function setRoyaltyEngine( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.royaltyEngineAddress] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/dynamic-contracts/__generated__/IExtensionManager/read/getAllExtensions.ts b/packages/thirdweb/src/extensions/dynamic-contracts/__generated__/IExtensionManager/read/getAllExtensions.ts index ad7179fa3bb..6b40fa433e9 100644 --- a/packages/thirdweb/src/extensions/dynamic-contracts/__generated__/IExtensionManager/read/getAllExtensions.ts +++ b/packages/thirdweb/src/extensions/dynamic-contracts/__generated__/IExtensionManager/read/getAllExtensions.ts @@ -8,41 +8,41 @@ export const FN_SELECTOR = "0x4a00cc48" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple[]", components: [ { + type: "tuple", + name: "metadata", components: [ { - name: "name", type: "string", + name: "name", }, { - name: "metadataURI", type: "string", + name: "metadataURI", }, { - name: "implementation", type: "address", + name: "implementation", }, ], - name: "metadata", - type: "tuple", }, { + type: "tuple[]", + name: "functions", components: [ { - name: "functionSelector", type: "bytes4", + name: "functionSelector", }, { - name: "functionSignature", type: "string", + name: "functionSignature", }, ], - name: "functions", - type: "tuple[]", }, ], - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/dynamic-contracts/__generated__/IExtensionManager/write/addExtension.ts b/packages/thirdweb/src/extensions/dynamic-contracts/__generated__/IExtensionManager/write/addExtension.ts index f5e348496b7..d1966acff79 100644 --- a/packages/thirdweb/src/extensions/dynamic-contracts/__generated__/IExtensionManager/write/addExtension.ts +++ b/packages/thirdweb/src/extensions/dynamic-contracts/__generated__/IExtensionManager/write/addExtension.ts @@ -40,42 +40,42 @@ export type AddExtensionParams = WithOverrides<{ export const FN_SELECTOR = "0xe05688fe" as const; const FN_INPUTS = [ { + type: "tuple", + name: "extension", components: [ { + type: "tuple", + name: "metadata", components: [ { - name: "name", type: "string", + name: "name", }, { - name: "metadataURI", type: "string", + name: "metadataURI", }, { - name: "implementation", type: "address", + name: "implementation", }, ], - name: "metadata", - type: "tuple", }, { + type: "tuple[]", + name: "functions", components: [ { - name: "functionSelector", type: "bytes4", + name: "functionSelector", }, { - name: "functionSignature", type: "string", + name: "functionSignature", }, ], - name: "functions", - type: "tuple[]", }, ], - name: "extension", - type: "tuple", }, ] as const; const FN_OUTPUTS = [] as const; @@ -173,23 +173,23 @@ export function addExtension( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.extension] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/dynamic-contracts/__generated__/IExtensionManager/write/removeExtension.ts b/packages/thirdweb/src/extensions/dynamic-contracts/__generated__/IExtensionManager/write/removeExtension.ts index e44ffee9980..6374a15b117 100644 --- a/packages/thirdweb/src/extensions/dynamic-contracts/__generated__/IExtensionManager/write/removeExtension.ts +++ b/packages/thirdweb/src/extensions/dynamic-contracts/__generated__/IExtensionManager/write/removeExtension.ts @@ -21,8 +21,8 @@ export type RemoveExtensionParams = WithOverrides<{ export const FN_SELECTOR = "0xee7d2adf" as const; const FN_INPUTS = [ { - name: "extensionName", type: "string", + name: "extensionName", }, ] as const; const FN_OUTPUTS = [] as const; @@ -120,23 +120,23 @@ export function removeExtension( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.extensionName] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/ABI.ts b/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/ABI.ts index 5343718a58f..bf73a866568 100644 --- a/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/ABI.ts +++ b/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/ABI.ts @@ -20,12 +20,12 @@ export type ABIParams = { export const FN_SELECTOR = "0x2203ab56" as const; const FN_INPUTS = [ { - name: "name", type: "bytes32", + name: "name", }, { - name: "contentTypes", type: "uint256", + name: "contentTypes", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/addr.ts b/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/addr.ts index 27820676373..83af7231f72 100644 --- a/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/addr.ts +++ b/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/addr.ts @@ -16,8 +16,8 @@ export type AddrParams = { export const FN_SELECTOR = "0x3b3b57de" as const; const FN_INPUTS = [ { - name: "name", type: "bytes32", + name: "name", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/contenthash.ts b/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/contenthash.ts index 9a1bd4f9e85..ebb71e668dd 100644 --- a/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/contenthash.ts +++ b/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/contenthash.ts @@ -16,8 +16,8 @@ export type ContenthashParams = { export const FN_SELECTOR = "0xbc1c58d1" as const; const FN_INPUTS = [ { - name: "name", type: "bytes32", + name: "name", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/name.ts b/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/name.ts index 7e785fe9ad3..2de03b0c45e 100644 --- a/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/name.ts +++ b/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/name.ts @@ -16,8 +16,8 @@ export type NameParams = { export const FN_SELECTOR = "0x691f3431" as const; const FN_INPUTS = [ { - name: "name", type: "bytes32", + name: "name", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/pubkey.ts b/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/pubkey.ts index 0173ffa5d1c..6ce678c089c 100644 --- a/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/pubkey.ts +++ b/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/pubkey.ts @@ -16,18 +16,18 @@ export type PubkeyParams = { export const FN_SELECTOR = "0xc8690233" as const; const FN_INPUTS = [ { - name: "name", type: "bytes32", + name: "name", }, ] as const; const FN_OUTPUTS = [ { - name: "x", type: "bytes32", + name: "x", }, { - name: "y", type: "bytes32", + name: "y", }, ] as const; diff --git a/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/text.ts b/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/text.ts index 8e7eae1f029..3faa66e172e 100644 --- a/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/text.ts +++ b/packages/thirdweb/src/extensions/ens/__generated__/AddressResolver/read/text.ts @@ -17,12 +17,12 @@ export type TextParams = { export const FN_SELECTOR = "0x59d1d43c" as const; const FN_INPUTS = [ { - name: "name", type: "bytes32", + name: "name", }, { - name: "key", type: "string", + name: "key", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/ens/__generated__/L2Resolver/read/name.ts b/packages/thirdweb/src/extensions/ens/__generated__/L2Resolver/read/name.ts index 20af79874cb..63713f86a03 100644 --- a/packages/thirdweb/src/extensions/ens/__generated__/L2Resolver/read/name.ts +++ b/packages/thirdweb/src/extensions/ens/__generated__/L2Resolver/read/name.ts @@ -16,8 +16,8 @@ export type NameParams = { export const FN_SELECTOR = "0x691f3431" as const; const FN_INPUTS = [ { - name: "node", type: "bytes32", + name: "node", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/ens/__generated__/UniversalResolver/read/resolve.ts b/packages/thirdweb/src/extensions/ens/__generated__/UniversalResolver/read/resolve.ts index 2c9bcbb9fcb..9695a690140 100644 --- a/packages/thirdweb/src/extensions/ens/__generated__/UniversalResolver/read/resolve.ts +++ b/packages/thirdweb/src/extensions/ens/__generated__/UniversalResolver/read/resolve.ts @@ -17,12 +17,12 @@ export type ResolveParams = { export const FN_SELECTOR = "0x9061b923" as const; const FN_INPUTS = [ { - name: "name", type: "bytes", + name: "name", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/ens/__generated__/UniversalResolver/read/reverse.ts b/packages/thirdweb/src/extensions/ens/__generated__/UniversalResolver/read/reverse.ts index f9e4de7d1a1..f84f14b8d2d 100644 --- a/packages/thirdweb/src/extensions/ens/__generated__/UniversalResolver/read/reverse.ts +++ b/packages/thirdweb/src/extensions/ens/__generated__/UniversalResolver/read/reverse.ts @@ -19,8 +19,8 @@ export type ReverseParams = { export const FN_SELECTOR = "0xec11c823" as const; const FN_INPUTS = [ { - name: "reverseName", type: "bytes", + name: "reverseName", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/BatchMintMetadata/read/getBatchIdAtIndex.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/BatchMintMetadata/read/getBatchIdAtIndex.ts index 91ed4f0c74d..813a7ef5345 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/BatchMintMetadata/read/getBatchIdAtIndex.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/BatchMintMetadata/read/getBatchIdAtIndex.ts @@ -16,8 +16,8 @@ export type GetBatchIdAtIndexParams = { export const FN_SELECTOR = "0x2419f51b" as const; const FN_INPUTS = [ { - name: "_index", type: "uint256", + name: "_index", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/read/verifyClaim.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/read/verifyClaim.ts index 32684a2ec82..b90d560ba70 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/read/verifyClaim.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/read/verifyClaim.ts @@ -37,56 +37,56 @@ export type VerifyClaimParams = { export const FN_SELECTOR = "0xea1def9c" as const; const FN_INPUTS = [ { - name: "_conditionId", type: "uint256", + name: "_conditionId", }, { - name: "_claimer", type: "address", + name: "_claimer", }, { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, { - name: "_quantity", type: "uint256", + name: "_quantity", }, { - name: "_currency", type: "address", + name: "_currency", }, { - name: "_pricePerToken", type: "uint256", + name: "_pricePerToken", }, { + type: "tuple", + name: "_allowlistProof", components: [ { - name: "proof", type: "bytes32[]", + name: "proof", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, ], - name: "_allowlistProof", - type: "tuple", }, ] as const; const FN_OUTPUTS = [ { - name: "isOverride", type: "bool", + name: "isOverride", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/freezeBatchBaseURI.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/freezeBatchBaseURI.ts index 534892538b5..fe5b329335e 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/freezeBatchBaseURI.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/freezeBatchBaseURI.ts @@ -18,8 +18,8 @@ export type FreezeBatchBaseURIParams = WithOverrides<{ export const FN_SELECTOR = "0xa07ced9e" as const; const FN_INPUTS = [ { - name: "_index", type: "uint256", + name: "_index", }, ] as const; const FN_OUTPUTS = [] as const; @@ -119,23 +119,23 @@ export function freezeBatchBaseURI( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.index] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/setMaxTotalSupply.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/setMaxTotalSupply.ts index c7f10409d0f..f14b243d535 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/setMaxTotalSupply.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/setMaxTotalSupply.ts @@ -22,12 +22,12 @@ export type SetMaxTotalSupplyParams = WithOverrides<{ export const FN_SELECTOR = "0x87198cf2" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, { - name: "_maxTotalSupply", type: "uint256", + name: "_maxTotalSupply", }, ] as const; const FN_OUTPUTS = [] as const; @@ -133,23 +133,23 @@ export function setMaxTotalSupply( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenId, resolvedOptions.maxTotalSupply] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/setSaleRecipientForToken.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/setSaleRecipientForToken.ts index fca39ad0b4b..81f578628a1 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/setSaleRecipientForToken.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/setSaleRecipientForToken.ts @@ -22,12 +22,12 @@ export type SetSaleRecipientForTokenParams = WithOverrides<{ export const FN_SELECTOR = "0x29c49b9b" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, { - name: "_saleRecipient", type: "address", + name: "_saleRecipient", }, ] as const; const FN_OUTPUTS = [] as const; @@ -137,23 +137,23 @@ export function setSaleRecipientForToken( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenId, resolvedOptions.saleRecipient] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/updateBatchBaseURI.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/updateBatchBaseURI.ts index cf52797da62..be277b363a4 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/updateBatchBaseURI.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/updateBatchBaseURI.ts @@ -19,12 +19,12 @@ export type UpdateBatchBaseURIParams = WithOverrides<{ export const FN_SELECTOR = "0xde903ddd" as const; const FN_INPUTS = [ { - name: "_index", type: "uint256", + name: "_index", }, { - name: "_uri", type: "string", + name: "_uri", }, ] as const; const FN_OUTPUTS = [] as const; @@ -127,23 +127,23 @@ export function updateBatchBaseURI( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.index, resolvedOptions.uri] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155/events/AirdropFailed.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155/events/AirdropFailed.ts index fdae53acdc8..14dd8c83769 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155/events/AirdropFailed.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155/events/AirdropFailed.ts @@ -46,8 +46,8 @@ export type AirdropFailedEventFilters = Partial<{ */ export function airdropFailedEvent(filters: AirdropFailedEventFilters = {}) { return prepareEvent({ - filters, signature: "event AirdropFailed(address indexed tokenAddress, address indexed tokenOwner, address indexed recipient, uint256 tokenId, uint256 amount)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155/write/airdropERC1155.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155/write/airdropERC1155.ts index 03a10e0d4e6..660ef2ad7d5 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155/write/airdropERC1155.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155/write/airdropERC1155.ts @@ -34,30 +34,30 @@ export type AirdropERC1155Params = WithOverrides<{ export const FN_SELECTOR = "0x41444690" as const; const FN_INPUTS = [ { - name: "tokenAddress", type: "address", + name: "tokenAddress", }, { - name: "tokenOwner", type: "address", + name: "tokenOwner", }, { + type: "tuple[]", + name: "contents", components: [ { - name: "recipient", type: "address", + name: "recipient", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "amount", type: "uint256", + name: "amount", }, ], - name: "contents", - type: "tuple[]", }, ] as const; const FN_OUTPUTS = [] as const; @@ -165,19 +165,8 @@ export function airdropERC1155( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -187,5 +176,16 @@ export function airdropERC1155( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155Claimable/events/TokensClaimed.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155Claimable/events/TokensClaimed.ts index a51a976cc27..959e9340680 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155Claimable/events/TokensClaimed.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155Claimable/events/TokensClaimed.ts @@ -46,8 +46,8 @@ export type TokensClaimedEventFilters = Partial<{ */ export function tokensClaimedEvent(filters: TokensClaimedEventFilters = {}) { return prepareEvent({ - filters, signature: "event TokensClaimed(address indexed claimer, address indexed receiver, uint256 indexed tokenId, uint256 quantityClaimed)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155Claimable/write/claim.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155Claimable/write/claim.ts index 6678253a7c9..9ec1ee4692a 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155Claimable/write/claim.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155Claimable/write/claim.ts @@ -25,24 +25,24 @@ export type ClaimParams = WithOverrides<{ export const FN_SELECTOR = "0x38524a10" as const; const FN_INPUTS = [ { - name: "receiver", type: "address", + name: "receiver", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "proofs", type: "bytes32[]", + name: "proofs", }, { - name: "proofMaxQuantityForWallet", type: "uint256", + name: "proofMaxQuantityForWallet", }, ] as const; const FN_OUTPUTS = [] as const; @@ -156,19 +156,8 @@ export function claim( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -180,5 +169,16 @@ export function claim( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IBurnableERC1155/write/burn.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IBurnableERC1155/write/burn.ts index 90310881fed..95abdf2729c 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IBurnableERC1155/write/burn.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IBurnableERC1155/write/burn.ts @@ -20,16 +20,16 @@ export type BurnParams = WithOverrides<{ export const FN_SELECTOR = "0xf5298aca" as const; const FN_INPUTS = [ { - name: "account", type: "address", + name: "account", }, { - name: "id", type: "uint256", + name: "id", }, { - name: "value", type: "uint256", + name: "value", }, ] as const; const FN_OUTPUTS = [] as const; @@ -135,19 +135,8 @@ export function burn( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -157,5 +146,16 @@ export function burn( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IBurnableERC1155/write/burnBatch.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IBurnableERC1155/write/burnBatch.ts index adf8783c218..32bc00e804b 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IBurnableERC1155/write/burnBatch.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IBurnableERC1155/write/burnBatch.ts @@ -20,16 +20,16 @@ export type BurnBatchParams = WithOverrides<{ export const FN_SELECTOR = "0x6b20c454" as const; const FN_INPUTS = [ { - name: "account", type: "address", + name: "account", }, { - name: "ids", type: "uint256[]", + name: "ids", }, { - name: "values", type: "uint256[]", + name: "values", }, ] as const; const FN_OUTPUTS = [] as const; @@ -137,19 +137,8 @@ export function burnBatch( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -159,5 +148,16 @@ export function burnBatch( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IClaimableERC1155/events/TokensClaimed.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IClaimableERC1155/events/TokensClaimed.ts index a51a976cc27..959e9340680 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IClaimableERC1155/events/TokensClaimed.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IClaimableERC1155/events/TokensClaimed.ts @@ -46,8 +46,8 @@ export type TokensClaimedEventFilters = Partial<{ */ export function tokensClaimedEvent(filters: TokensClaimedEventFilters = {}) { return prepareEvent({ - filters, signature: "event TokensClaimed(address indexed claimer, address indexed receiver, uint256 indexed tokenId, uint256 quantityClaimed)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IClaimableERC1155/read/verifyClaim.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IClaimableERC1155/read/verifyClaim.ts index 3a46dec6f77..8344ea32448 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IClaimableERC1155/read/verifyClaim.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IClaimableERC1155/read/verifyClaim.ts @@ -17,16 +17,16 @@ export type VerifyClaimParams = { export const FN_SELECTOR = "0x4bbb1abf" as const; const FN_INPUTS = [ { - name: "_claimer", type: "address", + name: "_claimer", }, { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, { - name: "_quantity", type: "uint256", + name: "_quantity", }, ] as const; const FN_OUTPUTS = [] as const; diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IClaimableERC1155/write/claim.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IClaimableERC1155/write/claim.ts index c1bdd3f62e5..644c3576dd3 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IClaimableERC1155/write/claim.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IClaimableERC1155/write/claim.ts @@ -20,16 +20,16 @@ export type ClaimParams = WithOverrides<{ export const FN_SELECTOR = "0x2bc43fd9" as const; const FN_INPUTS = [ { - name: "_receiver", type: "address", + name: "_receiver", }, { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, { - name: "_quantity", type: "uint256", + name: "_quantity", }, ] as const; const FN_OUTPUTS = [] as const; @@ -135,19 +135,8 @@ export function claim( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -157,5 +146,16 @@ export function claim( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/events/ClaimConditionsUpdated.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/events/ClaimConditionsUpdated.ts index 7a27f5af36d..ee38633afc3 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/events/ClaimConditionsUpdated.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/events/ClaimConditionsUpdated.ts @@ -36,8 +36,8 @@ export function claimConditionsUpdatedEvent( filters: ClaimConditionsUpdatedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event ClaimConditionsUpdated(uint256 indexed tokenId, (uint256 startTimestamp, uint256 maxClaimableSupply, uint256 supplyClaimed, uint256 quantityLimitPerWallet, bytes32 merkleRoot, uint256 pricePerToken, address currency, string metadata)[] claimConditions, bool resetEligibility)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/events/TokensClaimed.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/events/TokensClaimed.ts index 84638a2129a..02f82ec5124 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/events/TokensClaimed.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/events/TokensClaimed.ts @@ -46,8 +46,8 @@ export type TokensClaimedEventFilters = Partial<{ */ export function tokensClaimedEvent(filters: TokensClaimedEventFilters = {}) { return prepareEvent({ - filters, signature: "event TokensClaimed(uint256 indexed claimConditionIndex, address indexed claimer, address indexed receiver, uint256 tokenId, uint256 quantityClaimed)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/read/claimCondition.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/read/claimCondition.ts index 9c8220f9e29..deec1d69026 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/read/claimCondition.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/read/claimCondition.ts @@ -16,18 +16,18 @@ export type ClaimConditionParams = { export const FN_SELECTOR = "0xe9703d25" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, ] as const; const FN_OUTPUTS = [ { - name: "currentStartId", type: "uint256", + name: "currentStartId", }, { - name: "count", type: "uint256", + name: "count", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/read/getActiveClaimConditionId.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/read/getActiveClaimConditionId.ts index 3a1a57e210c..dcff83944d7 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/read/getActiveClaimConditionId.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/read/getActiveClaimConditionId.ts @@ -16,8 +16,8 @@ export type GetActiveClaimConditionIdParams = { export const FN_SELECTOR = "0x5ab063e8" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/read/getClaimConditionById.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/read/getClaimConditionById.ts index 829a3eae7c0..df3813b2551 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/read/getClaimConditionById.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/read/getClaimConditionById.ts @@ -20,52 +20,52 @@ export type GetClaimConditionByIdParams = { export const FN_SELECTOR = "0xd45b28d7" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, { - name: "_conditionId", type: "uint256", + name: "_conditionId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple", + name: "condition", components: [ { - name: "startTimestamp", type: "uint256", + name: "startTimestamp", }, { - name: "maxClaimableSupply", type: "uint256", + name: "maxClaimableSupply", }, { - name: "supplyClaimed", type: "uint256", + name: "supplyClaimed", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "merkleRoot", type: "bytes32", + name: "merkleRoot", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "metadata", type: "string", + name: "metadata", }, ], - name: "condition", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/write/claim.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/write/claim.ts index 68b510c857e..d00ef37b669 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/write/claim.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/write/claim.ts @@ -36,50 +36,50 @@ export type ClaimParams = WithOverrides<{ export const FN_SELECTOR = "0x57bc3d78" as const; const FN_INPUTS = [ { - name: "receiver", type: "address", + name: "receiver", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { + type: "tuple", + name: "allowlistProof", components: [ { - name: "proof", type: "bytes32[]", + name: "proof", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, ], - name: "allowlistProof", - type: "tuple", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [] as const; @@ -201,19 +201,8 @@ export function claim( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -227,5 +216,16 @@ export function claim( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/write/setClaimConditions.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/write/setClaimConditions.ts index ef17b4dacc7..8874dae7893 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/write/setClaimConditions.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/write/setClaimConditions.ts @@ -36,50 +36,50 @@ export type SetClaimConditionsParams = WithOverrides<{ export const FN_SELECTOR = "0x183718d1" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, { + type: "tuple[]", + name: "phases", components: [ { - name: "startTimestamp", type: "uint256", + name: "startTimestamp", }, { - name: "maxClaimableSupply", type: "uint256", + name: "maxClaimableSupply", }, { - name: "supplyClaimed", type: "uint256", + name: "supplyClaimed", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "merkleRoot", type: "bytes32", + name: "merkleRoot", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "metadata", type: "string", + name: "metadata", }, ], - name: "phases", - type: "tuple[]", }, { - name: "resetClaimEligibility", type: "bool", + name: "resetClaimEligibility", }, ] as const; const FN_OUTPUTS = [] as const; @@ -189,19 +189,8 @@ export function setClaimConditions( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -211,5 +200,16 @@ export function setClaimConditions( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/events/ClaimConditionUpdated.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/events/ClaimConditionUpdated.ts index a5e6a7e3072..298f234735b 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/events/ClaimConditionUpdated.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/events/ClaimConditionUpdated.ts @@ -36,8 +36,8 @@ export function claimConditionUpdatedEvent( filters: ClaimConditionUpdatedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event ClaimConditionUpdated(uint256 indexed tokenId, (uint256 startTimestamp, uint256 maxClaimableSupply, uint256 supplyClaimed, uint256 quantityLimitPerWallet, bytes32 merkleRoot, uint256 pricePerToken, address currency, string metadata) condition, bool resetEligibility)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/events/TokensClaimed.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/events/TokensClaimed.ts index a51a976cc27..959e9340680 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/events/TokensClaimed.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/events/TokensClaimed.ts @@ -46,8 +46,8 @@ export type TokensClaimedEventFilters = Partial<{ */ export function tokensClaimedEvent(filters: TokensClaimedEventFilters = {}) { return prepareEvent({ - filters, signature: "event TokensClaimed(address indexed claimer, address indexed receiver, uint256 indexed tokenId, uint256 quantityClaimed)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/read/claimCondition.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/read/claimCondition.ts index abbb7c6b067..36b144c74be 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/read/claimCondition.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/read/claimCondition.ts @@ -16,42 +16,42 @@ export type ClaimConditionParams = { export const FN_SELECTOR = "0xe9703d25" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [ { - name: "startTimestamp", type: "uint256", + name: "startTimestamp", }, { - name: "maxClaimableSupply", type: "uint256", + name: "maxClaimableSupply", }, { - name: "supplyClaimed", type: "uint256", + name: "supplyClaimed", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "merkleRoot", type: "bytes32", + name: "merkleRoot", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "metadata", type: "string", + name: "metadata", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/write/claim.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/write/claim.ts index 68b510c857e..d00ef37b669 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/write/claim.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/write/claim.ts @@ -36,50 +36,50 @@ export type ClaimParams = WithOverrides<{ export const FN_SELECTOR = "0x57bc3d78" as const; const FN_INPUTS = [ { - name: "receiver", type: "address", + name: "receiver", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { + type: "tuple", + name: "allowlistProof", components: [ { - name: "proof", type: "bytes32[]", + name: "proof", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, ], - name: "allowlistProof", - type: "tuple", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [] as const; @@ -201,19 +201,8 @@ export function claim( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -227,5 +216,16 @@ export function claim( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/write/setClaimConditions.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/write/setClaimConditions.ts index 3a872f85105..4b83811da0d 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/write/setClaimConditions.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IDropSinglePhase1155/write/setClaimConditions.ts @@ -36,50 +36,50 @@ export type SetClaimConditionsParams = WithOverrides<{ export const FN_SELECTOR = "0x8affb89f" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, { + type: "tuple", + name: "phase", components: [ { - name: "startTimestamp", type: "uint256", + name: "startTimestamp", }, { - name: "maxClaimableSupply", type: "uint256", + name: "maxClaimableSupply", }, { - name: "supplyClaimed", type: "uint256", + name: "supplyClaimed", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "merkleRoot", type: "bytes32", + name: "merkleRoot", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "metadata", type: "string", + name: "metadata", }, ], - name: "phase", - type: "tuple", }, { - name: "resetClaimEligibility", type: "bool", + name: "resetClaimEligibility", }, ] as const; const FN_OUTPUTS = [] as const; @@ -189,19 +189,8 @@ export function setClaimConditions( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -211,5 +200,16 @@ export function setClaimConditions( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/ApprovalForAll.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/ApprovalForAll.ts index 0812f02a604..b78452a80a4 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/ApprovalForAll.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/ApprovalForAll.ts @@ -40,8 +40,8 @@ export type ApprovalForAllEventFilters = Partial<{ */ export function approvalForAllEvent(filters: ApprovalForAllEventFilters = {}) { return prepareEvent({ - filters, signature: "event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/TransferBatch.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/TransferBatch.ts index 6bf4aef7795..fe5cb14013f 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/TransferBatch.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/TransferBatch.ts @@ -46,8 +46,8 @@ export type TransferBatchEventFilters = Partial<{ */ export function transferBatchEvent(filters: TransferBatchEventFilters = {}) { return prepareEvent({ - filters, signature: "event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] tokenIds, uint256[] _values)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/TransferSingle.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/TransferSingle.ts index fda95005b26..2f0cdab107a 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/TransferSingle.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/TransferSingle.ts @@ -46,8 +46,8 @@ export type TransferSingleEventFilters = Partial<{ */ export function transferSingleEvent(filters: TransferSingleEventFilters = {}) { return prepareEvent({ - filters, signature: "event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 tokenId, uint256 _value)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/URI.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/URI.ts index cc015d354d3..3888a8693f8 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/URI.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/URI.ts @@ -34,7 +34,7 @@ export type URIEventFilters = Partial<{ */ export function uRIEvent(filters: URIEventFilters = {}) { return prepareEvent({ - filters, signature: "event URI(string _value, uint256 indexed tokenId)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/balanceOf.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/balanceOf.ts index b38f6b85e23..a9de58c8de5 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/balanceOf.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/balanceOf.ts @@ -17,12 +17,12 @@ export type BalanceOfParams = { export const FN_SELECTOR = "0x00fdd58e" as const; const FN_INPUTS = [ { - name: "_owner", type: "address", + name: "_owner", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/balanceOfBatch.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/balanceOfBatch.ts index 6f321bad1cd..8929fab3b89 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/balanceOfBatch.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/balanceOfBatch.ts @@ -20,12 +20,12 @@ export type BalanceOfBatchParams = { export const FN_SELECTOR = "0x4e1273f4" as const; const FN_INPUTS = [ { - name: "_owners", type: "address[]", + name: "_owners", }, { - name: "tokenIds", type: "uint256[]", + name: "tokenIds", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/isApprovedForAll.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/isApprovedForAll.ts index 91fd045ab17..3a13e7d4011 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/isApprovedForAll.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/isApprovedForAll.ts @@ -17,12 +17,12 @@ export type IsApprovedForAllParams = { export const FN_SELECTOR = "0xe985e9c5" as const; const FN_INPUTS = [ { - name: "_owner", type: "address", + name: "_owner", }, { - name: "_operator", type: "address", + name: "_operator", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/totalSupply.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/totalSupply.ts index 349c73b8a2e..99962350074 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/totalSupply.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/totalSupply.ts @@ -16,8 +16,8 @@ export type TotalSupplyParams = { export const FN_SELECTOR = "0xbd85b039" as const; const FN_INPUTS = [ { - name: "id", type: "uint256", + name: "id", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/uri.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/uri.ts index f98a426d732..1d746a402a6 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/uri.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/uri.ts @@ -16,8 +16,8 @@ export type UriParams = { export const FN_SELECTOR = "0x0e89341c" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/safeBatchTransferFrom.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/safeBatchTransferFrom.ts index 94ddf0ac95b..21f4d03cbc7 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/safeBatchTransferFrom.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/safeBatchTransferFrom.ts @@ -25,24 +25,24 @@ export type SafeBatchTransferFromParams = WithOverrides<{ export const FN_SELECTOR = "0x2eb2c2d6" as const; const FN_INPUTS = [ { - name: "_from", type: "address", + name: "_from", }, { - name: "_to", type: "address", + name: "_to", }, { - name: "tokenIds", type: "uint256[]", + name: "tokenIds", }, { - name: "_values", type: "uint256[]", + name: "_values", }, { - name: "_data", type: "bytes", + name: "_data", }, ] as const; const FN_OUTPUTS = [] as const; @@ -162,19 +162,8 @@ export function safeBatchTransferFrom( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -186,5 +175,16 @@ export function safeBatchTransferFrom( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/safeTransferFrom.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/safeTransferFrom.ts index 9ee70134846..990d55e78c4 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/safeTransferFrom.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/safeTransferFrom.ts @@ -22,24 +22,24 @@ export type SafeTransferFromParams = WithOverrides<{ export const FN_SELECTOR = "0xf242432a" as const; const FN_INPUTS = [ { - name: "_from", type: "address", + name: "_from", }, { - name: "_to", type: "address", + name: "_to", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "_value", type: "uint256", + name: "_value", }, { - name: "_data", type: "bytes", + name: "_data", }, ] as const; const FN_OUTPUTS = [] as const; @@ -155,19 +155,8 @@ export function safeTransferFrom( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -179,5 +168,16 @@ export function safeTransferFrom( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/setApprovalForAll.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/setApprovalForAll.ts index 0d720b5aedb..540376e8822 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/setApprovalForAll.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/setApprovalForAll.ts @@ -19,12 +19,12 @@ export type SetApprovalForAllParams = WithOverrides<{ export const FN_SELECTOR = "0xa22cb465" as const; const FN_INPUTS = [ { - name: "_operator", type: "address", + name: "_operator", }, { - name: "_approved", type: "bool", + name: "_approved", }, ] as const; const FN_OUTPUTS = [] as const; @@ -127,23 +127,23 @@ export function setApprovalForAll( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.operator, resolvedOptions.approved] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Receiver/read/supportsInterface.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Receiver/read/supportsInterface.ts index 26d3510c06c..28cca2da663 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Receiver/read/supportsInterface.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Receiver/read/supportsInterface.ts @@ -19,8 +19,8 @@ export type SupportsInterfaceParams = { export const FN_SELECTOR = "0x01ffc9a7" as const; const FN_INPUTS = [ { - name: "interfaceId", type: "bytes4", + name: "interfaceId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Receiver/write/onERC1155BatchReceived.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Receiver/write/onERC1155BatchReceived.ts index eaedd907454..72454a87201 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Receiver/write/onERC1155BatchReceived.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Receiver/write/onERC1155BatchReceived.ts @@ -22,24 +22,24 @@ export type OnERC1155BatchReceivedParams = WithOverrides<{ export const FN_SELECTOR = "0xbc197c81" as const; const FN_INPUTS = [ { - name: "operator", type: "address", + name: "operator", }, { - name: "from", type: "address", + name: "from", }, { - name: "ids", type: "uint256[]", + name: "ids", }, { - name: "values", type: "uint256[]", + name: "values", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [ @@ -165,19 +165,8 @@ export function onERC1155BatchReceived( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -189,5 +178,16 @@ export function onERC1155BatchReceived( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Receiver/write/onERC1155Received.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Receiver/write/onERC1155Received.ts index d84c3bb6dbc..16eff631963 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Receiver/write/onERC1155Received.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Receiver/write/onERC1155Received.ts @@ -22,24 +22,24 @@ export type OnERC1155ReceivedParams = WithOverrides<{ export const FN_SELECTOR = "0xf23a6e61" as const; const FN_INPUTS = [ { - name: "operator", type: "address", + name: "operator", }, { - name: "from", type: "address", + name: "from", }, { - name: "id", type: "uint256", + name: "id", }, { - name: "value", type: "uint256", + name: "value", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [ @@ -161,19 +161,8 @@ export function onERC1155Received( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -185,5 +174,16 @@ export function onERC1155Received( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IEditionStake/write/depositRewardTokens.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IEditionStake/write/depositRewardTokens.ts index 79359b01906..a721d8b21df 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IEditionStake/write/depositRewardTokens.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IEditionStake/write/depositRewardTokens.ts @@ -18,8 +18,8 @@ export type DepositRewardTokensParams = WithOverrides<{ export const FN_SELECTOR = "0x16c621e0" as const; const FN_INPUTS = [ { - name: "_amount", type: "uint256", + name: "_amount", }, ] as const; const FN_OUTPUTS = [] as const; @@ -119,23 +119,23 @@ export function depositRewardTokens( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.amount] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IEditionStake/write/withdrawRewardTokens.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IEditionStake/write/withdrawRewardTokens.ts index 24930ac8e9e..f50c34dc977 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IEditionStake/write/withdrawRewardTokens.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IEditionStake/write/withdrawRewardTokens.ts @@ -18,8 +18,8 @@ export type WithdrawRewardTokensParams = WithOverrides<{ export const FN_SELECTOR = "0xcb43b2dd" as const; const FN_INPUTS = [ { - name: "_amount", type: "uint256", + name: "_amount", }, ] as const; const FN_OUTPUTS = [] as const; @@ -121,23 +121,23 @@ export function withdrawRewardTokens( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.amount] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/ILazyMint/events/TokensLazyMinted.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/ILazyMint/events/TokensLazyMinted.ts index b998658e49e..0b35913b5bb 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/ILazyMint/events/TokensLazyMinted.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/ILazyMint/events/TokensLazyMinted.ts @@ -36,8 +36,8 @@ export function tokensLazyMintedEvent( filters: TokensLazyMintedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event TokensLazyMinted(uint256 indexed startTokenId, uint256 endTokenId, string baseURI, bytes encryptedBaseURI)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/ILazyMint/write/lazyMint.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/ILazyMint/write/lazyMint.ts index 90f6de754f4..5326d8c783b 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/ILazyMint/write/lazyMint.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/ILazyMint/write/lazyMint.ts @@ -23,22 +23,22 @@ export type LazyMintParams = WithOverrides<{ export const FN_SELECTOR = "0xd37c353b" as const; const FN_INPUTS = [ { - name: "amount", type: "uint256", + name: "amount", }, { - name: "baseURIForTokens", type: "string", + name: "baseURIForTokens", }, { - name: "extraData", type: "bytes", + name: "extraData", }, ] as const; const FN_OUTPUTS = [ { - name: "batchId", type: "uint256", + name: "batchId", }, ] as const; @@ -143,19 +143,8 @@ export function lazyMint( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -165,5 +154,16 @@ export function lazyMint( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IMintableERC1155/events/TokensMinted.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IMintableERC1155/events/TokensMinted.ts index e86cc980365..1639017dea7 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IMintableERC1155/events/TokensMinted.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IMintableERC1155/events/TokensMinted.ts @@ -40,8 +40,8 @@ export type TokensMintedEventFilters = Partial<{ */ export function tokensMintedEvent(filters: TokensMintedEventFilters = {}) { return prepareEvent({ - filters, signature: "event TokensMinted(address indexed mintedTo, uint256 indexed tokenIdMinted, string uri, uint256 quantityMinted)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IMintableERC1155/write/mintTo.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IMintableERC1155/write/mintTo.ts index 84a299fbe0b..fa194b737b1 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IMintableERC1155/write/mintTo.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IMintableERC1155/write/mintTo.ts @@ -21,20 +21,20 @@ export type MintToParams = WithOverrides<{ export const FN_SELECTOR = "0xb03f4528" as const; const FN_INPUTS = [ { - name: "to", type: "address", + name: "to", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "uri", type: "string", + name: "uri", }, { - name: "amount", type: "uint256", + name: "amount", }, ] as const; const FN_OUTPUTS = [] as const; @@ -144,19 +144,8 @@ export function mintTo( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -167,5 +156,16 @@ export function mintTo( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/INFTMetadata/read/supportsInterface.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/INFTMetadata/read/supportsInterface.ts index 26d3510c06c..28cca2da663 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/INFTMetadata/read/supportsInterface.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/INFTMetadata/read/supportsInterface.ts @@ -19,8 +19,8 @@ export type SupportsInterfaceParams = { export const FN_SELECTOR = "0x01ffc9a7" as const; const FN_INPUTS = [ { - name: "interfaceId", type: "bytes4", + name: "interfaceId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/INFTMetadata/write/setTokenURI.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/INFTMetadata/write/setTokenURI.ts index 7bdae1392a5..ada2b7be565 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/INFTMetadata/write/setTokenURI.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/INFTMetadata/write/setTokenURI.ts @@ -19,12 +19,12 @@ export type SetTokenURIParams = WithOverrides<{ export const FN_SELECTOR = "0x162094c4" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, { - name: "_uri", type: "string", + name: "_uri", }, ] as const; const FN_OUTPUTS = [] as const; @@ -125,23 +125,23 @@ export function setTokenURI( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenId, resolvedOptions.uri] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/events/PackCreated.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/events/PackCreated.ts index 285247a806b..c6376f6f324 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/events/PackCreated.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/events/PackCreated.ts @@ -34,8 +34,8 @@ export type PackCreatedEventFilters = Partial<{ */ export function packCreatedEvent(filters: PackCreatedEventFilters = {}) { return prepareEvent({ - filters, signature: "event PackCreated(uint256 indexed packId, address recipient, uint256 totalPacksCreated)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/events/PackOpened.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/events/PackOpened.ts index f06d0783ba6..e1882226a08 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/events/PackOpened.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/events/PackOpened.ts @@ -40,8 +40,8 @@ export type PackOpenedEventFilters = Partial<{ */ export function packOpenedEvent(filters: PackOpenedEventFilters = {}) { return prepareEvent({ - filters, signature: "event PackOpened(uint256 indexed packId, address indexed opener, uint256 numOfPacksOpened, (address assetContract, uint8 tokenType, uint256 tokenId, uint256 totalAmount)[] rewardUnitsDistributed)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/events/PackUpdated.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/events/PackUpdated.ts index 2bac3df8ffe..5353551e981 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/events/PackUpdated.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/events/PackUpdated.ts @@ -34,8 +34,8 @@ export type PackUpdatedEventFilters = Partial<{ */ export function packUpdatedEvent(filters: PackUpdatedEventFilters = {}) { return prepareEvent({ - filters, signature: "event PackUpdated(uint256 indexed packId, address recipient, uint256 totalPacksCreated)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/write/createPack.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/write/createPack.ts index b76f966b0ff..d937bb002f9 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/write/createPack.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/write/createPack.ts @@ -44,56 +44,56 @@ export type CreatePackParams = WithOverrides<{ export const FN_SELECTOR = "0x092e6075" as const; const FN_INPUTS = [ { + type: "tuple[]", + name: "contents", components: [ { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "totalAmount", type: "uint256", + name: "totalAmount", }, ], - name: "contents", - type: "tuple[]", }, { - name: "numOfRewardUnits", type: "uint256[]", + name: "numOfRewardUnits", }, { - name: "packUri", type: "string", + name: "packUri", }, { - name: "openStartTimestamp", type: "uint128", + name: "openStartTimestamp", }, { - name: "amountDistributedPerOpen", type: "uint128", + name: "amountDistributedPerOpen", }, { - name: "recipient", type: "address", + name: "recipient", }, ] as const; const FN_OUTPUTS = [ { - name: "packId", type: "uint256", + name: "packId", }, { - name: "packTotalSupply", type: "uint256", + name: "packTotalSupply", }, ] as const; @@ -212,19 +212,8 @@ export function createPack( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -237,5 +226,16 @@ export function createPack( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/write/openPack.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/write/openPack.ts index e5ff179ee6c..ab20ae3048d 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/write/openPack.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/write/openPack.ts @@ -22,35 +22,35 @@ export type OpenPackParams = WithOverrides<{ export const FN_SELECTOR = "0x914e126a" as const; const FN_INPUTS = [ { - name: "packId", type: "uint256", + name: "packId", }, { - name: "amountToOpen", type: "uint256", + name: "amountToOpen", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple[]", components: [ { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "totalAmount", type: "uint256", + name: "totalAmount", }, ], - type: "tuple[]", }, ] as const; @@ -148,23 +148,23 @@ export function openPack( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.packId, resolvedOptions.amountToOpen] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/events/PackOpenRequested.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/events/PackOpenRequested.ts index d5bd6f7d865..877c44e06ab 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/events/PackOpenRequested.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/events/PackOpenRequested.ts @@ -42,8 +42,8 @@ export function packOpenRequestedEvent( filters: PackOpenRequestedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event PackOpenRequested(address indexed opener, uint256 indexed packId, uint256 amountToOpen, uint256 requestId)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/events/PackRandomnessFulfilled.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/events/PackRandomnessFulfilled.ts index dee10b5c0bb..de793650734 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/events/PackRandomnessFulfilled.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/events/PackRandomnessFulfilled.ts @@ -42,8 +42,8 @@ export function packRandomnessFulfilledEvent( filters: PackRandomnessFulfilledEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event PackRandomnessFulfilled(uint256 indexed packId, uint256 indexed requestId)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/read/canClaimRewards.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/read/canClaimRewards.ts index 7db5e93a362..95900c4c2c0 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/read/canClaimRewards.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/read/canClaimRewards.ts @@ -16,8 +16,8 @@ export type CanClaimRewardsParams = { export const FN_SELECTOR = "0xa9b47a66" as const; const FN_INPUTS = [ { - name: "_opener", type: "address", + name: "_opener", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/write/claimRewards.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/write/claimRewards.ts index 2c5c67dcc1d..4b53484ee6f 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/write/claimRewards.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/write/claimRewards.ts @@ -7,26 +7,26 @@ export const FN_SELECTOR = "0x372500ab" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "rewardUnits", components: [ { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "totalAmount", type: "uint256", + name: "totalAmount", }, ], - name: "rewardUnits", - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/write/openPackAndClaimRewards.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/write/openPackAndClaimRewards.ts index 53eef2b87f1..d9b0f36898b 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/write/openPackAndClaimRewards.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/write/openPackAndClaimRewards.ts @@ -26,16 +26,16 @@ export type OpenPackAndClaimRewardsParams = WithOverrides<{ export const FN_SELECTOR = "0xac296b3f" as const; const FN_INPUTS = [ { - name: "_packId", type: "uint256", + name: "_packId", }, { - name: "_amountToOpen", type: "uint256", + name: "_amountToOpen", }, { - name: "_callBackGasLimit", type: "uint32", + name: "_callBackGasLimit", }, ] as const; const FN_OUTPUTS = [ @@ -153,19 +153,8 @@ export function openPackAndClaimRewards( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -175,5 +164,16 @@ export function openPackAndClaimRewards( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/ISignatureMintERC1155/events/TokensMintedWithSignature.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/ISignatureMintERC1155/events/TokensMintedWithSignature.ts index fbe3d4fcabd..3a3d4ab049f 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/ISignatureMintERC1155/events/TokensMintedWithSignature.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/ISignatureMintERC1155/events/TokensMintedWithSignature.ts @@ -48,8 +48,8 @@ export function tokensMintedWithSignatureEvent( filters: TokensMintedWithSignatureEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event TokensMintedWithSignature(address indexed signer, address indexed mintedTo, uint256 indexed tokenIdMinted, (address to, address royaltyRecipient, uint256 royaltyBps, address primarySaleRecipient, uint256 tokenId, string uri, uint256 quantity, uint256 pricePerToken, address currency, uint128 validityStartTimestamp, uint128 validityEndTimestamp, bytes32 uid) mintRequest)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/ISignatureMintERC1155/read/verify.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/ISignatureMintERC1155/read/verify.ts index 7d9b75e617f..16cec785cf1 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/ISignatureMintERC1155/read/verify.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/ISignatureMintERC1155/read/verify.ts @@ -34,72 +34,72 @@ export type VerifyParams = { export const FN_SELECTOR = "0xb17cd86f" as const; const FN_INPUTS = [ { + type: "tuple", + name: "req", components: [ { - name: "to", type: "address", + name: "to", }, { - name: "royaltyRecipient", type: "address", + name: "royaltyRecipient", }, { - name: "royaltyBps", type: "uint256", + name: "royaltyBps", }, { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "uri", type: "string", + name: "uri", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "validityStartTimestamp", type: "uint128", + name: "validityStartTimestamp", }, { - name: "validityEndTimestamp", type: "uint128", + name: "validityEndTimestamp", }, { - name: "uid", type: "bytes32", + name: "uid", }, ], - name: "req", - type: "tuple", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [ { - name: "success", type: "bool", + name: "success", }, { - name: "signer", type: "address", + name: "signer", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/ISignatureMintERC1155/write/mintWithSignature.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/ISignatureMintERC1155/write/mintWithSignature.ts index 988aa78d23d..4906fe81e4b 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/ISignatureMintERC1155/write/mintWithSignature.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/ISignatureMintERC1155/write/mintWithSignature.ts @@ -36,62 +36,62 @@ export type MintWithSignatureParams = WithOverrides<{ export const FN_SELECTOR = "0x98a6e993" as const; const FN_INPUTS = [ { + type: "tuple", + name: "payload", components: [ { - name: "to", type: "address", + name: "to", }, { - name: "royaltyRecipient", type: "address", + name: "royaltyRecipient", }, { - name: "royaltyBps", type: "uint256", + name: "royaltyBps", }, { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "uri", type: "string", + name: "uri", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "validityStartTimestamp", type: "uint128", + name: "validityStartTimestamp", }, { - name: "validityEndTimestamp", type: "uint128", + name: "validityEndTimestamp", }, { - name: "uid", type: "bytes32", + name: "uid", }, ], - name: "payload", - type: "tuple", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [] as const; @@ -194,23 +194,23 @@ export function mintWithSignature( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.payload, resolvedOptions.signature] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/RewardsClaimed.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/RewardsClaimed.ts index 1a218d64ec6..1359ef370de 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/RewardsClaimed.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/RewardsClaimed.ts @@ -34,8 +34,8 @@ export type RewardsClaimedEventFilters = Partial<{ */ export function rewardsClaimedEvent(filters: RewardsClaimedEventFilters = {}) { return prepareEvent({ - filters, signature: "event RewardsClaimed(address indexed staker, uint256 rewardAmount)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/TokensStaked.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/TokensStaked.ts index 10b199d165b..91cac84cb8e 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/TokensStaked.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/TokensStaked.ts @@ -40,8 +40,8 @@ export type TokensStakedEventFilters = Partial<{ */ export function tokensStakedEvent(filters: TokensStakedEventFilters = {}) { return prepareEvent({ - filters, signature: "event TokensStaked(address indexed staker, uint256 indexed tokenId, uint256 amount)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/TokensWithdrawn.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/TokensWithdrawn.ts index dfe8e2c7093..ac580fa73c8 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/TokensWithdrawn.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/TokensWithdrawn.ts @@ -42,8 +42,8 @@ export function tokensWithdrawnEvent( filters: TokensWithdrawnEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event TokensWithdrawn(address indexed staker, uint256 indexed tokenId, uint256 amount)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/UpdatedRewardsPerUnitTime.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/UpdatedRewardsPerUnitTime.ts index ef17c6bf886..17da59ab8da 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/UpdatedRewardsPerUnitTime.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/UpdatedRewardsPerUnitTime.ts @@ -36,8 +36,8 @@ export function updatedRewardsPerUnitTimeEvent( filters: UpdatedRewardsPerUnitTimeEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event UpdatedRewardsPerUnitTime(uint256 indexed _tokenId, uint256 oldRewardsPerUnitTime, uint256 newRewardsPerUnitTime)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/UpdatedTimeUnit.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/UpdatedTimeUnit.ts index df51fd0eff5..036d3d395a8 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/UpdatedTimeUnit.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/events/UpdatedTimeUnit.ts @@ -36,8 +36,8 @@ export function updatedTimeUnitEvent( filters: UpdatedTimeUnitEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event UpdatedTimeUnit(uint256 indexed _tokenId, uint256 oldTimeUnit, uint256 newTimeUnit)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/read/getStakeInfo.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/read/getStakeInfo.ts index f8e34b3afa6..c94902fa163 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/read/getStakeInfo.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/read/getStakeInfo.ts @@ -16,22 +16,22 @@ export type GetStakeInfoParams = { export const FN_SELECTOR = "0xc3453153" as const; const FN_INPUTS = [ { - name: "staker", type: "address", + name: "staker", }, ] as const; const FN_OUTPUTS = [ { - name: "_tokensStaked", type: "uint256[]", + name: "_tokensStaked", }, { - name: "_tokenAmounts", type: "uint256[]", + name: "_tokenAmounts", }, { - name: "_totalRewards", type: "uint256", + name: "_totalRewards", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/read/getStakeInfoForToken.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/read/getStakeInfoForToken.ts index 9f1ebcdddc3..dc4bb9a4ae9 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/read/getStakeInfoForToken.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/read/getStakeInfoForToken.ts @@ -17,22 +17,22 @@ export type GetStakeInfoForTokenParams = { export const FN_SELECTOR = "0x168fb5c5" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "staker", type: "address", + name: "staker", }, ] as const; const FN_OUTPUTS = [ { - name: "_tokensStaked", type: "uint256", + name: "_tokensStaked", }, { - name: "_rewards", type: "uint256", + name: "_rewards", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/write/claimRewards.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/write/claimRewards.ts index 7a85cb7c3cb..b8423f58cae 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/write/claimRewards.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/write/claimRewards.ts @@ -18,8 +18,8 @@ export type ClaimRewardsParams = WithOverrides<{ export const FN_SELECTOR = "0x0962ef79" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [] as const; @@ -117,23 +117,23 @@ export function claimRewards( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenId] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/write/stake.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/write/stake.ts index e33708310d0..15711543ef4 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/write/stake.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/write/stake.ts @@ -19,12 +19,12 @@ export type StakeParams = WithOverrides<{ export const FN_SELECTOR = "0x952e68cf" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "amount", type: "uint64", + name: "amount", }, ] as const; const FN_OUTPUTS = [] as const; @@ -123,23 +123,23 @@ export function stake( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenId, resolvedOptions.amount] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/write/withdraw.ts b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/write/withdraw.ts index 564158e54ed..fc36cb2fea8 100644 --- a/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/write/withdraw.ts +++ b/packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/write/withdraw.ts @@ -19,12 +19,12 @@ export type WithdrawParams = WithOverrides<{ export const FN_SELECTOR = "0xc434dcfe" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "amount", type: "uint64", + name: "amount", }, ] as const; const FN_OUTPUTS = [] as const; @@ -123,23 +123,23 @@ export function withdraw( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenId, resolvedOptions.amount] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc1271/__generated__/isValidSignature/read/isValidSignature.ts b/packages/thirdweb/src/extensions/erc1271/__generated__/isValidSignature/read/isValidSignature.ts index cfc9abc6131..41c64799da0 100644 --- a/packages/thirdweb/src/extensions/erc1271/__generated__/isValidSignature/read/isValidSignature.ts +++ b/packages/thirdweb/src/extensions/erc1271/__generated__/isValidSignature/read/isValidSignature.ts @@ -17,12 +17,12 @@ export type IsValidSignatureParams = { export const FN_SELECTOR = "0x1626ba7e" as const; const FN_INPUTS = [ { - name: "hash", type: "bytes32", + name: "hash", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc165/__generated__/IERC165/read/supportsInterface.ts b/packages/thirdweb/src/extensions/erc165/__generated__/IERC165/read/supportsInterface.ts index 15c9f31dc9b..bcf99543c0f 100644 --- a/packages/thirdweb/src/extensions/erc165/__generated__/IERC165/read/supportsInterface.ts +++ b/packages/thirdweb/src/extensions/erc165/__generated__/IERC165/read/supportsInterface.ts @@ -19,8 +19,8 @@ export type SupportsInterfaceParams = { export const FN_SELECTOR = "0x01ffc9a7" as const; const FN_INPUTS = [ { - name: "interfaceId", type: "bytes4", + name: "interfaceId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/DropERC20/read/verifyClaim.ts b/packages/thirdweb/src/extensions/erc20/__generated__/DropERC20/read/verifyClaim.ts index 22b945be9c4..05b834d34c8 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/DropERC20/read/verifyClaim.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/DropERC20/read/verifyClaim.ts @@ -36,52 +36,52 @@ export type VerifyClaimParams = { export const FN_SELECTOR = "0x23a2902b" as const; const FN_INPUTS = [ { - name: "_conditionId", type: "uint256", + name: "_conditionId", }, { - name: "_claimer", type: "address", + name: "_claimer", }, { - name: "_quantity", type: "uint256", + name: "_quantity", }, { - name: "_currency", type: "address", + name: "_currency", }, { - name: "_pricePerToken", type: "uint256", + name: "_pricePerToken", }, { + type: "tuple", + name: "_allowlistProof", components: [ { - name: "proof", type: "bytes32[]", + name: "proof", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, ], - name: "_allowlistProof", - type: "tuple", }, ] as const; const FN_OUTPUTS = [ { - name: "isOverride", type: "bool", + name: "isOverride", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20/events/AirdropFailed.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20/events/AirdropFailed.ts index b84ff753d85..06d69c5ff16 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20/events/AirdropFailed.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20/events/AirdropFailed.ts @@ -46,8 +46,8 @@ export type AirdropFailedEventFilters = Partial<{ */ export function airdropFailedEvent(filters: AirdropFailedEventFilters = {}) { return prepareEvent({ - filters, signature: "event AirdropFailed(address indexed tokenAddress, address indexed tokenOwner, address indexed recipient, uint256 amount)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20/write/airdropERC20.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20/write/airdropERC20.ts index 78ffaebbb8c..fe3bb8cc142 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20/write/airdropERC20.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20/write/airdropERC20.ts @@ -33,26 +33,26 @@ export type AirdropERC20Params = WithOverrides<{ export const FN_SELECTOR = "0x0670b2b3" as const; const FN_INPUTS = [ { - name: "tokenAddress", type: "address", + name: "tokenAddress", }, { - name: "tokenOwner", type: "address", + name: "tokenOwner", }, { + type: "tuple[]", + name: "contents", components: [ { - name: "recipient", type: "address", + name: "recipient", }, { - name: "amount", type: "uint256", + name: "amount", }, ], - name: "contents", - type: "tuple[]", }, ] as const; const FN_OUTPUTS = [] as const; @@ -160,19 +160,8 @@ export function airdropERC20( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -182,5 +171,16 @@ export function airdropERC20( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20Claimable/events/TokensClaimed.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20Claimable/events/TokensClaimed.ts index 051402a467d..e79f0240b1e 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20Claimable/events/TokensClaimed.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20Claimable/events/TokensClaimed.ts @@ -40,8 +40,8 @@ export type TokensClaimedEventFilters = Partial<{ */ export function tokensClaimedEvent(filters: TokensClaimedEventFilters = {}) { return prepareEvent({ - filters, signature: "event TokensClaimed(address indexed claimer, address indexed receiver, uint256 quantityClaimed)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20Claimable/write/claim.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20Claimable/write/claim.ts index ede95cd288e..1b5c24e72ab 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20Claimable/write/claim.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20Claimable/write/claim.ts @@ -24,20 +24,20 @@ export type ClaimParams = WithOverrides<{ export const FN_SELECTOR = "0x3b4b57b0" as const; const FN_INPUTS = [ { - name: "receiver", type: "address", + name: "receiver", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "proofs", type: "bytes32[]", + name: "proofs", }, { - name: "proofMaxQuantityForWallet", type: "uint256", + name: "proofMaxQuantityForWallet", }, ] as const; const FN_OUTPUTS = [] as const; @@ -147,19 +147,8 @@ export function claim( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -170,5 +159,16 @@ export function claim( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IBurnableERC20/write/burn.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IBurnableERC20/write/burn.ts index 023c029e5a1..02facd11679 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IBurnableERC20/write/burn.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IBurnableERC20/write/burn.ts @@ -18,8 +18,8 @@ export type BurnParams = WithOverrides<{ export const FN_SELECTOR = "0x42966c68" as const; const FN_INPUTS = [ { - name: "amount", type: "uint256", + name: "amount", }, ] as const; const FN_OUTPUTS = [] as const; @@ -115,23 +115,23 @@ export function burn( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.amount] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IBurnableERC20/write/burnFrom.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IBurnableERC20/write/burnFrom.ts index bdf88fcc32f..15628bef1f9 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IBurnableERC20/write/burnFrom.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IBurnableERC20/write/burnFrom.ts @@ -19,12 +19,12 @@ export type BurnFromParams = WithOverrides<{ export const FN_SELECTOR = "0x79cc6790" as const; const FN_INPUTS = [ { - name: "account", type: "address", + name: "account", }, { - name: "amount", type: "uint256", + name: "amount", }, ] as const; const FN_OUTPUTS = [] as const; @@ -123,23 +123,23 @@ export function burnFrom( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.account, resolvedOptions.amount] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/events/TokensClaimed.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/events/TokensClaimed.ts index 82f026e2b60..03b681a438e 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/events/TokensClaimed.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/events/TokensClaimed.ts @@ -46,8 +46,8 @@ export type TokensClaimedEventFilters = Partial<{ */ export function tokensClaimedEvent(filters: TokensClaimedEventFilters = {}) { return prepareEvent({ - filters, signature: "event TokensClaimed(uint256 indexed claimConditionIndex, address indexed claimer, address indexed receiver, uint256 quantityClaimed)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/read/claimCondition.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/read/claimCondition.ts index 76f6e75d5cc..f2bb82075e1 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/read/claimCondition.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/read/claimCondition.ts @@ -8,12 +8,12 @@ export const FN_SELECTOR = "0xd637ed59" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "currentStartId", type: "uint256", + name: "currentStartId", }, { - name: "count", type: "uint256", + name: "count", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/read/getClaimConditionById.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/read/getClaimConditionById.ts index 2230db5b8b9..66dc374e9ff 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/read/getClaimConditionById.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/read/getClaimConditionById.ts @@ -19,48 +19,48 @@ export type GetClaimConditionByIdParams = { export const FN_SELECTOR = "0x6f8934f4" as const; const FN_INPUTS = [ { - name: "_conditionId", type: "uint256", + name: "_conditionId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple", + name: "condition", components: [ { - name: "startTimestamp", type: "uint256", + name: "startTimestamp", }, { - name: "maxClaimableSupply", type: "uint256", + name: "maxClaimableSupply", }, { - name: "supplyClaimed", type: "uint256", + name: "supplyClaimed", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "merkleRoot", type: "bytes32", + name: "merkleRoot", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "metadata", type: "string", + name: "metadata", }, ], - name: "condition", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/write/claim.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/write/claim.ts index 0a71bc9edcb..502154ae933 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/write/claim.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/write/claim.ts @@ -35,46 +35,46 @@ export type ClaimParams = WithOverrides<{ export const FN_SELECTOR = "0x84bb1e42" as const; const FN_INPUTS = [ { - name: "receiver", type: "address", + name: "receiver", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { + type: "tuple", + name: "allowlistProof", components: [ { - name: "proof", type: "bytes32[]", + name: "proof", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, ], - name: "allowlistProof", - type: "tuple", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [] as const; @@ -192,19 +192,8 @@ export function claim( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -217,5 +206,16 @@ export function claim( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/write/setClaimConditions.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/write/setClaimConditions.ts index 1409455f1aa..62a00d474bf 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/write/setClaimConditions.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/write/setClaimConditions.ts @@ -35,46 +35,46 @@ export type SetClaimConditionsParams = WithOverrides<{ export const FN_SELECTOR = "0x74bc7db7" as const; const FN_INPUTS = [ { + type: "tuple[]", + name: "phases", components: [ { - name: "startTimestamp", type: "uint256", + name: "startTimestamp", }, { - name: "maxClaimableSupply", type: "uint256", + name: "maxClaimableSupply", }, { - name: "supplyClaimed", type: "uint256", + name: "supplyClaimed", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "merkleRoot", type: "bytes32", + name: "merkleRoot", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "metadata", type: "string", + name: "metadata", }, ], - name: "phases", - type: "tuple[]", }, { - name: "resetClaimEligibility", type: "bool", + name: "resetClaimEligibility", }, ] as const; const FN_OUTPUTS = [] as const; @@ -180,19 +180,8 @@ export function setClaimConditions( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -201,5 +190,16 @@ export function setClaimConditions( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/events/Approval.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/events/Approval.ts index 5f51e60e237..8057c658b1e 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/events/Approval.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/events/Approval.ts @@ -40,8 +40,8 @@ export type ApprovalEventFilters = Partial<{ */ export function approvalEvent(filters: ApprovalEventFilters = {}) { return prepareEvent({ - filters, signature: "event Approval(address indexed owner, address indexed spender, uint256 value)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/events/Transfer.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/events/Transfer.ts index ca3bdadb5e5..c52084bf3e2 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/events/Transfer.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/events/Transfer.ts @@ -40,8 +40,8 @@ export type TransferEventFilters = Partial<{ */ export function transferEvent(filters: TransferEventFilters = {}) { return prepareEvent({ - filters, signature: "event Transfer(address indexed from, address indexed to, uint256 value)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/read/allowance.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/read/allowance.ts index 64452c82fa1..a301bde7d16 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/read/allowance.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/read/allowance.ts @@ -17,12 +17,12 @@ export type AllowanceParams = { export const FN_SELECTOR = "0xdd62ed3e" as const; const FN_INPUTS = [ { - name: "owner", type: "address", + name: "owner", }, { - name: "spender", type: "address", + name: "spender", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/read/balanceOf.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/read/balanceOf.ts index 4a5e362ea45..28fc473b542 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/read/balanceOf.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/read/balanceOf.ts @@ -16,8 +16,8 @@ export type BalanceOfParams = { export const FN_SELECTOR = "0x70a08231" as const; const FN_INPUTS = [ { - name: "_address", type: "address", + name: "_address", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/write/approve.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/write/approve.ts index 1e297ba3bdf..05f8b87f866 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/write/approve.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/write/approve.ts @@ -19,12 +19,12 @@ export type ApproveParams = WithOverrides<{ export const FN_SELECTOR = "0x095ea7b3" as const; const FN_INPUTS = [ { - name: "spender", type: "address", + name: "spender", }, { - name: "value", type: "uint256", + name: "value", }, ] as const; const FN_OUTPUTS = [ @@ -127,23 +127,23 @@ export function approve( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.spender, resolvedOptions.value] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/write/transfer.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/write/transfer.ts index 409dcfe395b..f9e725775a4 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/write/transfer.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/write/transfer.ts @@ -19,12 +19,12 @@ export type TransferParams = WithOverrides<{ export const FN_SELECTOR = "0xa9059cbb" as const; const FN_INPUTS = [ { - name: "to", type: "address", + name: "to", }, { - name: "value", type: "uint256", + name: "value", }, ] as const; const FN_OUTPUTS = [ @@ -127,23 +127,23 @@ export function transfer( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.to, resolvedOptions.value] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/write/transferFrom.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/write/transferFrom.ts index a1283faf7e1..8f1a555dafe 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/write/transferFrom.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/write/transferFrom.ts @@ -20,16 +20,16 @@ export type TransferFromParams = WithOverrides<{ export const FN_SELECTOR = "0x23b872dd" as const; const FN_INPUTS = [ { - name: "from", type: "address", + name: "from", }, { - name: "to", type: "address", + name: "to", }, { - name: "value", type: "uint256", + name: "value", }, ] as const; const FN_OUTPUTS = [ @@ -141,19 +141,8 @@ export function transferFrom( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -163,5 +152,16 @@ export function transferFrom( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IERC20Permit/read/nonces.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IERC20Permit/read/nonces.ts index 62a9e4df4ca..a5729c91c33 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IERC20Permit/read/nonces.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IERC20Permit/read/nonces.ts @@ -16,8 +16,8 @@ export type NoncesParams = { export const FN_SELECTOR = "0x7ecebe00" as const; const FN_INPUTS = [ { - name: "owner", type: "address", + name: "owner", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IERC20Permit/write/permit.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IERC20Permit/write/permit.ts index 67ffe7a6329..a7374999c2f 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IERC20Permit/write/permit.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IERC20Permit/write/permit.ts @@ -24,32 +24,32 @@ export type PermitParams = WithOverrides<{ export const FN_SELECTOR = "0xd505accf" as const; const FN_INPUTS = [ { - name: "owner", type: "address", + name: "owner", }, { - name: "spender", type: "address", + name: "spender", }, { - name: "value", type: "uint256", + name: "value", }, { - name: "deadline", type: "uint256", + name: "deadline", }, { - name: "v", type: "uint8", + name: "v", }, { - name: "r", type: "bytes32", + name: "r", }, { - name: "s", type: "bytes32", + name: "s", }, ] as const; const FN_OUTPUTS = [] as const; @@ -171,19 +171,8 @@ export function permit( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -197,5 +186,16 @@ export function permit( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IMintableERC20/events/TokensMinted.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IMintableERC20/events/TokensMinted.ts index b1453037bfc..03ecfce9d0f 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IMintableERC20/events/TokensMinted.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IMintableERC20/events/TokensMinted.ts @@ -34,8 +34,8 @@ export type TokensMintedEventFilters = Partial<{ */ export function tokensMintedEvent(filters: TokensMintedEventFilters = {}) { return prepareEvent({ - filters, signature: "event TokensMinted(address indexed mintedTo, uint256 quantityMinted)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IMintableERC20/write/mintTo.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IMintableERC20/write/mintTo.ts index b975e1f1ded..f0b38100c6b 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IMintableERC20/write/mintTo.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IMintableERC20/write/mintTo.ts @@ -19,12 +19,12 @@ export type MintToParams = WithOverrides<{ export const FN_SELECTOR = "0x449a52f8" as const; const FN_INPUTS = [ { - name: "to", type: "address", + name: "to", }, { - name: "amount", type: "uint256", + name: "amount", }, ] as const; const FN_OUTPUTS = [] as const; @@ -123,23 +123,23 @@ export function mintTo( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.to, resolvedOptions.amount] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/ISignatureMintERC20/events/TokensMintedWithSignature.ts b/packages/thirdweb/src/extensions/erc20/__generated__/ISignatureMintERC20/events/TokensMintedWithSignature.ts index 77164157de7..167e6b98602 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/ISignatureMintERC20/events/TokensMintedWithSignature.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/ISignatureMintERC20/events/TokensMintedWithSignature.ts @@ -42,8 +42,8 @@ export function tokensMintedWithSignatureEvent( filters: TokensMintedWithSignatureEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event TokensMintedWithSignature(address indexed signer, address indexed mintedTo, (address to, address primarySaleRecipient, uint256 quantity, uint256 price, address currency, uint128 validityStartTimestamp, uint128 validityEndTimestamp, bytes32 uid) mintRequest)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/ISignatureMintERC20/read/verify.ts b/packages/thirdweb/src/extensions/erc20/__generated__/ISignatureMintERC20/read/verify.ts index bf47fbaaf53..b252d8b1851 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/ISignatureMintERC20/read/verify.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/ISignatureMintERC20/read/verify.ts @@ -30,56 +30,56 @@ export type VerifyParams = { export const FN_SELECTOR = "0xc1b606e2" as const; const FN_INPUTS = [ { + type: "tuple", + name: "req", components: [ { - name: "to", type: "address", + name: "to", }, { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "price", type: "uint256", + name: "price", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "validityStartTimestamp", type: "uint128", + name: "validityStartTimestamp", }, { - name: "validityEndTimestamp", type: "uint128", + name: "validityEndTimestamp", }, { - name: "uid", type: "bytes32", + name: "uid", }, ], - name: "req", - type: "tuple", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [ { - name: "success", type: "bool", + name: "success", }, { - name: "signer", type: "address", + name: "signer", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/ISignatureMintERC20/write/mintWithSignature.ts b/packages/thirdweb/src/extensions/erc20/__generated__/ISignatureMintERC20/write/mintWithSignature.ts index 1fd20177ab2..b239f00a27d 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/ISignatureMintERC20/write/mintWithSignature.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/ISignatureMintERC20/write/mintWithSignature.ts @@ -32,46 +32,46 @@ export type MintWithSignatureParams = WithOverrides<{ export const FN_SELECTOR = "0x8f0fefbb" as const; const FN_INPUTS = [ { + type: "tuple", + name: "payload", components: [ { - name: "to", type: "address", + name: "to", }, { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "price", type: "uint256", + name: "price", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "validityStartTimestamp", type: "uint128", + name: "validityStartTimestamp", }, { - name: "validityEndTimestamp", type: "uint128", + name: "validityEndTimestamp", }, { - name: "uid", type: "bytes32", + name: "uid", }, ], - name: "payload", - type: "tuple", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [] as const; @@ -174,23 +174,23 @@ export function mintWithSignature( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.payload, resolvedOptions.signature] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/events/RewardsClaimed.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/events/RewardsClaimed.ts index 969fd654e5c..51fc2b438ba 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/events/RewardsClaimed.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/events/RewardsClaimed.ts @@ -34,8 +34,8 @@ export type RewardsClaimedEventFilters = Partial<{ */ export function rewardsClaimedEvent(filters: RewardsClaimedEventFilters = {}) { return prepareEvent({ - filters, signature: "event RewardsClaimed(address indexed staker, uint256 rewardAmount)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/events/TokensStaked.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/events/TokensStaked.ts index 583547e8918..7462592d148 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/events/TokensStaked.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/events/TokensStaked.ts @@ -34,7 +34,7 @@ export type TokensStakedEventFilters = Partial<{ */ export function tokensStakedEvent(filters: TokensStakedEventFilters = {}) { return prepareEvent({ - filters, signature: "event TokensStaked(address indexed staker, uint256 amount)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/events/TokensWithdrawn.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/events/TokensWithdrawn.ts index 53b02e8bc67..2ac66e20af2 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/events/TokensWithdrawn.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/events/TokensWithdrawn.ts @@ -36,7 +36,7 @@ export function tokensWithdrawnEvent( filters: TokensWithdrawnEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event TokensWithdrawn(address indexed staker, uint256 amount)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/read/getStakeInfo.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/read/getStakeInfo.ts index 4ec3e9363f7..ac575a71b1e 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/read/getStakeInfo.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/read/getStakeInfo.ts @@ -16,18 +16,18 @@ export type GetStakeInfoParams = { export const FN_SELECTOR = "0xc3453153" as const; const FN_INPUTS = [ { - name: "staker", type: "address", + name: "staker", }, ] as const; const FN_OUTPUTS = [ { - name: "_tokensStaked", type: "uint256", + name: "_tokensStaked", }, { - name: "_rewards", type: "uint256", + name: "_rewards", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/write/stake.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/write/stake.ts index e3480d1c5df..a102e7e40db 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/write/stake.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/write/stake.ts @@ -18,8 +18,8 @@ export type StakeParams = WithOverrides<{ export const FN_SELECTOR = "0xa694fc3a" as const; const FN_INPUTS = [ { - name: "amount", type: "uint256", + name: "amount", }, ] as const; const FN_OUTPUTS = [] as const; @@ -115,23 +115,23 @@ export function stake( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.amount] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/write/withdraw.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/write/withdraw.ts index 4b2e17a7852..e351237d2eb 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/write/withdraw.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IStaking20/write/withdraw.ts @@ -18,8 +18,8 @@ export type WithdrawParams = WithOverrides<{ export const FN_SELECTOR = "0x2e1a7d4d" as const; const FN_INPUTS = [ { - name: "amount", type: "uint256", + name: "amount", }, ] as const; const FN_OUTPUTS = [] as const; @@ -115,23 +115,23 @@ export function withdraw( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.amount] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/ITokenStake/write/depositRewardTokens.ts b/packages/thirdweb/src/extensions/erc20/__generated__/ITokenStake/write/depositRewardTokens.ts index 4f9d27bd8b6..8b3baff39b1 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/ITokenStake/write/depositRewardTokens.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/ITokenStake/write/depositRewardTokens.ts @@ -18,8 +18,8 @@ export type DepositRewardTokensParams = WithOverrides<{ export const FN_SELECTOR = "0x16c621e0" as const; const FN_INPUTS = [ { - name: "_amount", type: "uint256", + name: "_amount", }, ] as const; const FN_OUTPUTS = [] as const; @@ -119,23 +119,23 @@ export function depositRewardTokens( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.amount] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/ITokenStake/write/withdrawRewardTokens.ts b/packages/thirdweb/src/extensions/erc20/__generated__/ITokenStake/write/withdrawRewardTokens.ts index 20eac341e3f..b685e6934d6 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/ITokenStake/write/withdrawRewardTokens.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/ITokenStake/write/withdrawRewardTokens.ts @@ -18,8 +18,8 @@ export type WithdrawRewardTokensParams = WithOverrides<{ export const FN_SELECTOR = "0xcb43b2dd" as const; const FN_INPUTS = [ { - name: "_amount", type: "uint256", + name: "_amount", }, ] as const; const FN_OUTPUTS = [] as const; @@ -121,23 +121,23 @@ export function withdrawRewardTokens( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.amount] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/events/DelegateChanged.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/events/DelegateChanged.ts index c3acecb27ce..8d2d1ad0f4f 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/events/DelegateChanged.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/events/DelegateChanged.ts @@ -48,8 +48,8 @@ export function delegateChangedEvent( filters: DelegateChangedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/events/DelegateVotesChanged.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/events/DelegateVotesChanged.ts index 2edeed797af..679716ea9ea 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/events/DelegateVotesChanged.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/events/DelegateVotesChanged.ts @@ -36,8 +36,8 @@ export function delegateVotesChangedEvent( filters: DelegateVotesChangedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/read/delegates.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/read/delegates.ts index ea655ae1b0c..08ea92ba0b3 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/read/delegates.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/read/delegates.ts @@ -16,8 +16,8 @@ export type DelegatesParams = { export const FN_SELECTOR = "0x587cde1e" as const; const FN_INPUTS = [ { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/read/getPastTotalSupply.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/read/getPastTotalSupply.ts index 7d1d44e1552..7a9fef8ca2a 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/read/getPastTotalSupply.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/read/getPastTotalSupply.ts @@ -19,8 +19,8 @@ export type GetPastTotalSupplyParams = { export const FN_SELECTOR = "0x8e539e8c" as const; const FN_INPUTS = [ { - name: "blockNumber", type: "uint256", + name: "blockNumber", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/read/getPastVotes.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/read/getPastVotes.ts index 2c200dbfc9f..efa3696035e 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/read/getPastVotes.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/read/getPastVotes.ts @@ -20,12 +20,12 @@ export type GetPastVotesParams = { export const FN_SELECTOR = "0x3a46b1a8" as const; const FN_INPUTS = [ { - name: "account", type: "address", + name: "account", }, { - name: "blockNumber", type: "uint256", + name: "blockNumber", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/read/getVotes.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/read/getVotes.ts index 4e8e527637e..9f60ad99262 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/read/getVotes.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/read/getVotes.ts @@ -16,8 +16,8 @@ export type GetVotesParams = { export const FN_SELECTOR = "0x9ab24eb0" as const; const FN_INPUTS = [ { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/write/delegate.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/write/delegate.ts index 21bbcf173b3..8c871e9055c 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/write/delegate.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/write/delegate.ts @@ -21,8 +21,8 @@ export type DelegateParams = WithOverrides<{ export const FN_SELECTOR = "0x5c19a95c" as const; const FN_INPUTS = [ { - name: "delegatee", type: "address", + name: "delegatee", }, ] as const; const FN_OUTPUTS = [] as const; @@ -118,23 +118,23 @@ export function delegate( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.delegatee] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/write/delegateBySig.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/write/delegateBySig.ts index 63ae89d2acf..3d4a8db0d50 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/write/delegateBySig.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/write/delegateBySig.ts @@ -26,28 +26,28 @@ export type DelegateBySigParams = WithOverrides<{ export const FN_SELECTOR = "0xc3cda520" as const; const FN_INPUTS = [ { - name: "delegatee", type: "address", + name: "delegatee", }, { - name: "nonce", type: "uint256", + name: "nonce", }, { - name: "expiry", type: "uint256", + name: "expiry", }, { - name: "v", type: "uint8", + name: "v", }, { - name: "r", type: "bytes32", + name: "r", }, { - name: "s", type: "bytes32", + name: "s", }, ] as const; const FN_OUTPUTS = [] as const; @@ -167,19 +167,8 @@ export function delegateBySig( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -192,5 +181,16 @@ export function delegateBySig( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IWETH/write/transfer.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IWETH/write/transfer.ts index 409dcfe395b..f9e725775a4 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IWETH/write/transfer.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IWETH/write/transfer.ts @@ -19,12 +19,12 @@ export type TransferParams = WithOverrides<{ export const FN_SELECTOR = "0xa9059cbb" as const; const FN_INPUTS = [ { - name: "to", type: "address", + name: "to", }, { - name: "value", type: "uint256", + name: "value", }, ] as const; const FN_OUTPUTS = [ @@ -127,23 +127,23 @@ export function transfer( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.to, resolvedOptions.value] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc20/__generated__/IWETH/write/withdraw.ts b/packages/thirdweb/src/extensions/erc20/__generated__/IWETH/write/withdraw.ts index 4b2e17a7852..e351237d2eb 100644 --- a/packages/thirdweb/src/extensions/erc20/__generated__/IWETH/write/withdraw.ts +++ b/packages/thirdweb/src/extensions/erc20/__generated__/IWETH/write/withdraw.ts @@ -18,8 +18,8 @@ export type WithdrawParams = WithOverrides<{ export const FN_SELECTOR = "0x2e1a7d4d" as const; const FN_INPUTS = [ { - name: "amount", type: "uint256", + name: "amount", }, ] as const; const FN_OUTPUTS = [] as const; @@ -115,23 +115,23 @@ export function withdraw( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.amount] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc2771/__generated__/IERC2771Context/read/isTrustedForwarder.ts b/packages/thirdweb/src/extensions/erc2771/__generated__/IERC2771Context/read/isTrustedForwarder.ts index 8f413a85ce8..f48fb6279b8 100644 --- a/packages/thirdweb/src/extensions/erc2771/__generated__/IERC2771Context/read/isTrustedForwarder.ts +++ b/packages/thirdweb/src/extensions/erc2771/__generated__/IERC2771Context/read/isTrustedForwarder.ts @@ -19,8 +19,8 @@ export type IsTrustedForwarderParams = { export const FN_SELECTOR = "0x572b6c05" as const; const FN_INPUTS = [ { - name: "forwarder", type: "address", + name: "forwarder", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc2981/__generated__/IERC2981/read/royaltyInfo.ts b/packages/thirdweb/src/extensions/erc2981/__generated__/IERC2981/read/royaltyInfo.ts index fc39904bb62..edbd43bb8c8 100644 --- a/packages/thirdweb/src/extensions/erc2981/__generated__/IERC2981/read/royaltyInfo.ts +++ b/packages/thirdweb/src/extensions/erc2981/__generated__/IERC2981/read/royaltyInfo.ts @@ -20,22 +20,22 @@ export type RoyaltyInfoParams = { export const FN_SELECTOR = "0x2a55205a" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "salePrice", type: "uint256", + name: "salePrice", }, ] as const; const FN_OUTPUTS = [ { - name: "receiver", type: "address", + name: "receiver", }, { - name: "royaltyAmount", type: "uint256", + name: "royaltyAmount", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccount/write/validateUserOp.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccount/write/validateUserOp.ts index f87b2c21692..b2894032e80 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccount/write/validateUserOp.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccount/write/validateUserOp.ts @@ -42,68 +42,68 @@ export type ValidateUserOpParams = WithOverrides<{ export const FN_SELECTOR = "0x3a871cdd" as const; const FN_INPUTS = [ { + type: "tuple", + name: "userOp", components: [ { - name: "sender", type: "address", + name: "sender", }, { - name: "nonce", type: "uint256", + name: "nonce", }, { - name: "initCode", type: "bytes", + name: "initCode", }, { - name: "callData", type: "bytes", + name: "callData", }, { - name: "callGasLimit", type: "uint256", + name: "callGasLimit", }, { - name: "verificationGasLimit", type: "uint256", + name: "verificationGasLimit", }, { - name: "preVerificationGas", type: "uint256", + name: "preVerificationGas", }, { - name: "maxFeePerGas", type: "uint256", + name: "maxFeePerGas", }, { - name: "maxPriorityFeePerGas", type: "uint256", + name: "maxPriorityFeePerGas", }, { - name: "paymasterAndData", type: "bytes", + name: "paymasterAndData", }, { - name: "signature", type: "bytes", + name: "signature", }, ], - name: "userOp", - type: "tuple", }, { - name: "userOpHash", type: "bytes32", + name: "userOpHash", }, { - name: "missingAccountFunds", type: "uint256", + name: "missingAccountFunds", }, ] as const; const FN_OUTPUTS = [ { - name: "validationData", type: "uint256", + name: "validationData", }, ] as const; @@ -210,19 +210,8 @@ export function validateUserOp( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -232,5 +221,16 @@ export function validateUserOp( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/events/AccountCreated.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/events/AccountCreated.ts index 3919789bd3c..a16bc9a83cc 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/events/AccountCreated.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/events/AccountCreated.ts @@ -40,8 +40,8 @@ export type AccountCreatedEventFilters = Partial<{ */ export function accountCreatedEvent(filters: AccountCreatedEventFilters = {}) { return prepareEvent({ - filters, signature: "event AccountCreated(address indexed account, address indexed accountAdmin)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/events/SignerAdded.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/events/SignerAdded.ts index f96231b08cf..5da6ede6ac7 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/events/SignerAdded.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/events/SignerAdded.ts @@ -40,8 +40,8 @@ export type SignerAddedEventFilters = Partial<{ */ export function signerAddedEvent(filters: SignerAddedEventFilters = {}) { return prepareEvent({ - filters, signature: "event SignerAdded(address indexed account, address indexed signer)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/events/SignerRemoved.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/events/SignerRemoved.ts index c6cf3b98d23..82619ea12e0 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/events/SignerRemoved.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/events/SignerRemoved.ts @@ -40,8 +40,8 @@ export type SignerRemovedEventFilters = Partial<{ */ export function signerRemovedEvent(filters: SignerRemovedEventFilters = {}) { return prepareEvent({ - filters, signature: "event SignerRemoved(address indexed account, address indexed signer)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAccounts.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAccounts.ts index 26429c67036..a26c296a7f2 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAccounts.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAccounts.ts @@ -17,12 +17,12 @@ export type GetAccountsParams = { export const FN_SELECTOR = "0xe68a7c3b" as const; const FN_INPUTS = [ { - name: "start", type: "uint256", + name: "start", }, { - name: "end", type: "uint256", + name: "end", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAccountsOfSigner.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAccountsOfSigner.ts index 9d328ef60b2..846406de80f 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAccountsOfSigner.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAccountsOfSigner.ts @@ -16,14 +16,14 @@ export type GetAccountsOfSignerParams = { export const FN_SELECTOR = "0x0e6254fd" as const; const FN_INPUTS = [ { - name: "signer", type: "address", + name: "signer", }, ] as const; const FN_OUTPUTS = [ { - name: "accounts", type: "address[]", + name: "accounts", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAddress.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAddress.ts index 7793bc2c85e..0174ca08356 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAddress.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAddress.ts @@ -20,12 +20,12 @@ export type GetAddressParams = { export const FN_SELECTOR = "0x8878ed33" as const; const FN_INPUTS = [ { - name: "adminSigner", type: "address", + name: "adminSigner", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/isRegistered.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/isRegistered.ts index 56ac9b61de6..6d3eae1caf1 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/isRegistered.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/isRegistered.ts @@ -16,8 +16,8 @@ export type IsRegisteredParams = { export const FN_SELECTOR = "0xc3c5a547" as const; const FN_INPUTS = [ { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/createAccount.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/createAccount.ts index cd71a3487a1..b03c26c972f 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/createAccount.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/createAccount.ts @@ -19,18 +19,18 @@ export type CreateAccountParams = WithOverrides<{ export const FN_SELECTOR = "0xd8fd8f44" as const; const FN_INPUTS = [ { - name: "admin", type: "address", + name: "admin", }, { - name: "_data", type: "bytes", + name: "_data", }, ] as const; const FN_OUTPUTS = [ { - name: "account", type: "address", + name: "account", }, ] as const; @@ -130,23 +130,23 @@ export function createAccount( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.admin, resolvedOptions.data] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/onSignerAdded.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/onSignerAdded.ts index 72b25239083..8799cb8bd6d 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/onSignerAdded.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/onSignerAdded.ts @@ -23,16 +23,16 @@ export type OnSignerAddedParams = WithOverrides<{ export const FN_SELECTOR = "0x9ddbb9d8" as const; const FN_INPUTS = [ { - name: "signer", type: "address", + name: "signer", }, { - name: "creatorAdmin", type: "address", + name: "creatorAdmin", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [] as const; @@ -140,19 +140,8 @@ export function onSignerAdded( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -162,5 +151,16 @@ export function onSignerAdded( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/onSignerRemoved.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/onSignerRemoved.ts index 1b1a5d20e4f..378b00d4ce7 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/onSignerRemoved.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/onSignerRemoved.ts @@ -23,16 +23,16 @@ export type OnSignerRemovedParams = WithOverrides<{ export const FN_SELECTOR = "0x0db33003" as const; const FN_INPUTS = [ { - name: "signer", type: "address", + name: "signer", }, { - name: "creatorAdmin", type: "address", + name: "creatorAdmin", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [] as const; @@ -140,19 +140,8 @@ export function onSignerRemoved( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -162,5 +151,16 @@ export function onSignerRemoved( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/events/AdminUpdated.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/events/AdminUpdated.ts index e1cb6933d25..8da029f6d0e 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/events/AdminUpdated.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/events/AdminUpdated.ts @@ -34,7 +34,7 @@ export type AdminUpdatedEventFilters = Partial<{ */ export function adminUpdatedEvent(filters: AdminUpdatedEventFilters = {}) { return prepareEvent({ - filters, signature: "event AdminUpdated(address indexed signer, bool isAdmin)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/events/SignerPermissionsUpdated.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/events/SignerPermissionsUpdated.ts index 0e331399365..a74536a6f7a 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/events/SignerPermissionsUpdated.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/events/SignerPermissionsUpdated.ts @@ -42,8 +42,8 @@ export function signerPermissionsUpdatedEvent( filters: SignerPermissionsUpdatedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event SignerPermissionsUpdated(address indexed authorizingSigner, address indexed targetSigner, (address signer, uint8 isAdmin, address[] approvedTargets, uint256 nativeTokenLimitPerTransaction, uint128 permissionStartTimestamp, uint128 permissionEndTimestamp, uint128 reqValidityStartTimestamp, uint128 reqValidityEndTimestamp, bytes32 uid) permissions)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getAllActiveSigners.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getAllActiveSigners.ts index 2e47c5cf525..10a3a03b5de 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getAllActiveSigners.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getAllActiveSigners.ts @@ -8,30 +8,30 @@ export const FN_SELECTOR = "0x8b52d723" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "signers", components: [ { - name: "signer", type: "address", + name: "signer", }, { - name: "approvedTargets", type: "address[]", + name: "approvedTargets", }, { - name: "nativeTokenLimitPerTransaction", type: "uint256", + name: "nativeTokenLimitPerTransaction", }, { - name: "startTimestamp", type: "uint128", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint128", + name: "endTimestamp", }, ], - name: "signers", - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getAllAdmins.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getAllAdmins.ts index 4f5f26e99c5..4a99bfd8fea 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getAllAdmins.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getAllAdmins.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0xe9523c97" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "admins", type: "address[]", + name: "admins", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getAllSigners.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getAllSigners.ts index b6031dc3105..8637d17d40e 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getAllSigners.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getAllSigners.ts @@ -8,30 +8,30 @@ export const FN_SELECTOR = "0xd42f2f35" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "signers", components: [ { - name: "signer", type: "address", + name: "signer", }, { - name: "approvedTargets", type: "address[]", + name: "approvedTargets", }, { - name: "nativeTokenLimitPerTransaction", type: "uint256", + name: "nativeTokenLimitPerTransaction", }, { - name: "startTimestamp", type: "uint128", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint128", + name: "endTimestamp", }, ], - name: "signers", - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getPermissionsForSigner.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getPermissionsForSigner.ts index ccae2c07226..554ab0b1511 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getPermissionsForSigner.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getPermissionsForSigner.ts @@ -16,36 +16,36 @@ export type GetPermissionsForSignerParams = { export const FN_SELECTOR = "0xf15d424e" as const; const FN_INPUTS = [ { - name: "signer", type: "address", + name: "signer", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple", + name: "permissions", components: [ { - name: "signer", type: "address", + name: "signer", }, { - name: "approvedTargets", type: "address[]", + name: "approvedTargets", }, { - name: "nativeTokenLimitPerTransaction", type: "uint256", + name: "nativeTokenLimitPerTransaction", }, { - name: "startTimestamp", type: "uint128", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint128", + name: "endTimestamp", }, ], - name: "permissions", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/isActiveSigner.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/isActiveSigner.ts index 3bdebf0400d..2f4acb5c7e3 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/isActiveSigner.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/isActiveSigner.ts @@ -16,8 +16,8 @@ export type IsActiveSignerParams = { export const FN_SELECTOR = "0x7dff5a79" as const; const FN_INPUTS = [ { - name: "signer", type: "address", + name: "signer", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/isAdmin.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/isAdmin.ts index b30b9ba947c..2e40f43ff8e 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/isAdmin.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/isAdmin.ts @@ -16,8 +16,8 @@ export type IsAdminParams = { export const FN_SELECTOR = "0x24d7806c" as const; const FN_INPUTS = [ { - name: "signer", type: "address", + name: "signer", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/verifySignerPermissionRequest.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/verifySignerPermissionRequest.ts index 6078893f412..4dd893869dd 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/verifySignerPermissionRequest.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/verifySignerPermissionRequest.ts @@ -31,60 +31,60 @@ export type VerifySignerPermissionRequestParams = { export const FN_SELECTOR = "0xa9082d84" as const; const FN_INPUTS = [ { + type: "tuple", + name: "req", components: [ { - name: "signer", type: "address", + name: "signer", }, { - name: "isAdmin", type: "uint8", + name: "isAdmin", }, { - name: "approvedTargets", type: "address[]", + name: "approvedTargets", }, { - name: "nativeTokenLimitPerTransaction", type: "uint256", + name: "nativeTokenLimitPerTransaction", }, { - name: "permissionStartTimestamp", type: "uint128", + name: "permissionStartTimestamp", }, { - name: "permissionEndTimestamp", type: "uint128", + name: "permissionEndTimestamp", }, { - name: "reqValidityStartTimestamp", type: "uint128", + name: "reqValidityStartTimestamp", }, { - name: "reqValidityEndTimestamp", type: "uint128", + name: "reqValidityEndTimestamp", }, { - name: "uid", type: "bytes32", + name: "uid", }, ], - name: "req", - type: "tuple", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [ { - name: "success", type: "bool", + name: "success", }, { - name: "signer", type: "address", + name: "signer", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/write/setPermissionsForSigner.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/write/setPermissionsForSigner.ts index 99f03a9d50e..acad573f066 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/write/setPermissionsForSigner.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/write/setPermissionsForSigner.ts @@ -33,50 +33,50 @@ export type SetPermissionsForSignerParams = WithOverrides<{ export const FN_SELECTOR = "0x5892e236" as const; const FN_INPUTS = [ { + type: "tuple", + name: "req", components: [ { - name: "signer", type: "address", + name: "signer", }, { - name: "isAdmin", type: "uint8", + name: "isAdmin", }, { - name: "approvedTargets", type: "address[]", + name: "approvedTargets", }, { - name: "nativeTokenLimitPerTransaction", type: "uint256", + name: "nativeTokenLimitPerTransaction", }, { - name: "permissionStartTimestamp", type: "uint128", + name: "permissionStartTimestamp", }, { - name: "permissionEndTimestamp", type: "uint128", + name: "permissionEndTimestamp", }, { - name: "reqValidityStartTimestamp", type: "uint128", + name: "reqValidityStartTimestamp", }, { - name: "reqValidityEndTimestamp", type: "uint128", + name: "reqValidityEndTimestamp", }, { - name: "uid", type: "bytes32", + name: "uid", }, ], - name: "req", - type: "tuple", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [] as const; @@ -183,23 +183,23 @@ export function setPermissionsForSigner( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.req, resolvedOptions.signature] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/AccountDeployed.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/AccountDeployed.ts index c5c76a6a19d..57c092662d1 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/AccountDeployed.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/AccountDeployed.ts @@ -42,8 +42,8 @@ export function accountDeployedEvent( filters: AccountDeployedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event AccountDeployed(bytes32 indexed userOpHash, address indexed sender, address factory, address paymaster)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/Deposited.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/Deposited.ts index 5a3d67beffe..786675249ff 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/Deposited.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/Deposited.ts @@ -34,7 +34,7 @@ export type DepositedEventFilters = Partial<{ */ export function depositedEvent(filters: DepositedEventFilters = {}) { return prepareEvent({ - filters, signature: "event Deposited(address indexed account, uint256 totalDeposit)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/SignatureAggregatorChanged.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/SignatureAggregatorChanged.ts index be1fef18557..c159efd99ae 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/SignatureAggregatorChanged.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/SignatureAggregatorChanged.ts @@ -36,7 +36,7 @@ export function signatureAggregatorChangedEvent( filters: SignatureAggregatorChangedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event SignatureAggregatorChanged(address indexed aggregator)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/StakeLocked.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/StakeLocked.ts index 238cfb9053f..64432e3e52a 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/StakeLocked.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/StakeLocked.ts @@ -34,8 +34,8 @@ export type StakeLockedEventFilters = Partial<{ */ export function stakeLockedEvent(filters: StakeLockedEventFilters = {}) { return prepareEvent({ - filters, signature: "event StakeLocked(address indexed account, uint256 totalStaked, uint256 unstakeDelaySec)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/StakeUnlocked.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/StakeUnlocked.ts index 30b473ab2b2..3db5b217e5d 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/StakeUnlocked.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/StakeUnlocked.ts @@ -34,8 +34,8 @@ export type StakeUnlockedEventFilters = Partial<{ */ export function stakeUnlockedEvent(filters: StakeUnlockedEventFilters = {}) { return prepareEvent({ - filters, signature: "event StakeUnlocked(address indexed account, uint256 withdrawTime)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/StakeWithdrawn.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/StakeWithdrawn.ts index 3f3e8d02b33..fdca4a373fe 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/StakeWithdrawn.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/StakeWithdrawn.ts @@ -34,8 +34,8 @@ export type StakeWithdrawnEventFilters = Partial<{ */ export function stakeWithdrawnEvent(filters: StakeWithdrawnEventFilters = {}) { return prepareEvent({ - filters, signature: "event StakeWithdrawn(address indexed account, address withdrawAddress, uint256 amount)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/UserOperationEvent.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/UserOperationEvent.ts index 0dcf93c6e9c..34ab121fe48 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/UserOperationEvent.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/UserOperationEvent.ts @@ -48,8 +48,8 @@ export function userOperationEventEvent( filters: UserOperationEventEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event UserOperationEvent(bytes32 indexed userOpHash, address indexed sender, address indexed paymaster, uint256 nonce, bool success, uint256 actualGasCost, uint256 actualGasUsed)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/UserOperationRevertReason.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/UserOperationRevertReason.ts index 4ae291a64af..ea97112e335 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/UserOperationRevertReason.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/UserOperationRevertReason.ts @@ -42,8 +42,8 @@ export function userOperationRevertReasonEvent( filters: UserOperationRevertReasonEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event UserOperationRevertReason(bytes32 indexed userOpHash, address indexed sender, uint256 nonce, bytes revertReason)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/Withdrawn.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/Withdrawn.ts index 2d59fcb2fe8..7b4e4b377a5 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/Withdrawn.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/Withdrawn.ts @@ -34,8 +34,8 @@ export type WithdrawnEventFilters = Partial<{ */ export function withdrawnEvent(filters: WithdrawnEventFilters = {}) { return prepareEvent({ - filters, signature: "event Withdrawn(address indexed account, address withdrawAddress, uint256 amount)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/read/balanceOf.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/read/balanceOf.ts index 55e6ca4003f..32ad1790b30 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/read/balanceOf.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/read/balanceOf.ts @@ -16,8 +16,8 @@ export type BalanceOfParams = { export const FN_SELECTOR = "0x70a08231" as const; const FN_INPUTS = [ { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/read/getDepositInfo.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/read/getDepositInfo.ts index 08cce1e0335..df61606924e 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/read/getDepositInfo.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/read/getDepositInfo.ts @@ -16,36 +16,36 @@ export type GetDepositInfoParams = { export const FN_SELECTOR = "0x5287ce12" as const; const FN_INPUTS = [ { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple", + name: "info", components: [ { - name: "deposit", type: "uint112", + name: "deposit", }, { - name: "staked", type: "bool", + name: "staked", }, { - name: "stake", type: "uint112", + name: "stake", }, { - name: "unstakeDelaySec", type: "uint32", + name: "unstakeDelaySec", }, { - name: "withdrawTime", type: "uint48", + name: "withdrawTime", }, ], - name: "info", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/read/getNonce.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/read/getNonce.ts index 78d6bd5f232..129766b56b2 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/read/getNonce.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/read/getNonce.ts @@ -17,18 +17,18 @@ export type GetNonceParams = { export const FN_SELECTOR = "0x35567e1a" as const; const FN_INPUTS = [ { - name: "sender", type: "address", + name: "sender", }, { - name: "key", type: "uint192", + name: "key", }, ] as const; const FN_OUTPUTS = [ { - name: "nonce", type: "uint256", + name: "nonce", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/read/getUserOpHash.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/read/getUserOpHash.ts index df7cd5a0476..75572b4e566 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/read/getUserOpHash.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/read/getUserOpHash.ts @@ -32,54 +32,54 @@ export type GetUserOpHashParams = { export const FN_SELECTOR = "0xa6193531" as const; const FN_INPUTS = [ { + type: "tuple", + name: "userOp", components: [ { - name: "sender", type: "address", + name: "sender", }, { - name: "nonce", type: "uint256", + name: "nonce", }, { - name: "initCode", type: "bytes", + name: "initCode", }, { - name: "callData", type: "bytes", + name: "callData", }, { - name: "callGasLimit", type: "uint256", + name: "callGasLimit", }, { - name: "verificationGasLimit", type: "uint256", + name: "verificationGasLimit", }, { - name: "preVerificationGas", type: "uint256", + name: "preVerificationGas", }, { - name: "maxFeePerGas", type: "uint256", + name: "maxFeePerGas", }, { - name: "maxPriorityFeePerGas", type: "uint256", + name: "maxPriorityFeePerGas", }, { - name: "paymasterAndData", type: "bytes", + name: "paymasterAndData", }, { - name: "signature", type: "bytes", + name: "signature", }, ], - name: "userOp", - type: "tuple", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/addStake.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/addStake.ts index 5ee1b30c191..5385bd8265e 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/addStake.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/addStake.ts @@ -21,8 +21,8 @@ export type AddStakeParams = WithOverrides<{ export const FN_SELECTOR = "0x0396cb60" as const; const FN_INPUTS = [ { - name: "_unstakeDelaySec", type: "uint32", + name: "_unstakeDelaySec", }, ] as const; const FN_OUTPUTS = [] as const; @@ -118,23 +118,23 @@ export function addStake( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.unstakeDelaySec] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/depositTo.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/depositTo.ts index a680c985f9f..29803f6389d 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/depositTo.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/depositTo.ts @@ -18,8 +18,8 @@ export type DepositToParams = WithOverrides<{ export const FN_SELECTOR = "0xb760faf9" as const; const FN_INPUTS = [ { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [] as const; @@ -117,23 +117,23 @@ export function depositTo( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.account] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/getSenderAddress.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/getSenderAddress.ts index 3c156b207e1..b651367ee8d 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/getSenderAddress.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/getSenderAddress.ts @@ -18,8 +18,8 @@ export type GetSenderAddressParams = WithOverrides<{ export const FN_SELECTOR = "0x9b249f69" as const; const FN_INPUTS = [ { - name: "initCode", type: "bytes", + name: "initCode", }, ] as const; const FN_OUTPUTS = [] as const; @@ -117,23 +117,23 @@ export function getSenderAddress( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.initCode] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/handleAggregatedOps.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/handleAggregatedOps.ts index d3600668bd4..164d965aa5e 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/handleAggregatedOps.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/handleAggregatedOps.ts @@ -46,72 +46,72 @@ export type HandleAggregatedOpsParams = WithOverrides<{ export const FN_SELECTOR = "0x4b1d7cf5" as const; const FN_INPUTS = [ { + type: "tuple[]", + name: "opsPerAggregator", components: [ { + type: "tuple[]", + name: "userOps", components: [ { - name: "sender", type: "address", + name: "sender", }, { - name: "nonce", type: "uint256", + name: "nonce", }, { - name: "initCode", type: "bytes", + name: "initCode", }, { - name: "callData", type: "bytes", + name: "callData", }, { - name: "callGasLimit", type: "uint256", + name: "callGasLimit", }, { - name: "verificationGasLimit", type: "uint256", + name: "verificationGasLimit", }, { - name: "preVerificationGas", type: "uint256", + name: "preVerificationGas", }, { - name: "maxFeePerGas", type: "uint256", + name: "maxFeePerGas", }, { - name: "maxPriorityFeePerGas", type: "uint256", + name: "maxPriorityFeePerGas", }, { - name: "paymasterAndData", type: "bytes", + name: "paymasterAndData", }, { - name: "signature", type: "bytes", + name: "signature", }, ], - name: "userOps", - type: "tuple[]", }, { - name: "aggregator", type: "address", + name: "aggregator", }, { - name: "signature", type: "bytes", + name: "signature", }, ], - name: "opsPerAggregator", - type: "tuple[]", }, { - name: "beneficiary", type: "address", + name: "beneficiary", }, ] as const; const FN_OUTPUTS = [] as const; @@ -217,19 +217,8 @@ export function handleAggregatedOps( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -238,5 +227,16 @@ export function handleAggregatedOps( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/handleOps.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/handleOps.ts index 9ba76421223..142b42768d8 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/handleOps.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/handleOps.ts @@ -38,58 +38,58 @@ export type HandleOpsParams = WithOverrides<{ export const FN_SELECTOR = "0x1fad948c" as const; const FN_INPUTS = [ { + type: "tuple[]", + name: "ops", components: [ { - name: "sender", type: "address", + name: "sender", }, { - name: "nonce", type: "uint256", + name: "nonce", }, { - name: "initCode", type: "bytes", + name: "initCode", }, { - name: "callData", type: "bytes", + name: "callData", }, { - name: "callGasLimit", type: "uint256", + name: "callGasLimit", }, { - name: "verificationGasLimit", type: "uint256", + name: "verificationGasLimit", }, { - name: "preVerificationGas", type: "uint256", + name: "preVerificationGas", }, { - name: "maxFeePerGas", type: "uint256", + name: "maxFeePerGas", }, { - name: "maxPriorityFeePerGas", type: "uint256", + name: "maxPriorityFeePerGas", }, { - name: "paymasterAndData", type: "bytes", + name: "paymasterAndData", }, { - name: "signature", type: "bytes", + name: "signature", }, ], - name: "ops", - type: "tuple[]", }, { - name: "beneficiary", type: "address", + name: "beneficiary", }, ] as const; const FN_OUTPUTS = [] as const; @@ -190,23 +190,23 @@ export function handleOps( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.ops, resolvedOptions.beneficiary] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/incrementNonce.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/incrementNonce.ts index f302d500846..f41500266dc 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/incrementNonce.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/incrementNonce.ts @@ -18,8 +18,8 @@ export type IncrementNonceParams = WithOverrides<{ export const FN_SELECTOR = "0x0bd28e3b" as const; const FN_INPUTS = [ { - name: "key", type: "uint192", + name: "key", }, ] as const; const FN_OUTPUTS = [] as const; @@ -117,23 +117,23 @@ export function incrementNonce( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.key] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/simulateHandleOp.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/simulateHandleOp.ts index 2cbf03a7c47..45436f31447 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/simulateHandleOp.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/simulateHandleOp.ts @@ -39,62 +39,62 @@ export type SimulateHandleOpParams = WithOverrides<{ export const FN_SELECTOR = "0xd6383f94" as const; const FN_INPUTS = [ { + type: "tuple", + name: "op", components: [ { - name: "sender", type: "address", + name: "sender", }, { - name: "nonce", type: "uint256", + name: "nonce", }, { - name: "initCode", type: "bytes", + name: "initCode", }, { - name: "callData", type: "bytes", + name: "callData", }, { - name: "callGasLimit", type: "uint256", + name: "callGasLimit", }, { - name: "verificationGasLimit", type: "uint256", + name: "verificationGasLimit", }, { - name: "preVerificationGas", type: "uint256", + name: "preVerificationGas", }, { - name: "maxFeePerGas", type: "uint256", + name: "maxFeePerGas", }, { - name: "maxPriorityFeePerGas", type: "uint256", + name: "maxPriorityFeePerGas", }, { - name: "paymasterAndData", type: "bytes", + name: "paymasterAndData", }, { - name: "signature", type: "bytes", + name: "signature", }, ], - name: "op", - type: "tuple", }, { - name: "target", type: "address", + name: "target", }, { - name: "targetCallData", type: "bytes", + name: "targetCallData", }, ] as const; const FN_OUTPUTS = [] as const; @@ -202,19 +202,8 @@ export function simulateHandleOp( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -224,5 +213,16 @@ export function simulateHandleOp( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/simulateValidation.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/simulateValidation.ts index 219eb9561dc..c1098fde254 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/simulateValidation.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/simulateValidation.ts @@ -34,54 +34,54 @@ export type SimulateValidationParams = WithOverrides<{ export const FN_SELECTOR = "0xee219423" as const; const FN_INPUTS = [ { + type: "tuple", + name: "userOp", components: [ { - name: "sender", type: "address", + name: "sender", }, { - name: "nonce", type: "uint256", + name: "nonce", }, { - name: "initCode", type: "bytes", + name: "initCode", }, { - name: "callData", type: "bytes", + name: "callData", }, { - name: "callGasLimit", type: "uint256", + name: "callGasLimit", }, { - name: "verificationGasLimit", type: "uint256", + name: "verificationGasLimit", }, { - name: "preVerificationGas", type: "uint256", + name: "preVerificationGas", }, { - name: "maxFeePerGas", type: "uint256", + name: "maxFeePerGas", }, { - name: "maxPriorityFeePerGas", type: "uint256", + name: "maxPriorityFeePerGas", }, { - name: "paymasterAndData", type: "bytes", + name: "paymasterAndData", }, { - name: "signature", type: "bytes", + name: "signature", }, ], - name: "userOp", - type: "tuple", }, ] as const; const FN_OUTPUTS = [] as const; @@ -181,23 +181,23 @@ export function simulateValidation( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.userOp] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/withdrawStake.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/withdrawStake.ts index 14e3ed95f92..37db0a31e12 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/withdrawStake.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/withdrawStake.ts @@ -21,8 +21,8 @@ export type WithdrawStakeParams = WithOverrides<{ export const FN_SELECTOR = "0xc23a5cea" as const; const FN_INPUTS = [ { - name: "withdrawAddress", type: "address", + name: "withdrawAddress", }, ] as const; const FN_OUTPUTS = [] as const; @@ -120,23 +120,23 @@ export function withdrawStake( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.withdrawAddress] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/withdrawTo.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/withdrawTo.ts index 4cdfea7260f..b34a439bdee 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/withdrawTo.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/withdrawTo.ts @@ -25,12 +25,12 @@ export type WithdrawToParams = WithOverrides<{ export const FN_SELECTOR = "0x205c2878" as const; const FN_INPUTS = [ { - name: "withdrawAddress", type: "address", + name: "withdrawAddress", }, { - name: "withdrawAmount", type: "uint256", + name: "withdrawAmount", }, ] as const; const FN_OUTPUTS = [] as const; @@ -134,19 +134,8 @@ export function withdrawTo( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -155,5 +144,16 @@ export function withdrawTo( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint_v07/events/PostOpRevertReason.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint_v07/events/PostOpRevertReason.ts index 991f9320412..d9a94db53db 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint_v07/events/PostOpRevertReason.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint_v07/events/PostOpRevertReason.ts @@ -42,8 +42,8 @@ export function postOpRevertReasonEvent( filters: PostOpRevertReasonEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event PostOpRevertReason(bytes32 indexed userOpHash, address indexed sender, uint256 nonce, bytes revertReason)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint_v07/read/getUserOpHash.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint_v07/read/getUserOpHash.ts index 0fdce243df6..ec9af361efd 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint_v07/read/getUserOpHash.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint_v07/read/getUserOpHash.ts @@ -30,46 +30,46 @@ export type GetUserOpHashParams = { export const FN_SELECTOR = "0x22cdde4c" as const; const FN_INPUTS = [ { + type: "tuple", + name: "userOp", components: [ { - name: "sender", type: "address", + name: "sender", }, { - name: "nonce", type: "uint256", + name: "nonce", }, { - name: "initCode", type: "bytes", + name: "initCode", }, { - name: "callData", type: "bytes", + name: "callData", }, { - name: "accountGasLimits", type: "bytes32", + name: "accountGasLimits", }, { - name: "preVerificationGas", type: "uint256", + name: "preVerificationGas", }, { - name: "gasFees", type: "bytes32", + name: "gasFees", }, { - name: "paymasterAndData", type: "bytes", + name: "paymasterAndData", }, { - name: "signature", type: "bytes", + name: "signature", }, ], - name: "userOp", - type: "tuple", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IPaymaster/write/postOp.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IPaymaster/write/postOp.ts index dc71be29b9d..1c7b385cc5c 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IPaymaster/write/postOp.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IPaymaster/write/postOp.ts @@ -23,16 +23,16 @@ export type PostOpParams = WithOverrides<{ export const FN_SELECTOR = "0xa9a23409" as const; const FN_INPUTS = [ { - name: "mode", type: "uint8", + name: "mode", }, { - name: "context", type: "bytes", + name: "context", }, { - name: "actualGasCost", type: "uint256", + name: "actualGasCost", }, ] as const; const FN_OUTPUTS = [] as const; @@ -138,19 +138,8 @@ export function postOp( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -160,5 +149,16 @@ export function postOp( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4337/__generated__/IPaymaster/write/validatePaymasterUserOp.ts b/packages/thirdweb/src/extensions/erc4337/__generated__/IPaymaster/write/validatePaymasterUserOp.ts index e5e33c429c0..f1259034401 100644 --- a/packages/thirdweb/src/extensions/erc4337/__generated__/IPaymaster/write/validatePaymasterUserOp.ts +++ b/packages/thirdweb/src/extensions/erc4337/__generated__/IPaymaster/write/validatePaymasterUserOp.ts @@ -39,72 +39,72 @@ export type ValidatePaymasterUserOpParams = WithOverrides<{ export const FN_SELECTOR = "0xf465c77e" as const; const FN_INPUTS = [ { + type: "tuple", + name: "userOp", components: [ { - name: "sender", type: "address", + name: "sender", }, { - name: "nonce", type: "uint256", + name: "nonce", }, { - name: "initCode", type: "bytes", + name: "initCode", }, { - name: "callData", type: "bytes", + name: "callData", }, { - name: "callGasLimit", type: "uint256", + name: "callGasLimit", }, { - name: "verificationGasLimit", type: "uint256", + name: "verificationGasLimit", }, { - name: "preVerificationGas", type: "uint256", + name: "preVerificationGas", }, { - name: "maxFeePerGas", type: "uint256", + name: "maxFeePerGas", }, { - name: "maxPriorityFeePerGas", type: "uint256", + name: "maxPriorityFeePerGas", }, { - name: "paymasterAndData", type: "bytes", + name: "paymasterAndData", }, { - name: "signature", type: "bytes", + name: "signature", }, ], - name: "userOp", - type: "tuple", }, { - name: "userOpHash", type: "bytes32", + name: "userOpHash", }, { - name: "maxCost", type: "uint256", + name: "maxCost", }, ] as const; const FN_OUTPUTS = [ { - name: "context", type: "bytes", + name: "context", }, { - name: "validationData", type: "uint256", + name: "validationData", }, ] as const; @@ -217,19 +217,8 @@ export function validatePaymasterUserOp( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -239,5 +228,16 @@ export function validatePaymasterUserOp( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/events/Deposit.ts b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/events/Deposit.ts index 753a8961fff..f18b212a278 100644 --- a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/events/Deposit.ts +++ b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/events/Deposit.ts @@ -40,8 +40,8 @@ export type DepositEventFilters = Partial<{ */ export function depositEvent(filters: DepositEventFilters = {}) { return prepareEvent({ - filters, signature: "event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/events/Withdraw.ts b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/events/Withdraw.ts index 8450bb95731..b9024da0879 100644 --- a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/events/Withdraw.ts +++ b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/events/Withdraw.ts @@ -46,8 +46,8 @@ export type WithdrawEventFilters = Partial<{ */ export function withdrawEvent(filters: WithdrawEventFilters = {}) { return prepareEvent({ - filters, signature: "event Withdraw(address indexed caller, address indexed receiver, address indexed owner, uint256 assets, uint256 shares)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/asset.ts b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/asset.ts index 06812146334..c4280dffdde 100644 --- a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/asset.ts +++ b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/asset.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0x38d52e0f" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "assetTokenAddress", type: "address", + name: "assetTokenAddress", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/convertToAssets.ts b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/convertToAssets.ts index 7288d41eabb..aae1a9b0279 100644 --- a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/convertToAssets.ts +++ b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/convertToAssets.ts @@ -16,14 +16,14 @@ export type ConvertToAssetsParams = { export const FN_SELECTOR = "0x07a2d13a" as const; const FN_INPUTS = [ { - name: "shares", type: "uint256", + name: "shares", }, ] as const; const FN_OUTPUTS = [ { - name: "assets", type: "uint256", + name: "assets", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/convertToShares.ts b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/convertToShares.ts index 75ac99b846e..0ea83b5498f 100644 --- a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/convertToShares.ts +++ b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/convertToShares.ts @@ -16,14 +16,14 @@ export type ConvertToSharesParams = { export const FN_SELECTOR = "0xc6e6f592" as const; const FN_INPUTS = [ { - name: "assets", type: "uint256", + name: "assets", }, ] as const; const FN_OUTPUTS = [ { - name: "shares", type: "uint256", + name: "shares", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxDeposit.ts b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxDeposit.ts index a79217d1108..58b4e09281a 100644 --- a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxDeposit.ts +++ b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxDeposit.ts @@ -16,14 +16,14 @@ export type MaxDepositParams = { export const FN_SELECTOR = "0x402d267d" as const; const FN_INPUTS = [ { - name: "receiver", type: "address", + name: "receiver", }, ] as const; const FN_OUTPUTS = [ { - name: "maxAssets", type: "uint256", + name: "maxAssets", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxMint.ts b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxMint.ts index be7362591b6..5006143bc59 100644 --- a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxMint.ts +++ b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxMint.ts @@ -16,14 +16,14 @@ export type MaxMintParams = { export const FN_SELECTOR = "0xc63d75b6" as const; const FN_INPUTS = [ { - name: "receiver", type: "address", + name: "receiver", }, ] as const; const FN_OUTPUTS = [ { - name: "maxShares", type: "uint256", + name: "maxShares", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxRedeem.ts b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxRedeem.ts index fdf9a9bd349..aeeb693fc77 100644 --- a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxRedeem.ts +++ b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxRedeem.ts @@ -16,14 +16,14 @@ export type MaxRedeemParams = { export const FN_SELECTOR = "0xd905777e" as const; const FN_INPUTS = [ { - name: "owner", type: "address", + name: "owner", }, ] as const; const FN_OUTPUTS = [ { - name: "maxShares", type: "uint256", + name: "maxShares", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxWithdraw.ts b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxWithdraw.ts index 2f5cb5760df..7ba38dd8844 100644 --- a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxWithdraw.ts +++ b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxWithdraw.ts @@ -16,14 +16,14 @@ export type MaxWithdrawParams = { export const FN_SELECTOR = "0xce96cb77" as const; const FN_INPUTS = [ { - name: "owner", type: "address", + name: "owner", }, ] as const; const FN_OUTPUTS = [ { - name: "maxAssets", type: "uint256", + name: "maxAssets", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewDeposit.ts b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewDeposit.ts index fc50a5d5b2e..0f99cea3c14 100644 --- a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewDeposit.ts +++ b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewDeposit.ts @@ -16,14 +16,14 @@ export type PreviewDepositParams = { export const FN_SELECTOR = "0xef8b30f7" as const; const FN_INPUTS = [ { - name: "assets", type: "uint256", + name: "assets", }, ] as const; const FN_OUTPUTS = [ { - name: "shares", type: "uint256", + name: "shares", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewMint.ts b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewMint.ts index 0c11d728319..443c34fb41f 100644 --- a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewMint.ts +++ b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewMint.ts @@ -16,8 +16,8 @@ export type PreviewMintParams = { export const FN_SELECTOR = "0xb3d7f6b9" as const; const FN_INPUTS = [ { - name: "shares", type: "uint256", + name: "shares", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewRedeem.ts b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewRedeem.ts index 1ffa9dd1327..8e36a4bb59f 100644 --- a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewRedeem.ts +++ b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewRedeem.ts @@ -16,14 +16,14 @@ export type PreviewRedeemParams = { export const FN_SELECTOR = "0x4cdad506" as const; const FN_INPUTS = [ { - name: "shares", type: "uint256", + name: "shares", }, ] as const; const FN_OUTPUTS = [ { - name: "assets", type: "uint256", + name: "assets", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewWithdraw.ts b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewWithdraw.ts index d66508de4a0..9c250aad3bb 100644 --- a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewWithdraw.ts +++ b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewWithdraw.ts @@ -16,14 +16,14 @@ export type PreviewWithdrawParams = { export const FN_SELECTOR = "0x0a28a477" as const; const FN_INPUTS = [ { - name: "assets", type: "uint256", + name: "assets", }, ] as const; const FN_OUTPUTS = [ { - name: "shares", type: "uint256", + name: "shares", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/totalAssets.ts b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/totalAssets.ts index 1801c0053ff..e16ab10ad0a 100644 --- a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/totalAssets.ts +++ b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/totalAssets.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0x01e1d114" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "totalManagedAssets", type: "uint256", + name: "totalManagedAssets", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/deposit.ts b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/deposit.ts index d37c26b12d0..cb7b09695dd 100644 --- a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/deposit.ts +++ b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/deposit.ts @@ -19,18 +19,18 @@ export type DepositParams = WithOverrides<{ export const FN_SELECTOR = "0x6e553f65" as const; const FN_INPUTS = [ { - name: "assets", type: "uint256", + name: "assets", }, { - name: "receiver", type: "address", + name: "receiver", }, ] as const; const FN_OUTPUTS = [ { - name: "shares", type: "uint256", + name: "shares", }, ] as const; @@ -128,23 +128,23 @@ export function deposit( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.assets, resolvedOptions.receiver] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/mint.ts b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/mint.ts index 9499cfff6f9..76b3e11984f 100644 --- a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/mint.ts +++ b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/mint.ts @@ -19,18 +19,18 @@ export type MintParams = WithOverrides<{ export const FN_SELECTOR = "0x94bf804d" as const; const FN_INPUTS = [ { - name: "shares", type: "uint256", + name: "shares", }, { - name: "receiver", type: "address", + name: "receiver", }, ] as const; const FN_OUTPUTS = [ { - name: "assets", type: "uint256", + name: "assets", }, ] as const; @@ -128,23 +128,23 @@ export function mint( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.shares, resolvedOptions.receiver] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/redeem.ts b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/redeem.ts index dcc70c39d48..fbaf5e7bff3 100644 --- a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/redeem.ts +++ b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/redeem.ts @@ -20,22 +20,22 @@ export type RedeemParams = WithOverrides<{ export const FN_SELECTOR = "0xba087652" as const; const FN_INPUTS = [ { - name: "shares", type: "uint256", + name: "shares", }, { - name: "receiver", type: "address", + name: "receiver", }, { - name: "owner", type: "address", + name: "owner", }, ] as const; const FN_OUTPUTS = [ { - name: "assets", type: "uint256", + name: "assets", }, ] as const; @@ -140,19 +140,8 @@ export function redeem( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -162,5 +151,16 @@ export function redeem( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/withdraw.ts b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/withdraw.ts index 70362e7237b..be29d49c712 100644 --- a/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/withdraw.ts +++ b/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/withdraw.ts @@ -20,22 +20,22 @@ export type WithdrawParams = WithOverrides<{ export const FN_SELECTOR = "0xb460af94" as const; const FN_INPUTS = [ { - name: "assets", type: "uint256", + name: "assets", }, { - name: "receiver", type: "address", + name: "receiver", }, { - name: "owner", type: "address", + name: "owner", }, ] as const; const FN_OUTPUTS = [ { - name: "shares", type: "uint256", + name: "shares", }, ] as const; @@ -140,19 +140,8 @@ export function withdraw( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -162,5 +151,16 @@ export function withdraw( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc6551/__generated__/IERC6551Account/read/isValidSigner.ts b/packages/thirdweb/src/extensions/erc6551/__generated__/IERC6551Account/read/isValidSigner.ts index 26a270ebb9f..ce17d6bf523 100644 --- a/packages/thirdweb/src/extensions/erc6551/__generated__/IERC6551Account/read/isValidSigner.ts +++ b/packages/thirdweb/src/extensions/erc6551/__generated__/IERC6551Account/read/isValidSigner.ts @@ -17,18 +17,18 @@ export type IsValidSignerParams = { export const FN_SELECTOR = "0x523e3260" as const; const FN_INPUTS = [ { - name: "signer", type: "address", + name: "signer", }, { - name: "context", type: "bytes", + name: "context", }, ] as const; const FN_OUTPUTS = [ { - name: "magicValue", type: "bytes4", + name: "magicValue", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc6551/__generated__/IERC6551Account/read/token.ts b/packages/thirdweb/src/extensions/erc6551/__generated__/IERC6551Account/read/token.ts index 758898583c1..17140290a66 100644 --- a/packages/thirdweb/src/extensions/erc6551/__generated__/IERC6551Account/read/token.ts +++ b/packages/thirdweb/src/extensions/erc6551/__generated__/IERC6551Account/read/token.ts @@ -8,16 +8,16 @@ export const FN_SELECTOR = "0xfc0c546a" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "chainId", type: "uint256", + name: "chainId", }, { - name: "tokenContract", type: "address", + name: "tokenContract", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/read/verifyClaim.ts b/packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/read/verifyClaim.ts index 9547268a917..939294b1b13 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/read/verifyClaim.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/read/verifyClaim.ts @@ -36,52 +36,52 @@ export type VerifyClaimParams = { export const FN_SELECTOR = "0x23a2902b" as const; const FN_INPUTS = [ { - name: "_conditionId", type: "uint256", + name: "_conditionId", }, { - name: "_claimer", type: "address", + name: "_claimer", }, { - name: "_quantity", type: "uint256", + name: "_quantity", }, { - name: "_currency", type: "address", + name: "_currency", }, { - name: "_pricePerToken", type: "uint256", + name: "_pricePerToken", }, { + type: "tuple", + name: "_allowlistProof", components: [ { - name: "proof", type: "bytes32[]", + name: "proof", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, ], - name: "_allowlistProof", - type: "tuple", }, ] as const; const FN_OUTPUTS = [ { - name: "isOverride", type: "bool", + name: "isOverride", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/freezeBatchBaseURI.ts b/packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/freezeBatchBaseURI.ts index 529ea40cad5..d859f4ba0c7 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/freezeBatchBaseURI.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/freezeBatchBaseURI.ts @@ -18,8 +18,8 @@ export type FreezeBatchBaseURIParams = WithOverrides<{ export const FN_SELECTOR = "0xa07ced9e" as const; const FN_INPUTS = [ { - name: "_index", type: "uint256", + name: "_index", }, ] as const; const FN_OUTPUTS = [] as const; @@ -119,23 +119,23 @@ export function freezeBatchBaseURI( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.index] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/setMaxTotalSupply.ts b/packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/setMaxTotalSupply.ts index fa6e333d998..587749a9ef9 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/setMaxTotalSupply.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/setMaxTotalSupply.ts @@ -21,8 +21,8 @@ export type SetMaxTotalSupplyParams = WithOverrides<{ export const FN_SELECTOR = "0x3f3e4c11" as const; const FN_INPUTS = [ { - name: "_maxTotalSupply", type: "uint256", + name: "_maxTotalSupply", }, ] as const; const FN_OUTPUTS = [] as const; @@ -122,23 +122,23 @@ export function setMaxTotalSupply( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.maxTotalSupply] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/updateBatchBaseURI.ts b/packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/updateBatchBaseURI.ts index 0368737cc6c..bc8960627ce 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/updateBatchBaseURI.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/updateBatchBaseURI.ts @@ -19,12 +19,12 @@ export type UpdateBatchBaseURIParams = WithOverrides<{ export const FN_SELECTOR = "0xde903ddd" as const; const FN_INPUTS = [ { - name: "_index", type: "uint256", + name: "_index", }, { - name: "_uri", type: "string", + name: "_uri", }, ] as const; const FN_OUTPUTS = [] as const; @@ -127,23 +127,23 @@ export function updateBatchBaseURI( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.index, resolvedOptions.uri] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721/events/AirdropFailed.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721/events/AirdropFailed.ts index 074ba92c517..a5a0941adff 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721/events/AirdropFailed.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721/events/AirdropFailed.ts @@ -46,8 +46,8 @@ export type AirdropFailedEventFilters = Partial<{ */ export function airdropFailedEvent(filters: AirdropFailedEventFilters = {}) { return prepareEvent({ - filters, signature: "event AirdropFailed(address indexed tokenAddress, address indexed tokenOwner, address indexed recipient, uint256 tokenId)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721/write/airdropERC721.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721/write/airdropERC721.ts index 9ab804ed1ce..401d92112b7 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721/write/airdropERC721.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721/write/airdropERC721.ts @@ -33,26 +33,26 @@ export type AirdropERC721Params = WithOverrides<{ export const FN_SELECTOR = "0x7c2c059d" as const; const FN_INPUTS = [ { - name: "tokenAddress", type: "address", + name: "tokenAddress", }, { - name: "tokenOwner", type: "address", + name: "tokenOwner", }, { + type: "tuple[]", + name: "contents", components: [ { - name: "recipient", type: "address", + name: "recipient", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, ], - name: "contents", - type: "tuple[]", }, ] as const; const FN_OUTPUTS = [] as const; @@ -160,19 +160,8 @@ export function airdropERC721( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -182,5 +171,16 @@ export function airdropERC721( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721Claimable/events/TokensClaimed.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721Claimable/events/TokensClaimed.ts index b40aec40e59..e508430c74a 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721Claimable/events/TokensClaimed.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721Claimable/events/TokensClaimed.ts @@ -40,8 +40,8 @@ export type TokensClaimedEventFilters = Partial<{ */ export function tokensClaimedEvent(filters: TokensClaimedEventFilters = {}) { return prepareEvent({ - filters, signature: "event TokensClaimed(address indexed claimer, address indexed receiver, uint256 quantityClaimed)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721Claimable/write/claim.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721Claimable/write/claim.ts index f20c344b892..1b8c9c154f4 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721Claimable/write/claim.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721Claimable/write/claim.ts @@ -24,20 +24,20 @@ export type ClaimParams = WithOverrides<{ export const FN_SELECTOR = "0x3b4b57b0" as const; const FN_INPUTS = [ { - name: "receiver", type: "address", + name: "receiver", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "proofs", type: "bytes32[]", + name: "proofs", }, { - name: "proofMaxQuantityForWallet", type: "uint256", + name: "proofMaxQuantityForWallet", }, ] as const; const FN_OUTPUTS = [] as const; @@ -147,19 +147,8 @@ export function claim( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -170,5 +159,16 @@ export function claim( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IBatchMintMetadata/read/getBatchIdAtIndex.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IBatchMintMetadata/read/getBatchIdAtIndex.ts index 2ab79d4d7e5..4b7f34da2c5 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IBatchMintMetadata/read/getBatchIdAtIndex.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IBatchMintMetadata/read/getBatchIdAtIndex.ts @@ -16,8 +16,8 @@ export type GetBatchIdAtIndexParams = { export const FN_SELECTOR = "0x2419f51b" as const; const FN_INPUTS = [ { - name: "_index", type: "uint256", + name: "_index", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IBurnableERC721/write/burn.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IBurnableERC721/write/burn.ts index b544f973801..a8e4728f254 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IBurnableERC721/write/burn.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IBurnableERC721/write/burn.ts @@ -18,8 +18,8 @@ export type BurnParams = WithOverrides<{ export const FN_SELECTOR = "0x42966c68" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [] as const; @@ -115,23 +115,23 @@ export function burn( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenId] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IClaimableERC721/events/TokensClaimed.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IClaimableERC721/events/TokensClaimed.ts index fd159360a2f..97c65f0ee9a 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IClaimableERC721/events/TokensClaimed.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IClaimableERC721/events/TokensClaimed.ts @@ -46,8 +46,8 @@ export type TokensClaimedEventFilters = Partial<{ */ export function tokensClaimedEvent(filters: TokensClaimedEventFilters = {}) { return prepareEvent({ - filters, signature: "event TokensClaimed(address indexed claimer, address indexed receiver, uint256 indexed startTokenId, uint256 quantityClaimed)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IClaimableERC721/read/verifyClaim.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IClaimableERC721/read/verifyClaim.ts index fcd6bff6605..2696773d0ab 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IClaimableERC721/read/verifyClaim.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IClaimableERC721/read/verifyClaim.ts @@ -16,12 +16,12 @@ export type VerifyClaimParams = { export const FN_SELECTOR = "0x2f92023a" as const; const FN_INPUTS = [ { - name: "_claimer", type: "address", + name: "_claimer", }, { - name: "_quantity", type: "uint256", + name: "_quantity", }, ] as const; const FN_OUTPUTS = [] as const; diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IClaimableERC721/write/claim.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IClaimableERC721/write/claim.ts index 58e59b6eb27..1ddcb4ea94c 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IClaimableERC721/write/claim.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IClaimableERC721/write/claim.ts @@ -19,12 +19,12 @@ export type ClaimParams = WithOverrides<{ export const FN_SELECTOR = "0xaad3ec96" as const; const FN_INPUTS = [ { - name: "_receiver", type: "address", + name: "_receiver", }, { - name: "_quantity", type: "uint256", + name: "_quantity", }, ] as const; const FN_OUTPUTS = [] as const; @@ -123,23 +123,23 @@ export function claim( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.receiver, resolvedOptions.quantity] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/events/TokenURIRevealed.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/events/TokenURIRevealed.ts index 1fecec5b724..2e2af10afbf 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/events/TokenURIRevealed.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/events/TokenURIRevealed.ts @@ -36,8 +36,8 @@ export function tokenURIRevealedEvent( filters: TokenURIRevealedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event TokenURIRevealed(uint256 indexed index, string revealedURI)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/read/encryptDecrypt.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/read/encryptDecrypt.ts index c1f1a999672..0cf4e15cb47 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/read/encryptDecrypt.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/read/encryptDecrypt.ts @@ -17,18 +17,18 @@ export type EncryptDecryptParams = { export const FN_SELECTOR = "0xe7150322" as const; const FN_INPUTS = [ { - name: "data", type: "bytes", + name: "data", }, { - name: "key", type: "bytes", + name: "key", }, ] as const; const FN_OUTPUTS = [ { - name: "result", type: "bytes", + name: "result", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/read/encryptedData.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/read/encryptedData.ts index b1cc0015030..b650d93ec60 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/read/encryptedData.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/read/encryptedData.ts @@ -16,8 +16,8 @@ export type EncryptedDataParams = { export const FN_SELECTOR = "0xa05112fc" as const; const FN_INPUTS = [ { - name: "index", type: "uint256", + name: "index", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/write/reveal.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/write/reveal.ts index 72c6e0dfd22..7a15be4a4a9 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/write/reveal.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/write/reveal.ts @@ -22,18 +22,18 @@ export type RevealParams = WithOverrides<{ export const FN_SELECTOR = "0xce805642" as const; const FN_INPUTS = [ { - name: "identifier", type: "uint256", + name: "identifier", }, { - name: "key", type: "bytes", + name: "key", }, ] as const; const FN_OUTPUTS = [ { - name: "revealedURI", type: "string", + name: "revealedURI", }, ] as const; @@ -131,23 +131,23 @@ export function reveal( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.identifier, resolvedOptions.key] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/events/TokensClaimed.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/events/TokensClaimed.ts index 50e2640a789..04c54d35afd 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/events/TokensClaimed.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/events/TokensClaimed.ts @@ -46,8 +46,8 @@ export type TokensClaimedEventFilters = Partial<{ */ export function tokensClaimedEvent(filters: TokensClaimedEventFilters = {}) { return prepareEvent({ - filters, signature: "event TokensClaimed(uint256 indexed claimConditionIndex, address indexed claimer, address indexed receiver, uint256 startTokenId, uint256 quantityClaimed)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/read/baseURIIndices.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/read/baseURIIndices.ts index 3f13709afb6..1f867c8cdca 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/read/baseURIIndices.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/read/baseURIIndices.ts @@ -16,8 +16,8 @@ export type BaseURIIndicesParams = { export const FN_SELECTOR = "0xd860483f" as const; const FN_INPUTS = [ { - name: "index", type: "uint256", + name: "index", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/read/claimCondition.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/read/claimCondition.ts index c209f44db85..536b5046012 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/read/claimCondition.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/read/claimCondition.ts @@ -8,12 +8,12 @@ export const FN_SELECTOR = "0xd637ed59" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "currentStartId", type: "uint256", + name: "currentStartId", }, { - name: "count", type: "uint256", + name: "count", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/read/getClaimConditionById.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/read/getClaimConditionById.ts index efe91824b1c..f89b83a2294 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/read/getClaimConditionById.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/read/getClaimConditionById.ts @@ -19,48 +19,48 @@ export type GetClaimConditionByIdParams = { export const FN_SELECTOR = "0x6f8934f4" as const; const FN_INPUTS = [ { - name: "_conditionId", type: "uint256", + name: "_conditionId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple", + name: "condition", components: [ { - name: "startTimestamp", type: "uint256", + name: "startTimestamp", }, { - name: "maxClaimableSupply", type: "uint256", + name: "maxClaimableSupply", }, { - name: "supplyClaimed", type: "uint256", + name: "supplyClaimed", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "merkleRoot", type: "bytes32", + name: "merkleRoot", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "metadata", type: "string", + name: "metadata", }, ], - name: "condition", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/write/claim.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/write/claim.ts index 3939be3ce53..1c30efb8cb0 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/write/claim.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/write/claim.ts @@ -35,46 +35,46 @@ export type ClaimParams = WithOverrides<{ export const FN_SELECTOR = "0x84bb1e42" as const; const FN_INPUTS = [ { - name: "receiver", type: "address", + name: "receiver", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { + type: "tuple", + name: "allowlistProof", components: [ { - name: "proof", type: "bytes32[]", + name: "proof", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, ], - name: "allowlistProof", - type: "tuple", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [] as const; @@ -192,19 +192,8 @@ export function claim( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -217,5 +206,16 @@ export function claim( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/write/setClaimConditions.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/write/setClaimConditions.ts index ecdcd810f2d..12d2073a0ee 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/write/setClaimConditions.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/write/setClaimConditions.ts @@ -35,46 +35,46 @@ export type SetClaimConditionsParams = WithOverrides<{ export const FN_SELECTOR = "0x74bc7db7" as const; const FN_INPUTS = [ { + type: "tuple[]", + name: "phases", components: [ { - name: "startTimestamp", type: "uint256", + name: "startTimestamp", }, { - name: "maxClaimableSupply", type: "uint256", + name: "maxClaimableSupply", }, { - name: "supplyClaimed", type: "uint256", + name: "supplyClaimed", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "merkleRoot", type: "bytes32", + name: "merkleRoot", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "metadata", type: "string", + name: "metadata", }, ], - name: "phases", - type: "tuple[]", }, { - name: "resetClaimEligibility", type: "bool", + name: "resetClaimEligibility", }, ] as const; const FN_OUTPUTS = [] as const; @@ -180,19 +180,8 @@ export function setClaimConditions( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -201,5 +190,16 @@ export function setClaimConditions( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IDropSinglePhase/events/TokensClaimed.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IDropSinglePhase/events/TokensClaimed.ts index fd159360a2f..97c65f0ee9a 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IDropSinglePhase/events/TokensClaimed.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IDropSinglePhase/events/TokensClaimed.ts @@ -46,8 +46,8 @@ export type TokensClaimedEventFilters = Partial<{ */ export function tokensClaimedEvent(filters: TokensClaimedEventFilters = {}) { return prepareEvent({ - filters, signature: "event TokensClaimed(address indexed claimer, address indexed receiver, uint256 indexed startTokenId, uint256 quantityClaimed)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IDropSinglePhase/read/claimCondition.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IDropSinglePhase/read/claimCondition.ts index 5b1917ac2ec..88327db4387 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IDropSinglePhase/read/claimCondition.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IDropSinglePhase/read/claimCondition.ts @@ -8,42 +8,42 @@ export const FN_SELECTOR = "0xd637ed59" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple", + name: "condition", components: [ { - name: "startTimestamp", type: "uint256", + name: "startTimestamp", }, { - name: "maxClaimableSupply", type: "uint256", + name: "maxClaimableSupply", }, { - name: "supplyClaimed", type: "uint256", + name: "supplyClaimed", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "merkleRoot", type: "bytes32", + name: "merkleRoot", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "metadata", type: "string", + name: "metadata", }, ], - name: "condition", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IDropSinglePhase/write/claim.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IDropSinglePhase/write/claim.ts index 3939be3ce53..1c30efb8cb0 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IDropSinglePhase/write/claim.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IDropSinglePhase/write/claim.ts @@ -35,46 +35,46 @@ export type ClaimParams = WithOverrides<{ export const FN_SELECTOR = "0x84bb1e42" as const; const FN_INPUTS = [ { - name: "receiver", type: "address", + name: "receiver", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { + type: "tuple", + name: "allowlistProof", components: [ { - name: "proof", type: "bytes32[]", + name: "proof", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, ], - name: "allowlistProof", - type: "tuple", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [] as const; @@ -192,19 +192,8 @@ export function claim( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -217,5 +206,16 @@ export function claim( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IDropSinglePhase/write/setClaimConditions.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IDropSinglePhase/write/setClaimConditions.ts index 27f4ce8cc9e..a24b8c898b3 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IDropSinglePhase/write/setClaimConditions.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IDropSinglePhase/write/setClaimConditions.ts @@ -35,46 +35,46 @@ export type SetClaimConditionsParams = WithOverrides<{ export const FN_SELECTOR = "0x426cfaf3" as const; const FN_INPUTS = [ { + type: "tuple", + name: "phase", components: [ { - name: "startTimestamp", type: "uint256", + name: "startTimestamp", }, { - name: "maxClaimableSupply", type: "uint256", + name: "maxClaimableSupply", }, { - name: "supplyClaimed", type: "uint256", + name: "supplyClaimed", }, { - name: "quantityLimitPerWallet", type: "uint256", + name: "quantityLimitPerWallet", }, { - name: "merkleRoot", type: "bytes32", + name: "merkleRoot", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "metadata", type: "string", + name: "metadata", }, ], - name: "phase", - type: "tuple", }, { - name: "resetClaimEligibility", type: "bool", + name: "resetClaimEligibility", }, ] as const; const FN_OUTPUTS = [] as const; @@ -180,19 +180,8 @@ export function setClaimConditions( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -201,5 +190,16 @@ export function setClaimConditions( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/events/Approval.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/events/Approval.ts index cd341395868..e60cc1a073c 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/events/Approval.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/events/Approval.ts @@ -46,8 +46,8 @@ export type ApprovalEventFilters = Partial<{ */ export function approvalEvent(filters: ApprovalEventFilters = {}) { return prepareEvent({ - filters, signature: "event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/events/ApprovalForAll.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/events/ApprovalForAll.ts index b2735569c9e..585bd7da021 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/events/ApprovalForAll.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/events/ApprovalForAll.ts @@ -40,8 +40,8 @@ export type ApprovalForAllEventFilters = Partial<{ */ export function approvalForAllEvent(filters: ApprovalForAllEventFilters = {}) { return prepareEvent({ - filters, signature: "event ApprovalForAll(address indexed owner, address indexed operator, bool approved)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/events/Transfer.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/events/Transfer.ts index 4163cf5363a..83c0e99117b 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/events/Transfer.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/events/Transfer.ts @@ -46,8 +46,8 @@ export type TransferEventFilters = Partial<{ */ export function transferEvent(filters: TransferEventFilters = {}) { return prepareEvent({ - filters, signature: "event Transfer(address indexed from, address indexed to, uint256 indexed tokenId)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/balanceOf.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/balanceOf.ts index c75d7c35b12..95ba9ffd8ac 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/balanceOf.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/balanceOf.ts @@ -16,8 +16,8 @@ export type BalanceOfParams = { export const FN_SELECTOR = "0x70a08231" as const; const FN_INPUTS = [ { - name: "owner", type: "address", + name: "owner", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/getApproved.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/getApproved.ts index 3b08cf7171d..62c67865417 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/getApproved.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/getApproved.ts @@ -16,8 +16,8 @@ export type GetApprovedParams = { export const FN_SELECTOR = "0x081812fc" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/isApprovedForAll.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/isApprovedForAll.ts index 518585e4966..ef646d5aeb4 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/isApprovedForAll.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/isApprovedForAll.ts @@ -17,12 +17,12 @@ export type IsApprovedForAllParams = { export const FN_SELECTOR = "0xe985e9c5" as const; const FN_INPUTS = [ { - name: "owner", type: "address", + name: "owner", }, { - name: "operator", type: "address", + name: "operator", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/ownerOf.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/ownerOf.ts index d47f48285ab..401e641161a 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/ownerOf.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/ownerOf.ts @@ -16,8 +16,8 @@ export type OwnerOfParams = { export const FN_SELECTOR = "0x6352211e" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/tokenURI.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/tokenURI.ts index 1088ee3775c..968f8ffa3a0 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/tokenURI.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/tokenURI.ts @@ -16,8 +16,8 @@ export type TokenURIParams = { export const FN_SELECTOR = "0xc87b56dd" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/approve.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/approve.ts index d8980b43c68..f11264daf45 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/approve.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/approve.ts @@ -19,12 +19,12 @@ export type ApproveParams = WithOverrides<{ export const FN_SELECTOR = "0x095ea7b3" as const; const FN_INPUTS = [ { - name: "to", type: "address", + name: "to", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [] as const; @@ -123,23 +123,23 @@ export function approve( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.to, resolvedOptions.tokenId] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/safeTransferFrom.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/safeTransferFrom.ts index e05e5fcaca5..1f5c2679cdf 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/safeTransferFrom.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/safeTransferFrom.ts @@ -20,16 +20,16 @@ export type SafeTransferFromParams = WithOverrides<{ export const FN_SELECTOR = "0x42842e0e" as const; const FN_INPUTS = [ { - name: "from", type: "address", + name: "from", }, { - name: "to", type: "address", + name: "to", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [] as const; @@ -137,19 +137,8 @@ export function safeTransferFrom( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -159,5 +148,16 @@ export function safeTransferFrom( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/setApprovalForAll.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/setApprovalForAll.ts index 9096c337621..f4cbe38611c 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/setApprovalForAll.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/setApprovalForAll.ts @@ -19,12 +19,12 @@ export type SetApprovalForAllParams = WithOverrides<{ export const FN_SELECTOR = "0xa22cb465" as const; const FN_INPUTS = [ { - name: "operator", type: "address", + name: "operator", }, { - name: "_approved", type: "bool", + name: "_approved", }, ] as const; const FN_OUTPUTS = [] as const; @@ -127,23 +127,23 @@ export function setApprovalForAll( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.operator, resolvedOptions.approved] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/transferFrom.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/transferFrom.ts index bd1283d5c04..16b2674bffe 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/transferFrom.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/transferFrom.ts @@ -20,16 +20,16 @@ export type TransferFromParams = WithOverrides<{ export const FN_SELECTOR = "0x23b872dd" as const; const FN_INPUTS = [ { - name: "from", type: "address", + name: "from", }, { - name: "to", type: "address", + name: "to", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [] as const; @@ -137,19 +137,8 @@ export function transferFrom( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -159,5 +148,16 @@ export function transferFrom( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721AQueryable/events/ConsecutiveTransfer.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721AQueryable/events/ConsecutiveTransfer.ts index f2b6876432f..86d66e03f66 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721AQueryable/events/ConsecutiveTransfer.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721AQueryable/events/ConsecutiveTransfer.ts @@ -48,8 +48,8 @@ export function consecutiveTransferEvent( filters: ConsecutiveTransferEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721AQueryable/read/tokensOfOwner.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721AQueryable/read/tokensOfOwner.ts index 345073d1a33..285fff85165 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721AQueryable/read/tokensOfOwner.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721AQueryable/read/tokensOfOwner.ts @@ -16,8 +16,8 @@ export type TokensOfOwnerParams = { export const FN_SELECTOR = "0x8462151c" as const; const FN_INPUTS = [ { - name: "owner", type: "address", + name: "owner", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721AQueryable/read/tokensOfOwnerIn.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721AQueryable/read/tokensOfOwnerIn.ts index 3ab75e3ee86..72eb5418268 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721AQueryable/read/tokensOfOwnerIn.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721AQueryable/read/tokensOfOwnerIn.ts @@ -18,16 +18,16 @@ export type TokensOfOwnerInParams = { export const FN_SELECTOR = "0x99a2557a" as const; const FN_INPUTS = [ { - name: "owner", type: "address", + name: "owner", }, { - name: "start", type: "uint256", + name: "start", }, { - name: "stop", type: "uint256", + name: "stop", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721Enumerable/read/tokenByIndex.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721Enumerable/read/tokenByIndex.ts index e3ec8eac5f0..e8bea47ee9a 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721Enumerable/read/tokenByIndex.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721Enumerable/read/tokenByIndex.ts @@ -16,8 +16,8 @@ export type TokenByIndexParams = { export const FN_SELECTOR = "0x4f6ccce7" as const; const FN_INPUTS = [ { - name: "_index", type: "uint256", + name: "_index", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721Enumerable/read/tokenOfOwnerByIndex.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721Enumerable/read/tokenOfOwnerByIndex.ts index 260539c27a7..fae88bc7dc4 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721Enumerable/read/tokenOfOwnerByIndex.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721Enumerable/read/tokenOfOwnerByIndex.ts @@ -17,12 +17,12 @@ export type TokenOfOwnerByIndexParams = { export const FN_SELECTOR = "0x2f745c59" as const; const FN_INPUTS = [ { - name: "_owner", type: "address", + name: "_owner", }, { - name: "_index", type: "uint256", + name: "_index", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721Receiver/write/onERC721Received.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721Receiver/write/onERC721Received.ts index 68ff8a10a2b..1c908156fcf 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IERC721Receiver/write/onERC721Received.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IERC721Receiver/write/onERC721Received.ts @@ -21,20 +21,20 @@ export type OnERC721ReceivedParams = WithOverrides<{ export const FN_SELECTOR = "0x150b7a02" as const; const FN_INPUTS = [ { - name: "operator", type: "address", + name: "operator", }, { - name: "from", type: "address", + name: "from", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [ @@ -150,19 +150,8 @@ export function onERC721Received( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -173,5 +162,16 @@ export function onERC721Received( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/ILazyMint/events/TokensLazyMinted.ts b/packages/thirdweb/src/extensions/erc721/__generated__/ILazyMint/events/TokensLazyMinted.ts index 6fe312990fc..26bf1ce6d2f 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/ILazyMint/events/TokensLazyMinted.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/ILazyMint/events/TokensLazyMinted.ts @@ -36,8 +36,8 @@ export function tokensLazyMintedEvent( filters: TokensLazyMintedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event TokensLazyMinted(uint256 indexed startTokenId, uint256 endTokenId, string baseURI, bytes encryptedBaseURI)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/ILazyMint/write/lazyMint.ts b/packages/thirdweb/src/extensions/erc721/__generated__/ILazyMint/write/lazyMint.ts index 1eeb18fc85e..06ce4972ee8 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/ILazyMint/write/lazyMint.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/ILazyMint/write/lazyMint.ts @@ -23,22 +23,22 @@ export type LazyMintParams = WithOverrides<{ export const FN_SELECTOR = "0xd37c353b" as const; const FN_INPUTS = [ { - name: "amount", type: "uint256", + name: "amount", }, { - name: "baseURIForTokens", type: "string", + name: "baseURIForTokens", }, { - name: "extraData", type: "bytes", + name: "extraData", }, ] as const; const FN_OUTPUTS = [ { - name: "batchId", type: "uint256", + name: "batchId", }, ] as const; @@ -143,19 +143,8 @@ export function lazyMint( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -165,5 +154,16 @@ export function lazyMint( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IMintableERC721/events/TokensMinted.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IMintableERC721/events/TokensMinted.ts index b4e26aa7184..e9b672cdac1 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IMintableERC721/events/TokensMinted.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IMintableERC721/events/TokensMinted.ts @@ -40,8 +40,8 @@ export type TokensMintedEventFilters = Partial<{ */ export function tokensMintedEvent(filters: TokensMintedEventFilters = {}) { return prepareEvent({ - filters, signature: "event TokensMinted(address indexed mintedTo, uint256 indexed tokenIdMinted, string uri)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IMintableERC721/write/mintTo.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IMintableERC721/write/mintTo.ts index 722f0bace6a..a66e7e3dad9 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IMintableERC721/write/mintTo.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IMintableERC721/write/mintTo.ts @@ -19,12 +19,12 @@ export type MintToParams = WithOverrides<{ export const FN_SELECTOR = "0x0075a317" as const; const FN_INPUTS = [ { - name: "to", type: "address", + name: "to", }, { - name: "uri", type: "string", + name: "uri", }, ] as const; const FN_OUTPUTS = [ @@ -127,23 +127,23 @@ export function mintTo( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.to, resolvedOptions.uri] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/INFTMetadata/read/supportsInterface.ts b/packages/thirdweb/src/extensions/erc721/__generated__/INFTMetadata/read/supportsInterface.ts index 8ead51593eb..e445a10b9db 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/INFTMetadata/read/supportsInterface.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/INFTMetadata/read/supportsInterface.ts @@ -19,8 +19,8 @@ export type SupportsInterfaceParams = { export const FN_SELECTOR = "0x01ffc9a7" as const; const FN_INPUTS = [ { - name: "interfaceId", type: "bytes4", + name: "interfaceId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/INFTMetadata/write/setTokenURI.ts b/packages/thirdweb/src/extensions/erc721/__generated__/INFTMetadata/write/setTokenURI.ts index e6fafb0e530..663fc79fa6d 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/INFTMetadata/write/setTokenURI.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/INFTMetadata/write/setTokenURI.ts @@ -19,12 +19,12 @@ export type SetTokenURIParams = WithOverrides<{ export const FN_SELECTOR = "0x162094c4" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, { - name: "_uri", type: "string", + name: "_uri", }, ] as const; const FN_OUTPUTS = [] as const; @@ -125,23 +125,23 @@ export function setTokenURI( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenId, resolvedOptions.uri] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/INFTStake/write/depositRewardTokens.ts b/packages/thirdweb/src/extensions/erc721/__generated__/INFTStake/write/depositRewardTokens.ts index d434b122090..fdd553b85a6 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/INFTStake/write/depositRewardTokens.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/INFTStake/write/depositRewardTokens.ts @@ -18,8 +18,8 @@ export type DepositRewardTokensParams = WithOverrides<{ export const FN_SELECTOR = "0x16c621e0" as const; const FN_INPUTS = [ { - name: "_amount", type: "uint256", + name: "_amount", }, ] as const; const FN_OUTPUTS = [] as const; @@ -119,23 +119,23 @@ export function depositRewardTokens( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.amount] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/INFTStake/write/withdrawRewardTokens.ts b/packages/thirdweb/src/extensions/erc721/__generated__/INFTStake/write/withdrawRewardTokens.ts index 66cec30444f..d3980b873a9 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/INFTStake/write/withdrawRewardTokens.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/INFTStake/write/withdrawRewardTokens.ts @@ -18,8 +18,8 @@ export type WithdrawRewardTokensParams = WithOverrides<{ export const FN_SELECTOR = "0xcb43b2dd" as const; const FN_INPUTS = [ { - name: "_amount", type: "uint256", + name: "_amount", }, ] as const; const FN_OUTPUTS = [] as const; @@ -121,23 +121,23 @@ export function withdrawRewardTokens( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.amount] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadata/read/sharedMetadata.ts b/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadata/read/sharedMetadata.ts index 430d0358c54..a3d246e412b 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadata/read/sharedMetadata.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadata/read/sharedMetadata.ts @@ -8,20 +8,20 @@ export const FN_SELECTOR = "0xb280f703" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "name", type: "string", + name: "name", }, { - name: "description", type: "string", + name: "description", }, { - name: "imageURI", type: "string", + name: "imageURI", }, { - name: "animationURI", type: "string", + name: "animationURI", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadata/write/setSharedMetadata.ts b/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadata/write/setSharedMetadata.ts index d3213e60abd..0c52ecd7ecc 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadata/write/setSharedMetadata.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadata/write/setSharedMetadata.ts @@ -27,26 +27,26 @@ export type SetSharedMetadataParams = WithOverrides<{ export const FN_SELECTOR = "0xa7d27d9d" as const; const FN_INPUTS = [ { + type: "tuple", + name: "_metadata", components: [ { - name: "name", type: "string", + name: "name", }, { - name: "description", type: "string", + name: "description", }, { - name: "imageURI", type: "string", + name: "imageURI", }, { - name: "animationURI", type: "string", + name: "animationURI", }, ], - name: "_metadata", - type: "tuple", }, ] as const; const FN_OUTPUTS = [] as const; @@ -146,23 +146,23 @@ export function setSharedMetadata( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.metadata] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/events/SharedMetadataDeleted.ts b/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/events/SharedMetadataDeleted.ts index a96c36cd312..fad569bc974 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/events/SharedMetadataDeleted.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/events/SharedMetadataDeleted.ts @@ -36,7 +36,7 @@ export function sharedMetadataDeletedEvent( filters: SharedMetadataDeletedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event SharedMetadataDeleted(bytes32 indexed id)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/events/SharedMetadataUpdated.ts b/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/events/SharedMetadataUpdated.ts index 3b3f5625eda..a500645cb13 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/events/SharedMetadataUpdated.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/events/SharedMetadataUpdated.ts @@ -36,8 +36,8 @@ export function sharedMetadataUpdatedEvent( filters: SharedMetadataUpdatedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event SharedMetadataUpdated(bytes32 indexed id, string name, string description, string imageURI, string animationURI)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/read/getAllSharedMetadata.ts b/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/read/getAllSharedMetadata.ts index da31f2a43bc..e025d2380a5 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/read/getAllSharedMetadata.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/read/getAllSharedMetadata.ts @@ -8,36 +8,36 @@ export const FN_SELECTOR = "0xfc3c2a73" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "metadata", components: [ { - name: "id", type: "bytes32", + name: "id", }, { + type: "tuple", + name: "metadata", components: [ { - name: "name", type: "string", + name: "name", }, { - name: "description", type: "string", + name: "description", }, { - name: "imageURI", type: "string", + name: "imageURI", }, { - name: "animationURI", type: "string", + name: "animationURI", }, ], - name: "metadata", - type: "tuple", }, ], - name: "metadata", - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/write/deleteSharedMetadata.ts b/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/write/deleteSharedMetadata.ts index 53289cc2231..627bff7d9d2 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/write/deleteSharedMetadata.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/write/deleteSharedMetadata.ts @@ -18,8 +18,8 @@ export type DeleteSharedMetadataParams = WithOverrides<{ export const FN_SELECTOR = "0x1ebb2422" as const; const FN_INPUTS = [ { - name: "id", type: "bytes32", + name: "id", }, ] as const; const FN_OUTPUTS = [] as const; @@ -121,23 +121,23 @@ export function deleteSharedMetadata( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.id] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/write/setSharedMetadata.ts b/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/write/setSharedMetadata.ts index a0f31717dc7..b8cf5949eed 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/write/setSharedMetadata.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/write/setSharedMetadata.ts @@ -28,30 +28,30 @@ export type SetSharedMetadataParams = WithOverrides<{ export const FN_SELECTOR = "0x696b0c1a" as const; const FN_INPUTS = [ { + type: "tuple", + name: "metadata", components: [ { - name: "name", type: "string", + name: "name", }, { - name: "description", type: "string", + name: "description", }, { - name: "imageURI", type: "string", + name: "imageURI", }, { - name: "animationURI", type: "string", + name: "animationURI", }, ], - name: "metadata", - type: "tuple", }, { - name: "id", type: "bytes32", + name: "id", }, ] as const; const FN_OUTPUTS = [] as const; @@ -154,23 +154,23 @@ export function setSharedMetadata( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.metadata, resolvedOptions.id] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721/events/TokensMintedWithSignature.ts b/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721/events/TokensMintedWithSignature.ts index ca29a0a1af8..a000ef2b4b1 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721/events/TokensMintedWithSignature.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721/events/TokensMintedWithSignature.ts @@ -48,8 +48,8 @@ export function tokensMintedWithSignatureEvent( filters: TokensMintedWithSignatureEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event TokensMintedWithSignature(address indexed signer, address indexed mintedTo, uint256 indexed tokenIdMinted, (address to, address royaltyRecipient, uint256 royaltyBps, address primarySaleRecipient, string uri, uint256 price, address currency, uint128 validityStartTimestamp, uint128 validityEndTimestamp, bytes32 uid) mintpayload)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721/read/verify.ts b/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721/read/verify.ts index 7fe7800d736..c126f868b3a 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721/read/verify.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721/read/verify.ts @@ -32,64 +32,64 @@ export type VerifyParams = { export const FN_SELECTOR = "0xde903774" as const; const FN_INPUTS = [ { + type: "tuple", + name: "payload", components: [ { - name: "to", type: "address", + name: "to", }, { - name: "royaltyRecipient", type: "address", + name: "royaltyRecipient", }, { - name: "royaltyBps", type: "uint256", + name: "royaltyBps", }, { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, { - name: "uri", type: "string", + name: "uri", }, { - name: "price", type: "uint256", + name: "price", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "validityStartTimestamp", type: "uint128", + name: "validityStartTimestamp", }, { - name: "validityEndTimestamp", type: "uint128", + name: "validityEndTimestamp", }, { - name: "uid", type: "bytes32", + name: "uid", }, ], - name: "payload", - type: "tuple", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [ { - name: "success", type: "bool", + name: "success", }, { - name: "signer", type: "address", + name: "signer", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721/write/mintWithSignature.ts b/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721/write/mintWithSignature.ts index 25d1533f72c..8005a91782e 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721/write/mintWithSignature.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721/write/mintWithSignature.ts @@ -34,60 +34,60 @@ export type MintWithSignatureParams = WithOverrides<{ export const FN_SELECTOR = "0x2c4510f8" as const; const FN_INPUTS = [ { + type: "tuple", + name: "payload", components: [ { - name: "to", type: "address", + name: "to", }, { - name: "royaltyRecipient", type: "address", + name: "royaltyRecipient", }, { - name: "royaltyBps", type: "uint256", + name: "royaltyBps", }, { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, { - name: "uri", type: "string", + name: "uri", }, { - name: "price", type: "uint256", + name: "price", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "validityStartTimestamp", type: "uint128", + name: "validityStartTimestamp", }, { - name: "validityEndTimestamp", type: "uint128", + name: "validityEndTimestamp", }, { - name: "uid", type: "bytes32", + name: "uid", }, ], - name: "payload", - type: "tuple", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [ { - name: "tokenIdMinted", type: "uint256", + name: "tokenIdMinted", }, ] as const; @@ -189,23 +189,23 @@ export function mintWithSignature( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.payload, resolvedOptions.signature] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721_v2/events/TokensMintedWithSignature.ts b/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721_v2/events/TokensMintedWithSignature.ts index 6070f21cb48..390c8b29837 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721_v2/events/TokensMintedWithSignature.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721_v2/events/TokensMintedWithSignature.ts @@ -48,8 +48,8 @@ export function tokensMintedWithSignatureEvent( filters: TokensMintedWithSignatureEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event TokensMintedWithSignature(address indexed signer, address indexed mintedTo, uint256 indexed tokenIdMinted, (address to, address royaltyRecipient, uint256 royaltyBps, address primarySaleRecipient, string uri, uint256 quantity, uint256 pricePerToken, address currency, uint128 validityStartTimestamp, uint128 validityEndTimestamp, bytes32 uid) mintRequest)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721_v2/read/verify.ts b/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721_v2/read/verify.ts index eea0742e752..8c64cb10777 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721_v2/read/verify.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721_v2/read/verify.ts @@ -33,68 +33,68 @@ export type VerifyParams = { export const FN_SELECTOR = "0x252e82e8" as const; const FN_INPUTS = [ { + type: "tuple", + name: "req", components: [ { - name: "to", type: "address", + name: "to", }, { - name: "royaltyRecipient", type: "address", + name: "royaltyRecipient", }, { - name: "royaltyBps", type: "uint256", + name: "royaltyBps", }, { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, { - name: "uri", type: "string", + name: "uri", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "validityStartTimestamp", type: "uint128", + name: "validityStartTimestamp", }, { - name: "validityEndTimestamp", type: "uint128", + name: "validityEndTimestamp", }, { - name: "uid", type: "bytes32", + name: "uid", }, ], - name: "req", - type: "tuple", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [ { - name: "success", type: "bool", + name: "success", }, { - name: "signer", type: "address", + name: "signer", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721_v2/write/mintWithSignature.ts b/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721_v2/write/mintWithSignature.ts index d3a242538bf..e768fbb80c6 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721_v2/write/mintWithSignature.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721_v2/write/mintWithSignature.ts @@ -35,64 +35,64 @@ export type MintWithSignatureParams = WithOverrides<{ export const FN_SELECTOR = "0x439c7be5" as const; const FN_INPUTS = [ { + type: "tuple", + name: "payload", components: [ { - name: "to", type: "address", + name: "to", }, { - name: "royaltyRecipient", type: "address", + name: "royaltyRecipient", }, { - name: "royaltyBps", type: "uint256", + name: "royaltyBps", }, { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, { - name: "uri", type: "string", + name: "uri", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "validityStartTimestamp", type: "uint128", + name: "validityStartTimestamp", }, { - name: "validityEndTimestamp", type: "uint128", + name: "validityEndTimestamp", }, { - name: "uid", type: "bytes32", + name: "uid", }, ], - name: "payload", - type: "tuple", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [ { - name: "signer", type: "address", + name: "signer", }, ] as const; @@ -194,23 +194,23 @@ export function mintWithSignature( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.payload, resolvedOptions.signature] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/events/RewardsClaimed.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/events/RewardsClaimed.ts index 88248c5ecbd..28b8a7795ad 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/events/RewardsClaimed.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/events/RewardsClaimed.ts @@ -34,8 +34,8 @@ export type RewardsClaimedEventFilters = Partial<{ */ export function rewardsClaimedEvent(filters: RewardsClaimedEventFilters = {}) { return prepareEvent({ - filters, signature: "event RewardsClaimed(address indexed staker, uint256 rewardAmount)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/events/TokensStaked.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/events/TokensStaked.ts index 69c85b925fe..ddfeb7efc4a 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/events/TokensStaked.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/events/TokensStaked.ts @@ -40,8 +40,8 @@ export type TokensStakedEventFilters = Partial<{ */ export function tokensStakedEvent(filters: TokensStakedEventFilters = {}) { return prepareEvent({ - filters, signature: "event TokensStaked(address indexed staker, uint256[] indexed tokenIds)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/events/TokensWithdrawn.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/events/TokensWithdrawn.ts index 398986435e3..53692d1f2bc 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/events/TokensWithdrawn.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/events/TokensWithdrawn.ts @@ -42,8 +42,8 @@ export function tokensWithdrawnEvent( filters: TokensWithdrawnEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event TokensWithdrawn(address indexed staker, uint256[] indexed tokenIds)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/read/getStakeInfo.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/read/getStakeInfo.ts index 6865a02efdb..470d3344098 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/read/getStakeInfo.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/read/getStakeInfo.ts @@ -16,18 +16,18 @@ export type GetStakeInfoParams = { export const FN_SELECTOR = "0xc3453153" as const; const FN_INPUTS = [ { - name: "staker", type: "address", + name: "staker", }, ] as const; const FN_OUTPUTS = [ { - name: "_tokensStaked", type: "uint256[]", + name: "_tokensStaked", }, { - name: "_rewards", type: "uint256", + name: "_rewards", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/write/stake.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/write/stake.ts index af616913fd7..c47c2d400b3 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/write/stake.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/write/stake.ts @@ -21,8 +21,8 @@ export type StakeParams = WithOverrides<{ export const FN_SELECTOR = "0x0fbf0a93" as const; const FN_INPUTS = [ { - name: "tokenIds", type: "uint256[]", + name: "tokenIds", }, ] as const; const FN_OUTPUTS = [] as const; @@ -118,23 +118,23 @@ export function stake( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenIds] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/write/withdraw.ts b/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/write/withdraw.ts index 49b00b8d192..d7f2ad88809 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/write/withdraw.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/write/withdraw.ts @@ -21,8 +21,8 @@ export type WithdrawParams = WithOverrides<{ export const FN_SELECTOR = "0x983d95ce" as const; const FN_INPUTS = [ { - name: "tokenIds", type: "uint256[]", + name: "tokenIds", }, ] as const; const FN_OUTPUTS = [] as const; @@ -118,23 +118,23 @@ export function withdraw( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenIds] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/events/TokensMinted.ts b/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/events/TokensMinted.ts index b4e26aa7184..e9b672cdac1 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/events/TokensMinted.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/events/TokensMinted.ts @@ -40,8 +40,8 @@ export type TokensMintedEventFilters = Partial<{ */ export function tokensMintedEvent(filters: TokensMintedEventFilters = {}) { return prepareEvent({ - filters, signature: "event TokensMinted(address indexed mintedTo, uint256 indexed tokenIdMinted, string uri)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/events/TokensMintedWithSignature.ts b/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/events/TokensMintedWithSignature.ts index 38f41c7c98b..e96d9d79ff7 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/events/TokensMintedWithSignature.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/events/TokensMintedWithSignature.ts @@ -48,8 +48,8 @@ export function tokensMintedWithSignatureEvent( filters: TokensMintedWithSignatureEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event TokensMintedWithSignature(address indexed signer, address indexed mintedTo, uint256 indexed tokenIdMinted, (address to, address royaltyRecipient, uint256 royaltyBps, address primarySaleRecipient, uint256 quantity, uint256 pricePerToken, address currency, uint128 validityStartTimestamp, uint128 validityEndTimestamp, string uri) mintRequest)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/read/supportsInterface.ts b/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/read/supportsInterface.ts index 8ead51593eb..e445a10b9db 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/read/supportsInterface.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/read/supportsInterface.ts @@ -19,8 +19,8 @@ export type SupportsInterfaceParams = { export const FN_SELECTOR = "0x01ffc9a7" as const; const FN_INPUTS = [ { - name: "interfaceId", type: "bytes4", + name: "interfaceId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/read/tokenURI.ts b/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/read/tokenURI.ts index 1088ee3775c..968f8ffa3a0 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/read/tokenURI.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/read/tokenURI.ts @@ -16,8 +16,8 @@ export type TokenURIParams = { export const FN_SELECTOR = "0xc87b56dd" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/cancel.ts b/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/cancel.ts index 0c2e0f3e9ba..cd952cd72a7 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/cancel.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/cancel.ts @@ -18,8 +18,8 @@ export type CancelParams = WithOverrides<{ export const FN_SELECTOR = "0x40e58ee5" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [] as const; @@ -115,23 +115,23 @@ export function cancel( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenId] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/initialize.ts b/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/initialize.ts index ae9acd0a859..31971565a3c 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/initialize.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/initialize.ts @@ -51,44 +51,44 @@ export type InitializeParams = WithOverrides<{ export const FN_SELECTOR = "0xe1591634" as const; const FN_INPUTS = [ { - name: "_defaultAdmin", type: "address", + name: "_defaultAdmin", }, { - name: "_name", type: "string", + name: "_name", }, { - name: "_symbol", type: "string", + name: "_symbol", }, { - name: "_contractURI", type: "string", + name: "_contractURI", }, { - name: "_trustedForwarders", type: "address[]", + name: "_trustedForwarders", }, { - name: "_saleRecipient", type: "address", + name: "_saleRecipient", }, { - name: "_royaltyRecipient", type: "address", + name: "_royaltyRecipient", }, { - name: "_royaltyBps", type: "uint128", + name: "_royaltyBps", }, { - name: "_platformFeeBps", type: "uint128", + name: "_platformFeeBps", }, { - name: "_platformFeeRecipient", type: "address", + name: "_platformFeeRecipient", }, ] as const; const FN_OUTPUTS = [] as const; @@ -224,19 +224,8 @@ export function initialize( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -253,5 +242,16 @@ export function initialize( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/mintTo.ts b/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/mintTo.ts index 9cc6dc7e5fe..a492ce9f95d 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/mintTo.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/mintTo.ts @@ -19,18 +19,18 @@ export type MintToParams = WithOverrides<{ export const FN_SELECTOR = "0x0075a317" as const; const FN_INPUTS = [ { - name: "_to", type: "address", + name: "_to", }, { - name: "_uri", type: "string", + name: "_uri", }, ] as const; const FN_OUTPUTS = [ { - name: "tokenIdMinted", type: "uint256", + name: "tokenIdMinted", }, ] as const; @@ -128,23 +128,23 @@ export function mintTo( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.to, resolvedOptions.uri] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/mintWithSignature.ts b/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/mintWithSignature.ts index 127443b9598..11cdff84051 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/mintWithSignature.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/mintWithSignature.ts @@ -34,60 +34,60 @@ export type MintWithSignatureParams = WithOverrides<{ export const FN_SELECTOR = "0x91c5ee92" as const; const FN_INPUTS = [ { + type: "tuple", + name: "_req", components: [ { - name: "to", type: "address", + name: "to", }, { - name: "royaltyRecipient", type: "address", + name: "royaltyRecipient", }, { - name: "royaltyBps", type: "uint256", + name: "royaltyBps", }, { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "validityStartTimestamp", type: "uint128", + name: "validityStartTimestamp", }, { - name: "validityEndTimestamp", type: "uint128", + name: "validityEndTimestamp", }, { - name: "uri", type: "string", + name: "uri", }, ], - name: "_req", - type: "tuple", }, { - name: "_signature", type: "bytes", + name: "_signature", }, ] as const; const FN_OUTPUTS = [ { - name: "signer", type: "address", + name: "signer", }, ] as const; @@ -189,23 +189,23 @@ export function mintWithSignature( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.req, resolvedOptions.signature] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/revoke.ts b/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/revoke.ts index b9e637a13fc..af072eb19e7 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/revoke.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/LoyaltyCard/write/revoke.ts @@ -18,8 +18,8 @@ export type RevokeParams = WithOverrides<{ export const FN_SELECTOR = "0x20c5429b" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [] as const; @@ -115,23 +115,23 @@ export function revoke( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenId] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/events/TokensUnwrapped.ts b/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/events/TokensUnwrapped.ts index ce08d0e6a20..fa409453d53 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/events/TokensUnwrapped.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/events/TokensUnwrapped.ts @@ -48,8 +48,8 @@ export function tokensUnwrappedEvent( filters: TokensUnwrappedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event TokensUnwrapped(address indexed unwrapper, address indexed recipientOfWrappedContents, uint256 indexed tokenIdOfWrappedToken)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/events/TokensWrapped.ts b/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/events/TokensWrapped.ts index 6752b8171c0..fc620668141 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/events/TokensWrapped.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/events/TokensWrapped.ts @@ -46,8 +46,8 @@ export type TokensWrappedEventFilters = Partial<{ */ export function tokensWrappedEvent(filters: TokensWrappedEventFilters = {}) { return prepareEvent({ - filters, signature: "event TokensWrapped(address indexed wrapper, address indexed recipientOfWrappedToken, uint256 indexed tokenIdOfWrappedToken, (address assetContract, uint8 tokenType, uint256 tokenId, uint256 amount)[] wrappedContents)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/read/getWrappedContents.ts b/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/read/getWrappedContents.ts index 0f0e7c0e59f..a5629461f55 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/read/getWrappedContents.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/read/getWrappedContents.ts @@ -16,32 +16,32 @@ export type GetWrappedContentsParams = { export const FN_SELECTOR = "0xd5576d26" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "contents", components: [ { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "amount", type: "uint256", + name: "amount", }, ], - name: "contents", - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/read/supportsInterface.ts b/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/read/supportsInterface.ts index 8ead51593eb..e445a10b9db 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/read/supportsInterface.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/read/supportsInterface.ts @@ -19,8 +19,8 @@ export type SupportsInterfaceParams = { export const FN_SELECTOR = "0x01ffc9a7" as const; const FN_INPUTS = [ { - name: "interfaceId", type: "bytes4", + name: "interfaceId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/read/tokenURI.ts b/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/read/tokenURI.ts index 1088ee3775c..968f8ffa3a0 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/read/tokenURI.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/read/tokenURI.ts @@ -16,8 +16,8 @@ export type TokenURIParams = { export const FN_SELECTOR = "0xc87b56dd" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/write/initialize.ts b/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/write/initialize.ts index 705cfeb456e..51d6ee7eb4c 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/write/initialize.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/write/initialize.ts @@ -39,32 +39,32 @@ export type InitializeParams = WithOverrides<{ export const FN_SELECTOR = "0x754b8fe7" as const; const FN_INPUTS = [ { - name: "_defaultAdmin", type: "address", + name: "_defaultAdmin", }, { - name: "_name", type: "string", + name: "_name", }, { - name: "_symbol", type: "string", + name: "_symbol", }, { - name: "_contractURI", type: "string", + name: "_contractURI", }, { - name: "_trustedForwarders", type: "address[]", + name: "_trustedForwarders", }, { - name: "_royaltyRecipient", type: "address", + name: "_royaltyRecipient", }, { - name: "_royaltyBps", type: "uint256", + name: "_royaltyBps", }, ] as const; const FN_OUTPUTS = [] as const; @@ -188,19 +188,8 @@ export function initialize( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -214,5 +203,16 @@ export function initialize( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/write/unwrap.ts b/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/write/unwrap.ts index e1bd6b38d57..ea7207513cf 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/write/unwrap.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/write/unwrap.ts @@ -22,12 +22,12 @@ export type UnwrapParams = WithOverrides<{ export const FN_SELECTOR = "0x7647691d" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, { - name: "_recipient", type: "address", + name: "_recipient", }, ] as const; const FN_OUTPUTS = [] as const; @@ -126,23 +126,23 @@ export function unwrap( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenId, resolvedOptions.recipient] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/write/wrap.ts b/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/write/wrap.ts index 78026fa445b..00ddc11ce19 100644 --- a/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/write/wrap.ts +++ b/packages/thirdweb/src/extensions/erc721/__generated__/Multiwrap/write/wrap.ts @@ -35,40 +35,40 @@ export type WrapParams = WithOverrides<{ export const FN_SELECTOR = "0x29e471dd" as const; const FN_INPUTS = [ { + type: "tuple[]", + name: "_tokensToWrap", components: [ { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "amount", type: "uint256", + name: "amount", }, ], - name: "_tokensToWrap", - type: "tuple[]", }, { - name: "_uriForWrappedToken", type: "string", + name: "_uriForWrappedToken", }, { - name: "_recipient", type: "address", + name: "_recipient", }, ] as const; const FN_OUTPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; @@ -173,19 +173,8 @@ export function wrap( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -195,5 +184,16 @@ export function wrap( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc7504/__generated__/IRouterState/read/getAllExtensions.ts b/packages/thirdweb/src/extensions/erc7504/__generated__/IRouterState/read/getAllExtensions.ts index e9d9edffc70..8e80e46a8a4 100644 --- a/packages/thirdweb/src/extensions/erc7504/__generated__/IRouterState/read/getAllExtensions.ts +++ b/packages/thirdweb/src/extensions/erc7504/__generated__/IRouterState/read/getAllExtensions.ts @@ -8,42 +8,42 @@ export const FN_SELECTOR = "0x4a00cc48" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "allExtensions", components: [ { + type: "tuple", + name: "metadata", components: [ { - name: "name", type: "string", + name: "name", }, { - name: "metadataURI", type: "string", + name: "metadataURI", }, { - name: "implementation", type: "address", + name: "implementation", }, ], - name: "metadata", - type: "tuple", }, { + type: "tuple[]", + name: "functions", components: [ { - name: "functionSelector", type: "bytes4", + name: "functionSelector", }, { - name: "functionSignature", type: "string", + name: "functionSignature", }, ], - name: "functions", - type: "tuple[]", }, ], - name: "allExtensions", - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/accountId.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/accountId.ts index 0cdc82fe213..14b6db87730 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/accountId.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/accountId.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0x9cfd7cff" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "accountImplementationId", type: "string", + name: "accountImplementationId", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/isModuleInstalled.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/isModuleInstalled.ts index 60ad0322483..4a0f71b90f5 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/isModuleInstalled.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/isModuleInstalled.ts @@ -24,16 +24,16 @@ export type IsModuleInstalledParams = { export const FN_SELECTOR = "0x112d3a7d" as const; const FN_INPUTS = [ { - name: "moduleTypeId", type: "uint256", + name: "moduleTypeId", }, { - name: "module", type: "address", + name: "module", }, { - name: "additionalContext", type: "bytes", + name: "additionalContext", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/isValidSignature.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/isValidSignature.ts index df322da3153..adc179df2a8 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/isValidSignature.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/isValidSignature.ts @@ -17,12 +17,12 @@ export type IsValidSignatureParams = { export const FN_SELECTOR = "0x1626ba7e" as const; const FN_INPUTS = [ { - name: "hash", type: "bytes32", + name: "hash", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/supportsExecutionMode.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/supportsExecutionMode.ts index 3d6a47da4a3..40d1c3a2dbb 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/supportsExecutionMode.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/supportsExecutionMode.ts @@ -19,8 +19,8 @@ export type SupportsExecutionModeParams = { export const FN_SELECTOR = "0xd03c7914" as const; const FN_INPUTS = [ { - name: "encodedMode", type: "bytes32", + name: "encodedMode", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/supportsModule.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/supportsModule.ts index ff29be0c985..61d1e156108 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/supportsModule.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/read/supportsModule.ts @@ -19,8 +19,8 @@ export type SupportsModuleParams = { export const FN_SELECTOR = "0xf2dc691d" as const; const FN_INPUTS = [ { - name: "moduleTypeId", type: "uint256", + name: "moduleTypeId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/write/execute.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/write/execute.ts index a45cd99822c..e1f33cae5cf 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/write/execute.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/write/execute.ts @@ -22,12 +22,12 @@ export type ExecuteParams = WithOverrides<{ export const FN_SELECTOR = "0xe9ae5c53" as const; const FN_INPUTS = [ { - name: "mode", type: "bytes32", + name: "mode", }, { - name: "executionCalldata", type: "bytes", + name: "executionCalldata", }, ] as const; const FN_OUTPUTS = [] as const; @@ -129,23 +129,23 @@ export function execute( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.mode, resolvedOptions.executionCalldata] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/write/executeFromExecutor.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/write/executeFromExecutor.ts index 2590e8ce64a..427537a9640 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/write/executeFromExecutor.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/write/executeFromExecutor.ts @@ -22,18 +22,18 @@ export type ExecuteFromExecutorParams = WithOverrides<{ export const FN_SELECTOR = "0xd691c964" as const; const FN_INPUTS = [ { - name: "mode", type: "bytes32", + name: "mode", }, { - name: "executionCalldata", type: "bytes", + name: "executionCalldata", }, ] as const; const FN_OUTPUTS = [ { - name: "returnData", type: "bytes[]", + name: "returnData", }, ] as const; @@ -138,23 +138,23 @@ export function executeFromExecutor( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.mode, resolvedOptions.executionCalldata] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/write/installModule.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/write/installModule.ts index 822845b2145..fc3fb205dc1 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/write/installModule.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/write/installModule.ts @@ -23,16 +23,16 @@ export type InstallModuleParams = WithOverrides<{ export const FN_SELECTOR = "0x9517e29f" as const; const FN_INPUTS = [ { - name: "moduleTypeId", type: "uint256", + name: "moduleTypeId", }, { - name: "module", type: "address", + name: "module", }, { - name: "initData", type: "bytes", + name: "initData", }, ] as const; const FN_OUTPUTS = [] as const; @@ -140,19 +140,8 @@ export function installModule( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -162,5 +151,16 @@ export function installModule( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/write/uninstallModule.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/write/uninstallModule.ts index 1288636e295..d9b1094c612 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/write/uninstallModule.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/IERC7579Account/write/uninstallModule.ts @@ -26,16 +26,16 @@ export type UninstallModuleParams = WithOverrides<{ export const FN_SELECTOR = "0xa71763a8" as const; const FN_INPUTS = [ { - name: "moduleTypeId", type: "uint256", + name: "moduleTypeId", }, { - name: "module", type: "address", + name: "module", }, { - name: "deInitData", type: "bytes", + name: "deInitData", }, ] as const; const FN_OUTPUTS = [] as const; @@ -143,19 +143,8 @@ export function uninstallModule( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -165,5 +154,16 @@ export function uninstallModule( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/events/OwnershipTransferred.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/events/OwnershipTransferred.ts index a4e11bccd61..93c168c64f5 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/events/OwnershipTransferred.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/events/OwnershipTransferred.ts @@ -42,8 +42,8 @@ export function ownershipTransferredEvent( filters: OwnershipTransferredEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event OwnershipTransferred(address indexed oldOwner, address indexed newOwner)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/events/Upgraded.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/events/Upgraded.ts index e3c49af0a2f..895b9c0faf5 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/events/Upgraded.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/events/Upgraded.ts @@ -34,7 +34,7 @@ export type UpgradedEventFilters = Partial<{ */ export function upgradedEvent(filters: UpgradedEventFilters = {}) { return prepareEvent({ - filters, signature: "event Upgraded(address indexed implementation)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/read/getAddress.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/read/getAddress.ts index b9633b280df..c8adcafff58 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/read/getAddress.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/read/getAddress.ts @@ -17,18 +17,18 @@ export type GetAddressParams = { export const FN_SELECTOR = "0x8878ed33" as const; const FN_INPUTS = [ { - name: "owner", type: "address", + name: "owner", }, { - name: "salt", type: "bytes", + name: "salt", }, ] as const; const FN_OUTPUTS = [ { - name: "account", type: "address", + name: "account", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/read/implementation.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/read/implementation.ts index 3da59c7f228..2c9986eebf5 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/read/implementation.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/read/implementation.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0x5c60da1b" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "result", type: "address", + name: "result", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/read/owner.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/read/owner.ts index a9edc4b89a6..076e831d264 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/read/owner.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/read/owner.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0x8da5cb5b" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "result", type: "address", + name: "result", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/addStake.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/addStake.ts index 31435f0de4d..f3fb0db94fc 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/addStake.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/addStake.ts @@ -21,8 +21,8 @@ export type AddStakeParams = WithOverrides<{ export const FN_SELECTOR = "0x0396cb60" as const; const FN_INPUTS = [ { - name: "unstakeDelaySec", type: "uint32", + name: "unstakeDelaySec", }, ] as const; const FN_OUTPUTS = [] as const; @@ -118,23 +118,23 @@ export function addStake( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.unstakeDelaySec] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/createAccountWithModules.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/createAccountWithModules.ts index da584e4ee29..9edabb0aaf8 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/createAccountWithModules.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/createAccountWithModules.ts @@ -28,30 +28,30 @@ export type CreateAccountWithModulesParams = WithOverrides<{ export const FN_SELECTOR = "0x7c37d0dc" as const; const FN_INPUTS = [ { - name: "owner", type: "address", + name: "owner", }, { - name: "salt", type: "bytes", + name: "salt", }, { + type: "tuple[]", + name: "modules", components: [ { - name: "moduleTypeId", type: "uint256", + name: "moduleTypeId", }, { - name: "module", type: "address", + name: "module", }, { - name: "initData", type: "bytes", + name: "initData", }, ], - name: "modules", - type: "tuple[]", }, ] as const; const FN_OUTPUTS = [ @@ -169,19 +169,8 @@ export function createAccountWithModules( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -191,5 +180,16 @@ export function createAccountWithModules( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/transferOwnership.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/transferOwnership.ts index ae9fadeeb32..a3049c9517e 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/transferOwnership.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/transferOwnership.ts @@ -18,8 +18,8 @@ export type TransferOwnershipParams = WithOverrides<{ export const FN_SELECTOR = "0xf2fde38b" as const; const FN_INPUTS = [ { - name: "newOwner", type: "address", + name: "newOwner", }, ] as const; const FN_OUTPUTS = [] as const; @@ -119,23 +119,23 @@ export function transferOwnership( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.newOwner] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/upgradeTo.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/upgradeTo.ts index 69778356cbc..cd9ae09f1db 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/upgradeTo.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/upgradeTo.ts @@ -21,8 +21,8 @@ export type UpgradeToParams = WithOverrides<{ export const FN_SELECTOR = "0x3659cfe6" as const; const FN_INPUTS = [ { - name: "newImplementation", type: "address", + name: "newImplementation", }, ] as const; const FN_OUTPUTS = [] as const; @@ -120,23 +120,23 @@ export function upgradeTo( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.newImplementation] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/withdraw.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/withdraw.ts index b9f2a3c4a34..c995e626bdb 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/withdraw.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/withdraw.ts @@ -20,16 +20,16 @@ export type WithdrawParams = WithOverrides<{ export const FN_SELECTOR = "0xd9caed12" as const; const FN_INPUTS = [ { - name: "to", type: "address", + name: "to", }, { - name: "token", type: "address", + name: "token", }, { - name: "amount", type: "uint256", + name: "amount", }, ] as const; const FN_OUTPUTS = [] as const; @@ -135,19 +135,8 @@ export function withdraw( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -157,5 +146,16 @@ export function withdraw( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/withdrawStake.ts b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/withdrawStake.ts index 7eb496448d3..0cad89d40fb 100644 --- a/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/withdrawStake.ts +++ b/packages/thirdweb/src/extensions/erc7579/__generated__/ModularAccountFactory/write/withdrawStake.ts @@ -18,8 +18,8 @@ export type WithdrawStakeParams = WithOverrides<{ export const FN_SELECTOR = "0xc23a5cea" as const; const FN_INPUTS = [ { - name: "to", type: "address", + name: "to", }, ] as const; const FN_OUTPUTS = [] as const; @@ -117,23 +117,23 @@ export function withdrawStake( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.to] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/events/Executed.ts b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/events/Executed.ts index de30c93be7e..0e275711fcc 100644 --- a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/events/Executed.ts +++ b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/events/Executed.ts @@ -34,7 +34,7 @@ export type ExecutedEventFilters = Partial<{ */ export function executedEvent(filters: ExecutedEventFilters = {}) { return prepareEvent({ - filters, signature: "event Executed(address indexed to, uint256 value, bytes data)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/events/SessionCreated.ts b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/events/SessionCreated.ts index 6851748f9d1..36d4e243abf 100644 --- a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/events/SessionCreated.ts +++ b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/events/SessionCreated.ts @@ -34,8 +34,8 @@ export type SessionCreatedEventFilters = Partial<{ */ export function sessionCreatedEvent(filters: SessionCreatedEventFilters = {}) { return prepareEvent({ - filters, signature: "event SessionCreated(address indexed signer, (address signer, bool isWildcard, uint256 expiresAt, (address target, bytes4 selector, uint256 maxValuePerUse, (uint8 limitType, uint256 limit, uint256 period) valueLimit, (uint8 condition, uint64 index, bytes32 refValue, (uint8 limitType, uint256 limit, uint256 period) limit)[] constraints)[] callPolicies, (address target, uint256 maxValuePerUse, (uint8 limitType, uint256 limit, uint256 period) valueLimit)[] transferPolicies, bytes32 uid) sessionSpec)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/eip712Domain.ts b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/eip712Domain.ts index 95be7b27e5a..9ed2c26e1bf 100644 --- a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/eip712Domain.ts +++ b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/eip712Domain.ts @@ -8,32 +8,32 @@ export const FN_SELECTOR = "0x84b0196e" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "fields", type: "bytes1", + name: "fields", }, { - name: "name", type: "string", + name: "name", }, { - name: "version", type: "string", + name: "version", }, { - name: "chainId", type: "uint256", + name: "chainId", }, { - name: "verifyingContract", type: "address", + name: "verifyingContract", }, { - name: "salt", type: "bytes32", + name: "salt", }, { - name: "extensions", type: "uint256[]", + name: "extensions", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/getCallPoliciesForSigner.ts b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/getCallPoliciesForSigner.ts index e5680d5fe09..4a44f5a3fd1 100644 --- a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/getCallPoliciesForSigner.ts +++ b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/getCallPoliciesForSigner.ts @@ -16,81 +16,81 @@ export type GetCallPoliciesForSignerParams = { export const FN_SELECTOR = "0x7103acbb" as const; const FN_INPUTS = [ { - name: "signer", type: "address", + name: "signer", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple[]", components: [ { - name: "target", type: "address", + name: "target", }, { - name: "selector", type: "bytes4", + name: "selector", }, { - name: "maxValuePerUse", type: "uint256", + name: "maxValuePerUse", }, { + type: "tuple", + name: "valueLimit", components: [ { - name: "limitType", type: "uint8", + name: "limitType", }, { - name: "limit", type: "uint256", + name: "limit", }, { - name: "period", type: "uint256", + name: "period", }, ], - name: "valueLimit", - type: "tuple", }, { + type: "tuple[]", + name: "constraints", components: [ { - name: "condition", type: "uint8", + name: "condition", }, { - name: "index", type: "uint64", + name: "index", }, { - name: "refValue", type: "bytes32", + name: "refValue", }, { + type: "tuple", + name: "limit", components: [ { - name: "limitType", type: "uint8", + name: "limitType", }, { - name: "limit", type: "uint256", + name: "limit", }, { - name: "period", type: "uint256", + name: "period", }, ], - name: "limit", - type: "tuple", }, ], - name: "constraints", - type: "tuple[]", }, ], - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/getSessionExpirationForSigner.ts b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/getSessionExpirationForSigner.ts index de9198c6317..a5a81370ba3 100644 --- a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/getSessionExpirationForSigner.ts +++ b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/getSessionExpirationForSigner.ts @@ -16,8 +16,8 @@ export type GetSessionExpirationForSignerParams = { export const FN_SELECTOR = "0xf0a83adf" as const; const FN_INPUTS = [ { - name: "signer", type: "address", + name: "signer", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/getSessionStateForSigner.ts b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/getSessionStateForSigner.ts index 190f7ace4ba..3e948ef623e 100644 --- a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/getSessionStateForSigner.ts +++ b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/getSessionStateForSigner.ts @@ -16,81 +16,81 @@ export type GetSessionStateForSignerParams = { export const FN_SELECTOR = "0x74e25eb2" as const; const FN_INPUTS = [ { - name: "signer", type: "address", + name: "signer", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple", components: [ { + type: "tuple[]", + name: "transferValue", components: [ { - name: "remaining", type: "uint256", + name: "remaining", }, { - name: "target", type: "address", + name: "target", }, { - name: "selector", type: "bytes4", + name: "selector", }, { - name: "index", type: "uint256", + name: "index", }, ], - name: "transferValue", - type: "tuple[]", }, { + type: "tuple[]", + name: "callValue", components: [ { - name: "remaining", type: "uint256", + name: "remaining", }, { - name: "target", type: "address", + name: "target", }, { - name: "selector", type: "bytes4", + name: "selector", }, { - name: "index", type: "uint256", + name: "index", }, ], - name: "callValue", - type: "tuple[]", }, { + type: "tuple[]", + name: "callParams", components: [ { - name: "remaining", type: "uint256", + name: "remaining", }, { - name: "target", type: "address", + name: "target", }, { - name: "selector", type: "bytes4", + name: "selector", }, { - name: "index", type: "uint256", + name: "index", }, ], - name: "callParams", - type: "tuple[]", }, ], - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/getTransferPoliciesForSigner.ts b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/getTransferPoliciesForSigner.ts index e08786479ca..a97dfb80636 100644 --- a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/getTransferPoliciesForSigner.ts +++ b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/getTransferPoliciesForSigner.ts @@ -16,41 +16,41 @@ export type GetTransferPoliciesForSignerParams = { export const FN_SELECTOR = "0xed6ed279" as const; const FN_INPUTS = [ { - name: "signer", type: "address", + name: "signer", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple[]", components: [ { - name: "target", type: "address", + name: "target", }, { - name: "maxValuePerUse", type: "uint256", + name: "maxValuePerUse", }, { + type: "tuple", + name: "valueLimit", components: [ { - name: "limitType", type: "uint8", + name: "limitType", }, { - name: "limit", type: "uint256", + name: "limit", }, { - name: "period", type: "uint256", + name: "period", }, ], - name: "valueLimit", - type: "tuple", }, ], - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/isWildcardSigner.ts b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/isWildcardSigner.ts index 880b985ffdd..f653921de04 100644 --- a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/isWildcardSigner.ts +++ b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/read/isWildcardSigner.ts @@ -16,8 +16,8 @@ export type IsWildcardSignerParams = { export const FN_SELECTOR = "0x16c258a7" as const; const FN_INPUTS = [ { - name: "signer", type: "address", + name: "signer", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/write/createSessionWithSig.ts b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/write/createSessionWithSig.ts index e4b50d9a004..fc57af91cb6 100644 --- a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/write/createSessionWithSig.ts +++ b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/write/createSessionWithSig.ts @@ -81,134 +81,134 @@ export type CreateSessionWithSigParams = WithOverrides<{ export const FN_SELECTOR = "0xb5051648" as const; const FN_INPUTS = [ { + type: "tuple", + name: "sessionSpec", components: [ { - name: "signer", type: "address", + name: "signer", }, { - name: "isWildcard", type: "bool", + name: "isWildcard", }, { - name: "expiresAt", type: "uint256", + name: "expiresAt", }, { + type: "tuple[]", + name: "callPolicies", components: [ { - name: "target", type: "address", + name: "target", }, { - name: "selector", type: "bytes4", + name: "selector", }, { - name: "maxValuePerUse", type: "uint256", + name: "maxValuePerUse", }, { + type: "tuple", + name: "valueLimit", components: [ { - name: "limitType", type: "uint8", + name: "limitType", }, { - name: "limit", type: "uint256", + name: "limit", }, { - name: "period", type: "uint256", + name: "period", }, ], - name: "valueLimit", - type: "tuple", }, { + type: "tuple[]", + name: "constraints", components: [ { - name: "condition", type: "uint8", + name: "condition", }, { - name: "index", type: "uint64", + name: "index", }, { - name: "refValue", type: "bytes32", + name: "refValue", }, { + type: "tuple", + name: "limit", components: [ { - name: "limitType", type: "uint8", + name: "limitType", }, { - name: "limit", type: "uint256", + name: "limit", }, { - name: "period", type: "uint256", + name: "period", }, ], - name: "limit", - type: "tuple", }, ], - name: "constraints", - type: "tuple[]", }, ], - name: "callPolicies", - type: "tuple[]", }, { + type: "tuple[]", + name: "transferPolicies", components: [ { - name: "target", type: "address", + name: "target", }, { - name: "maxValuePerUse", type: "uint256", + name: "maxValuePerUse", }, { + type: "tuple", + name: "valueLimit", components: [ { - name: "limitType", type: "uint8", + name: "limitType", }, { - name: "limit", type: "uint256", + name: "limit", }, { - name: "period", type: "uint256", + name: "period", }, ], - name: "valueLimit", - type: "tuple", }, ], - name: "transferPolicies", - type: "tuple[]", }, { - name: "uid", type: "bytes32", + name: "uid", }, ], - name: "sessionSpec", - type: "tuple", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [] as const; @@ -316,23 +316,23 @@ export function createSessionWithSig( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.sessionSpec, resolvedOptions.signature] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/write/execute.ts b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/write/execute.ts index e3e0a0ad402..98988776faa 100644 --- a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/write/execute.ts +++ b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/write/execute.ts @@ -26,22 +26,22 @@ export type ExecuteParams = WithOverrides<{ export const FN_SELECTOR = "0x3f707e6b" as const; const FN_INPUTS = [ { + type: "tuple[]", + name: "calls", components: [ { - name: "target", type: "address", + name: "target", }, { - name: "value", type: "uint256", + name: "value", }, { - name: "data", type: "bytes", + name: "data", }, ], - name: "calls", - type: "tuple[]", }, ] as const; const FN_OUTPUTS = [] as const; @@ -137,23 +137,23 @@ export function execute( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.calls] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/write/executeWithSig.ts b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/write/executeWithSig.ts index b70e69ad6cd..92ecb549276 100644 --- a/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/write/executeWithSig.ts +++ b/packages/thirdweb/src/extensions/erc7702/__generated__/MinimalAccount/write/executeWithSig.ts @@ -34,36 +34,36 @@ export type ExecuteWithSigParams = WithOverrides<{ export const FN_SELECTOR = "0xba61557d" as const; const FN_INPUTS = [ { + type: "tuple", + name: "wrappedCalls", components: [ { + type: "tuple[]", + name: "calls", components: [ { - name: "target", type: "address", + name: "target", }, { - name: "value", type: "uint256", + name: "value", }, { - name: "data", type: "bytes", + name: "data", }, ], - name: "calls", - type: "tuple[]", }, { - name: "uid", type: "bytes32", + name: "uid", }, ], - name: "wrappedCalls", - type: "tuple", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [] as const; @@ -167,23 +167,23 @@ export function executeWithSig( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.wrappedCalls, resolvedOptions.signature] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IBundler/read/price.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IBundler/read/price.ts index 80f60351838..f31cabf823b 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IBundler/read/price.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IBundler/read/price.ts @@ -19,8 +19,8 @@ export type PriceParams = { export const FN_SELECTOR = "0x26a49e37" as const; const FN_INPUTS = [ { - name: "extraStorage", type: "uint256", + name: "extraStorage", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IBundler/write/register.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IBundler/write/register.ts index 22f7b727c93..8931d97823a 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IBundler/write/register.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IBundler/write/register.ts @@ -43,66 +43,66 @@ export type RegisterParams = WithOverrides<{ export const FN_SELECTOR = "0xa44c9ce7" as const; const FN_INPUTS = [ { + type: "tuple", + name: "registerParams", components: [ { - name: "to", type: "address", + name: "to", }, { - name: "recovery", type: "address", + name: "recovery", }, { - name: "deadline", type: "uint256", + name: "deadline", }, { - name: "sig", type: "bytes", + name: "sig", }, ], - name: "registerParams", - type: "tuple", }, { + type: "tuple[]", + name: "signerParams", components: [ { - name: "keyType", type: "uint32", + name: "keyType", }, { - name: "key", type: "bytes", + name: "key", }, { - name: "metadataType", type: "uint8", + name: "metadataType", }, { - name: "metadata", type: "bytes", + name: "metadata", }, { - name: "deadline", type: "uint256", + name: "deadline", }, { - name: "sig", type: "bytes", + name: "sig", }, ], - name: "signerParams", - type: "tuple[]", }, { - name: "extraStorage", type: "uint256", + name: "extraStorage", }, ] as const; const FN_OUTPUTS = [ { - name: "fid", type: "uint256", + name: "fid", }, ] as const; @@ -207,19 +207,8 @@ export function register( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -229,5 +218,16 @@ export function register( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdGateway/read/price.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdGateway/read/price.ts index 80f60351838..f31cabf823b 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdGateway/read/price.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdGateway/read/price.ts @@ -19,8 +19,8 @@ export type PriceParams = { export const FN_SELECTOR = "0x26a49e37" as const; const FN_INPUTS = [ { - name: "extraStorage", type: "uint256", + name: "extraStorage", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdGateway/write/register.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdGateway/write/register.ts index f0f2d76ae4a..837c7aef13b 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdGateway/write/register.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdGateway/write/register.ts @@ -22,22 +22,22 @@ export type RegisterParams = WithOverrides<{ export const FN_SELECTOR = "0x6d705ebb" as const; const FN_INPUTS = [ { - name: "recovery", type: "address", + name: "recovery", }, { - name: "extraStorage", type: "uint256", + name: "extraStorage", }, ] as const; const FN_OUTPUTS = [ { - name: "fid", type: "uint256", + name: "fid", }, { - name: "overpayment", type: "uint256", + name: "overpayment", }, ] as const; @@ -138,23 +138,23 @@ export function register( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.recovery, resolvedOptions.extraStorage] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdGateway/write/registerFor.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdGateway/write/registerFor.ts index 17e541df5d2..3d76100bc0c 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdGateway/write/registerFor.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdGateway/write/registerFor.ts @@ -25,34 +25,34 @@ export type RegisterForParams = WithOverrides<{ export const FN_SELECTOR = "0xa0c7529c" as const; const FN_INPUTS = [ { - name: "to", type: "address", + name: "to", }, { - name: "recovery", type: "address", + name: "recovery", }, { - name: "deadline", type: "uint256", + name: "deadline", }, { - name: "sig", type: "bytes", + name: "sig", }, { - name: "extraStorage", type: "uint256", + name: "extraStorage", }, ] as const; const FN_OUTPUTS = [ { - name: "fid", type: "uint256", + name: "fid", }, { - name: "overpayment", type: "uint256", + name: "overpayment", }, ] as const; @@ -167,19 +167,8 @@ export function registerFor( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -191,5 +180,16 @@ export function registerFor( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/AdminReset.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/AdminReset.ts index 19cd2f4d448..607bdffbbda 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/AdminReset.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/AdminReset.ts @@ -34,7 +34,7 @@ export type AdminResetEventFilters = Partial<{ */ export function adminResetEvent(filters: AdminResetEventFilters = {}) { return prepareEvent({ - filters, signature: "event AdminReset(uint256 indexed fid)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/ChangeRecoveryAddress.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/ChangeRecoveryAddress.ts index 29ab077be4e..a3d94326af6 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/ChangeRecoveryAddress.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/ChangeRecoveryAddress.ts @@ -42,8 +42,8 @@ export function changeRecoveryAddressEvent( filters: ChangeRecoveryAddressEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event ChangeRecoveryAddress(uint256 indexed id, address indexed recovery)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/Recover.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/Recover.ts index c859416f5bf..653946dc4b1 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/Recover.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/Recover.ts @@ -46,8 +46,8 @@ export type RecoverEventFilters = Partial<{ */ export function recoverEvent(filters: RecoverEventFilters = {}) { return prepareEvent({ - filters, signature: "event Recover(address indexed from, address indexed to, uint256 indexed id)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/Register.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/Register.ts index bbcd30cbe49..540ee67b971 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/Register.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/Register.ts @@ -40,8 +40,8 @@ export type RegisterEventFilters = Partial<{ */ export function registerEvent(filters: RegisterEventFilters = {}) { return prepareEvent({ - filters, signature: "event Register(address indexed to, uint256 indexed id, address recovery)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/Transfer.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/Transfer.ts index 7f232ba6a13..ef1ff29a359 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/Transfer.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/events/Transfer.ts @@ -40,8 +40,8 @@ export type TransferEventFilters = Partial<{ */ export function transferEvent(filters: TransferEventFilters = {}) { return prepareEvent({ - filters, signature: "event Transfer(address indexed from, address indexed to, uint256 id)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/read/custodyOf.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/read/custodyOf.ts index 0ef60f6be42..05486ae0fd0 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/read/custodyOf.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/read/custodyOf.ts @@ -16,14 +16,14 @@ export type CustodyOfParams = { export const FN_SELECTOR = "0x65269e47" as const; const FN_INPUTS = [ { - name: "fid", type: "uint256", + name: "fid", }, ] as const; const FN_OUTPUTS = [ { - name: "owner", type: "address", + name: "owner", }, ] as const; diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/read/idOf.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/read/idOf.ts index b7de6626faa..0f502bcf8dc 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/read/idOf.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/read/idOf.ts @@ -16,14 +16,14 @@ export type IdOfParams = { export const FN_SELECTOR = "0xd94fe832" as const; const FN_INPUTS = [ { - name: "owner", type: "address", + name: "owner", }, ] as const; const FN_OUTPUTS = [ { - name: "fid", type: "uint256", + name: "fid", }, ] as const; diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/read/recoveryOf.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/read/recoveryOf.ts index 17bc3551062..1ae91834a6d 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/read/recoveryOf.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/read/recoveryOf.ts @@ -16,14 +16,14 @@ export type RecoveryOfParams = { export const FN_SELECTOR = "0xfa1a1b25" as const; const FN_INPUTS = [ { - name: "fid", type: "uint256", + name: "fid", }, ] as const; const FN_OUTPUTS = [ { - name: "recovery", type: "address", + name: "recovery", }, ] as const; diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/read/verifyFidSignature.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/read/verifyFidSignature.ts index 271eadf920a..41d18969b31 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/read/verifyFidSignature.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/read/verifyFidSignature.ts @@ -22,26 +22,26 @@ export type VerifyFidSignatureParams = { export const FN_SELECTOR = "0x32faac70" as const; const FN_INPUTS = [ { - name: "custodyAddress", type: "address", + name: "custodyAddress", }, { - name: "fid", type: "uint256", + name: "fid", }, { - name: "digest", type: "bytes32", + name: "digest", }, { - name: "sig", type: "bytes", + name: "sig", }, ] as const; const FN_OUTPUTS = [ { - name: "isValid", type: "bool", + name: "isValid", }, ] as const; diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/changeRecoveryAddress.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/changeRecoveryAddress.ts index 330bccfb96f..d0ede787469 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/changeRecoveryAddress.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/changeRecoveryAddress.ts @@ -18,8 +18,8 @@ export type ChangeRecoveryAddressParams = WithOverrides<{ export const FN_SELECTOR = "0xf1f0b224" as const; const FN_INPUTS = [ { - name: "recovery", type: "address", + name: "recovery", }, ] as const; const FN_OUTPUTS = [] as const; @@ -121,23 +121,23 @@ export function changeRecoveryAddress( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.recovery] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/changeRecoveryAddressFor.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/changeRecoveryAddressFor.ts index 80e9629a194..26fb6c23633 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/changeRecoveryAddressFor.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/changeRecoveryAddressFor.ts @@ -21,20 +21,20 @@ export type ChangeRecoveryAddressForParams = WithOverrides<{ export const FN_SELECTOR = "0x9cbef8dc" as const; const FN_INPUTS = [ { - name: "owner", type: "address", + name: "owner", }, { - name: "recovery", type: "address", + name: "recovery", }, { - name: "deadline", type: "uint256", + name: "deadline", }, { - name: "sig", type: "bytes", + name: "sig", }, ] as const; const FN_OUTPUTS = [] as const; @@ -152,19 +152,8 @@ export function changeRecoveryAddressFor( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -175,5 +164,16 @@ export function changeRecoveryAddressFor( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/recover.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/recover.ts index a0a9b3368f5..5bcd4720a76 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/recover.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/recover.ts @@ -21,20 +21,20 @@ export type RecoverParams = WithOverrides<{ export const FN_SELECTOR = "0x2a42ede3" as const; const FN_INPUTS = [ { - name: "from", type: "address", + name: "from", }, { - name: "to", type: "address", + name: "to", }, { - name: "deadline", type: "uint256", + name: "deadline", }, { - name: "sig", type: "bytes", + name: "sig", }, ] as const; const FN_OUTPUTS = [] as const; @@ -144,19 +144,8 @@ export function recover( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -167,5 +156,16 @@ export function recover( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/recoverFor.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/recoverFor.ts index 93482dacc65..ef075116489 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/recoverFor.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/recoverFor.ts @@ -32,28 +32,28 @@ export type RecoverForParams = WithOverrides<{ export const FN_SELECTOR = "0xba656434" as const; const FN_INPUTS = [ { - name: "from", type: "address", + name: "from", }, { - name: "to", type: "address", + name: "to", }, { - name: "recoveryDeadline", type: "uint256", + name: "recoveryDeadline", }, { - name: "recoverySig", type: "bytes", + name: "recoverySig", }, { - name: "toDeadline", type: "uint256", + name: "toDeadline", }, { - name: "toSig", type: "bytes", + name: "toSig", }, ] as const; const FN_OUTPUTS = [] as const; @@ -173,19 +173,8 @@ export function recoverFor( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -198,5 +187,16 @@ export function recoverFor( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transfer.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transfer.ts index e910082125e..f4d9fc76753 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transfer.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transfer.ts @@ -20,16 +20,16 @@ export type TransferParams = WithOverrides<{ export const FN_SELECTOR = "0xbe45fd62" as const; const FN_INPUTS = [ { - name: "to", type: "address", + name: "to", }, { - name: "deadline", type: "uint256", + name: "deadline", }, { - name: "sig", type: "bytes", + name: "sig", }, ] as const; const FN_OUTPUTS = [] as const; @@ -135,19 +135,8 @@ export function transfer( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -157,5 +146,16 @@ export function transfer( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferAndChangeRecovery.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferAndChangeRecovery.ts index 6b19a04a8f8..04517684834 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferAndChangeRecovery.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferAndChangeRecovery.ts @@ -21,20 +21,20 @@ export type TransferAndChangeRecoveryParams = WithOverrides<{ export const FN_SELECTOR = "0x3ab8465d" as const; const FN_INPUTS = [ { - name: "to", type: "address", + name: "to", }, { - name: "recovery", type: "address", + name: "recovery", }, { - name: "deadline", type: "uint256", + name: "deadline", }, { - name: "sig", type: "bytes", + name: "sig", }, ] as const; const FN_OUTPUTS = [] as const; @@ -152,19 +152,8 @@ export function transferAndChangeRecovery( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -175,5 +164,16 @@ export function transferAndChangeRecovery( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferAndChangeRecoveryFor.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferAndChangeRecoveryFor.ts index e7626ce8d2d..d929c6a300f 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferAndChangeRecoveryFor.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferAndChangeRecoveryFor.ts @@ -30,32 +30,32 @@ export type TransferAndChangeRecoveryForParams = WithOverrides<{ export const FN_SELECTOR = "0x4c5cbb34" as const; const FN_INPUTS = [ { - name: "from", type: "address", + name: "from", }, { - name: "to", type: "address", + name: "to", }, { - name: "recovery", type: "address", + name: "recovery", }, { - name: "fromDeadline", type: "uint256", + name: "fromDeadline", }, { - name: "fromSig", type: "bytes", + name: "fromSig", }, { - name: "toDeadline", type: "uint256", + name: "toDeadline", }, { - name: "toSig", type: "bytes", + name: "toSig", }, ] as const; const FN_OUTPUTS = [] as const; @@ -185,19 +185,8 @@ export function transferAndChangeRecoveryFor( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -211,5 +200,16 @@ export function transferAndChangeRecoveryFor( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferFor.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferFor.ts index adfb3d6d281..eb7d9656e9c 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferFor.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferFor.ts @@ -29,28 +29,28 @@ export type TransferForParams = WithOverrides<{ export const FN_SELECTOR = "0x16f72842" as const; const FN_INPUTS = [ { - name: "from", type: "address", + name: "from", }, { - name: "to", type: "address", + name: "to", }, { - name: "fromDeadline", type: "uint256", + name: "fromDeadline", }, { - name: "fromSig", type: "bytes", + name: "fromSig", }, { - name: "toDeadline", type: "uint256", + name: "toDeadline", }, { - name: "toSig", type: "bytes", + name: "toSig", }, ] as const; const FN_OUTPUTS = [] as const; @@ -170,19 +170,8 @@ export function transferFor( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -195,5 +184,16 @@ export function transferFor( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyGateway/read/nonces.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyGateway/read/nonces.ts index 2d4370a57bd..df21d367979 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyGateway/read/nonces.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyGateway/read/nonces.ts @@ -16,8 +16,8 @@ export type NoncesParams = { export const FN_SELECTOR = "0x7ecebe00" as const; const FN_INPUTS = [ { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyGateway/write/add.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyGateway/write/add.ts index 2693fa21f00..269045165c3 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyGateway/write/add.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyGateway/write/add.ts @@ -24,20 +24,20 @@ export type AddParams = WithOverrides<{ export const FN_SELECTOR = "0x22b1a414" as const; const FN_INPUTS = [ { - name: "keyType", type: "uint32", + name: "keyType", }, { - name: "key", type: "bytes", + name: "key", }, { - name: "metadataType", type: "uint8", + name: "metadataType", }, { - name: "metadata", type: "bytes", + name: "metadata", }, ] as const; const FN_OUTPUTS = [] as const; @@ -147,19 +147,8 @@ export function add( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -170,5 +159,16 @@ export function add( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyGateway/write/addFor.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyGateway/write/addFor.ts index 36d8b42a717..a7e48e33e51 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyGateway/write/addFor.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyGateway/write/addFor.ts @@ -27,32 +27,32 @@ export type AddForParams = WithOverrides<{ export const FN_SELECTOR = "0xa005d3d2" as const; const FN_INPUTS = [ { - name: "fidOwner", type: "address", + name: "fidOwner", }, { - name: "keyType", type: "uint32", + name: "keyType", }, { - name: "key", type: "bytes", + name: "key", }, { - name: "metadataType", type: "uint8", + name: "metadataType", }, { - name: "metadata", type: "bytes", + name: "metadata", }, { - name: "deadline", type: "uint256", + name: "deadline", }, { - name: "sig", type: "bytes", + name: "sig", }, ] as const; const FN_OUTPUTS = [] as const; @@ -174,19 +174,8 @@ export function addFor( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -200,5 +189,16 @@ export function addFor( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/events/Add.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/events/Add.ts index aca8ff4c464..9d3ca5cb0dc 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/events/Add.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/events/Add.ts @@ -46,8 +46,8 @@ export type AddEventFilters = Partial<{ */ export function addEvent(filters: AddEventFilters = {}) { return prepareEvent({ - filters, signature: "event Add(uint256 indexed fid, uint32 indexed keyType, bytes indexed key, bytes keyBytes, uint8 metadataType, bytes metadata)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/events/AdminReset.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/events/AdminReset.ts index d058ba543ac..f42650a0de3 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/events/AdminReset.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/events/AdminReset.ts @@ -40,8 +40,8 @@ export type AdminResetEventFilters = Partial<{ */ export function adminResetEvent(filters: AdminResetEventFilters = {}) { return prepareEvent({ - filters, signature: "event AdminReset(uint256 indexed fid, bytes indexed key, bytes keyBytes)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/events/Remove.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/events/Remove.ts index 2cbb8f5e029..c1a085d0e4b 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/events/Remove.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/events/Remove.ts @@ -40,8 +40,8 @@ export type RemoveEventFilters = Partial<{ */ export function removeEvent(filters: RemoveEventFilters = {}) { return prepareEvent({ - filters, signature: "event Remove(uint256 indexed fid, bytes indexed key, bytes keyBytes)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/read/keyAt.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/read/keyAt.ts index 08add3ea42d..22e35d301e5 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/read/keyAt.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/read/keyAt.ts @@ -18,16 +18,16 @@ export type KeyAtParams = { export const FN_SELECTOR = "0x0ea9442c" as const; const FN_INPUTS = [ { - name: "fid", type: "uint256", + name: "fid", }, { - name: "state", type: "uint8", + name: "state", }, { - name: "index", type: "uint256", + name: "index", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/read/keyDataOf.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/read/keyDataOf.ts index 7466ff56320..4c55c831e17 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/read/keyDataOf.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/read/keyDataOf.ts @@ -17,12 +17,12 @@ export type KeyDataOfParams = { export const FN_SELECTOR = "0xac34cc5a" as const; const FN_INPUTS = [ { - name: "fid", type: "uint256", + name: "fid", }, { - name: "key", type: "bytes", + name: "key", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/read/keysOf.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/read/keysOf.ts index 0a933d04649..27051d256c2 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/read/keysOf.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/read/keysOf.ts @@ -17,12 +17,12 @@ export type KeysOfParams = { export const FN_SELECTOR = "0x1f64222f" as const; const FN_INPUTS = [ { - name: "fid", type: "uint256", + name: "fid", }, { - name: "state", type: "uint8", + name: "state", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/read/totalKeys.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/read/totalKeys.ts index 9a240bd9d14..57e35d5745f 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/read/totalKeys.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/read/totalKeys.ts @@ -17,12 +17,12 @@ export type TotalKeysParams = { export const FN_SELECTOR = "0x6840b75e" as const; const FN_INPUTS = [ { - name: "fid", type: "uint256", + name: "fid", }, { - name: "state", type: "uint8", + name: "state", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/write/remove.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/write/remove.ts index 505b8038435..69300b70490 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/write/remove.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/write/remove.ts @@ -18,8 +18,8 @@ export type RemoveParams = WithOverrides<{ export const FN_SELECTOR = "0x58edef4c" as const; const FN_INPUTS = [ { - name: "key", type: "bytes", + name: "key", }, ] as const; const FN_OUTPUTS = [] as const; @@ -115,23 +115,23 @@ export function remove( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.key] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/write/removeFor.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/write/removeFor.ts index ea1c8ca3925..206f94866d5 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/write/removeFor.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/write/removeFor.ts @@ -21,20 +21,20 @@ export type RemoveForParams = WithOverrides<{ export const FN_SELECTOR = "0x787bd966" as const; const FN_INPUTS = [ { - name: "fidOwner", type: "address", + name: "fidOwner", }, { - name: "key", type: "bytes", + name: "key", }, { - name: "deadline", type: "uint256", + name: "deadline", }, { - name: "sig", type: "bytes", + name: "sig", }, ] as const; const FN_OUTPUTS = [] as const; @@ -146,19 +146,8 @@ export function removeFor( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -169,5 +158,16 @@ export function removeFor( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IStorageRegistry/read/price.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IStorageRegistry/read/price.ts index 8505431f921..e344e5323c0 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IStorageRegistry/read/price.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IStorageRegistry/read/price.ts @@ -16,8 +16,8 @@ export type PriceParams = { export const FN_SELECTOR = "0x26a49e37" as const; const FN_INPUTS = [ { - name: "units", type: "uint256", + name: "units", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IStorageRegistry/write/batchRent.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IStorageRegistry/write/batchRent.ts index 62dc2021742..b8c9defb67d 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IStorageRegistry/write/batchRent.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IStorageRegistry/write/batchRent.ts @@ -19,12 +19,12 @@ export type BatchRentParams = WithOverrides<{ export const FN_SELECTOR = "0xa82c356e" as const; const FN_INPUTS = [ { - name: "fids", type: "uint256[]", + name: "fids", }, { - name: "units", type: "uint256[]", + name: "units", }, ] as const; const FN_OUTPUTS = [] as const; @@ -125,23 +125,23 @@ export function batchRent( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.fids, resolvedOptions.units] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/farcaster/__generated__/IStorageRegistry/write/rent.ts b/packages/thirdweb/src/extensions/farcaster/__generated__/IStorageRegistry/write/rent.ts index 025e4f80b37..a419f7a3bb4 100644 --- a/packages/thirdweb/src/extensions/farcaster/__generated__/IStorageRegistry/write/rent.ts +++ b/packages/thirdweb/src/extensions/farcaster/__generated__/IStorageRegistry/write/rent.ts @@ -19,18 +19,18 @@ export type RentParams = WithOverrides<{ export const FN_SELECTOR = "0x783a112b" as const; const FN_INPUTS = [ { - name: "fid", type: "uint256", + name: "fid", }, { - name: "units", type: "uint256", + name: "units", }, ] as const; const FN_OUTPUTS = [ { - name: "overpayment", type: "uint256", + name: "overpayment", }, ] as const; @@ -128,23 +128,23 @@ export function rent( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.fid, resolvedOptions.units] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowData.ts b/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowData.ts index a3f4b147599..3fea9d326f2 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowData.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowData.ts @@ -19,31 +19,31 @@ export type GetFollowDataParams = { export const FN_SELECTOR = "0xd6cbec5d" as const; const FN_INPUTS = [ { - name: "followTokenId", type: "uint256", + name: "followTokenId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple", components: [ { - name: "followerProfileId", type: "uint160", + name: "followerProfileId", }, { - name: "originalFollowTimestamp", type: "uint48", + name: "originalFollowTimestamp", }, { - name: "followTimestamp", type: "uint48", + name: "followTimestamp", }, { - name: "profileIdAllowedToRecover", type: "uint256", + name: "profileIdAllowedToRecover", }, ], - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowTimestamp.ts b/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowTimestamp.ts index 658742012bc..fdc73f35d45 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowTimestamp.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowTimestamp.ts @@ -19,8 +19,8 @@ export type GetFollowTimestampParams = { export const FN_SELECTOR = "0x3543a277" as const; const FN_INPUTS = [ { - name: "followTokenId", type: "uint256", + name: "followTokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowTokenId.ts b/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowTokenId.ts index 4f7435a95c8..1410fcebc23 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowTokenId.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowTokenId.ts @@ -19,8 +19,8 @@ export type GetFollowTokenIdParams = { export const FN_SELECTOR = "0x11c763d6" as const; const FN_INPUTS = [ { - name: "followerProfileId", type: "uint256", + name: "followerProfileId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowerProfileId.ts b/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowerProfileId.ts index 8cf23e11f65..f9b1d1a50ea 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowerProfileId.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getFollowerProfileId.ts @@ -19,8 +19,8 @@ export type GetFollowerProfileIdParams = { export const FN_SELECTOR = "0x886a65c3" as const; const FN_INPUTS = [ { - name: "followTokenId", type: "uint256", + name: "followTokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getOriginalFollowTimestamp.ts b/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getOriginalFollowTimestamp.ts index c82404bae68..d22da8e12f8 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getOriginalFollowTimestamp.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getOriginalFollowTimestamp.ts @@ -19,8 +19,8 @@ export type GetOriginalFollowTimestampParams = { export const FN_SELECTOR = "0xd1b34934" as const; const FN_INPUTS = [ { - name: "followTokenId", type: "uint256", + name: "followTokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getProfileIdAllowedToRecover.ts b/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getProfileIdAllowedToRecover.ts index 2942f9bf24e..0166e59c268 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getProfileIdAllowedToRecover.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/getProfileIdAllowedToRecover.ts @@ -19,8 +19,8 @@ export type GetProfileIdAllowedToRecoverParams = { export const FN_SELECTOR = "0x2af1544f" as const; const FN_INPUTS = [ { - name: "followTokenId", type: "uint256", + name: "followTokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/isFollowing.ts b/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/isFollowing.ts index fecddef35fa..fd3d19d6825 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/isFollowing.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/isFollowing.ts @@ -19,8 +19,8 @@ export type IsFollowingParams = { export const FN_SELECTOR = "0x4d71688d" as const; const FN_INPUTS = [ { - name: "followerProfileId", type: "uint256", + name: "followerProfileId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/mintTimestampOf.ts b/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/mintTimestampOf.ts index 75308c367f1..75ead7399a6 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/mintTimestampOf.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/FollowNFT/read/mintTimestampOf.ts @@ -16,8 +16,8 @@ export type MintTimestampOfParams = { export const FN_SELECTOR = "0x50ddf35c" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/LensHandle/read/getHandle.ts b/packages/thirdweb/src/extensions/lens/__generated__/LensHandle/read/getHandle.ts index d2b50d02fd7..9d953c3622d 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/LensHandle/read/getHandle.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/LensHandle/read/getHandle.ts @@ -16,8 +16,8 @@ export type GetHandleParams = { export const FN_SELECTOR = "0xec81d194" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/LensHandle/read/getLocalName.ts b/packages/thirdweb/src/extensions/lens/__generated__/LensHandle/read/getLocalName.ts index d38af7a477c..7b1e7dc38df 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/LensHandle/read/getLocalName.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/LensHandle/read/getLocalName.ts @@ -16,8 +16,8 @@ export type GetLocalNameParams = { export const FN_SELECTOR = "0x4985e504" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/LensHandle/read/getTokenId.ts b/packages/thirdweb/src/extensions/lens/__generated__/LensHandle/read/getTokenId.ts index 11639e363d1..b0895520653 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/LensHandle/read/getTokenId.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/LensHandle/read/getTokenId.ts @@ -16,8 +16,8 @@ export type GetTokenIdParams = { export const FN_SELECTOR = "0x1e7663bc" as const; const FN_INPUTS = [ { - name: "localName", type: "string", + name: "localName", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/exists.ts b/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/exists.ts index d510979c856..03b45d787ff 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/exists.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/exists.ts @@ -16,8 +16,8 @@ export type ExistsParams = { export const FN_SELECTOR = "0x4f558e79" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getContentURI.ts b/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getContentURI.ts index 91ae1a9deaa..3aca1b317c2 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getContentURI.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getContentURI.ts @@ -20,12 +20,12 @@ export type GetContentURIParams = { export const FN_SELECTOR = "0xb5a31496" as const; const FN_INPUTS = [ { - name: "profileId", type: "uint256", + name: "profileId", }, { - name: "pubId", type: "uint256", + name: "pubId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getProfile.ts b/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getProfile.ts index b2edcfdec8b..75ebeb39950 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getProfile.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getProfile.ts @@ -19,43 +19,43 @@ export type GetProfileParams = { export const FN_SELECTOR = "0xf08f4f64" as const; const FN_INPUTS = [ { - name: "profileId", type: "uint256", + name: "profileId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple", components: [ { - name: "pubCount", type: "uint256", + name: "pubCount", }, { - name: "followModule", type: "address", + name: "followModule", }, { - name: "followNFT", type: "address", + name: "followNFT", }, { - name: "__DEPRECATED__handle", type: "string", + name: "__DEPRECATED__handle", }, { - name: "__DEPRECATED__imageURI", type: "string", + name: "__DEPRECATED__imageURI", }, { - name: "__DEPRECATED__followNFTURI", type: "string", + name: "__DEPRECATED__followNFTURI", }, { - name: "metadataURI", type: "string", + name: "metadataURI", }, ], - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getProfileIdByHandleHash.ts b/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getProfileIdByHandleHash.ts index 2e009569ebd..727f85cacaf 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getProfileIdByHandleHash.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getProfileIdByHandleHash.ts @@ -19,8 +19,8 @@ export type GetProfileIdByHandleHashParams = { export const FN_SELECTOR = "0x19e14070" as const; const FN_INPUTS = [ { - name: "handleHash", type: "bytes32", + name: "handleHash", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getPublication.ts b/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getPublication.ts index ba8160ed54d..732495fd266 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getPublication.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/getPublication.ts @@ -20,55 +20,55 @@ export type GetPublicationParams = { export const FN_SELECTOR = "0x7385ebc9" as const; const FN_INPUTS = [ { - name: "profileId", type: "uint256", + name: "profileId", }, { - name: "pubId", type: "uint256", + name: "pubId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple", components: [ { - name: "pointedProfileId", type: "uint256", + name: "pointedProfileId", }, { - name: "pointedPubId", type: "uint256", + name: "pointedPubId", }, { - name: "contentURI", type: "string", + name: "contentURI", }, { - name: "referenceModule", type: "address", + name: "referenceModule", }, { - name: "__DEPRECATED__collectModule", type: "address", + name: "__DEPRECATED__collectModule", }, { - name: "__DEPRECATED__collectNFT", type: "address", + name: "__DEPRECATED__collectNFT", }, { - name: "pubType", type: "uint8", + name: "pubType", }, { - name: "rootProfileId", type: "uint256", + name: "rootProfileId", }, { - name: "rootPubId", type: "uint256", + name: "rootPubId", }, ], - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/mintTimestampOf.ts b/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/mintTimestampOf.ts index 75308c367f1..75ead7399a6 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/mintTimestampOf.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/mintTimestampOf.ts @@ -16,8 +16,8 @@ export type MintTimestampOfParams = { export const FN_SELECTOR = "0x50ddf35c" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/nonces.ts b/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/nonces.ts index d2a646311e4..b75ca15c1c7 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/nonces.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/nonces.ts @@ -16,8 +16,8 @@ export type NoncesParams = { export const FN_SELECTOR = "0x7ecebe00" as const; const FN_INPUTS = [ { - name: "signer", type: "address", + name: "signer", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/tokenDataOf.ts b/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/tokenDataOf.ts index 0bb4f9c14c9..365d29d6da7 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/tokenDataOf.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/LensHub/read/tokenDataOf.ts @@ -16,23 +16,23 @@ export type TokenDataOfParams = { export const FN_SELECTOR = "0xc0da9bcd" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple", components: [ { - name: "owner", type: "address", + name: "owner", }, { - name: "mintTimestamp", type: "uint96", + name: "mintTimestamp", }, ], - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/getModuleTypes.ts b/packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/getModuleTypes.ts index a5c8d475339..4c82ead0f23 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/getModuleTypes.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/getModuleTypes.ts @@ -19,8 +19,8 @@ export type GetModuleTypesParams = { export const FN_SELECTOR = "0xc5dcd896" as const; const FN_INPUTS = [ { - name: "moduleAddress", type: "address", + name: "moduleAddress", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/isErc20CurrencyRegistered.ts b/packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/isErc20CurrencyRegistered.ts index 54b6845605c..f8e495a9b44 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/isErc20CurrencyRegistered.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/isErc20CurrencyRegistered.ts @@ -19,8 +19,8 @@ export type IsErc20CurrencyRegisteredParams = { export const FN_SELECTOR = "0xf21b24d7" as const; const FN_INPUTS = [ { - name: "currencyAddress", type: "address", + name: "currencyAddress", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/isModuleRegistered.ts b/packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/isModuleRegistered.ts index 8fa808d018d..6edc467ade5 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/isModuleRegistered.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/isModuleRegistered.ts @@ -19,8 +19,8 @@ export type IsModuleRegisteredParams = { export const FN_SELECTOR = "0x1c5ebe2f" as const; const FN_INPUTS = [ { - name: "moduleAddress", type: "address", + name: "moduleAddress", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/isModuleRegisteredAs.ts b/packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/isModuleRegisteredAs.ts index 82708a7fd9e..f7bd65da099 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/isModuleRegisteredAs.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/ModuleRegistry/read/isModuleRegisteredAs.ts @@ -23,12 +23,12 @@ export type IsModuleRegisteredAsParams = { export const FN_SELECTOR = "0xc2b62fdd" as const; const FN_INPUTS = [ { - name: "moduleAddress", type: "address", + name: "moduleAddress", }, { - name: "moduleType", type: "uint256", + name: "moduleType", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/TokenHandleRegistry/read/getDefaultHandle.ts b/packages/thirdweb/src/extensions/lens/__generated__/TokenHandleRegistry/read/getDefaultHandle.ts index 9b4eb1a45de..e980545f042 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/TokenHandleRegistry/read/getDefaultHandle.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/TokenHandleRegistry/read/getDefaultHandle.ts @@ -19,8 +19,8 @@ export type GetDefaultHandleParams = { export const FN_SELECTOR = "0xe524488d" as const; const FN_INPUTS = [ { - name: "profileId", type: "uint256", + name: "profileId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/lens/__generated__/TokenHandleRegistry/read/nonces.ts b/packages/thirdweb/src/extensions/lens/__generated__/TokenHandleRegistry/read/nonces.ts index d208bdb8586..2bde91042d0 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/TokenHandleRegistry/read/nonces.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/TokenHandleRegistry/read/nonces.ts @@ -16,14 +16,14 @@ export type NoncesParams = { export const FN_SELECTOR = "0x7ecebe00" as const; const FN_INPUTS = [ { - name: "signer", type: "address", + name: "signer", }, ] as const; const FN_OUTPUTS = [ { - name: "nonce", type: "uint256", + name: "nonce", }, ] as const; diff --git a/packages/thirdweb/src/extensions/lens/__generated__/TokenHandleRegistry/read/resolve.ts b/packages/thirdweb/src/extensions/lens/__generated__/TokenHandleRegistry/read/resolve.ts index a3169c977c5..84b8abe8f34 100644 --- a/packages/thirdweb/src/extensions/lens/__generated__/TokenHandleRegistry/read/resolve.ts +++ b/packages/thirdweb/src/extensions/lens/__generated__/TokenHandleRegistry/read/resolve.ts @@ -16,8 +16,8 @@ export type ResolveParams = { export const FN_SELECTOR = "0x4f896d4f" as const; const FN_INPUTS = [ { - name: "handleId", type: "uint256", + name: "handleId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/BuyerApprovedForListing.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/BuyerApprovedForListing.ts index 50ae329f61e..65a62931636 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/BuyerApprovedForListing.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/BuyerApprovedForListing.ts @@ -42,8 +42,8 @@ export function buyerApprovedForListingEvent( filters: BuyerApprovedForListingEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event BuyerApprovedForListing(uint256 indexed listingId, address indexed buyer, bool approved)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/CancelledListing.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/CancelledListing.ts index 754fc8b8bec..25f7aab04ee 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/CancelledListing.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/CancelledListing.ts @@ -42,8 +42,8 @@ export function cancelledListingEvent( filters: CancelledListingEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event CancelledListing(address indexed listingCreator, uint256 indexed listingId)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/CurrencyApprovedForListing.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/CurrencyApprovedForListing.ts index dbafa7ec768..983ca3c8c4d 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/CurrencyApprovedForListing.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/CurrencyApprovedForListing.ts @@ -42,8 +42,8 @@ export function currencyApprovedForListingEvent( filters: CurrencyApprovedForListingEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event CurrencyApprovedForListing(uint256 indexed listingId, address indexed currency, uint256 pricePerToken)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/NewListing.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/NewListing.ts index f9739d155ee..7dcc74cbb31 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/NewListing.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/NewListing.ts @@ -46,8 +46,8 @@ export type NewListingEventFilters = Partial<{ */ export function newListingEvent(filters: NewListingEventFilters = {}) { return prepareEvent({ - filters, signature: "event NewListing(address indexed listingCreator, uint256 indexed listingId, address indexed assetContract, (uint256 listingId, uint256 tokenId, uint256 quantity, uint256 pricePerToken, uint128 startTimestamp, uint128 endTimestamp, address listingCreator, address assetContract, address currency, uint8 tokenType, uint8 status, bool reserved) listing)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/NewSale.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/NewSale.ts index 012105533c8..664e583308f 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/NewSale.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/NewSale.ts @@ -46,8 +46,8 @@ export type NewSaleEventFilters = Partial<{ */ export function newSaleEvent(filters: NewSaleEventFilters = {}) { return prepareEvent({ - filters, signature: "event NewSale(address indexed listingCreator, uint256 indexed listingId, address indexed assetContract, uint256 tokenId, address buyer, uint256 quantityBought, uint256 totalPricePaid)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/UpdatedListing.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/UpdatedListing.ts index 277774c796e..cd946280f87 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/UpdatedListing.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/events/UpdatedListing.ts @@ -46,8 +46,8 @@ export type UpdatedListingEventFilters = Partial<{ */ export function updatedListingEvent(filters: UpdatedListingEventFilters = {}) { return prepareEvent({ - filters, signature: "event UpdatedListing(address indexed listingCreator, uint256 indexed listingId, address indexed assetContract, (uint256 listingId, uint256 tokenId, uint256 quantity, uint256 pricePerToken, uint128 startTimestamp, uint128 endTimestamp, address listingCreator, address assetContract, address currency, uint8 tokenType, uint8 status, bool reserved) listing)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/currencyPriceForListing.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/currencyPriceForListing.ts index ee737722047..e6f15c2059e 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/currencyPriceForListing.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/currencyPriceForListing.ts @@ -20,12 +20,12 @@ export type CurrencyPriceForListingParams = { export const FN_SELECTOR = "0xfb14079d" as const; const FN_INPUTS = [ { - name: "_listingId", type: "uint256", + name: "_listingId", }, { - name: "_currency", type: "address", + name: "_currency", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/getAllListings.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/getAllListings.ts index 86a7393c146..ccef2b4d391 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/getAllListings.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/getAllListings.ts @@ -17,68 +17,68 @@ export type GetAllListingsParams = { export const FN_SELECTOR = "0xc5275fb0" as const; const FN_INPUTS = [ { - name: "_startId", type: "uint256", + name: "_startId", }, { - name: "_endId", type: "uint256", + name: "_endId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "listings", components: [ { - name: "listingId", type: "uint256", + name: "listingId", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "startTimestamp", type: "uint128", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint128", + name: "endTimestamp", }, { - name: "listingCreator", type: "address", + name: "listingCreator", }, { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "status", type: "uint8", + name: "status", }, { - name: "reserved", type: "bool", + name: "reserved", }, ], - name: "listings", - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/getAllValidListings.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/getAllValidListings.ts index 922ad75762b..ce20b1c10a3 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/getAllValidListings.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/getAllValidListings.ts @@ -17,68 +17,68 @@ export type GetAllValidListingsParams = { export const FN_SELECTOR = "0x31654b4d" as const; const FN_INPUTS = [ { - name: "_startId", type: "uint256", + name: "_startId", }, { - name: "_endId", type: "uint256", + name: "_endId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "listings", components: [ { - name: "listingId", type: "uint256", + name: "listingId", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "startTimestamp", type: "uint128", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint128", + name: "endTimestamp", }, { - name: "listingCreator", type: "address", + name: "listingCreator", }, { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "status", type: "uint8", + name: "status", }, { - name: "reserved", type: "bool", + name: "reserved", }, ], - name: "listings", - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/getListing.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/getListing.ts index b40e9af13c2..877c774ef0a 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/getListing.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/getListing.ts @@ -19,64 +19,64 @@ export type GetListingParams = { export const FN_SELECTOR = "0x107a274a" as const; const FN_INPUTS = [ { - name: "_listingId", type: "uint256", + name: "_listingId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple", + name: "listing", components: [ { - name: "listingId", type: "uint256", + name: "listingId", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "startTimestamp", type: "uint128", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint128", + name: "endTimestamp", }, { - name: "listingCreator", type: "address", + name: "listingCreator", }, { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "status", type: "uint8", + name: "status", }, { - name: "reserved", type: "bool", + name: "reserved", }, ], - name: "listing", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/isBuyerApprovedForListing.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/isBuyerApprovedForListing.ts index c3dac315fb9..647f507c31f 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/isBuyerApprovedForListing.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/isBuyerApprovedForListing.ts @@ -20,12 +20,12 @@ export type IsBuyerApprovedForListingParams = { export const FN_SELECTOR = "0x9cfbe2a6" as const; const FN_INPUTS = [ { - name: "_listingId", type: "uint256", + name: "_listingId", }, { - name: "_buyer", type: "address", + name: "_buyer", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/isCurrencyApprovedForListing.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/isCurrencyApprovedForListing.ts index 67e44c1c426..19748a64418 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/isCurrencyApprovedForListing.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/read/isCurrencyApprovedForListing.ts @@ -20,12 +20,12 @@ export type IsCurrencyApprovedForListingParams = { export const FN_SELECTOR = "0xa8519047" as const; const FN_INPUTS = [ { - name: "_listingId", type: "uint256", + name: "_listingId", }, { - name: "_currency", type: "address", + name: "_currency", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/approveBuyerForListing.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/approveBuyerForListing.ts index e0db3ba1e41..ea518f185d6 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/approveBuyerForListing.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/approveBuyerForListing.ts @@ -23,16 +23,16 @@ export type ApproveBuyerForListingParams = WithOverrides<{ export const FN_SELECTOR = "0x48dd77df" as const; const FN_INPUTS = [ { - name: "_listingId", type: "uint256", + name: "_listingId", }, { - name: "_buyer", type: "address", + name: "_buyer", }, { - name: "_toApprove", type: "bool", + name: "_toApprove", }, ] as const; const FN_OUTPUTS = [] as const; @@ -146,19 +146,8 @@ export function approveBuyerForListing( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -168,5 +157,16 @@ export function approveBuyerForListing( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/approveCurrencyForListing.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/approveCurrencyForListing.ts index 1d6b7c5d0a8..6e37f564067 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/approveCurrencyForListing.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/approveCurrencyForListing.ts @@ -26,16 +26,16 @@ export type ApproveCurrencyForListingParams = WithOverrides<{ export const FN_SELECTOR = "0xea8f9a3c" as const; const FN_INPUTS = [ { - name: "_listingId", type: "uint256", + name: "_listingId", }, { - name: "_currency", type: "address", + name: "_currency", }, { - name: "_pricePerTokenInCurrency", type: "uint256", + name: "_pricePerTokenInCurrency", }, ] as const; const FN_OUTPUTS = [] as const; @@ -149,19 +149,8 @@ export function approveCurrencyForListing( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -171,5 +160,16 @@ export function approveCurrencyForListing( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/buyFromListing.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/buyFromListing.ts index 0b5e66a8d5e..8287263a1ba 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/buyFromListing.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/buyFromListing.ts @@ -28,24 +28,24 @@ export type BuyFromListingParams = WithOverrides<{ export const FN_SELECTOR = "0x704232dc" as const; const FN_INPUTS = [ { - name: "_listingId", type: "uint256", + name: "_listingId", }, { - name: "_buyFor", type: "address", + name: "_buyFor", }, { - name: "_quantity", type: "uint256", + name: "_quantity", }, { - name: "_currency", type: "address", + name: "_currency", }, { - name: "_expectedTotalPrice", type: "uint256", + name: "_expectedTotalPrice", }, ] as const; const FN_OUTPUTS = [] as const; @@ -161,19 +161,8 @@ export function buyFromListing( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -185,5 +174,16 @@ export function buyFromListing( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/cancelListing.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/cancelListing.ts index 0f6d9036dac..2c791b9f01e 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/cancelListing.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/cancelListing.ts @@ -21,8 +21,8 @@ export type CancelListingParams = WithOverrides<{ export const FN_SELECTOR = "0x305a67a8" as const; const FN_INPUTS = [ { - name: "_listingId", type: "uint256", + name: "_listingId", }, ] as const; const FN_OUTPUTS = [] as const; @@ -120,23 +120,23 @@ export function cancelListing( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.listingId] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/createListing.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/createListing.ts index 71b1d602dbb..1edc7ce9143 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/createListing.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/createListing.ts @@ -31,48 +31,48 @@ export type CreateListingParams = WithOverrides<{ export const FN_SELECTOR = "0x746415b5" as const; const FN_INPUTS = [ { + type: "tuple", + name: "_params", components: [ { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "startTimestamp", type: "uint128", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint128", + name: "endTimestamp", }, { - name: "reserved", type: "bool", + name: "reserved", }, ], - name: "_params", - type: "tuple", }, ] as const; const FN_OUTPUTS = [ { - name: "listingId", type: "uint256", + name: "listingId", }, ] as const; @@ -169,23 +169,23 @@ export function createListing( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.params] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/updateListing.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/updateListing.ts index e8e9b0db944..5af616b8e02 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/updateListing.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/updateListing.ts @@ -35,46 +35,46 @@ export type UpdateListingParams = WithOverrides<{ export const FN_SELECTOR = "0x07b67758" as const; const FN_INPUTS = [ { - name: "_listingId", type: "uint256", + name: "_listingId", }, { + type: "tuple", + name: "_params", components: [ { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "pricePerToken", type: "uint256", + name: "pricePerToken", }, { - name: "startTimestamp", type: "uint128", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint128", + name: "endTimestamp", }, { - name: "reserved", type: "bool", + name: "reserved", }, ], - name: "_params", - type: "tuple", }, ] as const; const FN_OUTPUTS = [] as const; @@ -175,23 +175,23 @@ export function updateListing( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.listingId, resolvedOptions.params] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/events/AuctionClosed.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/events/AuctionClosed.ts index d0ff9814ed0..ef8c6ff4409 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/events/AuctionClosed.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/events/AuctionClosed.ts @@ -46,8 +46,8 @@ export type AuctionClosedEventFilters = Partial<{ */ export function auctionClosedEvent(filters: AuctionClosedEventFilters = {}) { return prepareEvent({ - filters, signature: "event AuctionClosed(uint256 indexed auctionId, address indexed assetContract, address indexed closer, uint256 tokenId, address auctionCreator, address winningBidder)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/events/CancelledAuction.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/events/CancelledAuction.ts index 07175dd29db..aafa0ed4b28 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/events/CancelledAuction.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/events/CancelledAuction.ts @@ -42,8 +42,8 @@ export function cancelledAuctionEvent( filters: CancelledAuctionEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event CancelledAuction(address indexed auctionCreator, uint256 indexed auctionId)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/events/NewAuction.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/events/NewAuction.ts index dce5bdedf9c..612c8dae2a4 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/events/NewAuction.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/events/NewAuction.ts @@ -46,8 +46,8 @@ export type NewAuctionEventFilters = Partial<{ */ export function newAuctionEvent(filters: NewAuctionEventFilters = {}) { return prepareEvent({ - filters, signature: "event NewAuction(address indexed auctionCreator, uint256 indexed auctionId, address indexed assetContract, (uint256 auctionId, uint256 tokenId, uint256 quantity, uint256 minimumBidAmount, uint256 buyoutBidAmount, uint64 timeBufferInSeconds, uint64 bidBufferBps, uint64 startTimestamp, uint64 endTimestamp, address auctionCreator, address assetContract, address currency, uint8 tokenType, uint8 status) auction)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/events/NewBid.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/events/NewBid.ts index 1fa747408d2..d63d49db766 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/events/NewBid.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/events/NewBid.ts @@ -46,8 +46,8 @@ export type NewBidEventFilters = Partial<{ */ export function newBidEvent(filters: NewBidEventFilters = {}) { return prepareEvent({ - filters, signature: "event NewBid(uint256 indexed auctionId, address indexed bidder, address indexed assetContract, uint256 bidAmount, (uint256 auctionId, uint256 tokenId, uint256 quantity, uint256 minimumBidAmount, uint256 buyoutBidAmount, uint64 timeBufferInSeconds, uint64 bidBufferBps, uint64 startTimestamp, uint64 endTimestamp, address auctionCreator, address assetContract, address currency, uint8 tokenType, uint8 status) auction)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/getAllAuctions.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/getAllAuctions.ts index f69f3a5af5a..5bf0ddba132 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/getAllAuctions.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/getAllAuctions.ts @@ -17,76 +17,76 @@ export type GetAllAuctionsParams = { export const FN_SELECTOR = "0xc291537c" as const; const FN_INPUTS = [ { - name: "_startId", type: "uint256", + name: "_startId", }, { - name: "_endId", type: "uint256", + name: "_endId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "auctions", components: [ { - name: "auctionId", type: "uint256", + name: "auctionId", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "minimumBidAmount", type: "uint256", + name: "minimumBidAmount", }, { - name: "buyoutBidAmount", type: "uint256", + name: "buyoutBidAmount", }, { - name: "timeBufferInSeconds", type: "uint64", + name: "timeBufferInSeconds", }, { - name: "bidBufferBps", type: "uint64", + name: "bidBufferBps", }, { - name: "startTimestamp", type: "uint64", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint64", + name: "endTimestamp", }, { - name: "auctionCreator", type: "address", + name: "auctionCreator", }, { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "status", type: "uint8", + name: "status", }, ], - name: "auctions", - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/getAllValidAuctions.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/getAllValidAuctions.ts index 6eb0f5938da..2a78e300971 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/getAllValidAuctions.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/getAllValidAuctions.ts @@ -17,76 +17,76 @@ export type GetAllValidAuctionsParams = { export const FN_SELECTOR = "0x7b063801" as const; const FN_INPUTS = [ { - name: "_startId", type: "uint256", + name: "_startId", }, { - name: "_endId", type: "uint256", + name: "_endId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "auctions", components: [ { - name: "auctionId", type: "uint256", + name: "auctionId", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "minimumBidAmount", type: "uint256", + name: "minimumBidAmount", }, { - name: "buyoutBidAmount", type: "uint256", + name: "buyoutBidAmount", }, { - name: "timeBufferInSeconds", type: "uint64", + name: "timeBufferInSeconds", }, { - name: "bidBufferBps", type: "uint64", + name: "bidBufferBps", }, { - name: "startTimestamp", type: "uint64", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint64", + name: "endTimestamp", }, { - name: "auctionCreator", type: "address", + name: "auctionCreator", }, { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "status", type: "uint8", + name: "status", }, ], - name: "auctions", - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/getAuction.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/getAuction.ts index 08ed92b3e27..0e617b97e15 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/getAuction.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/getAuction.ts @@ -19,72 +19,72 @@ export type GetAuctionParams = { export const FN_SELECTOR = "0x78bd7935" as const; const FN_INPUTS = [ { - name: "_auctionId", type: "uint256", + name: "_auctionId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple", + name: "auction", components: [ { - name: "auctionId", type: "uint256", + name: "auctionId", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "minimumBidAmount", type: "uint256", + name: "minimumBidAmount", }, { - name: "buyoutBidAmount", type: "uint256", + name: "buyoutBidAmount", }, { - name: "timeBufferInSeconds", type: "uint64", + name: "timeBufferInSeconds", }, { - name: "bidBufferBps", type: "uint64", + name: "bidBufferBps", }, { - name: "startTimestamp", type: "uint64", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint64", + name: "endTimestamp", }, { - name: "auctionCreator", type: "address", + name: "auctionCreator", }, { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "status", type: "uint8", + name: "status", }, ], - name: "auction", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/getWinningBid.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/getWinningBid.ts index 8a933346840..941d302bdc2 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/getWinningBid.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/getWinningBid.ts @@ -19,22 +19,22 @@ export type GetWinningBidParams = { export const FN_SELECTOR = "0x6891939d" as const; const FN_INPUTS = [ { - name: "_auctionId", type: "uint256", + name: "_auctionId", }, ] as const; const FN_OUTPUTS = [ { - name: "bidder", type: "address", + name: "bidder", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "bidAmount", type: "uint256", + name: "bidAmount", }, ] as const; diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/isAuctionExpired.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/isAuctionExpired.ts index d90f1b5c0ed..b6063ca7b31 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/isAuctionExpired.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/isAuctionExpired.ts @@ -19,8 +19,8 @@ export type IsAuctionExpiredParams = { export const FN_SELECTOR = "0x1389b117" as const; const FN_INPUTS = [ { - name: "_auctionId", type: "uint256", + name: "_auctionId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/isNewWinningBid.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/isNewWinningBid.ts index 7885c7c450e..09096df9c54 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/isNewWinningBid.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/read/isNewWinningBid.ts @@ -23,12 +23,12 @@ export type IsNewWinningBidParams = { export const FN_SELECTOR = "0x2eb566bd" as const; const FN_INPUTS = [ { - name: "_auctionId", type: "uint256", + name: "_auctionId", }, { - name: "_bidAmount", type: "uint256", + name: "_bidAmount", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/bidInAuction.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/bidInAuction.ts index d571dfda0f6..e629d8e71bf 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/bidInAuction.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/bidInAuction.ts @@ -25,12 +25,12 @@ export type BidInAuctionParams = WithOverrides<{ export const FN_SELECTOR = "0x0858e5ad" as const; const FN_INPUTS = [ { - name: "_auctionId", type: "uint256", + name: "_auctionId", }, { - name: "_bidAmount", type: "uint256", + name: "_bidAmount", }, ] as const; const FN_OUTPUTS = [] as const; @@ -131,23 +131,23 @@ export function bidInAuction( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.auctionId, resolvedOptions.bidAmount] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/cancelAuction.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/cancelAuction.ts index 9c30227fc67..51df278132e 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/cancelAuction.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/cancelAuction.ts @@ -21,8 +21,8 @@ export type CancelAuctionParams = WithOverrides<{ export const FN_SELECTOR = "0x96b5a755" as const; const FN_INPUTS = [ { - name: "_auctionId", type: "uint256", + name: "_auctionId", }, ] as const; const FN_OUTPUTS = [] as const; @@ -120,23 +120,23 @@ export function cancelAuction( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.auctionId] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/collectAuctionPayout.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/collectAuctionPayout.ts index b6dbe57b1f9..4d65a231619 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/collectAuctionPayout.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/collectAuctionPayout.ts @@ -21,8 +21,8 @@ export type CollectAuctionPayoutParams = WithOverrides<{ export const FN_SELECTOR = "0xebf05a62" as const; const FN_INPUTS = [ { - name: "_auctionId", type: "uint256", + name: "_auctionId", }, ] as const; const FN_OUTPUTS = [] as const; @@ -124,23 +124,23 @@ export function collectAuctionPayout( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.auctionId] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/collectAuctionTokens.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/collectAuctionTokens.ts index de394d93a4c..21a99f91025 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/collectAuctionTokens.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/collectAuctionTokens.ts @@ -21,8 +21,8 @@ export type CollectAuctionTokensParams = WithOverrides<{ export const FN_SELECTOR = "0x03a54fe0" as const; const FN_INPUTS = [ { - name: "_auctionId", type: "uint256", + name: "_auctionId", }, ] as const; const FN_OUTPUTS = [] as const; @@ -124,23 +124,23 @@ export function collectAuctionTokens( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.auctionId] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/createAuction.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/createAuction.ts index 0e10c08fbd0..378f42640a8 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/createAuction.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/createAuction.ts @@ -33,56 +33,56 @@ export type CreateAuctionParams = WithOverrides<{ export const FN_SELECTOR = "0x16654d40" as const; const FN_INPUTS = [ { + type: "tuple", + name: "_params", components: [ { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "minimumBidAmount", type: "uint256", + name: "minimumBidAmount", }, { - name: "buyoutBidAmount", type: "uint256", + name: "buyoutBidAmount", }, { - name: "timeBufferInSeconds", type: "uint64", + name: "timeBufferInSeconds", }, { - name: "bidBufferBps", type: "uint64", + name: "bidBufferBps", }, { - name: "startTimestamp", type: "uint64", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint64", + name: "endTimestamp", }, ], - name: "_params", - type: "tuple", }, ] as const; const FN_OUTPUTS = [ { - name: "auctionId", type: "uint256", + name: "auctionId", }, ] as const; @@ -179,23 +179,23 @@ export function createAuction( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.params] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/AuctionClosed.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/AuctionClosed.ts index 193ef08a9c8..62842341a63 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/AuctionClosed.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/AuctionClosed.ts @@ -46,8 +46,8 @@ export type AuctionClosedEventFilters = Partial<{ */ export function auctionClosedEvent(filters: AuctionClosedEventFilters = {}) { return prepareEvent({ - filters, signature: "event AuctionClosed(uint256 indexed listingId, address indexed closer, bool indexed cancelled, address auctionCreator, address winningBidder)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/ListingAdded.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/ListingAdded.ts index 3d715351f07..5177b264957 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/ListingAdded.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/ListingAdded.ts @@ -46,8 +46,8 @@ export type ListingAddedEventFilters = Partial<{ */ export function listingAddedEvent(filters: ListingAddedEventFilters = {}) { return prepareEvent({ - filters, signature: "event ListingAdded(uint256 indexed listingId, address indexed assetContract, address indexed lister, (uint256 listingId, address tokenOwner, address assetContract, uint256 tokenId, uint256 startTime, uint256 endTime, uint256 quantity, address currency, uint256 reservePricePerToken, uint256 buyoutPricePerToken, uint8 tokenType, uint8 listingType) listing)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/ListingRemoved.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/ListingRemoved.ts index 7a765b236c1..5ca6b7e42ea 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/ListingRemoved.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/ListingRemoved.ts @@ -40,8 +40,8 @@ export type ListingRemovedEventFilters = Partial<{ */ export function listingRemovedEvent(filters: ListingRemovedEventFilters = {}) { return prepareEvent({ - filters, signature: "event ListingRemoved(uint256 indexed listingId, address indexed listingCreator)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/ListingUpdated.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/ListingUpdated.ts index 531eba5ddf4..9de7381fbe8 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/ListingUpdated.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/ListingUpdated.ts @@ -40,8 +40,8 @@ export type ListingUpdatedEventFilters = Partial<{ */ export function listingUpdatedEvent(filters: ListingUpdatedEventFilters = {}) { return prepareEvent({ - filters, signature: "event ListingUpdated(uint256 indexed listingId, address indexed listingCreator)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/NewOffer.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/NewOffer.ts index 4b1606b5789..4efda0af611 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/NewOffer.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/NewOffer.ts @@ -46,8 +46,8 @@ export type NewOfferEventFilters = Partial<{ */ export function newOfferEvent(filters: NewOfferEventFilters = {}) { return prepareEvent({ - filters, signature: "event NewOffer(uint256 indexed listingId, address indexed offeror, uint8 indexed listingType, uint256 quantityWanted, uint256 totalOfferAmount, address currency)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/NewSale.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/NewSale.ts index 893e02000fc..da59581ce1c 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/NewSale.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/NewSale.ts @@ -46,8 +46,8 @@ export type NewSaleEventFilters = Partial<{ */ export function newSaleEvent(filters: NewSaleEventFilters = {}) { return prepareEvent({ - filters, signature: "event NewSale(uint256 indexed listingId, address indexed assetContract, address indexed lister, address buyer, uint256 quantityBought, uint256 totalPricePaid)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/PlatformFeeInfoUpdated.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/PlatformFeeInfoUpdated.ts index 4e91f71b9d2..d32fc97edec 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/PlatformFeeInfoUpdated.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/events/PlatformFeeInfoUpdated.ts @@ -36,8 +36,8 @@ export function platformFeeInfoUpdatedEvent( filters: PlatformFeeInfoUpdatedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event PlatformFeeInfoUpdated(address indexed platformFeeRecipient, uint256 platformFeeBps)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/acceptOffer.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/acceptOffer.ts index 49183fe3c78..406594839e2 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/acceptOffer.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/acceptOffer.ts @@ -27,20 +27,20 @@ export type AcceptOfferParams = WithOverrides<{ export const FN_SELECTOR = "0xb13c0e63" as const; const FN_INPUTS = [ { - name: "_listingId", type: "uint256", + name: "_listingId", }, { - name: "_offeror", type: "address", + name: "_offeror", }, { - name: "_currency", type: "address", + name: "_currency", }, { - name: "_totalPrice", type: "uint256", + name: "_totalPrice", }, ] as const; const FN_OUTPUTS = [] as const; @@ -152,19 +152,8 @@ export function acceptOffer( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -175,5 +164,16 @@ export function acceptOffer( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/buy.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/buy.ts index 027f141225b..36f0a65a4de 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/buy.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/buy.ts @@ -28,24 +28,24 @@ export type BuyParams = WithOverrides<{ export const FN_SELECTOR = "0x7687ab02" as const; const FN_INPUTS = [ { - name: "_listingId", type: "uint256", + name: "_listingId", }, { - name: "_buyFor", type: "address", + name: "_buyFor", }, { - name: "_quantity", type: "uint256", + name: "_quantity", }, { - name: "_currency", type: "address", + name: "_currency", }, { - name: "_totalPrice", type: "uint256", + name: "_totalPrice", }, ] as const; const FN_OUTPUTS = [] as const; @@ -159,19 +159,8 @@ export function buy( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -183,5 +172,16 @@ export function buy( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/cancelDirectListing.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/cancelDirectListing.ts index 0257eb65715..277b56ec199 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/cancelDirectListing.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/cancelDirectListing.ts @@ -21,8 +21,8 @@ export type CancelDirectListingParams = WithOverrides<{ export const FN_SELECTOR = "0x7506c84a" as const; const FN_INPUTS = [ { - name: "_listingId", type: "uint256", + name: "_listingId", }, ] as const; const FN_OUTPUTS = [] as const; @@ -122,23 +122,23 @@ export function cancelDirectListing( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.listingId] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/closeAuction.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/closeAuction.ts index ec6f0d8de8b..3c83c671942 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/closeAuction.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/closeAuction.ts @@ -22,12 +22,12 @@ export type CloseAuctionParams = WithOverrides<{ export const FN_SELECTOR = "0x6bab66ae" as const; const FN_INPUTS = [ { - name: "_listingId", type: "uint256", + name: "_listingId", }, { - name: "_closeFor", type: "address", + name: "_closeFor", }, ] as const; const FN_OUTPUTS = [] as const; @@ -128,23 +128,23 @@ export function closeAuction( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.listingId, resolvedOptions.closeFor] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/createListing.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/createListing.ts index 1890f378f7f..136cc238a5b 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/createListing.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/createListing.ts @@ -32,46 +32,46 @@ export type CreateListingParams = WithOverrides<{ export const FN_SELECTOR = "0x296f4e16" as const; const FN_INPUTS = [ { + type: "tuple", + name: "_params", components: [ { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "startTime", type: "uint256", + name: "startTime", }, { - name: "secondsUntilEndTime", type: "uint256", + name: "secondsUntilEndTime", }, { - name: "quantityToList", type: "uint256", + name: "quantityToList", }, { - name: "currencyToAccept", type: "address", + name: "currencyToAccept", }, { - name: "reservePricePerToken", type: "uint256", + name: "reservePricePerToken", }, { - name: "buyoutPricePerToken", type: "uint256", + name: "buyoutPricePerToken", }, { - name: "listingType", type: "uint8", + name: "listingType", }, ], - name: "_params", - type: "tuple", }, ] as const; const FN_OUTPUTS = [] as const; @@ -169,23 +169,23 @@ export function createListing( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.params] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/offer.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/offer.ts index 8c95eb6ab63..6a8e9874143 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/offer.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/offer.ts @@ -34,24 +34,24 @@ export type OfferParams = WithOverrides<{ export const FN_SELECTOR = "0x5fef45e7" as const; const FN_INPUTS = [ { - name: "_listingId", type: "uint256", + name: "_listingId", }, { - name: "_quantityWanted", type: "uint256", + name: "_quantityWanted", }, { - name: "_currency", type: "address", + name: "_currency", }, { - name: "_pricePerToken", type: "uint256", + name: "_pricePerToken", }, { - name: "_expirationTimestamp", type: "uint256", + name: "_expirationTimestamp", }, ] as const; const FN_OUTPUTS = [] as const; @@ -165,19 +165,8 @@ export function offer( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -189,5 +178,16 @@ export function offer( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/setContractURI.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/setContractURI.ts index a7d8b046f46..f156ccd65cc 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/setContractURI.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/setContractURI.ts @@ -18,8 +18,8 @@ export type SetContractURIParams = WithOverrides<{ export const FN_SELECTOR = "0x938e3d7b" as const; const FN_INPUTS = [ { - name: "_uri", type: "string", + name: "_uri", }, ] as const; const FN_OUTPUTS = [] as const; @@ -117,23 +117,23 @@ export function setContractURI( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.uri] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/setPlatformFeeInfo.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/setPlatformFeeInfo.ts index 93dadff3486..bfc107d5e07 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/setPlatformFeeInfo.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/setPlatformFeeInfo.ts @@ -25,12 +25,12 @@ export type SetPlatformFeeInfoParams = WithOverrides<{ export const FN_SELECTOR = "0x1e7ac488" as const; const FN_INPUTS = [ { - name: "_platformFeeRecipient", type: "address", + name: "_platformFeeRecipient", }, { - name: "_platformFeeBps", type: "uint256", + name: "_platformFeeBps", }, ] as const; const FN_OUTPUTS = [] as const; @@ -136,19 +136,8 @@ export function setPlatformFeeInfo( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -157,5 +146,16 @@ export function setPlatformFeeInfo( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/updateListing.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/updateListing.ts index 6951adfe72f..d1d0a1fb924 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/updateListing.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/updateListing.ts @@ -45,32 +45,32 @@ export type UpdateListingParams = WithOverrides<{ export const FN_SELECTOR = "0xc4b5b15f" as const; const FN_INPUTS = [ { - name: "_listingId", type: "uint256", + name: "_listingId", }, { - name: "_quantityToList", type: "uint256", + name: "_quantityToList", }, { - name: "_reservePricePerToken", type: "uint256", + name: "_reservePricePerToken", }, { - name: "_buyoutPricePerToken", type: "uint256", + name: "_buyoutPricePerToken", }, { - name: "_currencyToAccept", type: "address", + name: "_currencyToAccept", }, { - name: "_startTime", type: "uint256", + name: "_startTime", }, { - name: "_secondsUntilEndTime", type: "uint256", + name: "_secondsUntilEndTime", }, ] as const; const FN_OUTPUTS = [] as const; @@ -194,19 +194,8 @@ export function updateListing( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -220,5 +209,16 @@ export function updateListing( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/events/AcceptedOffer.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/events/AcceptedOffer.ts index 36db9ddb0a1..fd42fcb8462 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/events/AcceptedOffer.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/events/AcceptedOffer.ts @@ -46,8 +46,8 @@ export type AcceptedOfferEventFilters = Partial<{ */ export function acceptedOfferEvent(filters: AcceptedOfferEventFilters = {}) { return prepareEvent({ - filters, signature: "event AcceptedOffer(address indexed offeror, uint256 indexed offerId, address indexed assetContract, uint256 tokenId, address seller, uint256 quantityBought, uint256 totalPricePaid)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/events/CancelledOffer.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/events/CancelledOffer.ts index 052ab0867b1..c47bf357bc6 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/events/CancelledOffer.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/events/CancelledOffer.ts @@ -40,8 +40,8 @@ export type CancelledOfferEventFilters = Partial<{ */ export function cancelledOfferEvent(filters: CancelledOfferEventFilters = {}) { return prepareEvent({ - filters, signature: "event CancelledOffer(address indexed offeror, uint256 indexed offerId)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/events/NewOffer.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/events/NewOffer.ts index 3ec6d81ed9b..a0ce2707f11 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/events/NewOffer.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/events/NewOffer.ts @@ -46,8 +46,8 @@ export type NewOfferEventFilters = Partial<{ */ export function newOfferEvent(filters: NewOfferEventFilters = {}) { return prepareEvent({ - filters, signature: "event NewOffer(address indexed offeror, uint256 indexed offerId, address indexed assetContract, (uint256 offerId, uint256 tokenId, uint256 quantity, uint256 totalPrice, uint256 expirationTimestamp, address offeror, address assetContract, address currency, uint8 tokenType, uint8 status) offer)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/read/getAllOffers.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/read/getAllOffers.ts index de44cd07ef4..eaaf99cd4b2 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/read/getAllOffers.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/read/getAllOffers.ts @@ -17,60 +17,60 @@ export type GetAllOffersParams = { export const FN_SELECTOR = "0xc1edcfbe" as const; const FN_INPUTS = [ { - name: "_startId", type: "uint256", + name: "_startId", }, { - name: "_endId", type: "uint256", + name: "_endId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "offers", components: [ { - name: "offerId", type: "uint256", + name: "offerId", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "totalPrice", type: "uint256", + name: "totalPrice", }, { - name: "expirationTimestamp", type: "uint256", + name: "expirationTimestamp", }, { - name: "offeror", type: "address", + name: "offeror", }, { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "status", type: "uint8", + name: "status", }, ], - name: "offers", - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/read/getAllValidOffers.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/read/getAllValidOffers.ts index ef901d30f17..6fabcc41063 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/read/getAllValidOffers.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/read/getAllValidOffers.ts @@ -17,60 +17,60 @@ export type GetAllValidOffersParams = { export const FN_SELECTOR = "0x91940b3e" as const; const FN_INPUTS = [ { - name: "_startId", type: "uint256", + name: "_startId", }, { - name: "_endId", type: "uint256", + name: "_endId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "offers", components: [ { - name: "offerId", type: "uint256", + name: "offerId", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "totalPrice", type: "uint256", + name: "totalPrice", }, { - name: "expirationTimestamp", type: "uint256", + name: "expirationTimestamp", }, { - name: "offeror", type: "address", + name: "offeror", }, { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "status", type: "uint8", + name: "status", }, ], - name: "offers", - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/read/getOffer.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/read/getOffer.ts index 97fe560e741..72dfeaac9f3 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/read/getOffer.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/read/getOffer.ts @@ -16,56 +16,56 @@ export type GetOfferParams = { export const FN_SELECTOR = "0x4579268a" as const; const FN_INPUTS = [ { - name: "_offerId", type: "uint256", + name: "_offerId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple", + name: "offer", components: [ { - name: "offerId", type: "uint256", + name: "offerId", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "totalPrice", type: "uint256", + name: "totalPrice", }, { - name: "expirationTimestamp", type: "uint256", + name: "expirationTimestamp", }, { - name: "offeror", type: "address", + name: "offeror", }, { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "status", type: "uint8", + name: "status", }, ], - name: "offer", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/acceptOffer.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/acceptOffer.ts index ba388eb5203..65873d8a1cd 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/acceptOffer.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/acceptOffer.ts @@ -18,8 +18,8 @@ export type AcceptOfferParams = WithOverrides<{ export const FN_SELECTOR = "0xc815729d" as const; const FN_INPUTS = [ { - name: "_offerId", type: "uint256", + name: "_offerId", }, ] as const; const FN_OUTPUTS = [] as const; @@ -117,23 +117,23 @@ export function acceptOffer( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.offerId] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/cancelOffer.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/cancelOffer.ts index 0ad97cd1fce..150f01298a0 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/cancelOffer.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/cancelOffer.ts @@ -18,8 +18,8 @@ export type CancelOfferParams = WithOverrides<{ export const FN_SELECTOR = "0xef706adf" as const; const FN_INPUTS = [ { - name: "_offerId", type: "uint256", + name: "_offerId", }, ] as const; const FN_OUTPUTS = [] as const; @@ -117,23 +117,23 @@ export function cancelOffer( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.offerId] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/makeOffer.ts b/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/makeOffer.ts index 7f373c49bac..e8aa04508aa 100644 --- a/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/makeOffer.ts +++ b/packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/makeOffer.ts @@ -29,40 +29,40 @@ export type MakeOfferParams = WithOverrides<{ export const FN_SELECTOR = "0x016767fa" as const; const FN_INPUTS = [ { + type: "tuple", + name: "_params", components: [ { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "quantity", type: "uint256", + name: "quantity", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "totalPrice", type: "uint256", + name: "totalPrice", }, { - name: "expirationTimestamp", type: "uint256", + name: "expirationTimestamp", }, ], - name: "_params", - type: "tuple", }, ] as const; const FN_OUTPUTS = [ { - name: "offerId", type: "uint256", + name: "offerId", }, ] as const; @@ -159,23 +159,23 @@ export function makeOffer( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.params] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/module/install.ts b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/module/install.ts index 6cc34069075..93a3b918f36 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/module/install.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/module/install.ts @@ -48,8 +48,8 @@ export function module(params?: { publisher?: string }) { publisher: params?.publisher, }); return { - data: "0x" as const, module: moduleContract.address as Address, + data: "0x" as const, }; }; } @@ -83,8 +83,8 @@ export function install(options: { return installPublishedModule({ account: options.account, contract: options.contract, - moduleData: "0x" as const, moduleName: contractId, + moduleData: "0x" as const, publisher: options.params?.publisher, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getAllMetadataBatches.ts b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getAllMetadataBatches.ts index d4d3f44f0f6..388e295db59 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getAllMetadataBatches.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getAllMetadataBatches.ts @@ -8,21 +8,21 @@ export const FN_SELECTOR = "0xe6c23512" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple[]", components: [ { - name: "startTokenIdInclusive", type: "uint256", + name: "startTokenIdInclusive", }, { - name: "endTokenIdInclusive", type: "uint256", + name: "endTokenIdInclusive", }, { - name: "baseURI", type: "string", + name: "baseURI", }, ], - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getBatchIndex.ts b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getBatchIndex.ts index 3c5f845b84d..8f55369e551 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getBatchIndex.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getBatchIndex.ts @@ -16,8 +16,8 @@ export type GetBatchIndexParams = { export const FN_SELECTOR = "0x44ec3c07" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getMetadataBatch.ts b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getMetadataBatch.ts index 15e13a44647..2685b177c57 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getMetadataBatch.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getMetadataBatch.ts @@ -19,27 +19,27 @@ export type GetMetadataBatchParams = { export const FN_SELECTOR = "0xe034558b" as const; const FN_INPUTS = [ { - name: "_batchIndex", type: "uint256", + name: "_batchIndex", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple", components: [ { - name: "startTokenIdInclusive", type: "uint256", + name: "startTokenIdInclusive", }, { - name: "endTokenIdInclusive", type: "uint256", + name: "endTokenIdInclusive", }, { - name: "baseURI", type: "string", + name: "baseURI", }, ], - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getModuleConfig.ts b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getModuleConfig.ts index 84d5b4efa81..82ed8f80c64 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getModuleConfig.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getModuleConfig.ts @@ -8,46 +8,46 @@ export const FN_SELECTOR = "0x89e04e0e" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple", + name: "config", components: [ { - name: "registerInstallationCallback", type: "bool", + name: "registerInstallationCallback", }, { - name: "requiredInterfaces", type: "bytes4[]", + name: "requiredInterfaces", }, { - name: "supportedInterfaces", type: "bytes4[]", + name: "supportedInterfaces", }, { + type: "tuple[]", + name: "callbackFunctions", components: [ { - name: "selector", type: "bytes4", + name: "selector", }, ], - name: "callbackFunctions", - type: "tuple[]", }, { + type: "tuple[]", + name: "fallbackFunctions", components: [ { - name: "selector", type: "bytes4", + name: "selector", }, { - name: "permissionBits", type: "uint256", + name: "permissionBits", }, ], - name: "fallbackFunctions", - type: "tuple[]", }, ], - name: "config", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/write/setBaseURI.ts b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/write/setBaseURI.ts index d83394d46e5..5c43264fbea 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/write/setBaseURI.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/write/setBaseURI.ts @@ -22,12 +22,12 @@ export type SetBaseURIParams = WithOverrides<{ export const FN_SELECTOR = "0x33cfcb9f" as const; const FN_INPUTS = [ { - name: "_batchIndex", type: "uint256", + name: "_batchIndex", }, { - name: "_baseURI", type: "string", + name: "_baseURI", }, ] as const; const FN_OUTPUTS = [] as const; @@ -128,23 +128,23 @@ export function setBaseURI( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.batchIndex, resolvedOptions.baseURI] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/write/uploadMetadata.ts b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/write/uploadMetadata.ts index 1223ae32382..ec8a31184f5 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/write/uploadMetadata.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/write/uploadMetadata.ts @@ -19,12 +19,12 @@ export type UploadMetadataParams = WithOverrides<{ export const FN_SELECTOR = "0xbfa2f36e" as const; const FN_INPUTS = [ { - name: "_amount", type: "uint256", + name: "_amount", }, { - name: "_baseURI", type: "string", + name: "_baseURI", }, ] as const; const FN_OUTPUTS = [] as const; @@ -125,23 +125,23 @@ export function uploadMetadata( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.amount, resolvedOptions.baseURI] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/module/install.ts b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/module/install.ts index 3c7ead09b1d..4bfa3868136 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/module/install.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/module/install.ts @@ -48,8 +48,8 @@ export function module(params?: { publisher?: string }) { publisher: params?.publisher, }); return { - data: "0x" as const, module: moduleContract.address as Address, + data: "0x" as const, }; }; } @@ -83,8 +83,8 @@ export function install(options: { return installPublishedModule({ account: options.account, contract: options.contract, - moduleData: "0x" as const, moduleName: contractId, + moduleData: "0x" as const, publisher: options.params?.publisher, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/read/getAllMetadataBatches.ts b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/read/getAllMetadataBatches.ts index f28001b736c..c96956e1a57 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/read/getAllMetadataBatches.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/read/getAllMetadataBatches.ts @@ -8,21 +8,21 @@ export const FN_SELECTOR = "0xe6c23512" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple[]", components: [ { - name: "startTokenIdInclusive", type: "uint256", + name: "startTokenIdInclusive", }, { - name: "endTokenIdInclusive", type: "uint256", + name: "endTokenIdInclusive", }, { - name: "baseURI", type: "string", + name: "baseURI", }, ], - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/read/getBatchIndex.ts b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/read/getBatchIndex.ts index 98ba6899f86..c3b480fde67 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/read/getBatchIndex.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/read/getBatchIndex.ts @@ -16,8 +16,8 @@ export type GetBatchIndexParams = { export const FN_SELECTOR = "0x44ec3c07" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/read/getMetadataBatch.ts b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/read/getMetadataBatch.ts index f4e4d3638b2..b2969c59369 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/read/getMetadataBatch.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/read/getMetadataBatch.ts @@ -19,27 +19,27 @@ export type GetMetadataBatchParams = { export const FN_SELECTOR = "0xe034558b" as const; const FN_INPUTS = [ { - name: "_batchIndex", type: "uint256", + name: "_batchIndex", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple", components: [ { - name: "startTokenIdInclusive", type: "uint256", + name: "startTokenIdInclusive", }, { - name: "endTokenIdInclusive", type: "uint256", + name: "endTokenIdInclusive", }, { - name: "baseURI", type: "string", + name: "baseURI", }, ], - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/read/getModuleConfig.ts b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/read/getModuleConfig.ts index 96a414e53b6..090faeb17bd 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/read/getModuleConfig.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/read/getModuleConfig.ts @@ -8,46 +8,46 @@ export const FN_SELECTOR = "0x89e04e0e" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple", + name: "config", components: [ { - name: "registerInstallationCallback", type: "bool", + name: "registerInstallationCallback", }, { - name: "requiredInterfaces", type: "bytes4[]", + name: "requiredInterfaces", }, { - name: "supportedInterfaces", type: "bytes4[]", + name: "supportedInterfaces", }, { + type: "tuple[]", + name: "callbackFunctions", components: [ { - name: "selector", type: "bytes4", + name: "selector", }, ], - name: "callbackFunctions", - type: "tuple[]", }, { + type: "tuple[]", + name: "fallbackFunctions", components: [ { - name: "selector", type: "bytes4", + name: "selector", }, { - name: "permissionBits", type: "uint256", + name: "permissionBits", }, ], - name: "fallbackFunctions", - type: "tuple[]", }, ], - name: "config", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/write/setBaseURI.ts b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/write/setBaseURI.ts index 4249bee158c..b7de260d3fb 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/write/setBaseURI.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/write/setBaseURI.ts @@ -22,12 +22,12 @@ export type SetBaseURIParams = WithOverrides<{ export const FN_SELECTOR = "0x33cfcb9f" as const; const FN_INPUTS = [ { - name: "_batchIndex", type: "uint256", + name: "_batchIndex", }, { - name: "_baseURI", type: "string", + name: "_baseURI", }, ] as const; const FN_OUTPUTS = [] as const; @@ -128,23 +128,23 @@ export function setBaseURI( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.batchIndex, resolvedOptions.baseURI] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/write/uploadMetadata.ts b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/write/uploadMetadata.ts index cfba6d11c9d..c3d03933622 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/write/uploadMetadata.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/BatchMetadataERC721/write/uploadMetadata.ts @@ -19,12 +19,12 @@ export type UploadMetadataParams = WithOverrides<{ export const FN_SELECTOR = "0xbfa2f36e" as const; const FN_INPUTS = [ { - name: "_amount", type: "uint256", + name: "_amount", }, { - name: "_baseURI", type: "string", + name: "_baseURI", }, ] as const; const FN_OUTPUTS = [] as const; @@ -125,23 +125,23 @@ export function uploadMetadata( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.amount, resolvedOptions.baseURI] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/encode/encodeBytesBeforeMintERC1155.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/encode/encodeBytesBeforeMintERC1155.ts index 7ee536eb81c..1e04910839c 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/encode/encodeBytesBeforeMintERC1155.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/encode/encodeBytesBeforeMintERC1155.ts @@ -20,22 +20,22 @@ export type EncodeBytesBeforeMintERC1155Params = { export const FN_SELECTOR = "0x819ed5a3" as const; const FN_INPUTS = [ { + type: "tuple", + name: "params", components: [ { - name: "currency", type: "address", + name: "currency", }, { - name: "pricePerUnit", type: "uint256", + name: "pricePerUnit", }, { - name: "recipientAllowlistProof", type: "bytes32[]", + name: "recipientAllowlistProof", }, ], - name: "params", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/encode/encodeBytesBeforeMintWithSignatureERC1155.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/encode/encodeBytesBeforeMintWithSignatureERC1155.ts index 67aa84517d0..a29c31da0f3 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/encode/encodeBytesBeforeMintWithSignatureERC1155.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/encode/encodeBytesBeforeMintWithSignatureERC1155.ts @@ -23,34 +23,34 @@ export type EncodeBytesBeforeMintWithSignatureERC1155Params = { export const FN_SELECTOR = "0x63dacad2" as const; const FN_INPUTS = [ { + type: "tuple", + name: "params", components: [ { - name: "startTimestamp", type: "uint48", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint48", + name: "endTimestamp", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "maxMintPerWallet", type: "uint256", + name: "maxMintPerWallet", }, { - name: "pricePerUnit", type: "uint256", + name: "pricePerUnit", }, { - name: "uid", type: "bytes32", + name: "uid", }, ], - name: "params", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/encode/encodeBytesOnInstall.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/encode/encodeBytesOnInstall.ts index 472bbda5bd9..e352e188aa6 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/encode/encodeBytesOnInstall.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/encode/encodeBytesOnInstall.ts @@ -15,8 +15,8 @@ export type EncodeBytesOnInstallParams = { export const FN_SELECTOR = "0x5d4c0b89" as const; const FN_INPUTS = [ { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/module/install.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/module/install.ts index d7ae3d13255..463ec07137f 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/module/install.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/module/install.ts @@ -55,8 +55,8 @@ export function module( publisher: params?.publisher, }); return { - data: encodeInstall(params), module: moduleContract.address as Address, + data: encodeInstall(params), }; }; } @@ -92,8 +92,8 @@ export function install(options: { return installPublishedModule({ account: options.account, contract: options.contract, - moduleData: encodeInstall(options.params), moduleName: contractId, + moduleData: encodeInstall(options.params), publisher: options.params?.publisher, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/read/getClaimConditionByTokenId.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/read/getClaimConditionByTokenId.ts index feda9f2530a..f4173458bf5 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/read/getClaimConditionByTokenId.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/read/getClaimConditionByTokenId.ts @@ -16,48 +16,48 @@ export type GetClaimConditionByTokenIdParams = { export const FN_SELECTOR = "0x29a20bf4" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple", + name: "claimCondition", components: [ { - name: "availableSupply", type: "uint256", + name: "availableSupply", }, { - name: "allowlistMerkleRoot", type: "bytes32", + name: "allowlistMerkleRoot", }, { - name: "pricePerUnit", type: "uint256", + name: "pricePerUnit", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "maxMintPerWallet", type: "uint256", + name: "maxMintPerWallet", }, { - name: "startTimestamp", type: "uint48", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint48", + name: "endTimestamp", }, { - name: "auxData", type: "string", + name: "auxData", }, ], - name: "claimCondition", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/read/getSaleConfig.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/read/getSaleConfig.ts index ef5c00dc302..e4432a6b319 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/read/getSaleConfig.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/read/getSaleConfig.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0xcea943ee" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/write/setClaimConditionByTokenId.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/write/setClaimConditionByTokenId.ts index c6f44da5916..f14d386e81d 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/write/setClaimConditionByTokenId.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/write/setClaimConditionByTokenId.ts @@ -32,46 +32,46 @@ export type SetClaimConditionByTokenIdParams = WithOverrides<{ export const FN_SELECTOR = "0x3bcec708" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, { + type: "tuple", + name: "_claimCondition", components: [ { - name: "availableSupply", type: "uint256", + name: "availableSupply", }, { - name: "allowlistMerkleRoot", type: "bytes32", + name: "allowlistMerkleRoot", }, { - name: "pricePerUnit", type: "uint256", + name: "pricePerUnit", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "maxMintPerWallet", type: "uint256", + name: "maxMintPerWallet", }, { - name: "startTimestamp", type: "uint48", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint48", + name: "endTimestamp", }, { - name: "auxData", type: "string", + name: "auxData", }, ], - name: "_claimCondition", - type: "tuple", }, ] as const; const FN_OUTPUTS = [] as const; @@ -181,23 +181,23 @@ export function setClaimConditionByTokenId( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenId, resolvedOptions.claimCondition] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/write/setSaleConfig.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/write/setSaleConfig.ts index 408b582e56e..6f1c196e033 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/write/setSaleConfig.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC1155/write/setSaleConfig.ts @@ -21,8 +21,8 @@ export type SetSaleConfigParams = WithOverrides<{ export const FN_SELECTOR = "0xd29a3628" as const; const FN_INPUTS = [ { - name: "_primarySaleRecipient", type: "address", + name: "_primarySaleRecipient", }, ] as const; const FN_OUTPUTS = [] as const; @@ -120,23 +120,23 @@ export function setSaleConfig( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.primarySaleRecipient] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/encode/encodeBytesBeforeMintERC20.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/encode/encodeBytesBeforeMintERC20.ts index 807504e8605..80b41cd4b0a 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/encode/encodeBytesBeforeMintERC20.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/encode/encodeBytesBeforeMintERC20.ts @@ -20,22 +20,22 @@ export type EncodeBytesBeforeMintERC20Params = { export const FN_SELECTOR = "0x4e6030da" as const; const FN_INPUTS = [ { + type: "tuple", + name: "params", components: [ { - name: "currency", type: "address", + name: "currency", }, { - name: "pricePerUnit", type: "uint256", + name: "pricePerUnit", }, { - name: "recipientAllowlistProof", type: "bytes32[]", + name: "recipientAllowlistProof", }, ], - name: "params", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/encode/encodeBytesBeforeMintWithSignatureERC20.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/encode/encodeBytesBeforeMintWithSignatureERC20.ts index 65624f7e192..fe4972d9e1c 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/encode/encodeBytesBeforeMintWithSignatureERC20.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/encode/encodeBytesBeforeMintWithSignatureERC20.ts @@ -23,34 +23,34 @@ export type EncodeBytesBeforeMintWithSignatureERC20Params = { export const FN_SELECTOR = "0x3f4a1bb6" as const; const FN_INPUTS = [ { + type: "tuple", + name: "params", components: [ { - name: "startTimestamp", type: "uint48", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint48", + name: "endTimestamp", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "maxMintPerWallet", type: "uint256", + name: "maxMintPerWallet", }, { - name: "pricePerUnit", type: "uint256", + name: "pricePerUnit", }, { - name: "uid", type: "bytes32", + name: "uid", }, ], - name: "params", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/encode/encodeBytesOnInstall.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/encode/encodeBytesOnInstall.ts index 472bbda5bd9..e352e188aa6 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/encode/encodeBytesOnInstall.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/encode/encodeBytesOnInstall.ts @@ -15,8 +15,8 @@ export type EncodeBytesOnInstallParams = { export const FN_SELECTOR = "0x5d4c0b89" as const; const FN_INPUTS = [ { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/module/install.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/module/install.ts index fda1dd75578..df40a231efe 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/module/install.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/module/install.ts @@ -55,8 +55,8 @@ export function module( publisher: params?.publisher, }); return { - data: encodeInstall(params), module: moduleContract.address as Address, + data: encodeInstall(params), }; }; } @@ -92,8 +92,8 @@ export function install(options: { return installPublishedModule({ account: options.account, contract: options.contract, - moduleData: encodeInstall(options.params), moduleName: contractId, + moduleData: encodeInstall(options.params), publisher: options.params?.publisher, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/read/getClaimCondition.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/read/getClaimCondition.ts index 034494e34a1..552b801b09f 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/read/getClaimCondition.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/read/getClaimCondition.ts @@ -8,42 +8,42 @@ export const FN_SELECTOR = "0x30a63e11" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple", + name: "claimCondition", components: [ { - name: "availableSupply", type: "uint256", + name: "availableSupply", }, { - name: "allowlistMerkleRoot", type: "bytes32", + name: "allowlistMerkleRoot", }, { - name: "pricePerUnit", type: "uint256", + name: "pricePerUnit", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "maxMintPerWallet", type: "uint256", + name: "maxMintPerWallet", }, { - name: "startTimestamp", type: "uint48", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint48", + name: "endTimestamp", }, { - name: "auxData", type: "string", + name: "auxData", }, ], - name: "claimCondition", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/read/getSaleConfig.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/read/getSaleConfig.ts index 3aa090f11c4..b9cc3df2f69 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/read/getSaleConfig.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/read/getSaleConfig.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0xcea943ee" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/write/setClaimCondition.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/write/setClaimCondition.ts index 3ab227ed981..1f56dc88385 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/write/setClaimCondition.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/write/setClaimCondition.ts @@ -31,42 +31,42 @@ export type SetClaimConditionParams = WithOverrides<{ export const FN_SELECTOR = "0xac0c12f4" as const; const FN_INPUTS = [ { + type: "tuple", + name: "_claimCondition", components: [ { - name: "availableSupply", type: "uint256", + name: "availableSupply", }, { - name: "allowlistMerkleRoot", type: "bytes32", + name: "allowlistMerkleRoot", }, { - name: "pricePerUnit", type: "uint256", + name: "pricePerUnit", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "maxMintPerWallet", type: "uint256", + name: "maxMintPerWallet", }, { - name: "startTimestamp", type: "uint48", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint48", + name: "endTimestamp", }, { - name: "auxData", type: "string", + name: "auxData", }, ], - name: "_claimCondition", - type: "tuple", }, ] as const; const FN_OUTPUTS = [] as const; @@ -166,23 +166,23 @@ export function setClaimCondition( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.claimCondition] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/write/setSaleConfig.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/write/setSaleConfig.ts index 08b8be4fbc6..0ae7c9416fa 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/write/setSaleConfig.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC20/write/setSaleConfig.ts @@ -21,8 +21,8 @@ export type SetSaleConfigParams = WithOverrides<{ export const FN_SELECTOR = "0xd29a3628" as const; const FN_INPUTS = [ { - name: "_primarySaleRecipient", type: "address", + name: "_primarySaleRecipient", }, ] as const; const FN_OUTPUTS = [] as const; @@ -120,23 +120,23 @@ export function setSaleConfig( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.primarySaleRecipient] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/encode/encodeBytesBeforeMintERC721.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/encode/encodeBytesBeforeMintERC721.ts index 3643365d32b..1433a0cb4e8 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/encode/encodeBytesBeforeMintERC721.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/encode/encodeBytesBeforeMintERC721.ts @@ -20,22 +20,22 @@ export type EncodeBytesBeforeMintERC721Params = { export const FN_SELECTOR = "0xd9584651" as const; const FN_INPUTS = [ { + type: "tuple", + name: "params", components: [ { - name: "currency", type: "address", + name: "currency", }, { - name: "pricePerUnit", type: "uint256", + name: "pricePerUnit", }, { - name: "recipientAllowlistProof", type: "bytes32[]", + name: "recipientAllowlistProof", }, ], - name: "params", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/encode/encodeBytesBeforeMintWithSignatureERC721.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/encode/encodeBytesBeforeMintWithSignatureERC721.ts index 13646dc8d2c..2aeb7ccf962 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/encode/encodeBytesBeforeMintWithSignatureERC721.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/encode/encodeBytesBeforeMintWithSignatureERC721.ts @@ -23,34 +23,34 @@ export type EncodeBytesBeforeMintWithSignatureERC721Params = { export const FN_SELECTOR = "0x937bdca4" as const; const FN_INPUTS = [ { + type: "tuple", + name: "params", components: [ { - name: "startTimestamp", type: "uint48", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint48", + name: "endTimestamp", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "maxMintPerWallet", type: "uint256", + name: "maxMintPerWallet", }, { - name: "pricePerUnit", type: "uint256", + name: "pricePerUnit", }, { - name: "uid", type: "bytes32", + name: "uid", }, ], - name: "params", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/encode/encodeBytesOnInstall.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/encode/encodeBytesOnInstall.ts index 472bbda5bd9..e352e188aa6 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/encode/encodeBytesOnInstall.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/encode/encodeBytesOnInstall.ts @@ -15,8 +15,8 @@ export type EncodeBytesOnInstallParams = { export const FN_SELECTOR = "0x5d4c0b89" as const; const FN_INPUTS = [ { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/module/install.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/module/install.ts index 79b494f3934..f7671768943 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/module/install.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/module/install.ts @@ -55,8 +55,8 @@ export function module( publisher: params?.publisher, }); return { - data: encodeInstall(params), module: moduleContract.address as Address, + data: encodeInstall(params), }; }; } @@ -92,8 +92,8 @@ export function install(options: { return installPublishedModule({ account: options.account, contract: options.contract, - moduleData: encodeInstall(options.params), moduleName: contractId, + moduleData: encodeInstall(options.params), publisher: options.params?.publisher, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/read/getClaimCondition.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/read/getClaimCondition.ts index 9e478cd3ba9..12ccf64b64b 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/read/getClaimCondition.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/read/getClaimCondition.ts @@ -8,42 +8,42 @@ export const FN_SELECTOR = "0x30a63e11" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple", + name: "claimCondition", components: [ { - name: "availableSupply", type: "uint256", + name: "availableSupply", }, { - name: "allowlistMerkleRoot", type: "bytes32", + name: "allowlistMerkleRoot", }, { - name: "pricePerUnit", type: "uint256", + name: "pricePerUnit", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "maxMintPerWallet", type: "uint256", + name: "maxMintPerWallet", }, { - name: "startTimestamp", type: "uint48", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint48", + name: "endTimestamp", }, { - name: "auxData", type: "string", + name: "auxData", }, ], - name: "claimCondition", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/read/getSaleConfig.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/read/getSaleConfig.ts index 12438909570..aa68a4fcc99 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/read/getSaleConfig.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/read/getSaleConfig.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0xcea943ee" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/write/setClaimCondition.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/write/setClaimCondition.ts index e22768b0ac0..1916f16a819 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/write/setClaimCondition.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/write/setClaimCondition.ts @@ -31,42 +31,42 @@ export type SetClaimConditionParams = WithOverrides<{ export const FN_SELECTOR = "0xac0c12f4" as const; const FN_INPUTS = [ { + type: "tuple", + name: "_claimCondition", components: [ { - name: "availableSupply", type: "uint256", + name: "availableSupply", }, { - name: "allowlistMerkleRoot", type: "bytes32", + name: "allowlistMerkleRoot", }, { - name: "pricePerUnit", type: "uint256", + name: "pricePerUnit", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "maxMintPerWallet", type: "uint256", + name: "maxMintPerWallet", }, { - name: "startTimestamp", type: "uint48", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint48", + name: "endTimestamp", }, { - name: "auxData", type: "string", + name: "auxData", }, ], - name: "_claimCondition", - type: "tuple", }, ] as const; const FN_OUTPUTS = [] as const; @@ -166,23 +166,23 @@ export function setClaimCondition( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.claimCondition] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/write/setSaleConfig.ts b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/write/setSaleConfig.ts index c865fd7ab43..320e7f3fc26 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/write/setSaleConfig.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ClaimableERC721/write/setSaleConfig.ts @@ -21,8 +21,8 @@ export type SetSaleConfigParams = WithOverrides<{ export const FN_SELECTOR = "0xd29a3628" as const; const FN_INPUTS = [ { - name: "_primarySaleRecipient", type: "address", + name: "_primarySaleRecipient", }, ] as const; const FN_OUTPUTS = [] as const; @@ -120,23 +120,23 @@ export function setSaleConfig( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.primarySaleRecipient] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ERC1155Core/write/burn.ts b/packages/thirdweb/src/extensions/modules/__generated__/ERC1155Core/write/burn.ts index 5a5c87744d9..4347bf539f2 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ERC1155Core/write/burn.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ERC1155Core/write/burn.ts @@ -21,20 +21,20 @@ export type BurnParams = WithOverrides<{ export const FN_SELECTOR = "0x8a94b05f" as const; const FN_INPUTS = [ { - name: "from", type: "address", + name: "from", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "value", type: "uint256", + name: "value", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [] as const; @@ -144,19 +144,8 @@ export function burn( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -167,5 +156,16 @@ export function burn( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ERC1155Core/write/initialize.ts b/packages/thirdweb/src/extensions/modules/__generated__/ERC1155Core/write/initialize.ts index 5ac92bed461..2b4513d6448 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ERC1155Core/write/initialize.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ERC1155Core/write/initialize.ts @@ -29,28 +29,28 @@ export type InitializeParams = WithOverrides<{ export const FN_SELECTOR = "0x62835ade" as const; const FN_INPUTS = [ { - name: "_name", type: "string", + name: "_name", }, { - name: "_symbol", type: "string", + name: "_symbol", }, { - name: "_contractURI", type: "string", + name: "_contractURI", }, { - name: "_owner", type: "address", + name: "_owner", }, { - name: "_modules", type: "address[]", + name: "_modules", }, { - name: "_moduleInstallData", type: "bytes[]", + name: "_moduleInstallData", }, ] as const; const FN_OUTPUTS = [] as const; @@ -170,19 +170,8 @@ export function initialize( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -195,5 +184,16 @@ export function initialize( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ERC1155Core/write/mint.ts b/packages/thirdweb/src/extensions/modules/__generated__/ERC1155Core/write/mint.ts index 3e490cab7f1..7210063aa4f 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ERC1155Core/write/mint.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ERC1155Core/write/mint.ts @@ -22,24 +22,24 @@ export type MintParams = WithOverrides<{ export const FN_SELECTOR = "0xa4b645eb" as const; const FN_INPUTS = [ { - name: "to", type: "address", + name: "to", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "amount", type: "uint256", + name: "amount", }, { - name: "baseURI", type: "string", + name: "baseURI", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [] as const; @@ -153,19 +153,8 @@ export function mint( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -177,5 +166,16 @@ export function mint( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ERC1155Core/write/mintWithSignature.ts b/packages/thirdweb/src/extensions/modules/__generated__/ERC1155Core/write/mintWithSignature.ts index 547c35b3196..abd149cce03 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ERC1155Core/write/mintWithSignature.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ERC1155Core/write/mintWithSignature.ts @@ -23,28 +23,28 @@ export type MintWithSignatureParams = WithOverrides<{ export const FN_SELECTOR = "0xe6bd6ada" as const; const FN_INPUTS = [ { - name: "to", type: "address", + name: "to", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "amount", type: "uint256", + name: "amount", }, { - name: "baseURI", type: "string", + name: "baseURI", }, { - name: "data", type: "bytes", + name: "data", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [] as const; @@ -166,19 +166,8 @@ export function mintWithSignature( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -191,5 +180,16 @@ export function mintWithSignature( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ERC20Core/write/burn.ts b/packages/thirdweb/src/extensions/modules/__generated__/ERC20Core/write/burn.ts index 48e0fea98c2..e858f58eda6 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ERC20Core/write/burn.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ERC20Core/write/burn.ts @@ -20,16 +20,16 @@ export type BurnParams = WithOverrides<{ export const FN_SELECTOR = "0x44d17187" as const; const FN_INPUTS = [ { - name: "from", type: "address", + name: "from", }, { - name: "amount", type: "uint256", + name: "amount", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [] as const; @@ -135,19 +135,8 @@ export function burn( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -157,5 +146,16 @@ export function burn( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ERC20Core/write/initialize.ts b/packages/thirdweb/src/extensions/modules/__generated__/ERC20Core/write/initialize.ts index 0fc533a1f71..88d061e454e 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ERC20Core/write/initialize.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ERC20Core/write/initialize.ts @@ -29,28 +29,28 @@ export type InitializeParams = WithOverrides<{ export const FN_SELECTOR = "0x62835ade" as const; const FN_INPUTS = [ { - name: "_name", type: "string", + name: "_name", }, { - name: "_symbol", type: "string", + name: "_symbol", }, { - name: "_contractURI", type: "string", + name: "_contractURI", }, { - name: "_owner", type: "address", + name: "_owner", }, { - name: "_modules", type: "address[]", + name: "_modules", }, { - name: "_moduleInstallData", type: "bytes[]", + name: "_moduleInstallData", }, ] as const; const FN_OUTPUTS = [] as const; @@ -170,19 +170,8 @@ export function initialize( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -195,5 +184,16 @@ export function initialize( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ERC20Core/write/mint.ts b/packages/thirdweb/src/extensions/modules/__generated__/ERC20Core/write/mint.ts index 75498e5102f..5c229e704ea 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ERC20Core/write/mint.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ERC20Core/write/mint.ts @@ -20,16 +20,16 @@ export type MintParams = WithOverrides<{ export const FN_SELECTOR = "0x94d008ef" as const; const FN_INPUTS = [ { - name: "to", type: "address", + name: "to", }, { - name: "amount", type: "uint256", + name: "amount", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [] as const; @@ -135,19 +135,8 @@ export function mint( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -157,5 +146,16 @@ export function mint( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ERC20Core/write/mintWithSignature.ts b/packages/thirdweb/src/extensions/modules/__generated__/ERC20Core/write/mintWithSignature.ts index 075d4f6e81d..97b628a53e9 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ERC20Core/write/mintWithSignature.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ERC20Core/write/mintWithSignature.ts @@ -21,20 +21,20 @@ export type MintWithSignatureParams = WithOverrides<{ export const FN_SELECTOR = "0x0f7d3652" as const; const FN_INPUTS = [ { - name: "to", type: "address", + name: "to", }, { - name: "amount", type: "uint256", + name: "amount", }, { - name: "data", type: "bytes", + name: "data", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [] as const; @@ -148,19 +148,8 @@ export function mintWithSignature( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -171,5 +160,16 @@ export function mintWithSignature( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ERC721Core/write/burn.ts b/packages/thirdweb/src/extensions/modules/__generated__/ERC721Core/write/burn.ts index 794487cb1fd..e3bdcea619c 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ERC721Core/write/burn.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ERC721Core/write/burn.ts @@ -19,12 +19,12 @@ export type BurnParams = WithOverrides<{ export const FN_SELECTOR = "0xfe9d9303" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [] as const; @@ -123,23 +123,23 @@ export function burn( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenId, resolvedOptions.data] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ERC721Core/write/initialize.ts b/packages/thirdweb/src/extensions/modules/__generated__/ERC721Core/write/initialize.ts index 8e8d54b68ed..3db732e674d 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ERC721Core/write/initialize.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ERC721Core/write/initialize.ts @@ -29,28 +29,28 @@ export type InitializeParams = WithOverrides<{ export const FN_SELECTOR = "0x62835ade" as const; const FN_INPUTS = [ { - name: "_name", type: "string", + name: "_name", }, { - name: "_symbol", type: "string", + name: "_symbol", }, { - name: "_contractURI", type: "string", + name: "_contractURI", }, { - name: "_owner", type: "address", + name: "_owner", }, { - name: "_modules", type: "address[]", + name: "_modules", }, { - name: "_moduleInstallData", type: "bytes[]", + name: "_moduleInstallData", }, ] as const; const FN_OUTPUTS = [] as const; @@ -170,19 +170,8 @@ export function initialize( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -195,5 +184,16 @@ export function initialize( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ERC721Core/write/mint.ts b/packages/thirdweb/src/extensions/modules/__generated__/ERC721Core/write/mint.ts index 7dc21f0c27f..96a62ec9124 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ERC721Core/write/mint.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ERC721Core/write/mint.ts @@ -21,20 +21,20 @@ export type MintParams = WithOverrides<{ export const FN_SELECTOR = "0xd2b04fd6" as const; const FN_INPUTS = [ { - name: "to", type: "address", + name: "to", }, { - name: "amount", type: "uint256", + name: "amount", }, { - name: "baseURI", type: "string", + name: "baseURI", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [] as const; @@ -144,19 +144,8 @@ export function mint( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -167,5 +156,16 @@ export function mint( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/ERC721Core/write/mintWithSignature.ts b/packages/thirdweb/src/extensions/modules/__generated__/ERC721Core/write/mintWithSignature.ts index 33c6d26c550..e4d21b1a160 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/ERC721Core/write/mintWithSignature.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/ERC721Core/write/mintWithSignature.ts @@ -22,24 +22,24 @@ export type MintWithSignatureParams = WithOverrides<{ export const FN_SELECTOR = "0xeb4ada8a" as const; const FN_INPUTS = [ { - name: "to", type: "address", + name: "to", }, { - name: "amount", type: "uint256", + name: "amount", }, { - name: "baseURI", type: "string", + name: "baseURI", }, { - name: "data", type: "bytes", + name: "data", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [] as const; @@ -157,19 +157,8 @@ export function mintWithSignature( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -181,5 +170,16 @@ export function mintWithSignature( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/read/getInstalledModules.ts b/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/read/getInstalledModules.ts index 1431afe234c..a96d9ebb14a 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/read/getInstalledModules.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/read/getInstalledModules.ts @@ -8,55 +8,55 @@ export const FN_SELECTOR = "0x3e429396" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple[]", components: [ { - name: "implementation", type: "address", + name: "implementation", }, { + type: "tuple", + name: "config", components: [ { - name: "registerInstallationCallback", type: "bool", + name: "registerInstallationCallback", }, { - name: "requiredInterfaces", type: "bytes4[]", + name: "requiredInterfaces", }, { - name: "supportedInterfaces", type: "bytes4[]", + name: "supportedInterfaces", }, { + type: "tuple[]", + name: "callbackFunctions", components: [ { - name: "selector", type: "bytes4", + name: "selector", }, ], - name: "callbackFunctions", - type: "tuple[]", }, { + type: "tuple[]", + name: "fallbackFunctions", components: [ { - name: "selector", type: "bytes4", + name: "selector", }, { - name: "permissionBits", type: "uint256", + name: "permissionBits", }, ], - name: "fallbackFunctions", - type: "tuple[]", }, ], - name: "config", - type: "tuple", }, ], - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/read/getSupportedCallbackFunctions.ts b/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/read/getSupportedCallbackFunctions.ts index 3ed05afb70e..c1681500575 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/read/getSupportedCallbackFunctions.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/read/getSupportedCallbackFunctions.ts @@ -8,17 +8,17 @@ export const FN_SELECTOR = "0xf147db8a" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple[]", components: [ { - name: "selector", type: "bytes4", + name: "selector", }, { - name: "mode", type: "uint8", + name: "mode", }, ], - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/read/supportsInterface.ts b/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/read/supportsInterface.ts index 028c738f9f1..fa9b1189c8b 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/read/supportsInterface.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/read/supportsInterface.ts @@ -19,8 +19,8 @@ export type SupportsInterfaceParams = { export const FN_SELECTOR = "0x01ffc9a7" as const; const FN_INPUTS = [ { - name: "interfaceID", type: "bytes4", + name: "interfaceID", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/write/installModule.ts b/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/write/installModule.ts index a99b9fe145c..4969e47a4d8 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/write/installModule.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/write/installModule.ts @@ -22,12 +22,12 @@ export type InstallModuleParams = WithOverrides<{ export const FN_SELECTOR = "0x8da798da" as const; const FN_INPUTS = [ { - name: "moduleContract", type: "address", + name: "moduleContract", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [] as const; @@ -128,23 +128,23 @@ export function installModule( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.moduleContract, resolvedOptions.data] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/write/uninstallModule.ts b/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/write/uninstallModule.ts index 49defff7752..61c0fdadf8a 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/write/uninstallModule.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/IModularCore/write/uninstallModule.ts @@ -22,12 +22,12 @@ export type UninstallModuleParams = WithOverrides<{ export const FN_SELECTOR = "0x70c109cd" as const; const FN_INPUTS = [ { - name: "moduleContract", type: "address", + name: "moduleContract", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [] as const; @@ -128,23 +128,23 @@ export function uninstallModule( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.moduleContract, resolvedOptions.data] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/IModule/read/getModuleConfig.ts b/packages/thirdweb/src/extensions/modules/__generated__/IModule/read/getModuleConfig.ts index 375cd7455d0..583fd6ddfca 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/IModule/read/getModuleConfig.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/IModule/read/getModuleConfig.ts @@ -8,45 +8,45 @@ export const FN_SELECTOR = "0x89e04e0e" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple", components: [ { - name: "registerInstallationCallback", type: "bool", + name: "registerInstallationCallback", }, { - name: "requiredInterfaces", type: "bytes4[]", + name: "requiredInterfaces", }, { - name: "supportedInterfaces", type: "bytes4[]", + name: "supportedInterfaces", }, { + type: "tuple[]", + name: "callbackFunctions", components: [ { - name: "selector", type: "bytes4", + name: "selector", }, ], - name: "callbackFunctions", - type: "tuple[]", }, { + type: "tuple[]", + name: "fallbackFunctions", components: [ { - name: "selector", type: "bytes4", + name: "selector", }, { - name: "permissionBits", type: "uint256", + name: "permissionBits", }, ], - name: "fallbackFunctions", - type: "tuple[]", }, ], - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/encode/encodeBytesBeforeMintWithSignatureERC1155.ts b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/encode/encodeBytesBeforeMintWithSignatureERC1155.ts index 1f8b979b0cc..d4cdaf386fb 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/encode/encodeBytesBeforeMintWithSignatureERC1155.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/encode/encodeBytesBeforeMintWithSignatureERC1155.ts @@ -22,30 +22,30 @@ export type EncodeBytesBeforeMintWithSignatureERC1155Params = { export const FN_SELECTOR = "0x2e33c806" as const; const FN_INPUTS = [ { + type: "tuple", + name: "params", components: [ { - name: "startTimestamp", type: "uint48", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint48", + name: "endTimestamp", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "pricePerUnit", type: "uint256", + name: "pricePerUnit", }, { - name: "uid", type: "bytes32", + name: "uid", }, ], - name: "params", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/encode/encodeBytesOnInstall.ts b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/encode/encodeBytesOnInstall.ts index 472bbda5bd9..e352e188aa6 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/encode/encodeBytesOnInstall.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/encode/encodeBytesOnInstall.ts @@ -15,8 +15,8 @@ export type EncodeBytesOnInstallParams = { export const FN_SELECTOR = "0x5d4c0b89" as const; const FN_INPUTS = [ { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/module/install.ts b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/module/install.ts index 0b7bb6d7aa4..8a00c16b35b 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/module/install.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/module/install.ts @@ -55,8 +55,8 @@ export function module( publisher: params?.publisher, }); return { - data: encodeInstall(params), module: moduleContract.address as Address, + data: encodeInstall(params), }; }; } @@ -92,8 +92,8 @@ export function install(options: { return installPublishedModule({ account: options.account, contract: options.contract, - moduleData: encodeInstall(options.params), moduleName: contractId, + moduleData: encodeInstall(options.params), publisher: options.params?.publisher, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/read/getSaleConfig.ts b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/read/getSaleConfig.ts index 11d94b6158c..96b5a1cfc91 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/read/getSaleConfig.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/read/getSaleConfig.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0xcea943ee" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/write/setSaleConfig.ts b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/write/setSaleConfig.ts index 23dc1237e2c..85c77d5d648 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/write/setSaleConfig.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/write/setSaleConfig.ts @@ -21,8 +21,8 @@ export type SetSaleConfigParams = WithOverrides<{ export const FN_SELECTOR = "0xd29a3628" as const; const FN_INPUTS = [ { - name: "_primarySaleRecipient", type: "address", + name: "_primarySaleRecipient", }, ] as const; const FN_OUTPUTS = [] as const; @@ -120,23 +120,23 @@ export function setSaleConfig( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.primarySaleRecipient] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/write/setTokenURI.ts b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/write/setTokenURI.ts index 41f55380ad5..dc9f9ab39d2 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/write/setTokenURI.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC1155/write/setTokenURI.ts @@ -19,12 +19,12 @@ export type SetTokenURIParams = WithOverrides<{ export const FN_SELECTOR = "0x162094c4" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, { - name: "_tokenURI", type: "string", + name: "_tokenURI", }, ] as const; const FN_OUTPUTS = [] as const; @@ -125,23 +125,23 @@ export function setTokenURI( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenId, resolvedOptions.tokenURI] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/encode/encodeBytesBeforeMintWithSignatureERC20.ts b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/encode/encodeBytesBeforeMintWithSignatureERC20.ts index 27c321b1114..7b619ad0290 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/encode/encodeBytesBeforeMintWithSignatureERC20.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/encode/encodeBytesBeforeMintWithSignatureERC20.ts @@ -22,30 +22,30 @@ export type EncodeBytesBeforeMintWithSignatureERC20Params = { export const FN_SELECTOR = "0x76e51eae" as const; const FN_INPUTS = [ { + type: "tuple", + name: "params", components: [ { - name: "startTimestamp", type: "uint48", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint48", + name: "endTimestamp", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "pricePerUnit", type: "uint256", + name: "pricePerUnit", }, { - name: "uid", type: "bytes32", + name: "uid", }, ], - name: "params", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/encode/encodeBytesOnInstall.ts b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/encode/encodeBytesOnInstall.ts index 472bbda5bd9..e352e188aa6 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/encode/encodeBytesOnInstall.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/encode/encodeBytesOnInstall.ts @@ -15,8 +15,8 @@ export type EncodeBytesOnInstallParams = { export const FN_SELECTOR = "0x5d4c0b89" as const; const FN_INPUTS = [ { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/module/install.ts b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/module/install.ts index c24512fd757..cbc2b5518b4 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/module/install.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/module/install.ts @@ -55,8 +55,8 @@ export function module( publisher: params?.publisher, }); return { - data: encodeInstall(params), module: moduleContract.address as Address, + data: encodeInstall(params), }; }; } @@ -92,8 +92,8 @@ export function install(options: { return installPublishedModule({ account: options.account, contract: options.contract, - moduleData: encodeInstall(options.params), moduleName: contractId, + moduleData: encodeInstall(options.params), publisher: options.params?.publisher, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/read/getSaleConfig.ts b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/read/getSaleConfig.ts index f7d4ab4a5f6..6a206e95b48 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/read/getSaleConfig.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/read/getSaleConfig.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0xcea943ee" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/write/setSaleConfig.ts b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/write/setSaleConfig.ts index d22cd1992d7..813ce6bf686 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/write/setSaleConfig.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC20/write/setSaleConfig.ts @@ -21,8 +21,8 @@ export type SetSaleConfigParams = WithOverrides<{ export const FN_SELECTOR = "0xd29a3628" as const; const FN_INPUTS = [ { - name: "_primarySaleRecipient", type: "address", + name: "_primarySaleRecipient", }, ] as const; const FN_OUTPUTS = [] as const; @@ -120,23 +120,23 @@ export function setSaleConfig( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.primarySaleRecipient] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/encode/encodeBytesBeforeMintWithSignatureERC721.ts b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/encode/encodeBytesBeforeMintWithSignatureERC721.ts index 191ca3c367e..fa4ec577b2f 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/encode/encodeBytesBeforeMintWithSignatureERC721.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/encode/encodeBytesBeforeMintWithSignatureERC721.ts @@ -22,30 +22,30 @@ export type EncodeBytesBeforeMintWithSignatureERC721Params = { export const FN_SELECTOR = "0xcab11f42" as const; const FN_INPUTS = [ { + type: "tuple", + name: "params", components: [ { - name: "startTimestamp", type: "uint48", + name: "startTimestamp", }, { - name: "endTimestamp", type: "uint48", + name: "endTimestamp", }, { - name: "currency", type: "address", + name: "currency", }, { - name: "pricePerUnit", type: "uint256", + name: "pricePerUnit", }, { - name: "uid", type: "bytes32", + name: "uid", }, ], - name: "params", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/encode/encodeBytesOnInstall.ts b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/encode/encodeBytesOnInstall.ts index 472bbda5bd9..e352e188aa6 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/encode/encodeBytesOnInstall.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/encode/encodeBytesOnInstall.ts @@ -15,8 +15,8 @@ export type EncodeBytesOnInstallParams = { export const FN_SELECTOR = "0x5d4c0b89" as const; const FN_INPUTS = [ { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/events/NewMetadataBatch.ts b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/events/NewMetadataBatch.ts index 590125d7378..bca6f2ecc50 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/events/NewMetadataBatch.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/events/NewMetadataBatch.ts @@ -42,8 +42,8 @@ export function newMetadataBatchEvent( filters: NewMetadataBatchEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event NewMetadataBatch(uint256 indexed startTokenIdInclusive, uint256 indexed endTokenIdNonInclusive, string baseURI)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/module/install.ts b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/module/install.ts index df47c808fc8..d45e4be6fdb 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/module/install.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/module/install.ts @@ -55,8 +55,8 @@ export function module( publisher: params?.publisher, }); return { - data: encodeInstall(params), module: moduleContract.address as Address, + data: encodeInstall(params), }; }; } @@ -92,8 +92,8 @@ export function install(options: { return installPublishedModule({ account: options.account, contract: options.contract, - moduleData: encodeInstall(options.params), moduleName: contractId, + moduleData: encodeInstall(options.params), publisher: options.params?.publisher, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/read/getSaleConfig.ts b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/read/getSaleConfig.ts index e890af50168..2d30cd0f209 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/read/getSaleConfig.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/read/getSaleConfig.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0xcea943ee" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "primarySaleRecipient", type: "address", + name: "primarySaleRecipient", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/write/setSaleConfig.ts b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/write/setSaleConfig.ts index c03481cd89e..8a51cb58b75 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/write/setSaleConfig.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/MintableERC721/write/setSaleConfig.ts @@ -21,8 +21,8 @@ export type SetSaleConfigParams = WithOverrides<{ export const FN_SELECTOR = "0xd29a3628" as const; const FN_INPUTS = [ { - name: "_primarySaleRecipient", type: "address", + name: "_primarySaleRecipient", }, ] as const; const FN_OUTPUTS = [] as const; @@ -120,23 +120,23 @@ export function setSaleConfig( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.primarySaleRecipient] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/OpenEditionMetadataERC721/module/install.ts b/packages/thirdweb/src/extensions/modules/__generated__/OpenEditionMetadataERC721/module/install.ts index e65b530c488..208a0b32079 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/OpenEditionMetadataERC721/module/install.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/OpenEditionMetadataERC721/module/install.ts @@ -48,8 +48,8 @@ export function module(params?: { publisher?: string }) { publisher: params?.publisher, }); return { - data: "0x" as const, module: moduleContract.address as Address, + data: "0x" as const, }; }; } @@ -83,8 +83,8 @@ export function install(options: { return installPublishedModule({ account: options.account, contract: options.contract, - moduleData: "0x" as const, moduleName: contractId, + moduleData: "0x" as const, publisher: options.params?.publisher, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/OpenEditionMetadataERC721/read/onTokenURI.ts b/packages/thirdweb/src/extensions/modules/__generated__/OpenEditionMetadataERC721/read/onTokenURI.ts index d035555f3b4..434b96cba6d 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/OpenEditionMetadataERC721/read/onTokenURI.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/OpenEditionMetadataERC721/read/onTokenURI.ts @@ -16,8 +16,8 @@ export type OnTokenURIParams = { export const FN_SELECTOR = "0xcfc0cb96" as const; const FN_INPUTS = [ { - name: "_id", type: "uint256", + name: "_id", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/modules/__generated__/OpenEditionMetadataERC721/write/setSharedMetadata.ts b/packages/thirdweb/src/extensions/modules/__generated__/OpenEditionMetadataERC721/write/setSharedMetadata.ts index 2dcb41b5319..193bcfbd117 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/OpenEditionMetadataERC721/write/setSharedMetadata.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/OpenEditionMetadataERC721/write/setSharedMetadata.ts @@ -27,26 +27,26 @@ export type SetSharedMetadataParams = WithOverrides<{ export const FN_SELECTOR = "0xa7d27d9d" as const; const FN_INPUTS = [ { + type: "tuple", + name: "_metadata", components: [ { - name: "name", type: "string", + name: "name", }, { - name: "description", type: "string", + name: "description", }, { - name: "imageURI", type: "string", + name: "imageURI", }, { - name: "animationURI", type: "string", + name: "animationURI", }, ], - name: "_metadata", - type: "tuple", }, ] as const; const FN_OUTPUTS = [] as const; @@ -146,23 +146,23 @@ export function setSharedMetadata( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.metadata] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/events/OwnershipHandoverCanceled.ts b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/events/OwnershipHandoverCanceled.ts index b87781e237f..594a00bc44e 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/events/OwnershipHandoverCanceled.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/events/OwnershipHandoverCanceled.ts @@ -36,7 +36,7 @@ export function ownershipHandoverCanceledEvent( filters: OwnershipHandoverCanceledEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event OwnershipHandoverCanceled(address indexed pendingOwner)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/events/OwnershipHandoverRequested.ts b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/events/OwnershipHandoverRequested.ts index c6c082fa6fe..839f211331f 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/events/OwnershipHandoverRequested.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/events/OwnershipHandoverRequested.ts @@ -36,7 +36,7 @@ export function ownershipHandoverRequestedEvent( filters: OwnershipHandoverRequestedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event OwnershipHandoverRequested(address indexed pendingOwner)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/events/OwnershipTransferred.ts b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/events/OwnershipTransferred.ts index 8aa28dbb9e4..4286731b82b 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/events/OwnershipTransferred.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/events/OwnershipTransferred.ts @@ -42,8 +42,8 @@ export function ownershipTransferredEvent( filters: OwnershipTransferredEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event OwnershipTransferred(address indexed oldOwner, address indexed newOwner)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/events/RolesUpdated.ts b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/events/RolesUpdated.ts index 09855a76d6e..2bcc4cedde4 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/events/RolesUpdated.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/events/RolesUpdated.ts @@ -40,8 +40,8 @@ export type RolesUpdatedEventFilters = Partial<{ */ export function rolesUpdatedEvent(filters: RolesUpdatedEventFilters = {}) { return prepareEvent({ - filters, signature: "event RolesUpdated(address indexed user, uint256 indexed roles)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/hasAllRoles.ts b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/hasAllRoles.ts index 0bdde11a759..dea971cb572 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/hasAllRoles.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/hasAllRoles.ts @@ -17,12 +17,12 @@ export type HasAllRolesParams = { export const FN_SELECTOR = "0x1cd64df4" as const; const FN_INPUTS = [ { - name: "user", type: "address", + name: "user", }, { - name: "roles", type: "uint256", + name: "roles", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/hasAnyRole.ts b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/hasAnyRole.ts index a11783f7b72..335e037490b 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/hasAnyRole.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/hasAnyRole.ts @@ -17,12 +17,12 @@ export type HasAnyRoleParams = { export const FN_SELECTOR = "0x514e62fc" as const; const FN_INPUTS = [ { - name: "user", type: "address", + name: "user", }, { - name: "roles", type: "uint256", + name: "roles", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/owner.ts b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/owner.ts index 26e37a619e0..d4c93faaee3 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/owner.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/owner.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0x8da5cb5b" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "result", type: "address", + name: "result", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/ownershipHandoverExpiresAt.ts b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/ownershipHandoverExpiresAt.ts index 8fe37830db0..8b6d28bd88b 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/ownershipHandoverExpiresAt.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/ownershipHandoverExpiresAt.ts @@ -19,14 +19,14 @@ export type OwnershipHandoverExpiresAtParams = { export const FN_SELECTOR = "0xfee81cf4" as const; const FN_INPUTS = [ { - name: "pendingOwner", type: "address", + name: "pendingOwner", }, ] as const; const FN_OUTPUTS = [ { - name: "result", type: "uint256", + name: "result", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/rolesOf.ts b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/rolesOf.ts index 5450af081eb..641093af58b 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/rolesOf.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/read/rolesOf.ts @@ -16,14 +16,14 @@ export type RolesOfParams = { export const FN_SELECTOR = "0x2de94807" as const; const FN_INPUTS = [ { - name: "user", type: "address", + name: "user", }, ] as const; const FN_OUTPUTS = [ { - name: "roles", type: "uint256", + name: "roles", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/completeOwnershipHandover.ts b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/completeOwnershipHandover.ts index fbd54080592..579a95dbd4d 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/completeOwnershipHandover.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/completeOwnershipHandover.ts @@ -21,8 +21,8 @@ export type CompleteOwnershipHandoverParams = WithOverrides<{ export const FN_SELECTOR = "0xf04e283e" as const; const FN_INPUTS = [ { - name: "pendingOwner", type: "address", + name: "pendingOwner", }, ] as const; const FN_OUTPUTS = [] as const; @@ -126,23 +126,23 @@ export function completeOwnershipHandover( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.pendingOwner] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/grantRoles.ts b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/grantRoles.ts index 9a024670bd9..2af22dfc131 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/grantRoles.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/grantRoles.ts @@ -19,12 +19,12 @@ export type GrantRolesParams = WithOverrides<{ export const FN_SELECTOR = "0x1c10893f" as const; const FN_INPUTS = [ { - name: "user", type: "address", + name: "user", }, { - name: "roles", type: "uint256", + name: "roles", }, ] as const; const FN_OUTPUTS = [] as const; @@ -125,23 +125,23 @@ export function grantRoles( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.user, resolvedOptions.roles] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/renounceRoles.ts b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/renounceRoles.ts index f9d7616b494..60fcc3934d3 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/renounceRoles.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/renounceRoles.ts @@ -18,8 +18,8 @@ export type RenounceRolesParams = WithOverrides<{ export const FN_SELECTOR = "0x183a4f6e" as const; const FN_INPUTS = [ { - name: "roles", type: "uint256", + name: "roles", }, ] as const; const FN_OUTPUTS = [] as const; @@ -117,23 +117,23 @@ export function renounceRoles( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.roles] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/revokeRoles.ts b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/revokeRoles.ts index 2ce4e70aca2..c83e3816cd0 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/revokeRoles.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/revokeRoles.ts @@ -19,12 +19,12 @@ export type RevokeRolesParams = WithOverrides<{ export const FN_SELECTOR = "0x4a4ee7b1" as const; const FN_INPUTS = [ { - name: "user", type: "address", + name: "user", }, { - name: "roles", type: "uint256", + name: "roles", }, ] as const; const FN_OUTPUTS = [] as const; @@ -125,23 +125,23 @@ export function revokeRoles( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.user, resolvedOptions.roles] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/transferOwnership.ts b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/transferOwnership.ts index 72369738307..49e70615071 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/transferOwnership.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/OwnableRoles/write/transferOwnership.ts @@ -18,8 +18,8 @@ export type TransferOwnershipParams = WithOverrides<{ export const FN_SELECTOR = "0xf2fde38b" as const; const FN_INPUTS = [ { - name: "newOwner", type: "address", + name: "newOwner", }, ] as const; const FN_OUTPUTS = [] as const; @@ -119,23 +119,23 @@ export function transferOwnership( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.newOwner] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/encode/encodeBytesOnInstall.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/encode/encodeBytesOnInstall.ts index 3930834c6e1..f38917a3864 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/encode/encodeBytesOnInstall.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/encode/encodeBytesOnInstall.ts @@ -23,16 +23,16 @@ export type EncodeBytesOnInstallParams = { export const FN_SELECTOR = "0x2fbb2623" as const; const FN_INPUTS = [ { - name: "royaltyRecipient", type: "address", + name: "royaltyRecipient", }, { - name: "royaltyBps", type: "uint16", + name: "royaltyBps", }, { - name: "transferValidator", type: "address", + name: "transferValidator", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/events/DefaultRoyaltyUpdated.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/events/DefaultRoyaltyUpdated.ts index 333242c3936..d6fafd15514 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/events/DefaultRoyaltyUpdated.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/events/DefaultRoyaltyUpdated.ts @@ -36,8 +36,8 @@ export function defaultRoyaltyUpdatedEvent( filters: DefaultRoyaltyUpdatedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event DefaultRoyaltyUpdated(address indexed recipient, uint16 bps)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/events/TokenRoyaltyUpdated.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/events/TokenRoyaltyUpdated.ts index 4f783777de5..55474d84b50 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/events/TokenRoyaltyUpdated.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/events/TokenRoyaltyUpdated.ts @@ -42,8 +42,8 @@ export function tokenRoyaltyUpdatedEvent( filters: TokenRoyaltyUpdatedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event TokenRoyaltyUpdated(uint256 indexed tokenId, address indexed recipient, uint16 bps)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/module/install.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/module/install.ts index 62f4448a2a3..1d4d87e46ac 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/module/install.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/module/install.ts @@ -57,8 +57,8 @@ export function module( publisher: params?.publisher, }); return { - data: encodeInstall(params), module: moduleContract.address as Address, + data: encodeInstall(params), }; }; } @@ -96,8 +96,8 @@ export function install(options: { return installPublishedModule({ account: options.account, contract: options.contract, - moduleData: encodeInstall(options.params), moduleName: contractId, + moduleData: encodeInstall(options.params), publisher: options.params?.publisher, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/read/getRoyaltyInfoForToken.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/read/getRoyaltyInfoForToken.ts index 394b63003af..8b601553e0b 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/read/getRoyaltyInfoForToken.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/read/getRoyaltyInfoForToken.ts @@ -16,8 +16,8 @@ export type GetRoyaltyInfoForTokenParams = { export const FN_SELECTOR = "0x4cc157df" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/read/getTransferValidationFunction.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/read/getTransferValidationFunction.ts index 776b7cf96b2..a7b0ebc0442 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/read/getTransferValidationFunction.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/read/getTransferValidationFunction.ts @@ -8,12 +8,12 @@ export const FN_SELECTOR = "0x0d705df6" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "functionSignature", type: "bytes4", + name: "functionSignature", }, { - name: "isViewFunction", type: "bool", + name: "isViewFunction", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/read/getTransferValidator.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/read/getTransferValidator.ts index dc5f443de9c..ad1025f8f57 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/read/getTransferValidator.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/read/getTransferValidator.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0x098144d4" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "validator", type: "address", + name: "validator", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/read/royaltyInfo.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/read/royaltyInfo.ts index c3b89ac1636..c5cfefd1ad5 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/read/royaltyInfo.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/read/royaltyInfo.ts @@ -20,22 +20,22 @@ export type RoyaltyInfoParams = { export const FN_SELECTOR = "0x2a55205a" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, { - name: "_salePrice", type: "uint256", + name: "_salePrice", }, ] as const; const FN_OUTPUTS = [ { - name: "receiver", type: "address", + name: "receiver", }, { - name: "royaltyAmount", type: "uint256", + name: "royaltyAmount", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/write/setDefaultRoyaltyInfo.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/write/setDefaultRoyaltyInfo.ts index ce3acf2d779..c7776d8cbc7 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/write/setDefaultRoyaltyInfo.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/write/setDefaultRoyaltyInfo.ts @@ -25,12 +25,12 @@ export type SetDefaultRoyaltyInfoParams = WithOverrides<{ export const FN_SELECTOR = "0x93d79445" as const; const FN_INPUTS = [ { - name: "_royaltyRecipient", type: "address", + name: "_royaltyRecipient", }, { - name: "_royaltyBps", type: "uint16", + name: "_royaltyBps", }, ] as const; const FN_OUTPUTS = [] as const; @@ -138,19 +138,8 @@ export function setDefaultRoyaltyInfo( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -159,5 +148,16 @@ export function setDefaultRoyaltyInfo( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/write/setRoyaltyInfoForToken.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/write/setRoyaltyInfoForToken.ts index bce879fd67d..15fe07599be 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/write/setRoyaltyInfoForToken.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/write/setRoyaltyInfoForToken.ts @@ -23,16 +23,16 @@ export type SetRoyaltyInfoForTokenParams = WithOverrides<{ export const FN_SELECTOR = "0xab8e8c44" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, { - name: "_recipient", type: "address", + name: "_recipient", }, { - name: "_bps", type: "uint16", + name: "_bps", }, ] as const; const FN_OUTPUTS = [] as const; @@ -146,19 +146,8 @@ export function setRoyaltyInfoForToken( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -168,5 +157,16 @@ export function setRoyaltyInfoForToken( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/write/setTransferValidator.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/write/setTransferValidator.ts index e0ebc01e101..4dc18b1a4f5 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/write/setTransferValidator.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC1155/write/setTransferValidator.ts @@ -21,8 +21,8 @@ export type SetTransferValidatorParams = WithOverrides<{ export const FN_SELECTOR = "0xa9fc664e" as const; const FN_INPUTS = [ { - name: "validator", type: "address", + name: "validator", }, ] as const; const FN_OUTPUTS = [] as const; @@ -124,23 +124,23 @@ export function setTransferValidator( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.validator] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/encode/encodeBytesOnInstall.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/encode/encodeBytesOnInstall.ts index 3930834c6e1..f38917a3864 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/encode/encodeBytesOnInstall.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/encode/encodeBytesOnInstall.ts @@ -23,16 +23,16 @@ export type EncodeBytesOnInstallParams = { export const FN_SELECTOR = "0x2fbb2623" as const; const FN_INPUTS = [ { - name: "royaltyRecipient", type: "address", + name: "royaltyRecipient", }, { - name: "royaltyBps", type: "uint16", + name: "royaltyBps", }, { - name: "transferValidator", type: "address", + name: "transferValidator", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/events/DefaultRoyaltyUpdated.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/events/DefaultRoyaltyUpdated.ts index 445ff0cd1c6..ea24b039f7e 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/events/DefaultRoyaltyUpdated.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/events/DefaultRoyaltyUpdated.ts @@ -36,8 +36,8 @@ export function defaultRoyaltyUpdatedEvent( filters: DefaultRoyaltyUpdatedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event DefaultRoyaltyUpdated(address indexed recipient, uint256 bps)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/events/TokenRoyaltyUpdated.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/events/TokenRoyaltyUpdated.ts index 1f9d3f1785b..27058bede4e 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/events/TokenRoyaltyUpdated.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/events/TokenRoyaltyUpdated.ts @@ -42,8 +42,8 @@ export function tokenRoyaltyUpdatedEvent( filters: TokenRoyaltyUpdatedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event TokenRoyaltyUpdated(uint256 indexed tokenId, address indexed recipient, uint16 bps)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/module/install.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/module/install.ts index 5443b949f05..92685502b97 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/module/install.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/module/install.ts @@ -57,8 +57,8 @@ export function module( publisher: params?.publisher, }); return { - data: encodeInstall(params), module: moduleContract.address as Address, + data: encodeInstall(params), }; }; } @@ -96,8 +96,8 @@ export function install(options: { return installPublishedModule({ account: options.account, contract: options.contract, - moduleData: encodeInstall(options.params), moduleName: contractId, + moduleData: encodeInstall(options.params), publisher: options.params?.publisher, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/read/getRoyaltyInfoForToken.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/read/getRoyaltyInfoForToken.ts index 3d4af24e62c..f79ff81f875 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/read/getRoyaltyInfoForToken.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/read/getRoyaltyInfoForToken.ts @@ -16,8 +16,8 @@ export type GetRoyaltyInfoForTokenParams = { export const FN_SELECTOR = "0x4cc157df" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/read/getTransferValidationFunction.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/read/getTransferValidationFunction.ts index e891734133a..22b0333750f 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/read/getTransferValidationFunction.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/read/getTransferValidationFunction.ts @@ -8,12 +8,12 @@ export const FN_SELECTOR = "0x0d705df6" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "functionSignature", type: "bytes4", + name: "functionSignature", }, { - name: "isViewFunction", type: "bool", + name: "isViewFunction", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/read/getTransferValidator.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/read/getTransferValidator.ts index 178845eae52..ec803676f9d 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/read/getTransferValidator.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/read/getTransferValidator.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0x098144d4" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "validator", type: "address", + name: "validator", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/read/royaltyInfo.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/read/royaltyInfo.ts index 474b1820f22..e447e4c2be9 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/read/royaltyInfo.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/read/royaltyInfo.ts @@ -20,22 +20,22 @@ export type RoyaltyInfoParams = { export const FN_SELECTOR = "0x2a55205a" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, { - name: "_salePrice", type: "uint256", + name: "_salePrice", }, ] as const; const FN_OUTPUTS = [ { - name: "receiver", type: "address", + name: "receiver", }, { - name: "royaltyAmount", type: "uint256", + name: "royaltyAmount", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/write/setDefaultRoyaltyInfo.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/write/setDefaultRoyaltyInfo.ts index c795304efef..8219fe7e4ec 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/write/setDefaultRoyaltyInfo.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/write/setDefaultRoyaltyInfo.ts @@ -25,12 +25,12 @@ export type SetDefaultRoyaltyInfoParams = WithOverrides<{ export const FN_SELECTOR = "0x93d79445" as const; const FN_INPUTS = [ { - name: "_royaltyRecipient", type: "address", + name: "_royaltyRecipient", }, { - name: "_royaltyBps", type: "uint16", + name: "_royaltyBps", }, ] as const; const FN_OUTPUTS = [] as const; @@ -138,19 +138,8 @@ export function setDefaultRoyaltyInfo( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -159,5 +148,16 @@ export function setDefaultRoyaltyInfo( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/write/setRoyaltyInfoForToken.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/write/setRoyaltyInfoForToken.ts index 3596a985a30..af6575c161d 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/write/setRoyaltyInfoForToken.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/write/setRoyaltyInfoForToken.ts @@ -23,16 +23,16 @@ export type SetRoyaltyInfoForTokenParams = WithOverrides<{ export const FN_SELECTOR = "0xab8e8c44" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, { - name: "_recipient", type: "address", + name: "_recipient", }, { - name: "_bps", type: "uint16", + name: "_bps", }, ] as const; const FN_OUTPUTS = [] as const; @@ -146,19 +146,8 @@ export function setRoyaltyInfoForToken( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -168,5 +157,16 @@ export function setRoyaltyInfoForToken( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/write/setTransferValidator.ts b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/write/setTransferValidator.ts index f1a38cc3b14..d10219f94dd 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/write/setTransferValidator.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/RoyaltyERC721/write/setTransferValidator.ts @@ -21,8 +21,8 @@ export type SetTransferValidatorParams = WithOverrides<{ export const FN_SELECTOR = "0xa9fc664e" as const; const FN_INPUTS = [ { - name: "validator", type: "address", + name: "validator", }, ] as const; const FN_OUTPUTS = [] as const; @@ -124,23 +124,23 @@ export function setTransferValidator( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.validator] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/SequentialTokenIdERC1155/encode/encodeBytesOnInstall.ts b/packages/thirdweb/src/extensions/modules/__generated__/SequentialTokenIdERC1155/encode/encodeBytesOnInstall.ts index 715ef2901f7..308f4bc860a 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/SequentialTokenIdERC1155/encode/encodeBytesOnInstall.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/SequentialTokenIdERC1155/encode/encodeBytesOnInstall.ts @@ -15,8 +15,8 @@ export type EncodeBytesOnInstallParams = { export const FN_SELECTOR = "0x579a6021" as const; const FN_INPUTS = [ { - name: "startTokenId", type: "uint256", + name: "startTokenId", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/SequentialTokenIdERC1155/module/install.ts b/packages/thirdweb/src/extensions/modules/__generated__/SequentialTokenIdERC1155/module/install.ts index 4259c6a152e..83455e9a96e 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/SequentialTokenIdERC1155/module/install.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/SequentialTokenIdERC1155/module/install.ts @@ -55,8 +55,8 @@ export function module( publisher: params?.publisher, }); return { - data: encodeInstall(params), module: moduleContract.address as Address, + data: encodeInstall(params), }; }; } @@ -92,8 +92,8 @@ export function install(options: { return installPublishedModule({ account: options.account, contract: options.contract, - moduleData: encodeInstall(options.params), moduleName: contractId, + moduleData: encodeInstall(options.params), publisher: options.params?.publisher, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/SequentialTokenIdERC1155/read/getModuleConfig.ts b/packages/thirdweb/src/extensions/modules/__generated__/SequentialTokenIdERC1155/read/getModuleConfig.ts index d9ce9b9a5b9..a2376d3f38d 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/SequentialTokenIdERC1155/read/getModuleConfig.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/SequentialTokenIdERC1155/read/getModuleConfig.ts @@ -8,46 +8,46 @@ export const FN_SELECTOR = "0x89e04e0e" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple", + name: "config", components: [ { - name: "registerInstallationCallback", type: "bool", + name: "registerInstallationCallback", }, { - name: "requiredInterfaces", type: "bytes4[]", + name: "requiredInterfaces", }, { - name: "supportedInterfaces", type: "bytes4[]", + name: "supportedInterfaces", }, { + type: "tuple[]", + name: "callbackFunctions", components: [ { - name: "selector", type: "bytes4", + name: "selector", }, ], - name: "callbackFunctions", - type: "tuple[]", }, { + type: "tuple[]", + name: "fallbackFunctions", components: [ { - name: "selector", type: "bytes4", + name: "selector", }, { - name: "permissionBits", type: "uint256", + name: "permissionBits", }, ], - name: "fallbackFunctions", - type: "tuple[]", }, ], - name: "config", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/modules/__generated__/SequentialTokenIdERC1155/write/updateTokenIdERC1155.ts b/packages/thirdweb/src/extensions/modules/__generated__/SequentialTokenIdERC1155/write/updateTokenIdERC1155.ts index eaa624292f0..80e4d1c6822 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/SequentialTokenIdERC1155/write/updateTokenIdERC1155.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/SequentialTokenIdERC1155/write/updateTokenIdERC1155.ts @@ -18,8 +18,8 @@ export type UpdateTokenIdERC1155Params = WithOverrides<{ export const FN_SELECTOR = "0x034eb4dd" as const; const FN_INPUTS = [ { - name: "_tokenId", type: "uint256", + name: "_tokenId", }, ] as const; const FN_OUTPUTS = [ @@ -125,23 +125,23 @@ export function updateTokenIdERC1155( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.tokenId] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC1155/module/install.ts b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC1155/module/install.ts index 08bc5943cf9..5d31516a063 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC1155/module/install.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC1155/module/install.ts @@ -48,8 +48,8 @@ export function module(params?: { publisher?: string }) { publisher: params?.publisher, }); return { - data: "0x" as const, module: moduleContract.address as Address, + data: "0x" as const, }; }; } @@ -83,8 +83,8 @@ export function install(options: { return installPublishedModule({ account: options.account, contract: options.contract, - moduleData: "0x" as const, moduleName: contractId, + moduleData: "0x" as const, publisher: options.params?.publisher, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC1155/read/isTransferEnabledFor.ts b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC1155/read/isTransferEnabledFor.ts index b148b098f53..a53d04b1e66 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC1155/read/isTransferEnabledFor.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC1155/read/isTransferEnabledFor.ts @@ -16,8 +16,8 @@ export type IsTransferEnabledForParams = { export const FN_SELECTOR = "0x735d0538" as const; const FN_INPUTS = [ { - name: "target", type: "address", + name: "target", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC1155/write/setTransferable.ts b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC1155/write/setTransferable.ts index 931c64cc23c..13c899ba0ff 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC1155/write/setTransferable.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC1155/write/setTransferable.ts @@ -21,8 +21,8 @@ export type SetTransferableParams = WithOverrides<{ export const FN_SELECTOR = "0x9cd23707" as const; const FN_INPUTS = [ { - name: "enableTransfer", type: "bool", + name: "enableTransfer", }, ] as const; const FN_OUTPUTS = [] as const; @@ -120,23 +120,23 @@ export function setTransferable( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.enableTransfer] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC1155/write/setTransferableFor.ts b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC1155/write/setTransferableFor.ts index f09c0328a29..658168b007a 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC1155/write/setTransferableFor.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC1155/write/setTransferableFor.ts @@ -22,12 +22,12 @@ export type SetTransferableForParams = WithOverrides<{ export const FN_SELECTOR = "0x4c297cbd" as const; const FN_INPUTS = [ { - name: "target", type: "address", + name: "target", }, { - name: "enableTransfer", type: "bool", + name: "enableTransfer", }, ] as const; const FN_OUTPUTS = [] as const; @@ -133,23 +133,23 @@ export function setTransferableFor( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.target, resolvedOptions.enableTransfer] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC20/module/install.ts b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC20/module/install.ts index 565fe2593d5..c847d48cab4 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC20/module/install.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC20/module/install.ts @@ -48,8 +48,8 @@ export function module(params?: { publisher?: string }) { publisher: params?.publisher, }); return { - data: "0x" as const, module: moduleContract.address as Address, + data: "0x" as const, }; }; } @@ -83,8 +83,8 @@ export function install(options: { return installPublishedModule({ account: options.account, contract: options.contract, - moduleData: "0x" as const, moduleName: contractId, + moduleData: "0x" as const, publisher: options.params?.publisher, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC20/read/isTransferEnabledFor.ts b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC20/read/isTransferEnabledFor.ts index b6f36081ea6..31bf410891a 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC20/read/isTransferEnabledFor.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC20/read/isTransferEnabledFor.ts @@ -16,8 +16,8 @@ export type IsTransferEnabledForParams = { export const FN_SELECTOR = "0x735d0538" as const; const FN_INPUTS = [ { - name: "target", type: "address", + name: "target", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC20/write/setTransferable.ts b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC20/write/setTransferable.ts index b5096a9a7bd..ea99e6e9ed5 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC20/write/setTransferable.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC20/write/setTransferable.ts @@ -21,8 +21,8 @@ export type SetTransferableParams = WithOverrides<{ export const FN_SELECTOR = "0x9cd23707" as const; const FN_INPUTS = [ { - name: "enableTransfer", type: "bool", + name: "enableTransfer", }, ] as const; const FN_OUTPUTS = [] as const; @@ -120,23 +120,23 @@ export function setTransferable( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.enableTransfer] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC20/write/setTransferableFor.ts b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC20/write/setTransferableFor.ts index 55ff5f1e4d3..63cd4991a5c 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC20/write/setTransferableFor.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC20/write/setTransferableFor.ts @@ -22,12 +22,12 @@ export type SetTransferableForParams = WithOverrides<{ export const FN_SELECTOR = "0x4c297cbd" as const; const FN_INPUTS = [ { - name: "target", type: "address", + name: "target", }, { - name: "enableTransfer", type: "bool", + name: "enableTransfer", }, ] as const; const FN_OUTPUTS = [] as const; @@ -133,23 +133,23 @@ export function setTransferableFor( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.target, resolvedOptions.enableTransfer] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC721/module/install.ts b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC721/module/install.ts index afd927bc4be..4f83bb4478d 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC721/module/install.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC721/module/install.ts @@ -48,8 +48,8 @@ export function module(params?: { publisher?: string }) { publisher: params?.publisher, }); return { - data: "0x" as const, module: moduleContract.address as Address, + data: "0x" as const, }; }; } @@ -83,8 +83,8 @@ export function install(options: { return installPublishedModule({ account: options.account, contract: options.contract, - moduleData: "0x" as const, moduleName: contractId, + moduleData: "0x" as const, publisher: options.params?.publisher, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC721/read/isTransferEnabledFor.ts b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC721/read/isTransferEnabledFor.ts index 30f28d06d3c..d2a0815cea8 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC721/read/isTransferEnabledFor.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC721/read/isTransferEnabledFor.ts @@ -16,8 +16,8 @@ export type IsTransferEnabledForParams = { export const FN_SELECTOR = "0x735d0538" as const; const FN_INPUTS = [ { - name: "target", type: "address", + name: "target", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC721/write/setTransferable.ts b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC721/write/setTransferable.ts index 1a9467f6a60..5309665361d 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC721/write/setTransferable.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC721/write/setTransferable.ts @@ -21,8 +21,8 @@ export type SetTransferableParams = WithOverrides<{ export const FN_SELECTOR = "0x9cd23707" as const; const FN_INPUTS = [ { - name: "enableTransfer", type: "bool", + name: "enableTransfer", }, ] as const; const FN_OUTPUTS = [] as const; @@ -120,23 +120,23 @@ export function setTransferable( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.enableTransfer] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC721/write/setTransferableFor.ts b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC721/write/setTransferableFor.ts index fc9691076ff..068266a1a84 100644 --- a/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC721/write/setTransferableFor.ts +++ b/packages/thirdweb/src/extensions/modules/__generated__/TransferableERC721/write/setTransferableFor.ts @@ -22,12 +22,12 @@ export type SetTransferableForParams = WithOverrides<{ export const FN_SELECTOR = "0x4c297cbd" as const; const FN_INPUTS = [ { - name: "target", type: "address", + name: "target", }, { - name: "enableTransfer", type: "bool", + name: "enableTransfer", }, ] as const; const FN_OUTPUTS = [] as const; @@ -133,23 +133,23 @@ export function setTransferableFor( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.target, resolvedOptions.enableTransfer] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getBasefee.ts b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getBasefee.ts index 89315b85fd4..40d8ddd6ef6 100644 --- a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getBasefee.ts +++ b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getBasefee.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0x3e64a696" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "basefee", type: "uint256", + name: "basefee", }, ] as const; diff --git a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getBlockHash.ts b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getBlockHash.ts index 1cae461b7f6..149778a72e6 100644 --- a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getBlockHash.ts +++ b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getBlockHash.ts @@ -19,14 +19,14 @@ export type GetBlockHashParams = { export const FN_SELECTOR = "0xee82ac5e" as const; const FN_INPUTS = [ { - name: "blockNumber", type: "uint256", + name: "blockNumber", }, ] as const; const FN_OUTPUTS = [ { - name: "blockHash", type: "bytes32", + name: "blockHash", }, ] as const; diff --git a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getBlockNumber.ts b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getBlockNumber.ts index 1778d07fb55..102576e9ad6 100644 --- a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getBlockNumber.ts +++ b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getBlockNumber.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0x42cbb15c" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "blockNumber", type: "uint256", + name: "blockNumber", }, ] as const; diff --git a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getChainId.ts b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getChainId.ts index e838cdbbd89..36156b6e686 100644 --- a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getChainId.ts +++ b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getChainId.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0x3408e470" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "chainid", type: "uint256", + name: "chainid", }, ] as const; diff --git a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getCurrentBlockCoinbase.ts b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getCurrentBlockCoinbase.ts index f0a479e8f6d..2c9ba726c35 100644 --- a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getCurrentBlockCoinbase.ts +++ b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getCurrentBlockCoinbase.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0xa8b0574e" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "coinbase", type: "address", + name: "coinbase", }, ] as const; diff --git a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getCurrentBlockDifficulty.ts b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getCurrentBlockDifficulty.ts index 54792ffa12e..72335a2f8bd 100644 --- a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getCurrentBlockDifficulty.ts +++ b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getCurrentBlockDifficulty.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0x72425d9d" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "difficulty", type: "uint256", + name: "difficulty", }, ] as const; diff --git a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getCurrentBlockGasLimit.ts b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getCurrentBlockGasLimit.ts index 101ac59bd58..c65e5fd7676 100644 --- a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getCurrentBlockGasLimit.ts +++ b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getCurrentBlockGasLimit.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0x86d516e8" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "gaslimit", type: "uint256", + name: "gaslimit", }, ] as const; diff --git a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getCurrentBlockTimestamp.ts b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getCurrentBlockTimestamp.ts index 84891a0d046..d7caca01726 100644 --- a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getCurrentBlockTimestamp.ts +++ b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getCurrentBlockTimestamp.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0x0f28c97d" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "timestamp", type: "uint256", + name: "timestamp", }, ] as const; diff --git a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getEthBalance.ts b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getEthBalance.ts index 0f5f3c88fae..a224c0653b4 100644 --- a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getEthBalance.ts +++ b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getEthBalance.ts @@ -16,14 +16,14 @@ export type GetEthBalanceParams = { export const FN_SELECTOR = "0x4d2301cc" as const; const FN_INPUTS = [ { - name: "addr", type: "address", + name: "addr", }, ] as const; const FN_OUTPUTS = [ { - name: "balance", type: "uint256", + name: "balance", }, ] as const; diff --git a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getLastBlockHash.ts b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getLastBlockHash.ts index 080524bd944..27acbf25bc9 100644 --- a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getLastBlockHash.ts +++ b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/read/getLastBlockHash.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0x27e86d6e" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "blockHash", type: "bytes32", + name: "blockHash", }, ] as const; diff --git a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate.ts b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate.ts index d12a1873521..f4bb620df36 100644 --- a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate.ts +++ b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate.ts @@ -25,28 +25,28 @@ export type AggregateParams = WithOverrides<{ export const FN_SELECTOR = "0x252dba42" as const; const FN_INPUTS = [ { + type: "tuple[]", + name: "calls", components: [ { - name: "target", type: "address", + name: "target", }, { - name: "callData", type: "bytes", + name: "callData", }, ], - name: "calls", - type: "tuple[]", }, ] as const; const FN_OUTPUTS = [ { - name: "blockNumber", type: "uint256", + name: "blockNumber", }, { - name: "returnData", type: "bytes[]", + name: "returnData", }, ] as const; @@ -143,23 +143,23 @@ export function aggregate( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.calls] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate3.ts b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate3.ts index a996711c929..464c8e5b855 100644 --- a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate3.ts +++ b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate3.ts @@ -26,38 +26,38 @@ export type Aggregate3Params = WithOverrides<{ export const FN_SELECTOR = "0x82ad56cb" as const; const FN_INPUTS = [ { + type: "tuple[]", + name: "calls", components: [ { - name: "target", type: "address", + name: "target", }, { - name: "allowFailure", type: "bool", + name: "allowFailure", }, { - name: "callData", type: "bytes", + name: "callData", }, ], - name: "calls", - type: "tuple[]", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "returnData", components: [ { - name: "success", type: "bool", + name: "success", }, { - name: "returnData", type: "bytes", + name: "returnData", }, ], - name: "returnData", - type: "tuple[]", }, ] as const; @@ -154,23 +154,23 @@ export function aggregate3( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.calls] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate3Value.ts b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate3Value.ts index 51477184ea9..2a6f5834e5b 100644 --- a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate3Value.ts +++ b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate3Value.ts @@ -27,42 +27,42 @@ export type Aggregate3ValueParams = WithOverrides<{ export const FN_SELECTOR = "0x174dea71" as const; const FN_INPUTS = [ { + type: "tuple[]", + name: "calls", components: [ { - name: "target", type: "address", + name: "target", }, { - name: "allowFailure", type: "bool", + name: "allowFailure", }, { - name: "value", type: "uint256", + name: "value", }, { - name: "callData", type: "bytes", + name: "callData", }, ], - name: "calls", - type: "tuple[]", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "returnData", components: [ { - name: "success", type: "bool", + name: "success", }, { - name: "returnData", type: "bytes", + name: "returnData", }, ], - name: "returnData", - type: "tuple[]", }, ] as const; @@ -159,23 +159,23 @@ export function aggregate3Value( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.calls] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/blockAndAggregate.ts b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/blockAndAggregate.ts index eff1237ea72..1e1d4317881 100644 --- a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/blockAndAggregate.ts +++ b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/blockAndAggregate.ts @@ -25,42 +25,42 @@ export type BlockAndAggregateParams = WithOverrides<{ export const FN_SELECTOR = "0xc3077fa9" as const; const FN_INPUTS = [ { + type: "tuple[]", + name: "calls", components: [ { - name: "target", type: "address", + name: "target", }, { - name: "callData", type: "bytes", + name: "callData", }, ], - name: "calls", - type: "tuple[]", }, ] as const; const FN_OUTPUTS = [ { - name: "blockNumber", type: "uint256", + name: "blockNumber", }, { - name: "blockHash", type: "bytes32", + name: "blockHash", }, { + type: "tuple[]", + name: "returnData", components: [ { - name: "success", type: "bool", + name: "success", }, { - name: "returnData", type: "bytes", + name: "returnData", }, ], - name: "returnData", - type: "tuple[]", }, ] as const; @@ -159,23 +159,23 @@ export function blockAndAggregate( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.calls] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/tryAggregate.ts b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/tryAggregate.ts index bf87fb34568..d0312ddc01b 100644 --- a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/tryAggregate.ts +++ b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/tryAggregate.ts @@ -29,38 +29,38 @@ export type TryAggregateParams = WithOverrides<{ export const FN_SELECTOR = "0xbce38bd7" as const; const FN_INPUTS = [ { - name: "requireSuccess", type: "bool", + name: "requireSuccess", }, { + type: "tuple[]", + name: "calls", components: [ { - name: "target", type: "address", + name: "target", }, { - name: "callData", type: "bytes", + name: "callData", }, ], - name: "calls", - type: "tuple[]", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "returnData", components: [ { - name: "success", type: "bool", + name: "success", }, { - name: "returnData", type: "bytes", + name: "returnData", }, ], - name: "returnData", - type: "tuple[]", }, ] as const; @@ -163,23 +163,23 @@ export function tryAggregate( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.requireSuccess, resolvedOptions.calls] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/tryBlockAndAggregate.ts b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/tryBlockAndAggregate.ts index 2c750751ccd..4a42356cc17 100644 --- a/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/tryBlockAndAggregate.ts +++ b/packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/tryBlockAndAggregate.ts @@ -29,46 +29,46 @@ export type TryBlockAndAggregateParams = WithOverrides<{ export const FN_SELECTOR = "0x399542e9" as const; const FN_INPUTS = [ { - name: "requireSuccess", type: "bool", + name: "requireSuccess", }, { + type: "tuple[]", + name: "calls", components: [ { - name: "target", type: "address", + name: "target", }, { - name: "callData", type: "bytes", + name: "callData", }, ], - name: "calls", - type: "tuple[]", }, ] as const; const FN_OUTPUTS = [ { - name: "blockNumber", type: "uint256", + name: "blockNumber", }, { - name: "blockHash", type: "bytes32", + name: "blockHash", }, { + type: "tuple[]", + name: "returnData", components: [ { - name: "success", type: "bool", + name: "success", }, { - name: "returnData", type: "bytes", + name: "returnData", }, ], - name: "returnData", - type: "tuple[]", }, ] as const; @@ -175,23 +175,23 @@ export function tryBlockAndAggregate( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.requireSuccess, resolvedOptions.calls] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/pack/__generated__/IPack/events/PackCreated.ts b/packages/thirdweb/src/extensions/pack/__generated__/IPack/events/PackCreated.ts index 7f7e59e4970..fb2cb5db660 100644 --- a/packages/thirdweb/src/extensions/pack/__generated__/IPack/events/PackCreated.ts +++ b/packages/thirdweb/src/extensions/pack/__generated__/IPack/events/PackCreated.ts @@ -34,8 +34,8 @@ export type PackCreatedEventFilters = Partial<{ */ export function packCreatedEvent(filters: PackCreatedEventFilters = {}) { return prepareEvent({ - filters, signature: "event PackCreated(uint256 indexed packId, address recipient, uint256 totalPacksCreated)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/pack/__generated__/IPack/events/PackOpened.ts b/packages/thirdweb/src/extensions/pack/__generated__/IPack/events/PackOpened.ts index eb67785465c..d06bdadda34 100644 --- a/packages/thirdweb/src/extensions/pack/__generated__/IPack/events/PackOpened.ts +++ b/packages/thirdweb/src/extensions/pack/__generated__/IPack/events/PackOpened.ts @@ -40,8 +40,8 @@ export type PackOpenedEventFilters = Partial<{ */ export function packOpenedEvent(filters: PackOpenedEventFilters = {}) { return prepareEvent({ - filters, signature: "event PackOpened(uint256 indexed packId, address indexed opener, uint256 numOfPacksOpened, (address assetContract, uint8 tokenType, uint256 tokenId, uint256 totalAmount)[] rewardUnitsDistributed)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/pack/__generated__/IPack/events/PackUpdated.ts b/packages/thirdweb/src/extensions/pack/__generated__/IPack/events/PackUpdated.ts index 27908200057..4a6762257e9 100644 --- a/packages/thirdweb/src/extensions/pack/__generated__/IPack/events/PackUpdated.ts +++ b/packages/thirdweb/src/extensions/pack/__generated__/IPack/events/PackUpdated.ts @@ -34,8 +34,8 @@ export type PackUpdatedEventFilters = Partial<{ */ export function packUpdatedEvent(filters: PackUpdatedEventFilters = {}) { return prepareEvent({ - filters, signature: "event PackUpdated(uint256 indexed packId, address recipient, uint256 totalPacksCreated)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/canUpdatePack.ts b/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/canUpdatePack.ts index 18d152fdf41..b8febd5014e 100644 --- a/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/canUpdatePack.ts +++ b/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/canUpdatePack.ts @@ -16,8 +16,8 @@ export type CanUpdatePackParams = { export const FN_SELECTOR = "0xb0381b08" as const; const FN_INPUTS = [ { - name: "_key", type: "uint256", + name: "_key", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/getPackContents.ts b/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/getPackContents.ts index f455965d931..92a417a3bc1 100644 --- a/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/getPackContents.ts +++ b/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/getPackContents.ts @@ -16,36 +16,36 @@ export type GetPackContentsParams = { export const FN_SELECTOR = "0x8d4c446a" as const; const FN_INPUTS = [ { - name: "_packId", type: "uint256", + name: "_packId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "contents", components: [ { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "totalAmount", type: "uint256", + name: "totalAmount", }, ], - name: "contents", - type: "tuple[]", }, { - name: "perUnitAmounts", type: "uint256[]", + name: "perUnitAmounts", }, ] as const; diff --git a/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/getTokenCountOfBundle.ts b/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/getTokenCountOfBundle.ts index 6cca3c47cf2..cce2b6390db 100644 --- a/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/getTokenCountOfBundle.ts +++ b/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/getTokenCountOfBundle.ts @@ -16,8 +16,8 @@ export type GetTokenCountOfBundleParams = { export const FN_SELECTOR = "0xd0d2fe25" as const; const FN_INPUTS = [ { - name: "_bundleId", type: "uint256", + name: "_bundleId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/getTokenOfBundle.ts b/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/getTokenOfBundle.ts index 6129e13d9d4..5649dc09864 100644 --- a/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/getTokenOfBundle.ts +++ b/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/getTokenOfBundle.ts @@ -17,35 +17,35 @@ export type GetTokenOfBundleParams = { export const FN_SELECTOR = "0x1da799c9" as const; const FN_INPUTS = [ { - name: "_bundleId", type: "uint256", + name: "_bundleId", }, { - name: "index", type: "uint256", + name: "index", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple", components: [ { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "totalAmount", type: "uint256", + name: "totalAmount", }, ], - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/getUriOfBundle.ts b/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/getUriOfBundle.ts index 5d808e4b42c..3cc26fb50f9 100644 --- a/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/getUriOfBundle.ts +++ b/packages/thirdweb/src/extensions/pack/__generated__/IPack/read/getUriOfBundle.ts @@ -16,8 +16,8 @@ export type GetUriOfBundleParams = { export const FN_SELECTOR = "0x61195e94" as const; const FN_INPUTS = [ { - name: "_bundleId", type: "uint256", + name: "_bundleId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/pack/__generated__/IPack/write/addPackContents.ts b/packages/thirdweb/src/extensions/pack/__generated__/IPack/write/addPackContents.ts index c4a1a4dc21d..5bb0727f223 100644 --- a/packages/thirdweb/src/extensions/pack/__generated__/IPack/write/addPackContents.ts +++ b/packages/thirdweb/src/extensions/pack/__generated__/IPack/write/addPackContents.ts @@ -36,48 +36,48 @@ export type AddPackContentsParams = WithOverrides<{ export const FN_SELECTOR = "0xa96b1438" as const; const FN_INPUTS = [ { - name: "_packId", type: "uint256", + name: "_packId", }, { + type: "tuple[]", + name: "_contents", components: [ { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "totalAmount", type: "uint256", + name: "totalAmount", }, ], - name: "_contents", - type: "tuple[]", }, { - name: "_numOfRewardUnits", type: "uint256[]", + name: "_numOfRewardUnits", }, { - name: "_recipient", type: "address", + name: "_recipient", }, ] as const; const FN_OUTPUTS = [ { - name: "packTotalSupply", type: "uint256", + name: "packTotalSupply", }, { - name: "newSupplyAdded", type: "uint256", + name: "newSupplyAdded", }, ] as const; @@ -188,19 +188,8 @@ export function addPackContents( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -211,5 +200,16 @@ export function addPackContents( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/pack/__generated__/IPack/write/createPack.ts b/packages/thirdweb/src/extensions/pack/__generated__/IPack/write/createPack.ts index be63061314e..9462d48da72 100644 --- a/packages/thirdweb/src/extensions/pack/__generated__/IPack/write/createPack.ts +++ b/packages/thirdweb/src/extensions/pack/__generated__/IPack/write/createPack.ts @@ -44,56 +44,56 @@ export type CreatePackParams = WithOverrides<{ export const FN_SELECTOR = "0x092e6075" as const; const FN_INPUTS = [ { + type: "tuple[]", + name: "contents", components: [ { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "totalAmount", type: "uint256", + name: "totalAmount", }, ], - name: "contents", - type: "tuple[]", }, { - name: "numOfRewardUnits", type: "uint256[]", + name: "numOfRewardUnits", }, { - name: "packUri", type: "string", + name: "packUri", }, { - name: "openStartTimestamp", type: "uint128", + name: "openStartTimestamp", }, { - name: "amountDistributedPerOpen", type: "uint128", + name: "amountDistributedPerOpen", }, { - name: "recipient", type: "address", + name: "recipient", }, ] as const; const FN_OUTPUTS = [ { - name: "packId", type: "uint256", + name: "packId", }, { - name: "packTotalSupply", type: "uint256", + name: "packTotalSupply", }, ] as const; @@ -212,19 +212,8 @@ export function createPack( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -237,5 +226,16 @@ export function createPack( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/pack/__generated__/IPack/write/openPack.ts b/packages/thirdweb/src/extensions/pack/__generated__/IPack/write/openPack.ts index 97ca8cb2c9d..4749b3478e2 100644 --- a/packages/thirdweb/src/extensions/pack/__generated__/IPack/write/openPack.ts +++ b/packages/thirdweb/src/extensions/pack/__generated__/IPack/write/openPack.ts @@ -22,35 +22,35 @@ export type OpenPackParams = WithOverrides<{ export const FN_SELECTOR = "0x914e126a" as const; const FN_INPUTS = [ { - name: "packId", type: "uint256", + name: "packId", }, { - name: "amountToOpen", type: "uint256", + name: "amountToOpen", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple[]", components: [ { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "totalAmount", type: "uint256", + name: "totalAmount", }, ], - type: "tuple[]", }, ] as const; @@ -148,23 +148,23 @@ export function openPack( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.packId, resolvedOptions.amountToOpen] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/events/PackOpenRequested.ts b/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/events/PackOpenRequested.ts index 1c57f1ecb1b..36bd14d6965 100644 --- a/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/events/PackOpenRequested.ts +++ b/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/events/PackOpenRequested.ts @@ -42,8 +42,8 @@ export function packOpenRequestedEvent( filters: PackOpenRequestedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event PackOpenRequested(address indexed opener, uint256 indexed packId, uint256 amountToOpen, uint256 requestId)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/events/PackRandomnessFulfilled.ts b/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/events/PackRandomnessFulfilled.ts index 031826194c5..7f1745fa2ba 100644 --- a/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/events/PackRandomnessFulfilled.ts +++ b/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/events/PackRandomnessFulfilled.ts @@ -42,8 +42,8 @@ export function packRandomnessFulfilledEvent( filters: PackRandomnessFulfilledEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event PackRandomnessFulfilled(uint256 indexed packId, uint256 indexed requestId)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/read/canClaimRewards.ts b/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/read/canClaimRewards.ts index 80e8a798a58..895c70d6748 100644 --- a/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/read/canClaimRewards.ts +++ b/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/read/canClaimRewards.ts @@ -16,8 +16,8 @@ export type CanClaimRewardsParams = { export const FN_SELECTOR = "0xa9b47a66" as const; const FN_INPUTS = [ { - name: "_opener", type: "address", + name: "_opener", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/write/claimRewards.ts b/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/write/claimRewards.ts index bdc6de9c6d2..92ab7a14f6b 100644 --- a/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/write/claimRewards.ts +++ b/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/write/claimRewards.ts @@ -7,26 +7,26 @@ export const FN_SELECTOR = "0x372500ab" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "rewardUnits", components: [ { - name: "assetContract", type: "address", + name: "assetContract", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "totalAmount", type: "uint256", + name: "totalAmount", }, ], - name: "rewardUnits", - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/write/openPackAndClaimRewards.ts b/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/write/openPackAndClaimRewards.ts index ad89f183adb..09875c2f1c9 100644 --- a/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/write/openPackAndClaimRewards.ts +++ b/packages/thirdweb/src/extensions/pack/__generated__/IPackVRFDirect/write/openPackAndClaimRewards.ts @@ -26,16 +26,16 @@ export type OpenPackAndClaimRewardsParams = WithOverrides<{ export const FN_SELECTOR = "0xac296b3f" as const; const FN_INPUTS = [ { - name: "_packId", type: "uint256", + name: "_packId", }, { - name: "_amountToOpen", type: "uint256", + name: "_amountToOpen", }, { - name: "_callBackGasLimit", type: "uint32", + name: "_callBackGasLimit", }, ] as const; const FN_OUTPUTS = [ @@ -153,19 +153,8 @@ export function openPackAndClaimRewards( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -175,5 +164,16 @@ export function openPackAndClaimRewards( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/events/RoleAdminChanged.ts b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/events/RoleAdminChanged.ts index ee99c86ea03..18c40077c0d 100644 --- a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/events/RoleAdminChanged.ts +++ b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/events/RoleAdminChanged.ts @@ -48,8 +48,8 @@ export function roleAdminChangedEvent( filters: RoleAdminChangedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/events/RoleGranted.ts b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/events/RoleGranted.ts index b6b837ece97..7ac136a340d 100644 --- a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/events/RoleGranted.ts +++ b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/events/RoleGranted.ts @@ -46,8 +46,8 @@ export type RoleGrantedEventFilters = Partial<{ */ export function roleGrantedEvent(filters: RoleGrantedEventFilters = {}) { return prepareEvent({ - filters, signature: "event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/events/RoleRevoked.ts b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/events/RoleRevoked.ts index 601f4413c5d..d148578d3dc 100644 --- a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/events/RoleRevoked.ts +++ b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/events/RoleRevoked.ts @@ -46,8 +46,8 @@ export type RoleRevokedEventFilters = Partial<{ */ export function roleRevokedEvent(filters: RoleRevokedEventFilters = {}) { return prepareEvent({ - filters, signature: "event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/read/getRoleAdmin.ts b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/read/getRoleAdmin.ts index 47d44113063..6a5295c7316 100644 --- a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/read/getRoleAdmin.ts +++ b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/read/getRoleAdmin.ts @@ -16,8 +16,8 @@ export type GetRoleAdminParams = { export const FN_SELECTOR = "0x248a9ca3" as const; const FN_INPUTS = [ { - name: "role", type: "bytes32", + name: "role", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/read/hasRole.ts b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/read/hasRole.ts index f62f3380b91..5a856d38561 100644 --- a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/read/hasRole.ts +++ b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/read/hasRole.ts @@ -17,12 +17,12 @@ export type HasRoleParams = { export const FN_SELECTOR = "0x91d14854" as const; const FN_INPUTS = [ { - name: "role", type: "bytes32", + name: "role", }, { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/grantRole.ts b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/grantRole.ts index 63cc21447cb..d09f70d7b0c 100644 --- a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/grantRole.ts +++ b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/grantRole.ts @@ -19,12 +19,12 @@ export type GrantRoleParams = WithOverrides<{ export const FN_SELECTOR = "0x2f2ff15d" as const; const FN_INPUTS = [ { - name: "role", type: "bytes32", + name: "role", }, { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [] as const; @@ -125,23 +125,23 @@ export function grantRole( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.role, resolvedOptions.account] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/renounceRole.ts b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/renounceRole.ts index e24baa2bb0c..e6c933291cc 100644 --- a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/renounceRole.ts +++ b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/renounceRole.ts @@ -19,12 +19,12 @@ export type RenounceRoleParams = WithOverrides<{ export const FN_SELECTOR = "0x36568abe" as const; const FN_INPUTS = [ { - name: "role", type: "bytes32", + name: "role", }, { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [] as const; @@ -125,23 +125,23 @@ export function renounceRole( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.role, resolvedOptions.account] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/revokeRole.ts b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/revokeRole.ts index 78c0b88ae38..f6473a76bc6 100644 --- a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/revokeRole.ts +++ b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/revokeRole.ts @@ -19,12 +19,12 @@ export type RevokeRoleParams = WithOverrides<{ export const FN_SELECTOR = "0xd547741f" as const; const FN_INPUTS = [ { - name: "role", type: "bytes32", + name: "role", }, { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [] as const; @@ -125,23 +125,23 @@ export function revokeRole( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.role, resolvedOptions.account] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/events/RoleAdminChanged.ts b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/events/RoleAdminChanged.ts index ee99c86ea03..18c40077c0d 100644 --- a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/events/RoleAdminChanged.ts +++ b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/events/RoleAdminChanged.ts @@ -48,8 +48,8 @@ export function roleAdminChangedEvent( filters: RoleAdminChangedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/events/RoleGranted.ts b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/events/RoleGranted.ts index b6b837ece97..7ac136a340d 100644 --- a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/events/RoleGranted.ts +++ b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/events/RoleGranted.ts @@ -46,8 +46,8 @@ export type RoleGrantedEventFilters = Partial<{ */ export function roleGrantedEvent(filters: RoleGrantedEventFilters = {}) { return prepareEvent({ - filters, signature: "event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/events/RoleRevoked.ts b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/events/RoleRevoked.ts index 601f4413c5d..d148578d3dc 100644 --- a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/events/RoleRevoked.ts +++ b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/events/RoleRevoked.ts @@ -46,8 +46,8 @@ export type RoleRevokedEventFilters = Partial<{ */ export function roleRevokedEvent(filters: RoleRevokedEventFilters = {}) { return prepareEvent({ - filters, signature: "event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/read/getRoleAdmin.ts b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/read/getRoleAdmin.ts index 47d44113063..6a5295c7316 100644 --- a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/read/getRoleAdmin.ts +++ b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/read/getRoleAdmin.ts @@ -16,8 +16,8 @@ export type GetRoleAdminParams = { export const FN_SELECTOR = "0x248a9ca3" as const; const FN_INPUTS = [ { - name: "role", type: "bytes32", + name: "role", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/read/getRoleMember.ts b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/read/getRoleMember.ts index d07f9e82b32..c4b0f166724 100644 --- a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/read/getRoleMember.ts +++ b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/read/getRoleMember.ts @@ -17,12 +17,12 @@ export type GetRoleMemberParams = { export const FN_SELECTOR = "0x9010d07c" as const; const FN_INPUTS = [ { - name: "role", type: "bytes32", + name: "role", }, { - name: "index", type: "uint256", + name: "index", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/read/getRoleMemberCount.ts b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/read/getRoleMemberCount.ts index 2ef53c1b07c..9d0f2a60f83 100644 --- a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/read/getRoleMemberCount.ts +++ b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/read/getRoleMemberCount.ts @@ -16,8 +16,8 @@ export type GetRoleMemberCountParams = { export const FN_SELECTOR = "0xca15c873" as const; const FN_INPUTS = [ { - name: "role", type: "bytes32", + name: "role", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/read/hasRole.ts b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/read/hasRole.ts index f62f3380b91..5a856d38561 100644 --- a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/read/hasRole.ts +++ b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/read/hasRole.ts @@ -17,12 +17,12 @@ export type HasRoleParams = { export const FN_SELECTOR = "0x91d14854" as const; const FN_INPUTS = [ { - name: "role", type: "bytes32", + name: "role", }, { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/grantRole.ts b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/grantRole.ts index 63cc21447cb..d09f70d7b0c 100644 --- a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/grantRole.ts +++ b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/grantRole.ts @@ -19,12 +19,12 @@ export type GrantRoleParams = WithOverrides<{ export const FN_SELECTOR = "0x2f2ff15d" as const; const FN_INPUTS = [ { - name: "role", type: "bytes32", + name: "role", }, { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [] as const; @@ -125,23 +125,23 @@ export function grantRole( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.role, resolvedOptions.account] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/renounceRole.ts b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/renounceRole.ts index e24baa2bb0c..e6c933291cc 100644 --- a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/renounceRole.ts +++ b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/renounceRole.ts @@ -19,12 +19,12 @@ export type RenounceRoleParams = WithOverrides<{ export const FN_SELECTOR = "0x36568abe" as const; const FN_INPUTS = [ { - name: "role", type: "bytes32", + name: "role", }, { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [] as const; @@ -125,23 +125,23 @@ export function renounceRole( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.role, resolvedOptions.account] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/revokeRole.ts b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/revokeRole.ts index 78c0b88ae38..f6473a76bc6 100644 --- a/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/revokeRole.ts +++ b/packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/revokeRole.ts @@ -19,12 +19,12 @@ export type RevokeRoleParams = WithOverrides<{ export const FN_SELECTOR = "0xd547741f" as const; const FN_INPUTS = [ { - name: "role", type: "bytes32", + name: "role", }, { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [] as const; @@ -125,23 +125,23 @@ export function revokeRole( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.role, resolvedOptions.account] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC1155/write/initialize.ts b/packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC1155/write/initialize.ts index 52eae2fe169..f4e95dad1f3 100644 --- a/packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC1155/write/initialize.ts +++ b/packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC1155/write/initialize.ts @@ -51,44 +51,44 @@ export type InitializeParams = WithOverrides<{ export const FN_SELECTOR = "0xe1591634" as const; const FN_INPUTS = [ { - name: "_defaultAdmin", type: "address", + name: "_defaultAdmin", }, { - name: "_name", type: "string", + name: "_name", }, { - name: "_symbol", type: "string", + name: "_symbol", }, { - name: "_contractURI", type: "string", + name: "_contractURI", }, { - name: "_trustedForwarders", type: "address[]", + name: "_trustedForwarders", }, { - name: "_saleRecipient", type: "address", + name: "_saleRecipient", }, { - name: "_royaltyRecipient", type: "address", + name: "_royaltyRecipient", }, { - name: "_royaltyBps", type: "uint128", + name: "_royaltyBps", }, { - name: "_platformFeeBps", type: "uint128", + name: "_platformFeeBps", }, { - name: "_platformFeeRecipient", type: "address", + name: "_platformFeeRecipient", }, ] as const; const FN_OUTPUTS = [] as const; @@ -224,19 +224,8 @@ export function initialize( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -253,5 +242,16 @@ export function initialize( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC20/write/initialize.ts b/packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC20/write/initialize.ts index 274ea20dd28..1f3ab9ddf7c 100644 --- a/packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC20/write/initialize.ts +++ b/packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC20/write/initialize.ts @@ -43,36 +43,36 @@ export type InitializeParams = WithOverrides<{ export const FN_SELECTOR = "0x49c5c5b6" as const; const FN_INPUTS = [ { - name: "_defaultAdmin", type: "address", + name: "_defaultAdmin", }, { - name: "_name", type: "string", + name: "_name", }, { - name: "_symbol", type: "string", + name: "_symbol", }, { - name: "_contractURI", type: "string", + name: "_contractURI", }, { - name: "_trustedForwarders", type: "address[]", + name: "_trustedForwarders", }, { - name: "_saleRecipient", type: "address", + name: "_saleRecipient", }, { - name: "_platformFeeRecipient", type: "address", + name: "_platformFeeRecipient", }, { - name: "_platformFeeBps", type: "uint128", + name: "_platformFeeBps", }, ] as const; const FN_OUTPUTS = [] as const; @@ -200,19 +200,8 @@ export function initialize( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -227,5 +216,16 @@ export function initialize( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC721/write/initialize.ts b/packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC721/write/initialize.ts index 52eae2fe169..f4e95dad1f3 100644 --- a/packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC721/write/initialize.ts +++ b/packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC721/write/initialize.ts @@ -51,44 +51,44 @@ export type InitializeParams = WithOverrides<{ export const FN_SELECTOR = "0xe1591634" as const; const FN_INPUTS = [ { - name: "_defaultAdmin", type: "address", + name: "_defaultAdmin", }, { - name: "_name", type: "string", + name: "_name", }, { - name: "_symbol", type: "string", + name: "_symbol", }, { - name: "_contractURI", type: "string", + name: "_contractURI", }, { - name: "_trustedForwarders", type: "address[]", + name: "_trustedForwarders", }, { - name: "_saleRecipient", type: "address", + name: "_saleRecipient", }, { - name: "_royaltyRecipient", type: "address", + name: "_royaltyRecipient", }, { - name: "_royaltyBps", type: "uint128", + name: "_royaltyBps", }, { - name: "_platformFeeBps", type: "uint128", + name: "_platformFeeBps", }, { - name: "_platformFeeRecipient", type: "address", + name: "_platformFeeRecipient", }, ] as const; const FN_OUTPUTS = [] as const; @@ -224,19 +224,8 @@ export function initialize( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -253,5 +242,16 @@ export function initialize( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/prebuilts/__generated__/Marketplace/write/initialize.ts b/packages/thirdweb/src/extensions/prebuilts/__generated__/Marketplace/write/initialize.ts index afd8adc4244..36d6778ae8b 100644 --- a/packages/thirdweb/src/extensions/prebuilts/__generated__/Marketplace/write/initialize.ts +++ b/packages/thirdweb/src/extensions/prebuilts/__generated__/Marketplace/write/initialize.ts @@ -37,24 +37,24 @@ export type InitializeParams = WithOverrides<{ export const FN_SELECTOR = "0xaaae5633" as const; const FN_INPUTS = [ { - name: "_defaultAdmin", type: "address", + name: "_defaultAdmin", }, { - name: "_contractURI", type: "string", + name: "_contractURI", }, { - name: "_trustedForwarders", type: "address[]", + name: "_trustedForwarders", }, { - name: "_platformFeeRecipient", type: "address", + name: "_platformFeeRecipient", }, { - name: "_platformFeeBps", type: "uint16", + name: "_platformFeeBps", }, ] as const; const FN_OUTPUTS = [] as const; @@ -170,19 +170,8 @@ export function initialize( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -194,5 +183,16 @@ export function initialize( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/prebuilts/__generated__/OpenEditionERC721/write/initialize.ts b/packages/thirdweb/src/extensions/prebuilts/__generated__/OpenEditionERC721/write/initialize.ts index 593b1a9ae8a..1a8f813bbf9 100644 --- a/packages/thirdweb/src/extensions/prebuilts/__generated__/OpenEditionERC721/write/initialize.ts +++ b/packages/thirdweb/src/extensions/prebuilts/__generated__/OpenEditionERC721/write/initialize.ts @@ -43,36 +43,36 @@ export type InitializeParams = WithOverrides<{ export const FN_SELECTOR = "0x49c5c5b6" as const; const FN_INPUTS = [ { - name: "_defaultAdmin", type: "address", + name: "_defaultAdmin", }, { - name: "_name", type: "string", + name: "_name", }, { - name: "_symbol", type: "string", + name: "_symbol", }, { - name: "_contractURI", type: "string", + name: "_contractURI", }, { - name: "_trustedForwarders", type: "address[]", + name: "_trustedForwarders", }, { - name: "_saleRecipient", type: "address", + name: "_saleRecipient", }, { - name: "_royaltyRecipient", type: "address", + name: "_royaltyRecipient", }, { - name: "_royaltyBps", type: "uint128", + name: "_royaltyBps", }, ] as const; const FN_OUTPUTS = [] as const; @@ -200,19 +200,8 @@ export function initialize( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -227,5 +216,16 @@ export function initialize( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/prebuilts/__generated__/Pack/write/initialize.ts b/packages/thirdweb/src/extensions/prebuilts/__generated__/Pack/write/initialize.ts index c91ceb8b30e..69ec28d0568 100644 --- a/packages/thirdweb/src/extensions/prebuilts/__generated__/Pack/write/initialize.ts +++ b/packages/thirdweb/src/extensions/prebuilts/__generated__/Pack/write/initialize.ts @@ -39,32 +39,32 @@ export type InitializeParams = WithOverrides<{ export const FN_SELECTOR = "0x754b8fe7" as const; const FN_INPUTS = [ { - name: "_defaultAdmin", type: "address", + name: "_defaultAdmin", }, { - name: "_name", type: "string", + name: "_name", }, { - name: "_symbol", type: "string", + name: "_symbol", }, { - name: "_contractURI", type: "string", + name: "_contractURI", }, { - name: "_trustedForwarders", type: "address[]", + name: "_trustedForwarders", }, { - name: "_royaltyRecipient", type: "address", + name: "_royaltyRecipient", }, { - name: "_royaltyBps", type: "uint256", + name: "_royaltyBps", }, ] as const; const FN_OUTPUTS = [] as const; @@ -188,19 +188,8 @@ export function initialize( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -214,5 +203,16 @@ export function initialize( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/prebuilts/__generated__/Split/write/initialize.ts b/packages/thirdweb/src/extensions/prebuilts/__generated__/Split/write/initialize.ts index 1eecf8ddaf0..a8d1282e07e 100644 --- a/packages/thirdweb/src/extensions/prebuilts/__generated__/Split/write/initialize.ts +++ b/packages/thirdweb/src/extensions/prebuilts/__generated__/Split/write/initialize.ts @@ -31,24 +31,24 @@ export type InitializeParams = WithOverrides<{ export const FN_SELECTOR = "0xb1a14437" as const; const FN_INPUTS = [ { - name: "_defaultAdmin", type: "address", + name: "_defaultAdmin", }, { - name: "_contractURI", type: "string", + name: "_contractURI", }, { - name: "_trustedForwarders", type: "address[]", + name: "_trustedForwarders", }, { - name: "_payees", type: "address[]", + name: "_payees", }, { - name: "_shares", type: "uint256[]", + name: "_shares", }, ] as const; const FN_OUTPUTS = [] as const; @@ -164,19 +164,8 @@ export function initialize( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -188,5 +177,16 @@ export function initialize( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC1155/write/initialize.ts b/packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC1155/write/initialize.ts index e5c2007a36a..5e0ef5d1300 100644 --- a/packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC1155/write/initialize.ts +++ b/packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC1155/write/initialize.ts @@ -51,44 +51,44 @@ export type InitializeParams = WithOverrides<{ export const FN_SELECTOR = "0xe1591634" as const; const FN_INPUTS = [ { - name: "_defaultAdmin", type: "address", + name: "_defaultAdmin", }, { - name: "_name", type: "string", + name: "_name", }, { - name: "_symbol", type: "string", + name: "_symbol", }, { - name: "_contractURI", type: "string", + name: "_contractURI", }, { - name: "_trustedForwarders", type: "address[]", + name: "_trustedForwarders", }, { - name: "_primarySaleRecipient", type: "address", + name: "_primarySaleRecipient", }, { - name: "_royaltyRecipient", type: "address", + name: "_royaltyRecipient", }, { - name: "_royaltyBps", type: "uint128", + name: "_royaltyBps", }, { - name: "_platformFeeBps", type: "uint128", + name: "_platformFeeBps", }, { - name: "_platformFeeRecipient", type: "address", + name: "_platformFeeRecipient", }, ] as const; const FN_OUTPUTS = [] as const; @@ -224,19 +224,8 @@ export function initialize( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -253,5 +242,16 @@ export function initialize( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC20/write/initialize.ts b/packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC20/write/initialize.ts index d7bd411370f..0008f7a2b87 100644 --- a/packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC20/write/initialize.ts +++ b/packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC20/write/initialize.ts @@ -43,36 +43,36 @@ export type InitializeParams = WithOverrides<{ export const FN_SELECTOR = "0xdfad80a6" as const; const FN_INPUTS = [ { - name: "_defaultAdmin", type: "address", + name: "_defaultAdmin", }, { - name: "_name", type: "string", + name: "_name", }, { - name: "_symbol", type: "string", + name: "_symbol", }, { - name: "_contractURI", type: "string", + name: "_contractURI", }, { - name: "_trustedForwarders", type: "address[]", + name: "_trustedForwarders", }, { - name: "_primarySaleRecipient", type: "address", + name: "_primarySaleRecipient", }, { - name: "_platformFeeRecipient", type: "address", + name: "_platformFeeRecipient", }, { - name: "_platformFeeBps", type: "uint256", + name: "_platformFeeBps", }, ] as const; const FN_OUTPUTS = [] as const; @@ -200,19 +200,8 @@ export function initialize( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -227,5 +216,16 @@ export function initialize( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC721/write/initialize.ts b/packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC721/write/initialize.ts index 52eae2fe169..f4e95dad1f3 100644 --- a/packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC721/write/initialize.ts +++ b/packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC721/write/initialize.ts @@ -51,44 +51,44 @@ export type InitializeParams = WithOverrides<{ export const FN_SELECTOR = "0xe1591634" as const; const FN_INPUTS = [ { - name: "_defaultAdmin", type: "address", + name: "_defaultAdmin", }, { - name: "_name", type: "string", + name: "_name", }, { - name: "_symbol", type: "string", + name: "_symbol", }, { - name: "_contractURI", type: "string", + name: "_contractURI", }, { - name: "_trustedForwarders", type: "address[]", + name: "_trustedForwarders", }, { - name: "_saleRecipient", type: "address", + name: "_saleRecipient", }, { - name: "_royaltyRecipient", type: "address", + name: "_royaltyRecipient", }, { - name: "_royaltyBps", type: "uint128", + name: "_royaltyBps", }, { - name: "_platformFeeBps", type: "uint128", + name: "_platformFeeBps", }, { - name: "_platformFeeRecipient", type: "address", + name: "_platformFeeRecipient", }, ] as const; const FN_OUTPUTS = [] as const; @@ -224,19 +224,8 @@ export function initialize( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -253,5 +242,16 @@ export function initialize( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/prebuilts/__generated__/VoteERC20/write/initialize.ts b/packages/thirdweb/src/extensions/prebuilts/__generated__/VoteERC20/write/initialize.ts index 9e6fdd28aa3..66d5fa8b114 100644 --- a/packages/thirdweb/src/extensions/prebuilts/__generated__/VoteERC20/write/initialize.ts +++ b/packages/thirdweb/src/extensions/prebuilts/__generated__/VoteERC20/write/initialize.ts @@ -43,36 +43,36 @@ export type InitializeParams = WithOverrides<{ export const FN_SELECTOR = "0x7cf43f8d" as const; const FN_INPUTS = [ { - name: "_name", type: "string", + name: "_name", }, { - name: "_contractURI", type: "string", + name: "_contractURI", }, { - name: "_trustedForwarders", type: "address[]", + name: "_trustedForwarders", }, { - name: "_token", type: "address", + name: "_token", }, { - name: "_initialVotingDelay", type: "uint256", + name: "_initialVotingDelay", }, { - name: "_initialVotingPeriod", type: "uint256", + name: "_initialVotingPeriod", }, { - name: "_initialProposalThreshold", type: "uint256", + name: "_initialProposalThreshold", }, { - name: "_initialVoteQuorumFraction", type: "uint256", + name: "_initialVoteQuorumFraction", }, ] as const; const FN_OUTPUTS = [] as const; @@ -200,19 +200,8 @@ export function initialize( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -227,5 +216,16 @@ export function initialize( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/split/__generated__/Split/read/payee.ts b/packages/thirdweb/src/extensions/split/__generated__/Split/read/payee.ts index 62e10b946de..beb7ac88958 100644 --- a/packages/thirdweb/src/extensions/split/__generated__/Split/read/payee.ts +++ b/packages/thirdweb/src/extensions/split/__generated__/Split/read/payee.ts @@ -16,8 +16,8 @@ export type PayeeParams = { export const FN_SELECTOR = "0x8b83209b" as const; const FN_INPUTS = [ { - name: "index", type: "uint256", + name: "index", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/split/__generated__/Split/read/releasable.ts b/packages/thirdweb/src/extensions/split/__generated__/Split/read/releasable.ts index c6de9aba5b8..11791d48753 100644 --- a/packages/thirdweb/src/extensions/split/__generated__/Split/read/releasable.ts +++ b/packages/thirdweb/src/extensions/split/__generated__/Split/read/releasable.ts @@ -16,8 +16,8 @@ export type ReleasableParams = { export const FN_SELECTOR = "0xa3f8eace" as const; const FN_INPUTS = [ { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/split/__generated__/Split/read/released.ts b/packages/thirdweb/src/extensions/split/__generated__/Split/read/released.ts index 3563fa67f9d..3aad9d307fd 100644 --- a/packages/thirdweb/src/extensions/split/__generated__/Split/read/released.ts +++ b/packages/thirdweb/src/extensions/split/__generated__/Split/read/released.ts @@ -16,8 +16,8 @@ export type ReleasedParams = { export const FN_SELECTOR = "0x9852595c" as const; const FN_INPUTS = [ { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/split/__generated__/Split/read/shares.ts b/packages/thirdweb/src/extensions/split/__generated__/Split/read/shares.ts index ab616ea8dc4..ccd5d4f0ea3 100644 --- a/packages/thirdweb/src/extensions/split/__generated__/Split/read/shares.ts +++ b/packages/thirdweb/src/extensions/split/__generated__/Split/read/shares.ts @@ -16,8 +16,8 @@ export type SharesParams = { export const FN_SELECTOR = "0xce7c2ac2" as const; const FN_INPUTS = [ { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/split/__generated__/Split/write/release.ts b/packages/thirdweb/src/extensions/split/__generated__/Split/write/release.ts index f8170be5ac4..cb941c153cb 100644 --- a/packages/thirdweb/src/extensions/split/__generated__/Split/write/release.ts +++ b/packages/thirdweb/src/extensions/split/__generated__/Split/write/release.ts @@ -18,8 +18,8 @@ export type ReleaseParams = WithOverrides<{ export const FN_SELECTOR = "0x19165587" as const; const FN_INPUTS = [ { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [] as const; @@ -115,23 +115,23 @@ export function release( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.account] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/stylus/__generated__/IArbWasm/read/codehashVersion.ts b/packages/thirdweb/src/extensions/stylus/__generated__/IArbWasm/read/codehashVersion.ts index 4dec920df54..746fafde3a0 100644 --- a/packages/thirdweb/src/extensions/stylus/__generated__/IArbWasm/read/codehashVersion.ts +++ b/packages/thirdweb/src/extensions/stylus/__generated__/IArbWasm/read/codehashVersion.ts @@ -16,14 +16,14 @@ export type CodehashVersionParams = { export const FN_SELECTOR = "0xd70c0ca7" as const; const FN_INPUTS = [ { - name: "codehash", type: "bytes32", + name: "codehash", }, ] as const; const FN_OUTPUTS = [ { - name: "version", type: "uint16", + name: "version", }, ] as const; diff --git a/packages/thirdweb/src/extensions/stylus/__generated__/IArbWasm/write/activateProgram.ts b/packages/thirdweb/src/extensions/stylus/__generated__/IArbWasm/write/activateProgram.ts index bd2994597f1..b1b723248c0 100644 --- a/packages/thirdweb/src/extensions/stylus/__generated__/IArbWasm/write/activateProgram.ts +++ b/packages/thirdweb/src/extensions/stylus/__generated__/IArbWasm/write/activateProgram.ts @@ -18,8 +18,8 @@ export type ActivateProgramParams = WithOverrides<{ export const FN_SELECTOR = "0x58c780c2" as const; const FN_INPUTS = [ { - name: "program", type: "address", + name: "program", }, ] as const; const FN_OUTPUTS = [ @@ -124,23 +124,23 @@ export function activateProgram( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.program] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/stylus/__generated__/IStylusDeployer/write/deploy.ts b/packages/thirdweb/src/extensions/stylus/__generated__/IStylusDeployer/write/deploy.ts index bf1c111839f..5a6d44c65ae 100644 --- a/packages/thirdweb/src/extensions/stylus/__generated__/IStylusDeployer/write/deploy.ts +++ b/packages/thirdweb/src/extensions/stylus/__generated__/IStylusDeployer/write/deploy.ts @@ -24,20 +24,20 @@ export type DeployParams = WithOverrides<{ export const FN_SELECTOR = "0xa9a8e4e9" as const; const FN_INPUTS = [ { - name: "bytecode", type: "bytes", + name: "bytecode", }, { - name: "initData", type: "bytes", + name: "initData", }, { - name: "initValue", type: "uint256", + name: "initValue", }, { - name: "salt", type: "bytes32", + name: "salt", }, ] as const; const FN_OUTPUTS = [ @@ -151,19 +151,8 @@ export function deploy( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -174,5 +163,16 @@ export function deploy( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IAppURI/write/setAppURI.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IAppURI/write/setAppURI.ts index 73aa2497ff6..5914590d189 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IAppURI/write/setAppURI.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IAppURI/write/setAppURI.ts @@ -18,8 +18,8 @@ export type SetAppURIParams = WithOverrides<{ export const FN_SELECTOR = "0xfea18082" as const; const FN_INPUTS = [ { - name: "_uri", type: "string", + name: "_uri", }, ] as const; const FN_OUTPUTS = [] as const; @@ -117,23 +117,23 @@ export function setAppURI( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.uri] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/events/ProxyDeployed.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/events/ProxyDeployed.ts index 281d0697df8..fdbd658fb2b 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/events/ProxyDeployed.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/events/ProxyDeployed.ts @@ -40,8 +40,8 @@ export type ProxyDeployedEventFilters = Partial<{ */ export function proxyDeployedEvent(filters: ProxyDeployedEventFilters = {}) { return prepareEvent({ - filters, signature: "event ProxyDeployed(address indexed implementation, address proxy, address indexed deployer)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/events/ProxyDeployedV2.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/events/ProxyDeployedV2.ts index 44cf4fe1793..d2cf5087ba9 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/events/ProxyDeployedV2.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/events/ProxyDeployedV2.ts @@ -48,8 +48,8 @@ export function proxyDeployedV2Event( filters: ProxyDeployedV2EventFilters = {}, ) { return prepareEvent({ - filters, signature: "event ProxyDeployedV2(address indexed implementation, address indexed proxy, address indexed deployer, bytes32 inputSalt, bytes data, bytes extraData)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/write/deployProxyByImplementation.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/write/deployProxyByImplementation.ts index ce0d0a2c98e..4f3054fa23b 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/write/deployProxyByImplementation.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/write/deployProxyByImplementation.ts @@ -23,16 +23,16 @@ export type DeployProxyByImplementationParams = WithOverrides<{ export const FN_SELECTOR = "0x11b804ab" as const; const FN_INPUTS = [ { - name: "implementation", type: "address", + name: "implementation", }, { - name: "data", type: "bytes", + name: "data", }, { - name: "salt", type: "bytes32", + name: "salt", }, ] as const; const FN_OUTPUTS = [ @@ -150,19 +150,8 @@ export function deployProxyByImplementation( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -172,5 +161,16 @@ export function deployProxyByImplementation( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/write/deployProxyByImplementationV2.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/write/deployProxyByImplementationV2.ts index cf91f261d41..9c38e1b77be 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/write/deployProxyByImplementationV2.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/write/deployProxyByImplementationV2.ts @@ -24,20 +24,20 @@ export type DeployProxyByImplementationV2Params = WithOverrides<{ export const FN_SELECTOR = "0xd057c8b1" as const; const FN_INPUTS = [ { - name: "implementation", type: "address", + name: "implementation", }, { - name: "data", type: "bytes", + name: "data", }, { - name: "salt", type: "bytes32", + name: "salt", }, { - name: "extraData", type: "bytes", + name: "extraData", }, ] as const; const FN_OUTPUTS = [ @@ -159,19 +159,8 @@ export function deployProxyByImplementationV2( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -182,5 +171,16 @@ export function deployProxyByImplementationV2( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/events/ContractPublished.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/events/ContractPublished.ts index 756cc6f3e75..cb592fe7e78 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/events/ContractPublished.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/events/ContractPublished.ts @@ -42,8 +42,8 @@ export function contractPublishedEvent( filters: ContractPublishedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event ContractPublished(address indexed operator, address indexed publisher, (string contractId, uint256 publishTimestamp, string publishMetadataUri, bytes32 bytecodeHash, address implementation) publishedContract)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/events/ContractUnpublished.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/events/ContractUnpublished.ts index d5c0c6d5527..daacec8d2fa 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/events/ContractUnpublished.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/events/ContractUnpublished.ts @@ -48,8 +48,8 @@ export function contractUnpublishedEvent( filters: ContractUnpublishedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event ContractUnpublished(address indexed operator, address indexed publisher, string indexed contractId)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/events/PublisherProfileUpdated.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/events/PublisherProfileUpdated.ts index f149393f44b..a27c7ed8a50 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/events/PublisherProfileUpdated.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/events/PublisherProfileUpdated.ts @@ -36,8 +36,8 @@ export function publisherProfileUpdatedEvent( filters: PublisherProfileUpdatedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event PublisherProfileUpdated(address indexed publisher, string prevURI, string newURI)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getAllPublishedContracts.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getAllPublishedContracts.ts index f8d9d8c3329..160d991507d 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getAllPublishedContracts.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getAllPublishedContracts.ts @@ -19,36 +19,36 @@ export type GetAllPublishedContractsParams = { export const FN_SELECTOR = "0xaf8db690" as const; const FN_INPUTS = [ { - name: "publisher", type: "address", + name: "publisher", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "published", components: [ { - name: "contractId", type: "string", + name: "contractId", }, { - name: "publishTimestamp", type: "uint256", + name: "publishTimestamp", }, { - name: "publishMetadataUri", type: "string", + name: "publishMetadataUri", }, { - name: "bytecodeHash", type: "bytes32", + name: "bytecodeHash", }, { - name: "implementation", type: "address", + name: "implementation", }, ], - name: "published", - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getPublishedContract.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getPublishedContract.ts index 1779b66b970..aa118da5ec4 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getPublishedContract.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getPublishedContract.ts @@ -23,40 +23,40 @@ export type GetPublishedContractParams = { export const FN_SELECTOR = "0x7ec047fa" as const; const FN_INPUTS = [ { - name: "publisher", type: "address", + name: "publisher", }, { - name: "contractId", type: "string", + name: "contractId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple", + name: "published", components: [ { - name: "contractId", type: "string", + name: "contractId", }, { - name: "publishTimestamp", type: "uint256", + name: "publishTimestamp", }, { - name: "publishMetadataUri", type: "string", + name: "publishMetadataUri", }, { - name: "bytecodeHash", type: "bytes32", + name: "bytecodeHash", }, { - name: "implementation", type: "address", + name: "implementation", }, ], - name: "published", - type: "tuple", }, ] as const; diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getPublishedContractVersions.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getPublishedContractVersions.ts index 6a7f3ed3a73..da7579bee87 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getPublishedContractVersions.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getPublishedContractVersions.ts @@ -23,40 +23,40 @@ export type GetPublishedContractVersionsParams = { export const FN_SELECTOR = "0x80251dac" as const; const FN_INPUTS = [ { - name: "publisher", type: "address", + name: "publisher", }, { - name: "contractId", type: "string", + name: "contractId", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "published", components: [ { - name: "contractId", type: "string", + name: "contractId", }, { - name: "publishTimestamp", type: "uint256", + name: "publishTimestamp", }, { - name: "publishMetadataUri", type: "string", + name: "publishMetadataUri", }, { - name: "bytecodeHash", type: "bytes32", + name: "bytecodeHash", }, { - name: "implementation", type: "address", + name: "implementation", }, ], - name: "published", - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getPublishedUriFromCompilerUri.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getPublishedUriFromCompilerUri.ts index d5cefe1c3f3..ec4c61cd8a2 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getPublishedUriFromCompilerUri.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getPublishedUriFromCompilerUri.ts @@ -19,14 +19,14 @@ export type GetPublishedUriFromCompilerUriParams = { export const FN_SELECTOR = "0x819e992f" as const; const FN_INPUTS = [ { - name: "compilerMetadataUri", type: "string", + name: "compilerMetadataUri", }, ] as const; const FN_OUTPUTS = [ { - name: "publishedMetadataUris", type: "string[]", + name: "publishedMetadataUris", }, ] as const; diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getPublisherProfileUri.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getPublisherProfileUri.ts index 10f803b6e41..2fcb86f7d42 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getPublisherProfileUri.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/read/getPublisherProfileUri.ts @@ -19,14 +19,14 @@ export type GetPublisherProfileUriParams = { export const FN_SELECTOR = "0x4f781675" as const; const FN_INPUTS = [ { - name: "publisher", type: "address", + name: "publisher", }, ] as const; const FN_OUTPUTS = [ { - name: "uri", type: "string", + name: "uri", }, ] as const; diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/publishContract.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/publishContract.ts index 8eb1035a5ca..6a3349b0b27 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/publishContract.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/publishContract.ts @@ -41,28 +41,28 @@ export type PublishContractParams = WithOverrides<{ export const FN_SELECTOR = "0xd50299e6" as const; const FN_INPUTS = [ { - name: "publisher", type: "address", + name: "publisher", }, { - name: "contractId", type: "string", + name: "contractId", }, { - name: "publishMetadataUri", type: "string", + name: "publishMetadataUri", }, { - name: "compilerMetadataUri", type: "string", + name: "compilerMetadataUri", }, { - name: "bytecodeHash", type: "bytes32", + name: "bytecodeHash", }, { - name: "implementation", type: "address", + name: "implementation", }, ] as const; const FN_OUTPUTS = [] as const; @@ -182,19 +182,8 @@ export function publishContract( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -207,5 +196,16 @@ export function publishContract( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/setPublisherProfileUri.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/setPublisherProfileUri.ts index aa618eedd09..6e3e25a8f16 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/setPublisherProfileUri.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/setPublisherProfileUri.ts @@ -22,12 +22,12 @@ export type SetPublisherProfileUriParams = WithOverrides<{ export const FN_SELECTOR = "0x6e578e54" as const; const FN_INPUTS = [ { - name: "publisher", type: "address", + name: "publisher", }, { - name: "uri", type: "string", + name: "uri", }, ] as const; const FN_OUTPUTS = [] as const; @@ -134,23 +134,23 @@ export function setPublisherProfileUri( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.publisher, resolvedOptions.uri] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/unpublishContract.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/unpublishContract.ts index 9c835cfff23..0f2780e8a7b 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/unpublishContract.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/unpublishContract.ts @@ -25,12 +25,12 @@ export type UnpublishContractParams = WithOverrides<{ export const FN_SELECTOR = "0x06eb56cc" as const; const FN_INPUTS = [ { - name: "publisher", type: "address", + name: "publisher", }, { - name: "contractId", type: "string", + name: "contractId", }, ] as const; const FN_OUTPUTS = [] as const; @@ -136,23 +136,23 @@ export function unpublishContract( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.publisher, resolvedOptions.contractId] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/events/RuleCreated.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/events/RuleCreated.ts index 89bae55fec4..703bd2203fb 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/events/RuleCreated.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/events/RuleCreated.ts @@ -34,8 +34,8 @@ export type RuleCreatedEventFilters = Partial<{ */ export function ruleCreatedEvent(filters: RuleCreatedEventFilters = {}) { return prepareEvent({ - filters, signature: "event RuleCreated(bytes32 indexed ruleId, (bytes32 ruleId, address token, uint8 tokenType, uint256 tokenId, uint256 balance, uint256 score, uint8 ruleType) rule)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/events/RuleDeleted.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/events/RuleDeleted.ts index d49aa30069a..07b59b32352 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/events/RuleDeleted.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/events/RuleDeleted.ts @@ -34,7 +34,7 @@ export type RuleDeletedEventFilters = Partial<{ */ export function ruleDeletedEvent(filters: RuleDeletedEventFilters = {}) { return prepareEvent({ - filters, signature: "event RuleDeleted(bytes32 indexed ruleId)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/events/RulesEngineOverriden.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/events/RulesEngineOverriden.ts index 3058ceb2afd..cc1ff027a80 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/events/RulesEngineOverriden.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/events/RulesEngineOverriden.ts @@ -36,7 +36,7 @@ export function rulesEngineOverridenEvent( filters: RulesEngineOverridenEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event RulesEngineOverriden(address indexed newRulesEngine)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/read/getAllRules.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/read/getAllRules.ts index ba836cf5188..cf01e006e62 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/read/getAllRules.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/read/getAllRules.ts @@ -8,38 +8,38 @@ export const FN_SELECTOR = "0x1184aef2" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "rules", components: [ { - name: "ruleId", type: "bytes32", + name: "ruleId", }, { - name: "token", type: "address", + name: "token", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "balance", type: "uint256", + name: "balance", }, { - name: "score", type: "uint256", + name: "score", }, { - name: "ruleType", type: "uint8", + name: "ruleType", }, ], - name: "rules", - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/read/getRulesEngineOverride.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/read/getRulesEngineOverride.ts index 5258456d62a..895aa7bf039 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/read/getRulesEngineOverride.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/read/getRulesEngineOverride.ts @@ -8,8 +8,8 @@ export const FN_SELECTOR = "0xa7145eb4" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { - name: "rulesEngineAddress", type: "address", + name: "rulesEngineAddress", }, ] as const; diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/read/getScore.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/read/getScore.ts index 118ea4765b4..362f6ed7cc6 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/read/getScore.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/read/getScore.ts @@ -19,14 +19,14 @@ export type GetScoreParams = { export const FN_SELECTOR = "0xd47875d0" as const; const FN_INPUTS = [ { - name: "_tokenOwner", type: "address", + name: "_tokenOwner", }, ] as const; const FN_OUTPUTS = [ { - name: "score", type: "uint256", + name: "score", }, ] as const; diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/createRuleMultiplicative.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/createRuleMultiplicative.ts index 708421fe18d..ef265952561 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/createRuleMultiplicative.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/createRuleMultiplicative.ts @@ -27,32 +27,32 @@ export type CreateRuleMultiplicativeParams = WithOverrides<{ export const FN_SELECTOR = "0x1e2e9cb5" as const; const FN_INPUTS = [ { + type: "tuple", + name: "rule", components: [ { - name: "token", type: "address", + name: "token", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "scorePerOwnedToken", type: "uint256", + name: "scorePerOwnedToken", }, ], - name: "rule", - type: "tuple", }, ] as const; const FN_OUTPUTS = [ { - name: "ruleId", type: "bytes32", + name: "ruleId", }, ] as const; @@ -155,23 +155,23 @@ export function createRuleMultiplicative( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.rule] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/createRuleThreshold.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/createRuleThreshold.ts index ea16c30dc1f..db7aa40753e 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/createRuleThreshold.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/createRuleThreshold.ts @@ -28,36 +28,36 @@ export type CreateRuleThresholdParams = WithOverrides<{ export const FN_SELECTOR = "0x1022a25e" as const; const FN_INPUTS = [ { + type: "tuple", + name: "rule", components: [ { - name: "token", type: "address", + name: "token", }, { - name: "tokenType", type: "uint8", + name: "tokenType", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, { - name: "balance", type: "uint256", + name: "balance", }, { - name: "score", type: "uint256", + name: "score", }, ], - name: "rule", - type: "tuple", }, ] as const; const FN_OUTPUTS = [ { - name: "ruleId", type: "bytes32", + name: "ruleId", }, ] as const; @@ -156,23 +156,23 @@ export function createRuleThreshold( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.rule] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/deleteRule.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/deleteRule.ts index 31f0de9b86c..bef08963aab 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/deleteRule.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/deleteRule.ts @@ -18,8 +18,8 @@ export type DeleteRuleParams = WithOverrides<{ export const FN_SELECTOR = "0x9d907761" as const; const FN_INPUTS = [ { - name: "ruleId", type: "bytes32", + name: "ruleId", }, ] as const; const FN_OUTPUTS = [] as const; @@ -117,23 +117,23 @@ export function deleteRule( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.ruleId] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/setRulesEngineOverride.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/setRulesEngineOverride.ts index b42aa90b0a3..99d7900505b 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/setRulesEngineOverride.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/setRulesEngineOverride.ts @@ -21,8 +21,8 @@ export type SetRulesEngineOverrideParams = WithOverrides<{ export const FN_SELECTOR = "0x0eb0adb6" as const; const FN_INPUTS = [ { - name: "_rulesEngineAddress", type: "address", + name: "_rulesEngineAddress", }, ] as const; const FN_OUTPUTS = [] as const; @@ -126,23 +126,23 @@ export function setRulesEngineOverride( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.rulesEngineAddress] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/ISignatureAction/events/RequestExecuted.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/ISignatureAction/events/RequestExecuted.ts index 103ba42602c..d3b9ed5fec4 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/ISignatureAction/events/RequestExecuted.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/ISignatureAction/events/RequestExecuted.ts @@ -42,8 +42,8 @@ export function requestExecutedEvent( filters: RequestExecutedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event RequestExecuted(address indexed user, address indexed signer, (uint128 validityStartTimestamp, uint128 validityEndTimestamp, bytes32 uid, bytes data) _req)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/ISignatureAction/read/verify.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/ISignatureAction/read/verify.ts index 416b10cdeb4..e1e39e5fcc0 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/ISignatureAction/read/verify.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/ISignatureAction/read/verify.ts @@ -26,40 +26,40 @@ export type VerifyParams = { export const FN_SELECTOR = "0xc4376dd7" as const; const FN_INPUTS = [ { + type: "tuple", + name: "req", components: [ { - name: "validityStartTimestamp", type: "uint128", + name: "validityStartTimestamp", }, { - name: "validityEndTimestamp", type: "uint128", + name: "validityEndTimestamp", }, { - name: "uid", type: "bytes32", + name: "uid", }, { - name: "data", type: "bytes", + name: "data", }, ], - name: "req", - type: "tuple", }, { - name: "signature", type: "bytes", + name: "signature", }, ] as const; const FN_OUTPUTS = [ { - name: "success", type: "bool", + name: "success", }, { - name: "signer", type: "address", + name: "signer", }, ] as const; diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWFee/read/getFeeInfo.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWFee/read/getFeeInfo.ts index 8ca983f087a..79327e01306 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWFee/read/getFeeInfo.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWFee/read/getFeeInfo.ts @@ -17,22 +17,22 @@ export type GetFeeInfoParams = { export const FN_SELECTOR = "0x85b49ad0" as const; const FN_INPUTS = [ { - name: "_proxy", type: "address", + name: "_proxy", }, { - name: "_type", type: "uint256", + name: "_type", }, ] as const; const FN_OUTPUTS = [ { - name: "recipient", type: "address", + name: "recipient", }, { - name: "bps", type: "uint256", + name: "bps", }, ] as const; diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/events/Added.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/events/Added.ts index a7bd17c4176..19a26f8c345 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/events/Added.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/events/Added.ts @@ -46,8 +46,8 @@ export type AddedEventFilters = Partial<{ */ export function addedEvent(filters: AddedEventFilters = {}) { return prepareEvent({ - filters, signature: "event Added(address indexed deployer, address indexed deployment, uint256 indexed chainId, string metadataUri)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/events/Deleted.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/events/Deleted.ts index 8daf7a56c1b..63fdd50ba9b 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/events/Deleted.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/events/Deleted.ts @@ -46,8 +46,8 @@ export type DeletedEventFilters = Partial<{ */ export function deletedEvent(filters: DeletedEventFilters = {}) { return prepareEvent({ - filters, signature: "event Deleted(address indexed deployer, address indexed deployment, uint256 indexed chainId)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/read/count.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/read/count.ts index d180091e31d..8f0bbfd54ba 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/read/count.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/read/count.ts @@ -16,14 +16,14 @@ export type CountParams = { export const FN_SELECTOR = "0x05d85eda" as const; const FN_INPUTS = [ { - name: "_deployer", type: "address", + name: "_deployer", }, ] as const; const FN_OUTPUTS = [ { - name: "deploymentCount", type: "uint256", + name: "deploymentCount", }, ] as const; diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/read/getAll.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/read/getAll.ts index d2e648e1b3c..2a07856178b 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/read/getAll.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/read/getAll.ts @@ -16,28 +16,28 @@ export type GetAllParams = { export const FN_SELECTOR = "0xeb077342" as const; const FN_INPUTS = [ { - name: "_deployer", type: "address", + name: "_deployer", }, ] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "allDeployments", components: [ { - name: "deploymentAddress", type: "address", + name: "deploymentAddress", }, { - name: "chainId", type: "uint256", + name: "chainId", }, { - name: "metadataURI", type: "string", + name: "metadataURI", }, ], - name: "allDeployments", - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/read/getMetadataUri.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/read/getMetadataUri.ts index 7fa8bc8d256..0a568674e5e 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/read/getMetadataUri.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/read/getMetadataUri.ts @@ -20,18 +20,18 @@ export type GetMetadataUriParams = { export const FN_SELECTOR = "0xf4c2012d" as const; const FN_INPUTS = [ { - name: "_chainId", type: "uint256", + name: "_chainId", }, { - name: "_deployment", type: "address", + name: "_deployment", }, ] as const; const FN_OUTPUTS = [ { - name: "metadataUri", type: "string", + name: "metadataUri", }, ] as const; diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/write/add.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/write/add.ts index 16f44e82e66..e111407965b 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/write/add.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/write/add.ts @@ -27,20 +27,20 @@ export type AddParams = WithOverrides<{ export const FN_SELECTOR = "0x26c5b516" as const; const FN_INPUTS = [ { - name: "_deployer", type: "address", + name: "_deployer", }, { - name: "_deployment", type: "address", + name: "_deployment", }, { - name: "_chainId", type: "uint256", + name: "_chainId", }, { - name: "metadataUri", type: "string", + name: "metadataUri", }, ] as const; const FN_OUTPUTS = [] as const; @@ -150,19 +150,8 @@ export function add( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -173,5 +162,16 @@ export function add( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/write/remove.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/write/remove.ts index 49949360631..29b6635f75e 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/write/remove.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/write/remove.ts @@ -23,16 +23,16 @@ export type RemoveParams = WithOverrides<{ export const FN_SELECTOR = "0x59e5fd04" as const; const FN_INPUTS = [ { - name: "_deployer", type: "address", + name: "_deployer", }, { - name: "_deployment", type: "address", + name: "_deployment", }, { - name: "_chainId", type: "uint256", + name: "_chainId", }, ] as const; const FN_OUTPUTS = [] as const; @@ -138,19 +138,8 @@ export function remove( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -160,5 +149,16 @@ export function remove( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/thirdweb/__generated__/IThirdwebContract/write/setContractURI.ts b/packages/thirdweb/src/extensions/thirdweb/__generated__/IThirdwebContract/write/setContractURI.ts index 005bdc41676..0ba92ee95f7 100644 --- a/packages/thirdweb/src/extensions/thirdweb/__generated__/IThirdwebContract/write/setContractURI.ts +++ b/packages/thirdweb/src/extensions/thirdweb/__generated__/IThirdwebContract/write/setContractURI.ts @@ -18,8 +18,8 @@ export type SetContractURIParams = WithOverrides<{ export const FN_SELECTOR = "0x938e3d7b" as const; const FN_INPUTS = [ { - name: "_uri", type: "string", + name: "_uri", }, ] as const; const FN_OUTPUTS = [] as const; @@ -117,23 +117,23 @@ export function setContractURI( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.uri] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/Approval.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/Approval.ts new file mode 100644 index 00000000000..5228963dd34 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/Approval.ts @@ -0,0 +1,47 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "Approval" event. + */ +export type ApprovalEventFilters = Partial<{ + owner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "owner"; + indexed: true; + }>; + spender: AbiParameterToPrimitiveType<{ + type: "address"; + name: "spender"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the Approval event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { approvalEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * approvalEvent({ + * owner: ..., + * spender: ..., + * }) + * ], + * }); + * ``` + */ +export function approvalEvent(filters: ApprovalEventFilters = {}) { + return prepareEvent({ + signature: + "event Approval(address indexed owner, address indexed spender, uint256 amount)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/ContractURIUpdated.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/ContractURIUpdated.ts new file mode 100644 index 00000000000..7bfbc0c16fc --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/ContractURIUpdated.ts @@ -0,0 +1,24 @@ +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Creates an event object for the ContractURIUpdated event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { contractURIUpdatedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * contractURIUpdatedEvent() + * ], + * }); + * ``` + */ +export function contractURIUpdatedEvent() { + return prepareEvent({ + signature: "event ContractURIUpdated()", + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/Initialized.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/Initialized.ts new file mode 100644 index 00000000000..1061653b3d4 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/Initialized.ts @@ -0,0 +1,24 @@ +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Creates an event object for the Initialized event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { initializedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * initializedEvent() + * ], + * }); + * ``` + */ +export function initializedEvent() { + return prepareEvent({ + signature: "event Initialized(uint64 version)", + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/OwnershipHandoverCanceled.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/OwnershipHandoverCanceled.ts new file mode 100644 index 00000000000..39a285efa35 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/OwnershipHandoverCanceled.ts @@ -0,0 +1,42 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "OwnershipHandoverCanceled" event. + */ +export type OwnershipHandoverCanceledEventFilters = Partial<{ + pendingOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "pendingOwner"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the OwnershipHandoverCanceled event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { ownershipHandoverCanceledEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * ownershipHandoverCanceledEvent({ + * pendingOwner: ..., + * }) + * ], + * }); + * ``` + */ +export function ownershipHandoverCanceledEvent( + filters: OwnershipHandoverCanceledEventFilters = {}, +) { + return prepareEvent({ + signature: "event OwnershipHandoverCanceled(address indexed pendingOwner)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/OwnershipHandoverRequested.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/OwnershipHandoverRequested.ts new file mode 100644 index 00000000000..75704cff765 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/OwnershipHandoverRequested.ts @@ -0,0 +1,42 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "OwnershipHandoverRequested" event. + */ +export type OwnershipHandoverRequestedEventFilters = Partial<{ + pendingOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "pendingOwner"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the OwnershipHandoverRequested event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { ownershipHandoverRequestedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * ownershipHandoverRequestedEvent({ + * pendingOwner: ..., + * }) + * ], + * }); + * ``` + */ +export function ownershipHandoverRequestedEvent( + filters: OwnershipHandoverRequestedEventFilters = {}, +) { + return prepareEvent({ + signature: "event OwnershipHandoverRequested(address indexed pendingOwner)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/OwnershipTransferred.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/OwnershipTransferred.ts new file mode 100644 index 00000000000..91dcf136312 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/OwnershipTransferred.ts @@ -0,0 +1,49 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "OwnershipTransferred" event. + */ +export type OwnershipTransferredEventFilters = Partial<{ + oldOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "oldOwner"; + indexed: true; + }>; + newOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "newOwner"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the OwnershipTransferred event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { ownershipTransferredEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * ownershipTransferredEvent({ + * oldOwner: ..., + * newOwner: ..., + * }) + * ], + * }); + * ``` + */ +export function ownershipTransferredEvent( + filters: OwnershipTransferredEventFilters = {}, +) { + return prepareEvent({ + signature: + "event OwnershipTransferred(address indexed oldOwner, address indexed newOwner)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/Transfer.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/Transfer.ts new file mode 100644 index 00000000000..c74afb3f164 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/events/Transfer.ts @@ -0,0 +1,47 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "Transfer" event. + */ +export type TransferEventFilters = Partial<{ + from: AbiParameterToPrimitiveType<{ + type: "address"; + name: "from"; + indexed: true; + }>; + to: AbiParameterToPrimitiveType<{ + type: "address"; + name: "to"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the Transfer event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { transferEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * transferEvent({ + * from: ..., + * to: ..., + * }) + * ], + * }); + * ``` + */ +export function transferEvent(filters: TransferEventFilters = {}) { + return prepareEvent({ + signature: + "event Transfer(address indexed from, address indexed to, uint256 amount)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/DOMAIN_SEPARATOR.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/DOMAIN_SEPARATOR.ts new file mode 100644 index 00000000000..7eec0943d4d --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/DOMAIN_SEPARATOR.ts @@ -0,0 +1,70 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0x3644e515" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "bytes32", + name: "result", + }, +] as const; + +/** + * Checks if the `DOMAIN_SEPARATOR` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `DOMAIN_SEPARATOR` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isDOMAIN_SEPARATORSupported } from "thirdweb/extensions/tokens"; + * const supported = isDOMAIN_SEPARATORSupported(["0x..."]); + * ``` + */ +export function isDOMAIN_SEPARATORSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the DOMAIN_SEPARATOR function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeDOMAIN_SEPARATORResult } from "thirdweb/extensions/tokens"; + * const result = decodeDOMAIN_SEPARATORResultResult("..."); + * ``` + */ +export function decodeDOMAIN_SEPARATORResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "DOMAIN_SEPARATOR" function on the contract. + * @param options - The options for the DOMAIN_SEPARATOR function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { DOMAIN_SEPARATOR } from "thirdweb/extensions/tokens"; + * + * const result = await DOMAIN_SEPARATOR({ + * contract, + * }); + * + * ``` + */ +export async function DOMAIN_SEPARATOR(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/allowance.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/allowance.ts new file mode 100644 index 00000000000..854c7b91223 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/allowance.ts @@ -0,0 +1,134 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "allowance" function. + */ +export type AllowanceParams = { + owner: AbiParameterToPrimitiveType<{ type: "address"; name: "owner" }>; + spender: AbiParameterToPrimitiveType<{ type: "address"; name: "spender" }>; +}; + +export const FN_SELECTOR = "0xdd62ed3e" as const; +const FN_INPUTS = [ + { + type: "address", + name: "owner", + }, + { + type: "address", + name: "spender", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "uint256", + name: "result", + }, +] as const; + +/** + * Checks if the `allowance` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `allowance` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isAllowanceSupported } from "thirdweb/extensions/tokens"; + * const supported = isAllowanceSupported(["0x..."]); + * ``` + */ +export function isAllowanceSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "allowance" function. + * @param options - The options for the allowance function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeAllowanceParams } from "thirdweb/extensions/tokens"; + * const result = encodeAllowanceParams({ + * owner: ..., + * spender: ..., + * }); + * ``` + */ +export function encodeAllowanceParams(options: AllowanceParams) { + return encodeAbiParameters(FN_INPUTS, [options.owner, options.spender]); +} + +/** + * Encodes the "allowance" function into a Hex string with its parameters. + * @param options - The options for the allowance function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeAllowance } from "thirdweb/extensions/tokens"; + * const result = encodeAllowance({ + * owner: ..., + * spender: ..., + * }); + * ``` + */ +export function encodeAllowance(options: AllowanceParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeAllowanceParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the allowance function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeAllowanceResult } from "thirdweb/extensions/tokens"; + * const result = decodeAllowanceResultResult("..."); + * ``` + */ +export function decodeAllowanceResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "allowance" function on the contract. + * @param options - The options for the allowance function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { allowance } from "thirdweb/extensions/tokens"; + * + * const result = await allowance({ + * contract, + * owner: ..., + * spender: ..., + * }); + * + * ``` + */ +export async function allowance( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.owner, options.spender], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/balanceOf.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/balanceOf.ts new file mode 100644 index 00000000000..d6eb079f204 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/balanceOf.ts @@ -0,0 +1,126 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "balanceOf" function. + */ +export type BalanceOfParams = { + owner: AbiParameterToPrimitiveType<{ type: "address"; name: "owner" }>; +}; + +export const FN_SELECTOR = "0x70a08231" as const; +const FN_INPUTS = [ + { + type: "address", + name: "owner", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "uint256", + name: "result", + }, +] as const; + +/** + * Checks if the `balanceOf` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `balanceOf` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isBalanceOfSupported } from "thirdweb/extensions/tokens"; + * const supported = isBalanceOfSupported(["0x..."]); + * ``` + */ +export function isBalanceOfSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "balanceOf" function. + * @param options - The options for the balanceOf function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeBalanceOfParams } from "thirdweb/extensions/tokens"; + * const result = encodeBalanceOfParams({ + * owner: ..., + * }); + * ``` + */ +export function encodeBalanceOfParams(options: BalanceOfParams) { + return encodeAbiParameters(FN_INPUTS, [options.owner]); +} + +/** + * Encodes the "balanceOf" function into a Hex string with its parameters. + * @param options - The options for the balanceOf function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeBalanceOf } from "thirdweb/extensions/tokens"; + * const result = encodeBalanceOf({ + * owner: ..., + * }); + * ``` + */ +export function encodeBalanceOf(options: BalanceOfParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeBalanceOfParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the balanceOf function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeBalanceOfResult } from "thirdweb/extensions/tokens"; + * const result = decodeBalanceOfResultResult("..."); + * ``` + */ +export function decodeBalanceOfResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "balanceOf" function on the contract. + * @param options - The options for the balanceOf function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { balanceOf } from "thirdweb/extensions/tokens"; + * + * const result = await balanceOf({ + * contract, + * owner: ..., + * }); + * + * ``` + */ +export async function balanceOf( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.owner], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/contractURI.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/contractURI.ts new file mode 100644 index 00000000000..850e4e88ec6 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/contractURI.ts @@ -0,0 +1,69 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0xe8a3d485" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "string", + }, +] as const; + +/** + * Checks if the `contractURI` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `contractURI` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isContractURISupported } from "thirdweb/extensions/tokens"; + * const supported = isContractURISupported(["0x..."]); + * ``` + */ +export function isContractURISupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the contractURI function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeContractURIResult } from "thirdweb/extensions/tokens"; + * const result = decodeContractURIResultResult("..."); + * ``` + */ +export function decodeContractURIResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "contractURI" function on the contract. + * @param options - The options for the contractURI function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { contractURI } from "thirdweb/extensions/tokens"; + * + * const result = await contractURI({ + * contract, + * }); + * + * ``` + */ +export async function contractURI(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/decimals.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/decimals.ts new file mode 100644 index 00000000000..fd52e1e495a --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/decimals.ts @@ -0,0 +1,69 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0x313ce567" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "uint8", + }, +] as const; + +/** + * Checks if the `decimals` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `decimals` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isDecimalsSupported } from "thirdweb/extensions/tokens"; + * const supported = isDecimalsSupported(["0x..."]); + * ``` + */ +export function isDecimalsSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the decimals function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeDecimalsResult } from "thirdweb/extensions/tokens"; + * const result = decodeDecimalsResultResult("..."); + * ``` + */ +export function decodeDecimalsResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "decimals" function on the contract. + * @param options - The options for the decimals function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { decimals } from "thirdweb/extensions/tokens"; + * + * const result = await decimals({ + * contract, + * }); + * + * ``` + */ +export async function decimals(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/name.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/name.ts new file mode 100644 index 00000000000..1911e1e6081 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/name.ts @@ -0,0 +1,69 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0x06fdde03" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "string", + }, +] as const; + +/** + * Checks if the `name` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `name` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isNameSupported } from "thirdweb/extensions/tokens"; + * const supported = isNameSupported(["0x..."]); + * ``` + */ +export function isNameSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the name function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeNameResult } from "thirdweb/extensions/tokens"; + * const result = decodeNameResultResult("..."); + * ``` + */ +export function decodeNameResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "name" function on the contract. + * @param options - The options for the name function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { name } from "thirdweb/extensions/tokens"; + * + * const result = await name({ + * contract, + * }); + * + * ``` + */ +export async function name(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/nonces.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/nonces.ts new file mode 100644 index 00000000000..d8c997cfa5d --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/nonces.ts @@ -0,0 +1,122 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "nonces" function. + */ +export type NoncesParams = { + owner: AbiParameterToPrimitiveType<{ type: "address"; name: "owner" }>; +}; + +export const FN_SELECTOR = "0x7ecebe00" as const; +const FN_INPUTS = [ + { + type: "address", + name: "owner", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "uint256", + name: "result", + }, +] as const; + +/** + * Checks if the `nonces` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `nonces` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isNoncesSupported } from "thirdweb/extensions/tokens"; + * const supported = isNoncesSupported(["0x..."]); + * ``` + */ +export function isNoncesSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "nonces" function. + * @param options - The options for the nonces function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeNoncesParams } from "thirdweb/extensions/tokens"; + * const result = encodeNoncesParams({ + * owner: ..., + * }); + * ``` + */ +export function encodeNoncesParams(options: NoncesParams) { + return encodeAbiParameters(FN_INPUTS, [options.owner]); +} + +/** + * Encodes the "nonces" function into a Hex string with its parameters. + * @param options - The options for the nonces function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeNonces } from "thirdweb/extensions/tokens"; + * const result = encodeNonces({ + * owner: ..., + * }); + * ``` + */ +export function encodeNonces(options: NoncesParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeNoncesParams(options).slice(2)) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the nonces function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeNoncesResult } from "thirdweb/extensions/tokens"; + * const result = decodeNoncesResultResult("..."); + * ``` + */ +export function decodeNoncesResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "nonces" function on the contract. + * @param options - The options for the nonces function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { nonces } from "thirdweb/extensions/tokens"; + * + * const result = await nonces({ + * contract, + * owner: ..., + * }); + * + * ``` + */ +export async function nonces(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.owner], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/owner.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/owner.ts new file mode 100644 index 00000000000..b0d99f234f0 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/owner.ts @@ -0,0 +1,70 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0x8da5cb5b" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "address", + name: "result", + }, +] as const; + +/** + * Checks if the `owner` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `owner` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isOwnerSupported } from "thirdweb/extensions/tokens"; + * const supported = isOwnerSupported(["0x..."]); + * ``` + */ +export function isOwnerSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the owner function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeOwnerResult } from "thirdweb/extensions/tokens"; + * const result = decodeOwnerResultResult("..."); + * ``` + */ +export function decodeOwnerResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "owner" function on the contract. + * @param options - The options for the owner function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { owner } from "thirdweb/extensions/tokens"; + * + * const result = await owner({ + * contract, + * }); + * + * ``` + */ +export async function owner(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/ownershipHandoverExpiresAt.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/ownershipHandoverExpiresAt.ts new file mode 100644 index 00000000000..0313d621929 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/ownershipHandoverExpiresAt.ts @@ -0,0 +1,135 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "ownershipHandoverExpiresAt" function. + */ +export type OwnershipHandoverExpiresAtParams = { + pendingOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "pendingOwner"; + }>; +}; + +export const FN_SELECTOR = "0xfee81cf4" as const; +const FN_INPUTS = [ + { + type: "address", + name: "pendingOwner", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "uint256", + name: "result", + }, +] as const; + +/** + * Checks if the `ownershipHandoverExpiresAt` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `ownershipHandoverExpiresAt` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isOwnershipHandoverExpiresAtSupported } from "thirdweb/extensions/tokens"; + * const supported = isOwnershipHandoverExpiresAtSupported(["0x..."]); + * ``` + */ +export function isOwnershipHandoverExpiresAtSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "ownershipHandoverExpiresAt" function. + * @param options - The options for the ownershipHandoverExpiresAt function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeOwnershipHandoverExpiresAtParams } from "thirdweb/extensions/tokens"; + * const result = encodeOwnershipHandoverExpiresAtParams({ + * pendingOwner: ..., + * }); + * ``` + */ +export function encodeOwnershipHandoverExpiresAtParams( + options: OwnershipHandoverExpiresAtParams, +) { + return encodeAbiParameters(FN_INPUTS, [options.pendingOwner]); +} + +/** + * Encodes the "ownershipHandoverExpiresAt" function into a Hex string with its parameters. + * @param options - The options for the ownershipHandoverExpiresAt function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeOwnershipHandoverExpiresAt } from "thirdweb/extensions/tokens"; + * const result = encodeOwnershipHandoverExpiresAt({ + * pendingOwner: ..., + * }); + * ``` + */ +export function encodeOwnershipHandoverExpiresAt( + options: OwnershipHandoverExpiresAtParams, +) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeOwnershipHandoverExpiresAtParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the ownershipHandoverExpiresAt function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeOwnershipHandoverExpiresAtResult } from "thirdweb/extensions/tokens"; + * const result = decodeOwnershipHandoverExpiresAtResultResult("..."); + * ``` + */ +export function decodeOwnershipHandoverExpiresAtResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "ownershipHandoverExpiresAt" function on the contract. + * @param options - The options for the ownershipHandoverExpiresAt function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { ownershipHandoverExpiresAt } from "thirdweb/extensions/tokens"; + * + * const result = await ownershipHandoverExpiresAt({ + * contract, + * pendingOwner: ..., + * }); + * + * ``` + */ +export async function ownershipHandoverExpiresAt( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.pendingOwner], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/supportsInterface.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/supportsInterface.ts new file mode 100644 index 00000000000..ece4beb6db0 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/supportsInterface.ts @@ -0,0 +1,130 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "supportsInterface" function. + */ +export type SupportsInterfaceParams = { + interfaceId: AbiParameterToPrimitiveType<{ + type: "bytes4"; + name: "interfaceId"; + }>; +}; + +export const FN_SELECTOR = "0x01ffc9a7" as const; +const FN_INPUTS = [ + { + type: "bytes4", + name: "interfaceId", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "bool", + }, +] as const; + +/** + * Checks if the `supportsInterface` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `supportsInterface` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isSupportsInterfaceSupported } from "thirdweb/extensions/tokens"; + * const supported = isSupportsInterfaceSupported(["0x..."]); + * ``` + */ +export function isSupportsInterfaceSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "supportsInterface" function. + * @param options - The options for the supportsInterface function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeSupportsInterfaceParams } from "thirdweb/extensions/tokens"; + * const result = encodeSupportsInterfaceParams({ + * interfaceId: ..., + * }); + * ``` + */ +export function encodeSupportsInterfaceParams( + options: SupportsInterfaceParams, +) { + return encodeAbiParameters(FN_INPUTS, [options.interfaceId]); +} + +/** + * Encodes the "supportsInterface" function into a Hex string with its parameters. + * @param options - The options for the supportsInterface function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeSupportsInterface } from "thirdweb/extensions/tokens"; + * const result = encodeSupportsInterface({ + * interfaceId: ..., + * }); + * ``` + */ +export function encodeSupportsInterface(options: SupportsInterfaceParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeSupportsInterfaceParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the supportsInterface function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeSupportsInterfaceResult } from "thirdweb/extensions/tokens"; + * const result = decodeSupportsInterfaceResultResult("..."); + * ``` + */ +export function decodeSupportsInterfaceResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "supportsInterface" function on the contract. + * @param options - The options for the supportsInterface function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { supportsInterface } from "thirdweb/extensions/tokens"; + * + * const result = await supportsInterface({ + * contract, + * interfaceId: ..., + * }); + * + * ``` + */ +export async function supportsInterface( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.interfaceId], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/symbol.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/symbol.ts new file mode 100644 index 00000000000..664f624447d --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/symbol.ts @@ -0,0 +1,69 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0x95d89b41" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "string", + }, +] as const; + +/** + * Checks if the `symbol` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `symbol` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isSymbolSupported } from "thirdweb/extensions/tokens"; + * const supported = isSymbolSupported(["0x..."]); + * ``` + */ +export function isSymbolSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the symbol function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeSymbolResult } from "thirdweb/extensions/tokens"; + * const result = decodeSymbolResultResult("..."); + * ``` + */ +export function decodeSymbolResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "symbol" function on the contract. + * @param options - The options for the symbol function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { symbol } from "thirdweb/extensions/tokens"; + * + * const result = await symbol({ + * contract, + * }); + * + * ``` + */ +export async function symbol(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/totalSupply.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/totalSupply.ts new file mode 100644 index 00000000000..3f72b1256d8 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/read/totalSupply.ts @@ -0,0 +1,70 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0x18160ddd" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "uint256", + name: "result", + }, +] as const; + +/** + * Checks if the `totalSupply` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `totalSupply` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isTotalSupplySupported } from "thirdweb/extensions/tokens"; + * const supported = isTotalSupplySupported(["0x..."]); + * ``` + */ +export function isTotalSupplySupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the totalSupply function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeTotalSupplyResult } from "thirdweb/extensions/tokens"; + * const result = decodeTotalSupplyResultResult("..."); + * ``` + */ +export function decodeTotalSupplyResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "totalSupply" function on the contract. + * @param options - The options for the totalSupply function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { totalSupply } from "thirdweb/extensions/tokens"; + * + * const result = await totalSupply({ + * contract, + * }); + * + * ``` + */ +export async function totalSupply(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/approve.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/approve.ts new file mode 100644 index 00000000000..97aa7f770aa --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/approve.ts @@ -0,0 +1,149 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "approve" function. + */ +export type ApproveParams = WithOverrides<{ + spender: AbiParameterToPrimitiveType<{ type: "address"; name: "spender" }>; + amount: AbiParameterToPrimitiveType<{ type: "uint256"; name: "amount" }>; +}>; + +export const FN_SELECTOR = "0x095ea7b3" as const; +const FN_INPUTS = [ + { + type: "address", + name: "spender", + }, + { + type: "uint256", + name: "amount", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "bool", + }, +] as const; + +/** + * Checks if the `approve` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `approve` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isApproveSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isApproveSupported(["0x..."]); + * ``` + */ +export function isApproveSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "approve" function. + * @param options - The options for the approve function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeApproveParams } from "thirdweb/extensions/tokens"; + * const result = encodeApproveParams({ + * spender: ..., + * amount: ..., + * }); + * ``` + */ +export function encodeApproveParams(options: ApproveParams) { + return encodeAbiParameters(FN_INPUTS, [options.spender, options.amount]); +} + +/** + * Encodes the "approve" function into a Hex string with its parameters. + * @param options - The options for the approve function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeApprove } from "thirdweb/extensions/tokens"; + * const result = encodeApprove({ + * spender: ..., + * amount: ..., + * }); + * ``` + */ +export function encodeApprove(options: ApproveParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeApproveParams(options).slice(2)) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "approve" function on the contract. + * @param options - The options for the "approve" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { approve } from "thirdweb/extensions/tokens"; + * + * const transaction = approve({ + * contract, + * spender: ..., + * amount: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function approve( + options: BaseTransactionOptions< + | ApproveParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.spender, resolvedOptions.amount] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/burn.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/burn.ts new file mode 100644 index 00000000000..4878da12849 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/burn.ts @@ -0,0 +1,137 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "burn" function. + */ +export type BurnParams = WithOverrides<{ + amount: AbiParameterToPrimitiveType<{ type: "uint256"; name: "amount" }>; +}>; + +export const FN_SELECTOR = "0x42966c68" as const; +const FN_INPUTS = [ + { + type: "uint256", + name: "amount", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `burn` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `burn` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isBurnSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isBurnSupported(["0x..."]); + * ``` + */ +export function isBurnSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "burn" function. + * @param options - The options for the burn function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeBurnParams } from "thirdweb/extensions/tokens"; + * const result = encodeBurnParams({ + * amount: ..., + * }); + * ``` + */ +export function encodeBurnParams(options: BurnParams) { + return encodeAbiParameters(FN_INPUTS, [options.amount]); +} + +/** + * Encodes the "burn" function into a Hex string with its parameters. + * @param options - The options for the burn function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeBurn } from "thirdweb/extensions/tokens"; + * const result = encodeBurn({ + * amount: ..., + * }); + * ``` + */ +export function encodeBurn(options: BurnParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeBurnParams(options).slice(2)) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "burn" function on the contract. + * @param options - The options for the "burn" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { burn } from "thirdweb/extensions/tokens"; + * + * const transaction = burn({ + * contract, + * amount: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function burn( + options: BaseTransactionOptions< + | BurnParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.amount] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/burnFrom.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/burnFrom.ts new file mode 100644 index 00000000000..74d2984f38e --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/burnFrom.ts @@ -0,0 +1,145 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "burnFrom" function. + */ +export type BurnFromParams = WithOverrides<{ + from: AbiParameterToPrimitiveType<{ type: "address"; name: "from" }>; + amount: AbiParameterToPrimitiveType<{ type: "uint256"; name: "amount" }>; +}>; + +export const FN_SELECTOR = "0x79cc6790" as const; +const FN_INPUTS = [ + { + type: "address", + name: "from", + }, + { + type: "uint256", + name: "amount", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `burnFrom` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `burnFrom` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isBurnFromSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isBurnFromSupported(["0x..."]); + * ``` + */ +export function isBurnFromSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "burnFrom" function. + * @param options - The options for the burnFrom function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeBurnFromParams } from "thirdweb/extensions/tokens"; + * const result = encodeBurnFromParams({ + * from: ..., + * amount: ..., + * }); + * ``` + */ +export function encodeBurnFromParams(options: BurnFromParams) { + return encodeAbiParameters(FN_INPUTS, [options.from, options.amount]); +} + +/** + * Encodes the "burnFrom" function into a Hex string with its parameters. + * @param options - The options for the burnFrom function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeBurnFrom } from "thirdweb/extensions/tokens"; + * const result = encodeBurnFrom({ + * from: ..., + * amount: ..., + * }); + * ``` + */ +export function encodeBurnFrom(options: BurnFromParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeBurnFromParams(options).slice(2)) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "burnFrom" function on the contract. + * @param options - The options for the "burnFrom" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { burnFrom } from "thirdweb/extensions/tokens"; + * + * const transaction = burnFrom({ + * contract, + * from: ..., + * amount: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function burnFrom( + options: BaseTransactionOptions< + | BurnFromParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.from, resolvedOptions.amount] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/cancelOwnershipHandover.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/cancelOwnershipHandover.ts new file mode 100644 index 00000000000..dcbc74fc6af --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/cancelOwnershipHandover.ts @@ -0,0 +1,52 @@ +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; + +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; + +export const FN_SELECTOR = "0x54d1f13d" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `cancelOwnershipHandover` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `cancelOwnershipHandover` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isCancelOwnershipHandoverSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isCancelOwnershipHandoverSupported(["0x..."]); + * ``` + */ +export function isCancelOwnershipHandoverSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Prepares a transaction to call the "cancelOwnershipHandover" function on the contract. + * @param options - The options for the "cancelOwnershipHandover" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { cancelOwnershipHandover } from "thirdweb/extensions/tokens"; + * + * const transaction = cancelOwnershipHandover(); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function cancelOwnershipHandover(options: BaseTransactionOptions) { + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/completeOwnershipHandover.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/completeOwnershipHandover.ts new file mode 100644 index 00000000000..21cad20a483 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/completeOwnershipHandover.ts @@ -0,0 +1,148 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "completeOwnershipHandover" function. + */ +export type CompleteOwnershipHandoverParams = WithOverrides<{ + pendingOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "pendingOwner"; + }>; +}>; + +export const FN_SELECTOR = "0xf04e283e" as const; +const FN_INPUTS = [ + { + type: "address", + name: "pendingOwner", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `completeOwnershipHandover` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `completeOwnershipHandover` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isCompleteOwnershipHandoverSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isCompleteOwnershipHandoverSupported(["0x..."]); + * ``` + */ +export function isCompleteOwnershipHandoverSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "completeOwnershipHandover" function. + * @param options - The options for the completeOwnershipHandover function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeCompleteOwnershipHandoverParams } from "thirdweb/extensions/tokens"; + * const result = encodeCompleteOwnershipHandoverParams({ + * pendingOwner: ..., + * }); + * ``` + */ +export function encodeCompleteOwnershipHandoverParams( + options: CompleteOwnershipHandoverParams, +) { + return encodeAbiParameters(FN_INPUTS, [options.pendingOwner]); +} + +/** + * Encodes the "completeOwnershipHandover" function into a Hex string with its parameters. + * @param options - The options for the completeOwnershipHandover function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeCompleteOwnershipHandover } from "thirdweb/extensions/tokens"; + * const result = encodeCompleteOwnershipHandover({ + * pendingOwner: ..., + * }); + * ``` + */ +export function encodeCompleteOwnershipHandover( + options: CompleteOwnershipHandoverParams, +) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeCompleteOwnershipHandoverParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "completeOwnershipHandover" function on the contract. + * @param options - The options for the "completeOwnershipHandover" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { completeOwnershipHandover } from "thirdweb/extensions/tokens"; + * + * const transaction = completeOwnershipHandover({ + * contract, + * pendingOwner: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function completeOwnershipHandover( + options: BaseTransactionOptions< + | CompleteOwnershipHandoverParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.pendingOwner] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/initialize.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/initialize.ts new file mode 100644 index 00000000000..d555ae6d2fb --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/initialize.ts @@ -0,0 +1,189 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "initialize" function. + */ +export type InitializeParams = WithOverrides<{ + name: AbiParameterToPrimitiveType<{ type: "string"; name: "_name" }>; + symbol: AbiParameterToPrimitiveType<{ type: "string"; name: "_symbol" }>; + contractURI: AbiParameterToPrimitiveType<{ + type: "string"; + name: "_contractURI"; + }>; + maxSupply: AbiParameterToPrimitiveType<{ + type: "uint256"; + name: "_maxSupply"; + }>; + owner: AbiParameterToPrimitiveType<{ type: "address"; name: "_owner" }>; +}>; + +export const FN_SELECTOR = "0x30a8ff4e" as const; +const FN_INPUTS = [ + { + type: "string", + name: "_name", + }, + { + type: "string", + name: "_symbol", + }, + { + type: "string", + name: "_contractURI", + }, + { + type: "uint256", + name: "_maxSupply", + }, + { + type: "address", + name: "_owner", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `initialize` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `initialize` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isInitializeSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isInitializeSupported(["0x..."]); + * ``` + */ +export function isInitializeSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "initialize" function. + * @param options - The options for the initialize function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeInitializeParams } from "thirdweb/extensions/tokens"; + * const result = encodeInitializeParams({ + * name: ..., + * symbol: ..., + * contractURI: ..., + * maxSupply: ..., + * owner: ..., + * }); + * ``` + */ +export function encodeInitializeParams(options: InitializeParams) { + return encodeAbiParameters(FN_INPUTS, [ + options.name, + options.symbol, + options.contractURI, + options.maxSupply, + options.owner, + ]); +} + +/** + * Encodes the "initialize" function into a Hex string with its parameters. + * @param options - The options for the initialize function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeInitialize } from "thirdweb/extensions/tokens"; + * const result = encodeInitialize({ + * name: ..., + * symbol: ..., + * contractURI: ..., + * maxSupply: ..., + * owner: ..., + * }); + * ``` + */ +export function encodeInitialize(options: InitializeParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeInitializeParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "initialize" function on the contract. + * @param options - The options for the "initialize" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { initialize } from "thirdweb/extensions/tokens"; + * + * const transaction = initialize({ + * contract, + * name: ..., + * symbol: ..., + * contractURI: ..., + * maxSupply: ..., + * owner: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function initialize( + options: BaseTransactionOptions< + | InitializeParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [ + resolvedOptions.name, + resolvedOptions.symbol, + resolvedOptions.contractURI, + resolvedOptions.maxSupply, + resolvedOptions.owner, + ] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/permit.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/permit.ts new file mode 100644 index 00000000000..54478293ecb --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/permit.ts @@ -0,0 +1,201 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "permit" function. + */ +export type PermitParams = WithOverrides<{ + owner: AbiParameterToPrimitiveType<{ type: "address"; name: "owner" }>; + spender: AbiParameterToPrimitiveType<{ type: "address"; name: "spender" }>; + value: AbiParameterToPrimitiveType<{ type: "uint256"; name: "value" }>; + deadline: AbiParameterToPrimitiveType<{ type: "uint256"; name: "deadline" }>; + v: AbiParameterToPrimitiveType<{ type: "uint8"; name: "v" }>; + r: AbiParameterToPrimitiveType<{ type: "bytes32"; name: "r" }>; + s: AbiParameterToPrimitiveType<{ type: "bytes32"; name: "s" }>; +}>; + +export const FN_SELECTOR = "0xd505accf" as const; +const FN_INPUTS = [ + { + type: "address", + name: "owner", + }, + { + type: "address", + name: "spender", + }, + { + type: "uint256", + name: "value", + }, + { + type: "uint256", + name: "deadline", + }, + { + type: "uint8", + name: "v", + }, + { + type: "bytes32", + name: "r", + }, + { + type: "bytes32", + name: "s", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `permit` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `permit` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isPermitSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isPermitSupported(["0x..."]); + * ``` + */ +export function isPermitSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "permit" function. + * @param options - The options for the permit function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodePermitParams } from "thirdweb/extensions/tokens"; + * const result = encodePermitParams({ + * owner: ..., + * spender: ..., + * value: ..., + * deadline: ..., + * v: ..., + * r: ..., + * s: ..., + * }); + * ``` + */ +export function encodePermitParams(options: PermitParams) { + return encodeAbiParameters(FN_INPUTS, [ + options.owner, + options.spender, + options.value, + options.deadline, + options.v, + options.r, + options.s, + ]); +} + +/** + * Encodes the "permit" function into a Hex string with its parameters. + * @param options - The options for the permit function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodePermit } from "thirdweb/extensions/tokens"; + * const result = encodePermit({ + * owner: ..., + * spender: ..., + * value: ..., + * deadline: ..., + * v: ..., + * r: ..., + * s: ..., + * }); + * ``` + */ +export function encodePermit(options: PermitParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodePermitParams(options).slice(2)) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "permit" function on the contract. + * @param options - The options for the "permit" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { permit } from "thirdweb/extensions/tokens"; + * + * const transaction = permit({ + * contract, + * owner: ..., + * spender: ..., + * value: ..., + * deadline: ..., + * v: ..., + * r: ..., + * s: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function permit( + options: BaseTransactionOptions< + | PermitParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [ + resolvedOptions.owner, + resolvedOptions.spender, + resolvedOptions.value, + resolvedOptions.deadline, + resolvedOptions.v, + resolvedOptions.r, + resolvedOptions.s, + ] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/renounceOwnership.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/renounceOwnership.ts new file mode 100644 index 00000000000..622553c35e4 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/renounceOwnership.ts @@ -0,0 +1,50 @@ +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; + +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; + +export const FN_SELECTOR = "0x715018a6" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `renounceOwnership` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `renounceOwnership` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isRenounceOwnershipSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isRenounceOwnershipSupported(["0x..."]); + * ``` + */ +export function isRenounceOwnershipSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Prepares a transaction to call the "renounceOwnership" function on the contract. + * @param options - The options for the "renounceOwnership" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { renounceOwnership } from "thirdweb/extensions/tokens"; + * + * const transaction = renounceOwnership(); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function renounceOwnership(options: BaseTransactionOptions) { + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/requestOwnershipHandover.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/requestOwnershipHandover.ts new file mode 100644 index 00000000000..91b716f38a8 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/requestOwnershipHandover.ts @@ -0,0 +1,52 @@ +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; + +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; + +export const FN_SELECTOR = "0x25692962" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `requestOwnershipHandover` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `requestOwnershipHandover` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isRequestOwnershipHandoverSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isRequestOwnershipHandoverSupported(["0x..."]); + * ``` + */ +export function isRequestOwnershipHandoverSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Prepares a transaction to call the "requestOwnershipHandover" function on the contract. + * @param options - The options for the "requestOwnershipHandover" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { requestOwnershipHandover } from "thirdweb/extensions/tokens"; + * + * const transaction = requestOwnershipHandover(); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function requestOwnershipHandover(options: BaseTransactionOptions) { + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/setContractURI.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/setContractURI.ts new file mode 100644 index 00000000000..dbaa63896c0 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/setContractURI.ts @@ -0,0 +1,142 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "setContractURI" function. + */ +export type SetContractURIParams = WithOverrides<{ + contractURI: AbiParameterToPrimitiveType<{ + type: "string"; + name: "_contractURI"; + }>; +}>; + +export const FN_SELECTOR = "0x938e3d7b" as const; +const FN_INPUTS = [ + { + type: "string", + name: "_contractURI", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `setContractURI` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `setContractURI` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isSetContractURISupported } from "thirdweb/extensions/tokens"; + * + * const supported = isSetContractURISupported(["0x..."]); + * ``` + */ +export function isSetContractURISupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "setContractURI" function. + * @param options - The options for the setContractURI function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeSetContractURIParams } from "thirdweb/extensions/tokens"; + * const result = encodeSetContractURIParams({ + * contractURI: ..., + * }); + * ``` + */ +export function encodeSetContractURIParams(options: SetContractURIParams) { + return encodeAbiParameters(FN_INPUTS, [options.contractURI]); +} + +/** + * Encodes the "setContractURI" function into a Hex string with its parameters. + * @param options - The options for the setContractURI function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeSetContractURI } from "thirdweb/extensions/tokens"; + * const result = encodeSetContractURI({ + * contractURI: ..., + * }); + * ``` + */ +export function encodeSetContractURI(options: SetContractURIParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeSetContractURIParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "setContractURI" function on the contract. + * @param options - The options for the "setContractURI" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { setContractURI } from "thirdweb/extensions/tokens"; + * + * const transaction = setContractURI({ + * contract, + * contractURI: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function setContractURI( + options: BaseTransactionOptions< + | SetContractURIParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.contractURI] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/transfer.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/transfer.ts new file mode 100644 index 00000000000..a78237f2dc8 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/transfer.ts @@ -0,0 +1,149 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "transfer" function. + */ +export type TransferParams = WithOverrides<{ + to: AbiParameterToPrimitiveType<{ type: "address"; name: "to" }>; + amount: AbiParameterToPrimitiveType<{ type: "uint256"; name: "amount" }>; +}>; + +export const FN_SELECTOR = "0xa9059cbb" as const; +const FN_INPUTS = [ + { + type: "address", + name: "to", + }, + { + type: "uint256", + name: "amount", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "bool", + }, +] as const; + +/** + * Checks if the `transfer` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `transfer` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isTransferSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isTransferSupported(["0x..."]); + * ``` + */ +export function isTransferSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "transfer" function. + * @param options - The options for the transfer function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeTransferParams } from "thirdweb/extensions/tokens"; + * const result = encodeTransferParams({ + * to: ..., + * amount: ..., + * }); + * ``` + */ +export function encodeTransferParams(options: TransferParams) { + return encodeAbiParameters(FN_INPUTS, [options.to, options.amount]); +} + +/** + * Encodes the "transfer" function into a Hex string with its parameters. + * @param options - The options for the transfer function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeTransfer } from "thirdweb/extensions/tokens"; + * const result = encodeTransfer({ + * to: ..., + * amount: ..., + * }); + * ``` + */ +export function encodeTransfer(options: TransferParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeTransferParams(options).slice(2)) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "transfer" function on the contract. + * @param options - The options for the "transfer" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { transfer } from "thirdweb/extensions/tokens"; + * + * const transaction = transfer({ + * contract, + * to: ..., + * amount: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function transfer( + options: BaseTransactionOptions< + | TransferParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.to, resolvedOptions.amount] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/transferFrom.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/transferFrom.ts new file mode 100644 index 00000000000..78cb5ebcdab --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/transferFrom.ts @@ -0,0 +1,167 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "transferFrom" function. + */ +export type TransferFromParams = WithOverrides<{ + from: AbiParameterToPrimitiveType<{ type: "address"; name: "from" }>; + to: AbiParameterToPrimitiveType<{ type: "address"; name: "to" }>; + amount: AbiParameterToPrimitiveType<{ type: "uint256"; name: "amount" }>; +}>; + +export const FN_SELECTOR = "0x23b872dd" as const; +const FN_INPUTS = [ + { + type: "address", + name: "from", + }, + { + type: "address", + name: "to", + }, + { + type: "uint256", + name: "amount", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "bool", + }, +] as const; + +/** + * Checks if the `transferFrom` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `transferFrom` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isTransferFromSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isTransferFromSupported(["0x..."]); + * ``` + */ +export function isTransferFromSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "transferFrom" function. + * @param options - The options for the transferFrom function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeTransferFromParams } from "thirdweb/extensions/tokens"; + * const result = encodeTransferFromParams({ + * from: ..., + * to: ..., + * amount: ..., + * }); + * ``` + */ +export function encodeTransferFromParams(options: TransferFromParams) { + return encodeAbiParameters(FN_INPUTS, [ + options.from, + options.to, + options.amount, + ]); +} + +/** + * Encodes the "transferFrom" function into a Hex string with its parameters. + * @param options - The options for the transferFrom function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeTransferFrom } from "thirdweb/extensions/tokens"; + * const result = encodeTransferFrom({ + * from: ..., + * to: ..., + * amount: ..., + * }); + * ``` + */ +export function encodeTransferFrom(options: TransferFromParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeTransferFromParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "transferFrom" function on the contract. + * @param options - The options for the "transferFrom" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { transferFrom } from "thirdweb/extensions/tokens"; + * + * const transaction = transferFrom({ + * contract, + * from: ..., + * to: ..., + * amount: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function transferFrom( + options: BaseTransactionOptions< + | TransferFromParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [ + resolvedOptions.from, + resolvedOptions.to, + resolvedOptions.amount, + ] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/transferOwnership.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/transferOwnership.ts new file mode 100644 index 00000000000..108df00ea3f --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Asset/write/transferOwnership.ts @@ -0,0 +1,141 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "transferOwnership" function. + */ +export type TransferOwnershipParams = WithOverrides<{ + newOwner: AbiParameterToPrimitiveType<{ type: "address"; name: "newOwner" }>; +}>; + +export const FN_SELECTOR = "0xf2fde38b" as const; +const FN_INPUTS = [ + { + type: "address", + name: "newOwner", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `transferOwnership` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `transferOwnership` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isTransferOwnershipSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isTransferOwnershipSupported(["0x..."]); + * ``` + */ +export function isTransferOwnershipSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "transferOwnership" function. + * @param options - The options for the transferOwnership function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeTransferOwnershipParams } from "thirdweb/extensions/tokens"; + * const result = encodeTransferOwnershipParams({ + * newOwner: ..., + * }); + * ``` + */ +export function encodeTransferOwnershipParams( + options: TransferOwnershipParams, +) { + return encodeAbiParameters(FN_INPUTS, [options.newOwner]); +} + +/** + * Encodes the "transferOwnership" function into a Hex string with its parameters. + * @param options - The options for the transferOwnership function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeTransferOwnership } from "thirdweb/extensions/tokens"; + * const result = encodeTransferOwnership({ + * newOwner: ..., + * }); + * ``` + */ +export function encodeTransferOwnership(options: TransferOwnershipParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeTransferOwnershipParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "transferOwnership" function on the contract. + * @param options - The options for the "transferOwnership" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { transferOwnership } from "thirdweb/extensions/tokens"; + * + * const transaction = transferOwnership({ + * contract, + * newOwner: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function transferOwnership( + options: BaseTransactionOptions< + | TransferOwnershipParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.newOwner] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/AirdropUpdated.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/AirdropUpdated.ts new file mode 100644 index 00000000000..ed03e7628d4 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/AirdropUpdated.ts @@ -0,0 +1,24 @@ +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Creates an event object for the AirdropUpdated event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { airdropUpdatedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * airdropUpdatedEvent() + * ], + * }); + * ``` + */ +export function airdropUpdatedEvent() { + return prepareEvent({ + signature: "event AirdropUpdated(address airdrop)", + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/Created.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/Created.ts new file mode 100644 index 00000000000..407d12b2068 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/Created.ts @@ -0,0 +1,47 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "Created" event. + */ +export type CreatedEventFilters = Partial<{ + creator: AbiParameterToPrimitiveType<{ + type: "address"; + name: "creator"; + indexed: true; + }>; + asset: AbiParameterToPrimitiveType<{ + type: "address"; + name: "asset"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the Created event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { createdEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * createdEvent({ + * creator: ..., + * asset: ..., + * }) + * ], + * }); + * ``` + */ +export function createdEvent(filters: CreatedEventFilters = {}) { + return prepareEvent({ + signature: + "event Created(bytes32 contractId, address indexed creator, address indexed asset, address referrer, bytes aux)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/Distributed.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/Distributed.ts new file mode 100644 index 00000000000..ba29899d7d3 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/Distributed.ts @@ -0,0 +1,25 @@ +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Creates an event object for the Distributed event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { distributedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * distributedEvent() + * ], + * }); + * ``` + */ +export function distributedEvent() { + return prepareEvent({ + signature: + "event Distributed(address asset, uint256 recipientCount, uint256 totalAmount)", + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/ImplementationAdded.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/ImplementationAdded.ts new file mode 100644 index 00000000000..da0e6d5983e --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/ImplementationAdded.ts @@ -0,0 +1,43 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "ImplementationAdded" event. + */ +export type ImplementationAddedEventFilters = Partial<{ + implementation: AbiParameterToPrimitiveType<{ + type: "address"; + name: "implementation"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the ImplementationAdded event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { implementationAddedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * implementationAddedEvent({ + * implementation: ..., + * }) + * ], + * }); + * ``` + */ +export function implementationAddedEvent( + filters: ImplementationAddedEventFilters = {}, +) { + return prepareEvent({ + signature: + "event ImplementationAdded(bytes32 contractId, address indexed implementation, uint8 implementationType, uint8 createHook, bytes createHookData)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/Initialized.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/Initialized.ts new file mode 100644 index 00000000000..1061653b3d4 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/Initialized.ts @@ -0,0 +1,24 @@ +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Creates an event object for the Initialized event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { initializedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * initializedEvent() + * ], + * }); + * ``` + */ +export function initializedEvent() { + return prepareEvent({ + signature: "event Initialized(uint64 version)", + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/OwnershipHandoverCanceled.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/OwnershipHandoverCanceled.ts new file mode 100644 index 00000000000..39a285efa35 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/OwnershipHandoverCanceled.ts @@ -0,0 +1,42 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "OwnershipHandoverCanceled" event. + */ +export type OwnershipHandoverCanceledEventFilters = Partial<{ + pendingOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "pendingOwner"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the OwnershipHandoverCanceled event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { ownershipHandoverCanceledEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * ownershipHandoverCanceledEvent({ + * pendingOwner: ..., + * }) + * ], + * }); + * ``` + */ +export function ownershipHandoverCanceledEvent( + filters: OwnershipHandoverCanceledEventFilters = {}, +) { + return prepareEvent({ + signature: "event OwnershipHandoverCanceled(address indexed pendingOwner)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/OwnershipHandoverRequested.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/OwnershipHandoverRequested.ts new file mode 100644 index 00000000000..75704cff765 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/OwnershipHandoverRequested.ts @@ -0,0 +1,42 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "OwnershipHandoverRequested" event. + */ +export type OwnershipHandoverRequestedEventFilters = Partial<{ + pendingOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "pendingOwner"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the OwnershipHandoverRequested event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { ownershipHandoverRequestedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * ownershipHandoverRequestedEvent({ + * pendingOwner: ..., + * }) + * ], + * }); + * ``` + */ +export function ownershipHandoverRequestedEvent( + filters: OwnershipHandoverRequestedEventFilters = {}, +) { + return prepareEvent({ + signature: "event OwnershipHandoverRequested(address indexed pendingOwner)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/OwnershipTransferred.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/OwnershipTransferred.ts new file mode 100644 index 00000000000..91dcf136312 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/OwnershipTransferred.ts @@ -0,0 +1,49 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "OwnershipTransferred" event. + */ +export type OwnershipTransferredEventFilters = Partial<{ + oldOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "oldOwner"; + indexed: true; + }>; + newOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "newOwner"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the OwnershipTransferred event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { ownershipTransferredEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * ownershipTransferredEvent({ + * oldOwner: ..., + * newOwner: ..., + * }) + * ], + * }); + * ``` + */ +export function ownershipTransferredEvent( + filters: OwnershipTransferredEventFilters = {}, +) { + return prepareEvent({ + signature: + "event OwnershipTransferred(address indexed oldOwner, address indexed newOwner)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/RewardClaimed.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/RewardClaimed.ts new file mode 100644 index 00000000000..c6208468dec --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/RewardClaimed.ts @@ -0,0 +1,24 @@ +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Creates an event object for the RewardClaimed event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { rewardClaimedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * rewardClaimedEvent() + * ], + * }); + * ``` + */ +export function rewardClaimedEvent() { + return prepareEvent({ + signature: "event RewardClaimed(address asset, address claimer)", + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/RewardLockerUpdated.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/RewardLockerUpdated.ts new file mode 100644 index 00000000000..5abca0bfd36 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/RewardLockerUpdated.ts @@ -0,0 +1,24 @@ +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Creates an event object for the RewardLockerUpdated event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { rewardLockerUpdatedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * rewardLockerUpdatedEvent() + * ], + * }); + * ``` + */ +export function rewardLockerUpdatedEvent() { + return prepareEvent({ + signature: "event RewardLockerUpdated(address locker)", + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/RouterUpdated.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/RouterUpdated.ts new file mode 100644 index 00000000000..d6636ea9f2b --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/RouterUpdated.ts @@ -0,0 +1,24 @@ +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Creates an event object for the RouterUpdated event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { routerUpdatedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * routerUpdatedEvent() + * ], + * }); + * ``` + */ +export function routerUpdatedEvent() { + return prepareEvent({ + signature: "event RouterUpdated(address router)", + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/Upgraded.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/Upgraded.ts new file mode 100644 index 00000000000..115091371cf --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/events/Upgraded.ts @@ -0,0 +1,40 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "Upgraded" event. + */ +export type UpgradedEventFilters = Partial<{ + implementation: AbiParameterToPrimitiveType<{ + type: "address"; + name: "implementation"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the Upgraded event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { upgradedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * upgradedEvent({ + * implementation: ..., + * }) + * ], + * }); + * ``` + */ +export function upgradedEvent(filters: UpgradedEventFilters = {}) { + return prepareEvent({ + signature: "event Upgraded(address indexed implementation)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/getAirdrop.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/getAirdrop.ts new file mode 100644 index 00000000000..7f8a6b28edf --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/getAirdrop.ts @@ -0,0 +1,70 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0xd25f82a0" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "address", + name: "airdrop", + }, +] as const; + +/** + * Checks if the `getAirdrop` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `getAirdrop` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isGetAirdropSupported } from "thirdweb/extensions/tokens"; + * const supported = isGetAirdropSupported(["0x..."]); + * ``` + */ +export function isGetAirdropSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the getAirdrop function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeGetAirdropResult } from "thirdweb/extensions/tokens"; + * const result = decodeGetAirdropResultResult("..."); + * ``` + */ +export function decodeGetAirdropResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "getAirdrop" function on the contract. + * @param options - The options for the getAirdrop function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { getAirdrop } from "thirdweb/extensions/tokens"; + * + * const result = await getAirdrop({ + * contract, + * }); + * + * ``` + */ +export async function getAirdrop(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/getImplementation.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/getImplementation.ts new file mode 100644 index 00000000000..ff7210c19c7 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/getImplementation.ts @@ -0,0 +1,153 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "getImplementation" function. + */ +export type GetImplementationParams = { + contractId: AbiParameterToPrimitiveType<{ + type: "bytes32"; + name: "contractId"; + }>; +}; + +export const FN_SELECTOR = "0x3c2e0828" as const; +const FN_INPUTS = [ + { + type: "bytes32", + name: "contractId", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "tuple", + name: "config", + components: [ + { + type: "bytes32", + name: "contractId", + }, + { + type: "address", + name: "implementation", + }, + { + type: "uint8", + name: "implementationType", + }, + { + type: "uint8", + name: "createHook", + }, + { + type: "bytes", + name: "createHookData", + }, + ], + }, +] as const; + +/** + * Checks if the `getImplementation` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `getImplementation` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isGetImplementationSupported } from "thirdweb/extensions/tokens"; + * const supported = isGetImplementationSupported(["0x..."]); + * ``` + */ +export function isGetImplementationSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "getImplementation" function. + * @param options - The options for the getImplementation function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeGetImplementationParams } from "thirdweb/extensions/tokens"; + * const result = encodeGetImplementationParams({ + * contractId: ..., + * }); + * ``` + */ +export function encodeGetImplementationParams( + options: GetImplementationParams, +) { + return encodeAbiParameters(FN_INPUTS, [options.contractId]); +} + +/** + * Encodes the "getImplementation" function into a Hex string with its parameters. + * @param options - The options for the getImplementation function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeGetImplementation } from "thirdweb/extensions/tokens"; + * const result = encodeGetImplementation({ + * contractId: ..., + * }); + * ``` + */ +export function encodeGetImplementation(options: GetImplementationParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeGetImplementationParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the getImplementation function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeGetImplementationResult } from "thirdweb/extensions/tokens"; + * const result = decodeGetImplementationResultResult("..."); + * ``` + */ +export function decodeGetImplementationResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "getImplementation" function on the contract. + * @param options - The options for the getImplementation function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { getImplementation } from "thirdweb/extensions/tokens"; + * + * const result = await getImplementation({ + * contract, + * contractId: ..., + * }); + * + * ``` + */ +export async function getImplementation( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.contractId], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/getReward.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/getReward.ts new file mode 100644 index 00000000000..9108f74b4ca --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/getReward.ts @@ -0,0 +1,147 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "getReward" function. + */ +export type GetRewardParams = { + asset: AbiParameterToPrimitiveType<{ type: "address"; name: "asset" }>; +}; + +export const FN_SELECTOR = "0xc00007b0" as const; +const FN_INPUTS = [ + { + type: "address", + name: "asset", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "tuple", + components: [ + { + type: "address", + name: "positionManager", + }, + { + type: "uint256", + name: "tokenId", + }, + { + type: "address", + name: "recipient", + }, + { + type: "address", + name: "referrer", + }, + { + type: "uint16", + name: "referrerBps", + }, + ], + }, +] as const; + +/** + * Checks if the `getReward` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `getReward` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isGetRewardSupported } from "thirdweb/extensions/tokens"; + * const supported = isGetRewardSupported(["0x..."]); + * ``` + */ +export function isGetRewardSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "getReward" function. + * @param options - The options for the getReward function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeGetRewardParams } from "thirdweb/extensions/tokens"; + * const result = encodeGetRewardParams({ + * asset: ..., + * }); + * ``` + */ +export function encodeGetRewardParams(options: GetRewardParams) { + return encodeAbiParameters(FN_INPUTS, [options.asset]); +} + +/** + * Encodes the "getReward" function into a Hex string with its parameters. + * @param options - The options for the getReward function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeGetReward } from "thirdweb/extensions/tokens"; + * const result = encodeGetReward({ + * asset: ..., + * }); + * ``` + */ +export function encodeGetReward(options: GetRewardParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeGetRewardParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the getReward function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeGetRewardResult } from "thirdweb/extensions/tokens"; + * const result = decodeGetRewardResultResult("..."); + * ``` + */ +export function decodeGetRewardResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "getReward" function on the contract. + * @param options - The options for the getReward function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { getReward } from "thirdweb/extensions/tokens"; + * + * const result = await getReward({ + * contract, + * asset: ..., + * }); + * + * ``` + */ +export async function getReward( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.asset], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/getRewardLocker.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/getRewardLocker.ts new file mode 100644 index 00000000000..77fe9eb8d65 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/getRewardLocker.ts @@ -0,0 +1,70 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0xb0188df2" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "address", + name: "rewardLocker", + }, +] as const; + +/** + * Checks if the `getRewardLocker` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `getRewardLocker` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isGetRewardLockerSupported } from "thirdweb/extensions/tokens"; + * const supported = isGetRewardLockerSupported(["0x..."]); + * ``` + */ +export function isGetRewardLockerSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the getRewardLocker function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeGetRewardLockerResult } from "thirdweb/extensions/tokens"; + * const result = decodeGetRewardLockerResultResult("..."); + * ``` + */ +export function decodeGetRewardLockerResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "getRewardLocker" function on the contract. + * @param options - The options for the getRewardLocker function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { getRewardLocker } from "thirdweb/extensions/tokens"; + * + * const result = await getRewardLocker({ + * contract, + * }); + * + * ``` + */ +export async function getRewardLocker(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/getRouter.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/getRouter.ts new file mode 100644 index 00000000000..7bd0351392e --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/getRouter.ts @@ -0,0 +1,70 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0xb0f479a1" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "address", + name: "router", + }, +] as const; + +/** + * Checks if the `getRouter` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `getRouter` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isGetRouterSupported } from "thirdweb/extensions/tokens"; + * const supported = isGetRouterSupported(["0x..."]); + * ``` + */ +export function isGetRouterSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the getRouter function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeGetRouterResult } from "thirdweb/extensions/tokens"; + * const result = decodeGetRouterResultResult("..."); + * ``` + */ +export function decodeGetRouterResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "getRouter" function on the contract. + * @param options - The options for the getRouter function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { getRouter } from "thirdweb/extensions/tokens"; + * + * const result = await getRouter({ + * contract, + * }); + * + * ``` + */ +export async function getRouter(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/guardSalt.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/guardSalt.ts new file mode 100644 index 00000000000..f79eebee356 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/guardSalt.ts @@ -0,0 +1,165 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "guardSalt" function. + */ +export type GuardSaltParams = { + salt: AbiParameterToPrimitiveType<{ type: "bytes32"; name: "salt" }>; + creator: AbiParameterToPrimitiveType<{ type: "address"; name: "creator" }>; + contractInitData: AbiParameterToPrimitiveType<{ + type: "bytes"; + name: "contractInitData"; + }>; + hookInitData: AbiParameterToPrimitiveType<{ + type: "bytes"; + name: "hookInitData"; + }>; +}; + +export const FN_SELECTOR = "0xd5ebb1df" as const; +const FN_INPUTS = [ + { + type: "bytes32", + name: "salt", + }, + { + type: "address", + name: "creator", + }, + { + type: "bytes", + name: "contractInitData", + }, + { + type: "bytes", + name: "hookInitData", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "bytes32", + }, +] as const; + +/** + * Checks if the `guardSalt` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `guardSalt` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isGuardSaltSupported } from "thirdweb/extensions/tokens"; + * const supported = isGuardSaltSupported(["0x..."]); + * ``` + */ +export function isGuardSaltSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "guardSalt" function. + * @param options - The options for the guardSalt function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeGuardSaltParams } from "thirdweb/extensions/tokens"; + * const result = encodeGuardSaltParams({ + * salt: ..., + * creator: ..., + * contractInitData: ..., + * hookInitData: ..., + * }); + * ``` + */ +export function encodeGuardSaltParams(options: GuardSaltParams) { + return encodeAbiParameters(FN_INPUTS, [ + options.salt, + options.creator, + options.contractInitData, + options.hookInitData, + ]); +} + +/** + * Encodes the "guardSalt" function into a Hex string with its parameters. + * @param options - The options for the guardSalt function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeGuardSalt } from "thirdweb/extensions/tokens"; + * const result = encodeGuardSalt({ + * salt: ..., + * creator: ..., + * contractInitData: ..., + * hookInitData: ..., + * }); + * ``` + */ +export function encodeGuardSalt(options: GuardSaltParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeGuardSaltParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the guardSalt function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeGuardSaltResult } from "thirdweb/extensions/tokens"; + * const result = decodeGuardSaltResultResult("..."); + * ``` + */ +export function decodeGuardSaltResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "guardSalt" function on the contract. + * @param options - The options for the guardSalt function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { guardSalt } from "thirdweb/extensions/tokens"; + * + * const result = await guardSalt({ + * contract, + * salt: ..., + * creator: ..., + * contractInitData: ..., + * hookInitData: ..., + * }); + * + * ``` + */ +export async function guardSalt( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [ + options.salt, + options.creator, + options.contractInitData, + options.hookInitData, + ], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/owner.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/owner.ts new file mode 100644 index 00000000000..b0d99f234f0 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/owner.ts @@ -0,0 +1,70 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0x8da5cb5b" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "address", + name: "result", + }, +] as const; + +/** + * Checks if the `owner` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `owner` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isOwnerSupported } from "thirdweb/extensions/tokens"; + * const supported = isOwnerSupported(["0x..."]); + * ``` + */ +export function isOwnerSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the owner function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeOwnerResult } from "thirdweb/extensions/tokens"; + * const result = decodeOwnerResultResult("..."); + * ``` + */ +export function decodeOwnerResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "owner" function on the contract. + * @param options - The options for the owner function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { owner } from "thirdweb/extensions/tokens"; + * + * const result = await owner({ + * contract, + * }); + * + * ``` + */ +export async function owner(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/ownershipHandoverExpiresAt.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/ownershipHandoverExpiresAt.ts new file mode 100644 index 00000000000..0313d621929 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/ownershipHandoverExpiresAt.ts @@ -0,0 +1,135 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "ownershipHandoverExpiresAt" function. + */ +export type OwnershipHandoverExpiresAtParams = { + pendingOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "pendingOwner"; + }>; +}; + +export const FN_SELECTOR = "0xfee81cf4" as const; +const FN_INPUTS = [ + { + type: "address", + name: "pendingOwner", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "uint256", + name: "result", + }, +] as const; + +/** + * Checks if the `ownershipHandoverExpiresAt` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `ownershipHandoverExpiresAt` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isOwnershipHandoverExpiresAtSupported } from "thirdweb/extensions/tokens"; + * const supported = isOwnershipHandoverExpiresAtSupported(["0x..."]); + * ``` + */ +export function isOwnershipHandoverExpiresAtSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "ownershipHandoverExpiresAt" function. + * @param options - The options for the ownershipHandoverExpiresAt function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeOwnershipHandoverExpiresAtParams } from "thirdweb/extensions/tokens"; + * const result = encodeOwnershipHandoverExpiresAtParams({ + * pendingOwner: ..., + * }); + * ``` + */ +export function encodeOwnershipHandoverExpiresAtParams( + options: OwnershipHandoverExpiresAtParams, +) { + return encodeAbiParameters(FN_INPUTS, [options.pendingOwner]); +} + +/** + * Encodes the "ownershipHandoverExpiresAt" function into a Hex string with its parameters. + * @param options - The options for the ownershipHandoverExpiresAt function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeOwnershipHandoverExpiresAt } from "thirdweb/extensions/tokens"; + * const result = encodeOwnershipHandoverExpiresAt({ + * pendingOwner: ..., + * }); + * ``` + */ +export function encodeOwnershipHandoverExpiresAt( + options: OwnershipHandoverExpiresAtParams, +) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeOwnershipHandoverExpiresAtParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the ownershipHandoverExpiresAt function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeOwnershipHandoverExpiresAtResult } from "thirdweb/extensions/tokens"; + * const result = decodeOwnershipHandoverExpiresAtResultResult("..."); + * ``` + */ +export function decodeOwnershipHandoverExpiresAtResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "ownershipHandoverExpiresAt" function on the contract. + * @param options - The options for the ownershipHandoverExpiresAt function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { ownershipHandoverExpiresAt } from "thirdweb/extensions/tokens"; + * + * const result = await ownershipHandoverExpiresAt({ + * contract, + * pendingOwner: ..., + * }); + * + * ``` + */ +export async function ownershipHandoverExpiresAt( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.pendingOwner], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/predictAddress.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/predictAddress.ts new file mode 100644 index 00000000000..33a7dd9acba --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/predictAddress.ts @@ -0,0 +1,176 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "predictAddress" function. + */ +export type PredictAddressParams = { + contractId: AbiParameterToPrimitiveType<{ + type: "bytes32"; + name: "contractId"; + }>; + creator: AbiParameterToPrimitiveType<{ type: "address"; name: "creator" }>; + params: AbiParameterToPrimitiveType<{ + type: "tuple"; + name: "params"; + components: [ + { type: "address"; name: "referrer" }, + { type: "bytes32"; name: "salt" }, + { type: "bytes"; name: "data" }, + { type: "bytes"; name: "hookData" }, + ]; + }>; +}; + +export const FN_SELECTOR = "0x6b6963c6" as const; +const FN_INPUTS = [ + { + type: "bytes32", + name: "contractId", + }, + { + type: "address", + name: "creator", + }, + { + type: "tuple", + name: "params", + components: [ + { + type: "address", + name: "referrer", + }, + { + type: "bytes32", + name: "salt", + }, + { + type: "bytes", + name: "data", + }, + { + type: "bytes", + name: "hookData", + }, + ], + }, +] as const; +const FN_OUTPUTS = [ + { + type: "address", + name: "predicted", + }, +] as const; + +/** + * Checks if the `predictAddress` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `predictAddress` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isPredictAddressSupported } from "thirdweb/extensions/tokens"; + * const supported = isPredictAddressSupported(["0x..."]); + * ``` + */ +export function isPredictAddressSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "predictAddress" function. + * @param options - The options for the predictAddress function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodePredictAddressParams } from "thirdweb/extensions/tokens"; + * const result = encodePredictAddressParams({ + * contractId: ..., + * creator: ..., + * params: ..., + * }); + * ``` + */ +export function encodePredictAddressParams(options: PredictAddressParams) { + return encodeAbiParameters(FN_INPUTS, [ + options.contractId, + options.creator, + options.params, + ]); +} + +/** + * Encodes the "predictAddress" function into a Hex string with its parameters. + * @param options - The options for the predictAddress function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodePredictAddress } from "thirdweb/extensions/tokens"; + * const result = encodePredictAddress({ + * contractId: ..., + * creator: ..., + * params: ..., + * }); + * ``` + */ +export function encodePredictAddress(options: PredictAddressParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodePredictAddressParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the predictAddress function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodePredictAddressResult } from "thirdweb/extensions/tokens"; + * const result = decodePredictAddressResultResult("..."); + * ``` + */ +export function decodePredictAddressResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "predictAddress" function on the contract. + * @param options - The options for the predictAddress function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { predictAddress } from "thirdweb/extensions/tokens"; + * + * const result = await predictAddress({ + * contract, + * contractId: ..., + * creator: ..., + * params: ..., + * }); + * + * ``` + */ +export async function predictAddress( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.contractId, options.creator, options.params], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/predictAddressByConfig.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/predictAddressByConfig.ts new file mode 100644 index 00000000000..4adf4d9a442 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/predictAddressByConfig.ts @@ -0,0 +1,211 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "predictAddressByConfig" function. + */ +export type PredictAddressByConfigParams = { + config: AbiParameterToPrimitiveType<{ + type: "tuple"; + name: "config"; + components: [ + { type: "bytes32"; name: "contractId" }, + { type: "address"; name: "implementation" }, + { type: "uint8"; name: "implementationType" }, + { type: "uint8"; name: "createHook" }, + { type: "bytes"; name: "createHookData" }, + ]; + }>; + creator: AbiParameterToPrimitiveType<{ type: "address"; name: "creator" }>; + params: AbiParameterToPrimitiveType<{ + type: "tuple"; + name: "params"; + components: [ + { type: "address"; name: "referrer" }, + { type: "bytes32"; name: "salt" }, + { type: "bytes"; name: "data" }, + { type: "bytes"; name: "hookData" }, + ]; + }>; +}; + +export const FN_SELECTOR = "0xbccfb6ad" as const; +const FN_INPUTS = [ + { + type: "tuple", + name: "config", + components: [ + { + type: "bytes32", + name: "contractId", + }, + { + type: "address", + name: "implementation", + }, + { + type: "uint8", + name: "implementationType", + }, + { + type: "uint8", + name: "createHook", + }, + { + type: "bytes", + name: "createHookData", + }, + ], + }, + { + type: "address", + name: "creator", + }, + { + type: "tuple", + name: "params", + components: [ + { + type: "address", + name: "referrer", + }, + { + type: "bytes32", + name: "salt", + }, + { + type: "bytes", + name: "data", + }, + { + type: "bytes", + name: "hookData", + }, + ], + }, +] as const; +const FN_OUTPUTS = [ + { + type: "address", + name: "predicted", + }, +] as const; + +/** + * Checks if the `predictAddressByConfig` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `predictAddressByConfig` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isPredictAddressByConfigSupported } from "thirdweb/extensions/tokens"; + * const supported = isPredictAddressByConfigSupported(["0x..."]); + * ``` + */ +export function isPredictAddressByConfigSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "predictAddressByConfig" function. + * @param options - The options for the predictAddressByConfig function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodePredictAddressByConfigParams } from "thirdweb/extensions/tokens"; + * const result = encodePredictAddressByConfigParams({ + * config: ..., + * creator: ..., + * params: ..., + * }); + * ``` + */ +export function encodePredictAddressByConfigParams( + options: PredictAddressByConfigParams, +) { + return encodeAbiParameters(FN_INPUTS, [ + options.config, + options.creator, + options.params, + ]); +} + +/** + * Encodes the "predictAddressByConfig" function into a Hex string with its parameters. + * @param options - The options for the predictAddressByConfig function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodePredictAddressByConfig } from "thirdweb/extensions/tokens"; + * const result = encodePredictAddressByConfig({ + * config: ..., + * creator: ..., + * params: ..., + * }); + * ``` + */ +export function encodePredictAddressByConfig( + options: PredictAddressByConfigParams, +) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodePredictAddressByConfigParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the predictAddressByConfig function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodePredictAddressByConfigResult } from "thirdweb/extensions/tokens"; + * const result = decodePredictAddressByConfigResultResult("..."); + * ``` + */ +export function decodePredictAddressByConfigResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "predictAddressByConfig" function on the contract. + * @param options - The options for the predictAddressByConfig function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { predictAddressByConfig } from "thirdweb/extensions/tokens"; + * + * const result = await predictAddressByConfig({ + * contract, + * config: ..., + * creator: ..., + * params: ..., + * }); + * + * ``` + */ +export async function predictAddressByConfig( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.config, options.creator, options.params], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/proxiableUUID.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/proxiableUUID.ts new file mode 100644 index 00000000000..f9b76fe556a --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/read/proxiableUUID.ts @@ -0,0 +1,69 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0x52d1902d" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "bytes32", + }, +] as const; + +/** + * Checks if the `proxiableUUID` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `proxiableUUID` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isProxiableUUIDSupported } from "thirdweb/extensions/tokens"; + * const supported = isProxiableUUIDSupported(["0x..."]); + * ``` + */ +export function isProxiableUUIDSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the proxiableUUID function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeProxiableUUIDResult } from "thirdweb/extensions/tokens"; + * const result = decodeProxiableUUIDResultResult("..."); + * ``` + */ +export function decodeProxiableUUIDResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "proxiableUUID" function on the contract. + * @param options - The options for the proxiableUUID function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { proxiableUUID } from "thirdweb/extensions/tokens"; + * + * const result = await proxiableUUID({ + * contract, + * }); + * + * ``` + */ +export async function proxiableUUID(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/addImplementation.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/addImplementation.ts new file mode 100644 index 00000000000..3b2cacb0cdf --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/addImplementation.ts @@ -0,0 +1,181 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "addImplementation" function. + */ +export type AddImplementationParams = WithOverrides<{ + config: AbiParameterToPrimitiveType<{ + type: "tuple"; + name: "config"; + components: [ + { type: "bytes32"; name: "contractId" }, + { type: "address"; name: "implementation" }, + { type: "uint8"; name: "implementationType" }, + { type: "uint8"; name: "createHook" }, + { type: "bytes"; name: "createHookData" }, + ]; + }>; + isDefault: AbiParameterToPrimitiveType<{ type: "bool"; name: "isDefault" }>; +}>; + +export const FN_SELECTOR = "0x4bf8055d" as const; +const FN_INPUTS = [ + { + type: "tuple", + name: "config", + components: [ + { + type: "bytes32", + name: "contractId", + }, + { + type: "address", + name: "implementation", + }, + { + type: "uint8", + name: "implementationType", + }, + { + type: "uint8", + name: "createHook", + }, + { + type: "bytes", + name: "createHookData", + }, + ], + }, + { + type: "bool", + name: "isDefault", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `addImplementation` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `addImplementation` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isAddImplementationSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isAddImplementationSupported(["0x..."]); + * ``` + */ +export function isAddImplementationSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "addImplementation" function. + * @param options - The options for the addImplementation function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeAddImplementationParams } from "thirdweb/extensions/tokens"; + * const result = encodeAddImplementationParams({ + * config: ..., + * isDefault: ..., + * }); + * ``` + */ +export function encodeAddImplementationParams( + options: AddImplementationParams, +) { + return encodeAbiParameters(FN_INPUTS, [options.config, options.isDefault]); +} + +/** + * Encodes the "addImplementation" function into a Hex string with its parameters. + * @param options - The options for the addImplementation function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeAddImplementation } from "thirdweb/extensions/tokens"; + * const result = encodeAddImplementation({ + * config: ..., + * isDefault: ..., + * }); + * ``` + */ +export function encodeAddImplementation(options: AddImplementationParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeAddImplementationParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "addImplementation" function on the contract. + * @param options - The options for the "addImplementation" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { addImplementation } from "thirdweb/extensions/tokens"; + * + * const transaction = addImplementation({ + * contract, + * config: ..., + * isDefault: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function addImplementation( + options: BaseTransactionOptions< + | AddImplementationParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.config, resolvedOptions.isDefault] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/buy.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/buy.ts new file mode 100644 index 00000000000..4adb305411c --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/buy.ts @@ -0,0 +1,196 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "buy" function. + */ +export type BuyParams = WithOverrides<{ + asset: AbiParameterToPrimitiveType<{ type: "address"; name: "asset" }>; + params: AbiParameterToPrimitiveType<{ + type: "tuple"; + name: "params"; + components: [ + { type: "address"; name: "recipient" }, + { type: "address"; name: "referrer" }, + { type: "address"; name: "tokenIn" }, + { type: "uint256"; name: "amountIn" }, + { type: "uint256"; name: "minAmountOut" }, + { type: "uint256"; name: "deadline" }, + { type: "bytes"; name: "hookData" }, + ]; + }>; +}>; + +export const FN_SELECTOR = "0x688cb20f" as const; +const FN_INPUTS = [ + { + type: "address", + name: "asset", + }, + { + type: "tuple", + name: "params", + components: [ + { + type: "address", + name: "recipient", + }, + { + type: "address", + name: "referrer", + }, + { + type: "address", + name: "tokenIn", + }, + { + type: "uint256", + name: "amountIn", + }, + { + type: "uint256", + name: "minAmountOut", + }, + { + type: "uint256", + name: "deadline", + }, + { + type: "bytes", + name: "hookData", + }, + ], + }, +] as const; +const FN_OUTPUTS = [ + { + type: "uint256", + name: "amountIn", + }, + { + type: "uint256", + name: "amountOut", + }, +] as const; + +/** + * Checks if the `buy` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `buy` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isBuySupported } from "thirdweb/extensions/tokens"; + * + * const supported = isBuySupported(["0x..."]); + * ``` + */ +export function isBuySupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "buy" function. + * @param options - The options for the buy function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeBuyParams } from "thirdweb/extensions/tokens"; + * const result = encodeBuyParams({ + * asset: ..., + * params: ..., + * }); + * ``` + */ +export function encodeBuyParams(options: BuyParams) { + return encodeAbiParameters(FN_INPUTS, [options.asset, options.params]); +} + +/** + * Encodes the "buy" function into a Hex string with its parameters. + * @param options - The options for the buy function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeBuy } from "thirdweb/extensions/tokens"; + * const result = encodeBuy({ + * asset: ..., + * params: ..., + * }); + * ``` + */ +export function encodeBuy(options: BuyParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeBuyParams(options).slice(2)) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "buy" function on the contract. + * @param options - The options for the "buy" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { buy } from "thirdweb/extensions/tokens"; + * + * const transaction = buy({ + * contract, + * asset: ..., + * params: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function buy( + options: BaseTransactionOptions< + | BuyParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.asset, resolvedOptions.params] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/cancelOwnershipHandover.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/cancelOwnershipHandover.ts new file mode 100644 index 00000000000..dcbc74fc6af --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/cancelOwnershipHandover.ts @@ -0,0 +1,52 @@ +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; + +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; + +export const FN_SELECTOR = "0x54d1f13d" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `cancelOwnershipHandover` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `cancelOwnershipHandover` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isCancelOwnershipHandoverSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isCancelOwnershipHandoverSupported(["0x..."]); + * ``` + */ +export function isCancelOwnershipHandoverSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Prepares a transaction to call the "cancelOwnershipHandover" function on the contract. + * @param options - The options for the "cancelOwnershipHandover" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { cancelOwnershipHandover } from "thirdweb/extensions/tokens"; + * + * const transaction = cancelOwnershipHandover(); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function cancelOwnershipHandover(options: BaseTransactionOptions) { + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/claimReward.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/claimReward.ts new file mode 100644 index 00000000000..baafcc2696f --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/claimReward.ts @@ -0,0 +1,139 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "claimReward" function. + */ +export type ClaimRewardParams = WithOverrides<{ + asset: AbiParameterToPrimitiveType<{ type: "address"; name: "asset" }>; +}>; + +export const FN_SELECTOR = "0xd279c191" as const; +const FN_INPUTS = [ + { + type: "address", + name: "asset", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `claimReward` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `claimReward` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isClaimRewardSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isClaimRewardSupported(["0x..."]); + * ``` + */ +export function isClaimRewardSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "claimReward" function. + * @param options - The options for the claimReward function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeClaimRewardParams } from "thirdweb/extensions/tokens"; + * const result = encodeClaimRewardParams({ + * asset: ..., + * }); + * ``` + */ +export function encodeClaimRewardParams(options: ClaimRewardParams) { + return encodeAbiParameters(FN_INPUTS, [options.asset]); +} + +/** + * Encodes the "claimReward" function into a Hex string with its parameters. + * @param options - The options for the claimReward function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeClaimReward } from "thirdweb/extensions/tokens"; + * const result = encodeClaimReward({ + * asset: ..., + * }); + * ``` + */ +export function encodeClaimReward(options: ClaimRewardParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeClaimRewardParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "claimReward" function on the contract. + * @param options - The options for the "claimReward" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { claimReward } from "thirdweb/extensions/tokens"; + * + * const transaction = claimReward({ + * contract, + * asset: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function claimReward( + options: BaseTransactionOptions< + | ClaimRewardParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.asset] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/completeOwnershipHandover.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/completeOwnershipHandover.ts new file mode 100644 index 00000000000..21cad20a483 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/completeOwnershipHandover.ts @@ -0,0 +1,148 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "completeOwnershipHandover" function. + */ +export type CompleteOwnershipHandoverParams = WithOverrides<{ + pendingOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "pendingOwner"; + }>; +}>; + +export const FN_SELECTOR = "0xf04e283e" as const; +const FN_INPUTS = [ + { + type: "address", + name: "pendingOwner", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `completeOwnershipHandover` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `completeOwnershipHandover` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isCompleteOwnershipHandoverSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isCompleteOwnershipHandoverSupported(["0x..."]); + * ``` + */ +export function isCompleteOwnershipHandoverSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "completeOwnershipHandover" function. + * @param options - The options for the completeOwnershipHandover function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeCompleteOwnershipHandoverParams } from "thirdweb/extensions/tokens"; + * const result = encodeCompleteOwnershipHandoverParams({ + * pendingOwner: ..., + * }); + * ``` + */ +export function encodeCompleteOwnershipHandoverParams( + options: CompleteOwnershipHandoverParams, +) { + return encodeAbiParameters(FN_INPUTS, [options.pendingOwner]); +} + +/** + * Encodes the "completeOwnershipHandover" function into a Hex string with its parameters. + * @param options - The options for the completeOwnershipHandover function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeCompleteOwnershipHandover } from "thirdweb/extensions/tokens"; + * const result = encodeCompleteOwnershipHandover({ + * pendingOwner: ..., + * }); + * ``` + */ +export function encodeCompleteOwnershipHandover( + options: CompleteOwnershipHandoverParams, +) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeCompleteOwnershipHandoverParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "completeOwnershipHandover" function on the contract. + * @param options - The options for the "completeOwnershipHandover" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { completeOwnershipHandover } from "thirdweb/extensions/tokens"; + * + * const transaction = completeOwnershipHandover({ + * contract, + * pendingOwner: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function completeOwnershipHandover( + options: BaseTransactionOptions< + | CompleteOwnershipHandoverParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.pendingOwner] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/create.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/create.ts new file mode 100644 index 00000000000..165381dda01 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/create.ts @@ -0,0 +1,180 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "create" function. + */ +export type CreateParams = WithOverrides<{ + creator: AbiParameterToPrimitiveType<{ type: "address"; name: "creator" }>; + createParams: AbiParameterToPrimitiveType<{ + type: "tuple"; + name: "createParams"; + components: [ + { type: "address"; name: "referrer" }, + { type: "bytes32"; name: "salt" }, + { type: "bytes"; name: "data" }, + { type: "bytes"; name: "hookData" }, + ]; + }>; +}>; + +export const FN_SELECTOR = "0x65d53dd9" as const; +const FN_INPUTS = [ + { + type: "address", + name: "creator", + }, + { + type: "tuple", + name: "createParams", + components: [ + { + type: "address", + name: "referrer", + }, + { + type: "bytes32", + name: "salt", + }, + { + type: "bytes", + name: "data", + }, + { + type: "bytes", + name: "hookData", + }, + ], + }, +] as const; +const FN_OUTPUTS = [ + { + type: "address", + name: "asset", + }, +] as const; + +/** + * Checks if the `create` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `create` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isCreateSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isCreateSupported(["0x..."]); + * ``` + */ +export function isCreateSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "create" function. + * @param options - The options for the create function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeCreateParams } from "thirdweb/extensions/tokens"; + * const result = encodeCreateParams({ + * creator: ..., + * createParams: ..., + * }); + * ``` + */ +export function encodeCreateParams(options: CreateParams) { + return encodeAbiParameters(FN_INPUTS, [ + options.creator, + options.createParams, + ]); +} + +/** + * Encodes the "create" function into a Hex string with its parameters. + * @param options - The options for the create function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeCreate } from "thirdweb/extensions/tokens"; + * const result = encodeCreate({ + * creator: ..., + * createParams: ..., + * }); + * ``` + */ +export function encodeCreate(options: CreateParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeCreateParams(options).slice(2)) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "create" function on the contract. + * @param options - The options for the "create" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { create } from "thirdweb/extensions/tokens"; + * + * const transaction = create({ + * contract, + * creator: ..., + * createParams: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function create( + options: BaseTransactionOptions< + | CreateParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.creator, resolvedOptions.createParams] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/createById.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/createById.ts new file mode 100644 index 00000000000..11cd3716adf --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/createById.ts @@ -0,0 +1,198 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "createById" function. + */ +export type CreateByIdParams = WithOverrides<{ + contractId: AbiParameterToPrimitiveType<{ + type: "bytes32"; + name: "contractId"; + }>; + creator: AbiParameterToPrimitiveType<{ type: "address"; name: "creator" }>; + params: AbiParameterToPrimitiveType<{ + type: "tuple"; + name: "params"; + components: [ + { type: "address"; name: "referrer" }, + { type: "bytes32"; name: "salt" }, + { type: "bytes"; name: "data" }, + { type: "bytes"; name: "hookData" }, + ]; + }>; +}>; + +export const FN_SELECTOR = "0x1889d488" as const; +const FN_INPUTS = [ + { + type: "bytes32", + name: "contractId", + }, + { + type: "address", + name: "creator", + }, + { + type: "tuple", + name: "params", + components: [ + { + type: "address", + name: "referrer", + }, + { + type: "bytes32", + name: "salt", + }, + { + type: "bytes", + name: "data", + }, + { + type: "bytes", + name: "hookData", + }, + ], + }, +] as const; +const FN_OUTPUTS = [ + { + type: "address", + name: "asset", + }, +] as const; + +/** + * Checks if the `createById` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `createById` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isCreateByIdSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isCreateByIdSupported(["0x..."]); + * ``` + */ +export function isCreateByIdSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "createById" function. + * @param options - The options for the createById function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeCreateByIdParams } from "thirdweb/extensions/tokens"; + * const result = encodeCreateByIdParams({ + * contractId: ..., + * creator: ..., + * params: ..., + * }); + * ``` + */ +export function encodeCreateByIdParams(options: CreateByIdParams) { + return encodeAbiParameters(FN_INPUTS, [ + options.contractId, + options.creator, + options.params, + ]); +} + +/** + * Encodes the "createById" function into a Hex string with its parameters. + * @param options - The options for the createById function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeCreateById } from "thirdweb/extensions/tokens"; + * const result = encodeCreateById({ + * contractId: ..., + * creator: ..., + * params: ..., + * }); + * ``` + */ +export function encodeCreateById(options: CreateByIdParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeCreateByIdParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "createById" function on the contract. + * @param options - The options for the "createById" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { createById } from "thirdweb/extensions/tokens"; + * + * const transaction = createById({ + * contract, + * contractId: ..., + * creator: ..., + * params: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function createById( + options: BaseTransactionOptions< + | CreateByIdParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [ + resolvedOptions.contractId, + resolvedOptions.creator, + resolvedOptions.params, + ] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/createByImplementationConfig.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/createByImplementationConfig.ts new file mode 100644 index 00000000000..980c71a812a --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/createByImplementationConfig.ts @@ -0,0 +1,233 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "createByImplementationConfig" function. + */ +export type CreateByImplementationConfigParams = WithOverrides<{ + config: AbiParameterToPrimitiveType<{ + type: "tuple"; + name: "config"; + components: [ + { type: "bytes32"; name: "contractId" }, + { type: "address"; name: "implementation" }, + { type: "uint8"; name: "implementationType" }, + { type: "uint8"; name: "createHook" }, + { type: "bytes"; name: "createHookData" }, + ]; + }>; + creator: AbiParameterToPrimitiveType<{ type: "address"; name: "creator" }>; + params: AbiParameterToPrimitiveType<{ + type: "tuple"; + name: "params"; + components: [ + { type: "address"; name: "referrer" }, + { type: "bytes32"; name: "salt" }, + { type: "bytes"; name: "data" }, + { type: "bytes"; name: "hookData" }, + ]; + }>; +}>; + +export const FN_SELECTOR = "0x1a1b2b88" as const; +const FN_INPUTS = [ + { + type: "tuple", + name: "config", + components: [ + { + type: "bytes32", + name: "contractId", + }, + { + type: "address", + name: "implementation", + }, + { + type: "uint8", + name: "implementationType", + }, + { + type: "uint8", + name: "createHook", + }, + { + type: "bytes", + name: "createHookData", + }, + ], + }, + { + type: "address", + name: "creator", + }, + { + type: "tuple", + name: "params", + components: [ + { + type: "address", + name: "referrer", + }, + { + type: "bytes32", + name: "salt", + }, + { + type: "bytes", + name: "data", + }, + { + type: "bytes", + name: "hookData", + }, + ], + }, +] as const; +const FN_OUTPUTS = [ + { + type: "address", + name: "asset", + }, +] as const; + +/** + * Checks if the `createByImplementationConfig` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `createByImplementationConfig` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isCreateByImplementationConfigSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isCreateByImplementationConfigSupported(["0x..."]); + * ``` + */ +export function isCreateByImplementationConfigSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "createByImplementationConfig" function. + * @param options - The options for the createByImplementationConfig function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeCreateByImplementationConfigParams } from "thirdweb/extensions/tokens"; + * const result = encodeCreateByImplementationConfigParams({ + * config: ..., + * creator: ..., + * params: ..., + * }); + * ``` + */ +export function encodeCreateByImplementationConfigParams( + options: CreateByImplementationConfigParams, +) { + return encodeAbiParameters(FN_INPUTS, [ + options.config, + options.creator, + options.params, + ]); +} + +/** + * Encodes the "createByImplementationConfig" function into a Hex string with its parameters. + * @param options - The options for the createByImplementationConfig function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeCreateByImplementationConfig } from "thirdweb/extensions/tokens"; + * const result = encodeCreateByImplementationConfig({ + * config: ..., + * creator: ..., + * params: ..., + * }); + * ``` + */ +export function encodeCreateByImplementationConfig( + options: CreateByImplementationConfigParams, +) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeCreateByImplementationConfigParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "createByImplementationConfig" function on the contract. + * @param options - The options for the "createByImplementationConfig" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { createByImplementationConfig } from "thirdweb/extensions/tokens"; + * + * const transaction = createByImplementationConfig({ + * contract, + * config: ..., + * creator: ..., + * params: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function createByImplementationConfig( + options: BaseTransactionOptions< + | CreateByImplementationConfigParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [ + resolvedOptions.config, + resolvedOptions.creator, + resolvedOptions.params, + ] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/distribute.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/distribute.ts new file mode 100644 index 00000000000..0b8ea75aae3 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/distribute.ts @@ -0,0 +1,164 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "distribute" function. + */ +export type DistributeParams = WithOverrides<{ + asset: AbiParameterToPrimitiveType<{ type: "address"; name: "asset" }>; + contents: AbiParameterToPrimitiveType<{ + type: "tuple[]"; + name: "contents"; + components: [ + { type: "uint256"; name: "amount" }, + { type: "address"; name: "recipient" }, + ]; + }>; +}>; + +export const FN_SELECTOR = "0xe542b93b" as const; +const FN_INPUTS = [ + { + type: "address", + name: "asset", + }, + { + type: "tuple[]", + name: "contents", + components: [ + { + type: "uint256", + name: "amount", + }, + { + type: "address", + name: "recipient", + }, + ], + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `distribute` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `distribute` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isDistributeSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isDistributeSupported(["0x..."]); + * ``` + */ +export function isDistributeSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "distribute" function. + * @param options - The options for the distribute function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeDistributeParams } from "thirdweb/extensions/tokens"; + * const result = encodeDistributeParams({ + * asset: ..., + * contents: ..., + * }); + * ``` + */ +export function encodeDistributeParams(options: DistributeParams) { + return encodeAbiParameters(FN_INPUTS, [options.asset, options.contents]); +} + +/** + * Encodes the "distribute" function into a Hex string with its parameters. + * @param options - The options for the distribute function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeDistribute } from "thirdweb/extensions/tokens"; + * const result = encodeDistribute({ + * asset: ..., + * contents: ..., + * }); + * ``` + */ +export function encodeDistribute(options: DistributeParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeDistributeParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "distribute" function on the contract. + * @param options - The options for the "distribute" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { distribute } from "thirdweb/extensions/tokens"; + * + * const transaction = distribute({ + * contract, + * asset: ..., + * contents: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function distribute( + options: BaseTransactionOptions< + | DistributeParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.asset, resolvedOptions.contents] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/initialize.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/initialize.ts new file mode 100644 index 00000000000..324294fd194 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/initialize.ts @@ -0,0 +1,176 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "initialize" function. + */ +export type InitializeParams = WithOverrides<{ + owner: AbiParameterToPrimitiveType<{ type: "address"; name: "owner" }>; + router: AbiParameterToPrimitiveType<{ type: "address"; name: "router" }>; + rewardLocker: AbiParameterToPrimitiveType<{ + type: "address"; + name: "rewardLocker"; + }>; + airdrop: AbiParameterToPrimitiveType<{ type: "address"; name: "airdrop" }>; +}>; + +export const FN_SELECTOR = "0xf8c8765e" as const; +const FN_INPUTS = [ + { + type: "address", + name: "owner", + }, + { + type: "address", + name: "router", + }, + { + type: "address", + name: "rewardLocker", + }, + { + type: "address", + name: "airdrop", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `initialize` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `initialize` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isInitializeSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isInitializeSupported(["0x..."]); + * ``` + */ +export function isInitializeSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "initialize" function. + * @param options - The options for the initialize function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeInitializeParams } from "thirdweb/extensions/tokens"; + * const result = encodeInitializeParams({ + * owner: ..., + * router: ..., + * rewardLocker: ..., + * airdrop: ..., + * }); + * ``` + */ +export function encodeInitializeParams(options: InitializeParams) { + return encodeAbiParameters(FN_INPUTS, [ + options.owner, + options.router, + options.rewardLocker, + options.airdrop, + ]); +} + +/** + * Encodes the "initialize" function into a Hex string with its parameters. + * @param options - The options for the initialize function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeInitialize } from "thirdweb/extensions/tokens"; + * const result = encodeInitialize({ + * owner: ..., + * router: ..., + * rewardLocker: ..., + * airdrop: ..., + * }); + * ``` + */ +export function encodeInitialize(options: InitializeParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeInitializeParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "initialize" function on the contract. + * @param options - The options for the "initialize" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { initialize } from "thirdweb/extensions/tokens"; + * + * const transaction = initialize({ + * contract, + * owner: ..., + * router: ..., + * rewardLocker: ..., + * airdrop: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function initialize( + options: BaseTransactionOptions< + | InitializeParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [ + resolvedOptions.owner, + resolvedOptions.router, + resolvedOptions.rewardLocker, + resolvedOptions.airdrop, + ] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/renounceOwnership.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/renounceOwnership.ts new file mode 100644 index 00000000000..622553c35e4 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/renounceOwnership.ts @@ -0,0 +1,50 @@ +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; + +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; + +export const FN_SELECTOR = "0x715018a6" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `renounceOwnership` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `renounceOwnership` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isRenounceOwnershipSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isRenounceOwnershipSupported(["0x..."]); + * ``` + */ +export function isRenounceOwnershipSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Prepares a transaction to call the "renounceOwnership" function on the contract. + * @param options - The options for the "renounceOwnership" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { renounceOwnership } from "thirdweb/extensions/tokens"; + * + * const transaction = renounceOwnership(); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function renounceOwnership(options: BaseTransactionOptions) { + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/requestOwnershipHandover.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/requestOwnershipHandover.ts new file mode 100644 index 00000000000..91b716f38a8 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/requestOwnershipHandover.ts @@ -0,0 +1,52 @@ +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; + +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; + +export const FN_SELECTOR = "0x25692962" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `requestOwnershipHandover` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `requestOwnershipHandover` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isRequestOwnershipHandoverSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isRequestOwnershipHandoverSupported(["0x..."]); + * ``` + */ +export function isRequestOwnershipHandoverSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Prepares a transaction to call the "requestOwnershipHandover" function on the contract. + * @param options - The options for the "requestOwnershipHandover" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { requestOwnershipHandover } from "thirdweb/extensions/tokens"; + * + * const transaction = requestOwnershipHandover(); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function requestOwnershipHandover(options: BaseTransactionOptions) { + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/sell.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/sell.ts new file mode 100644 index 00000000000..93ed3e085a6 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/sell.ts @@ -0,0 +1,191 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "sell" function. + */ +export type SellParams = WithOverrides<{ + asset: AbiParameterToPrimitiveType<{ type: "address"; name: "asset" }>; + params: AbiParameterToPrimitiveType<{ + type: "tuple"; + name: "params"; + components: [ + { type: "address"; name: "recipient" }, + { type: "address"; name: "tokenOut" }, + { type: "uint256"; name: "amountIn" }, + { type: "uint256"; name: "minAmountOut" }, + { type: "uint256"; name: "deadline" }, + { type: "bytes"; name: "hookData" }, + ]; + }>; +}>; + +export const FN_SELECTOR = "0xfbc84f15" as const; +const FN_INPUTS = [ + { + type: "address", + name: "asset", + }, + { + type: "tuple", + name: "params", + components: [ + { + type: "address", + name: "recipient", + }, + { + type: "address", + name: "tokenOut", + }, + { + type: "uint256", + name: "amountIn", + }, + { + type: "uint256", + name: "minAmountOut", + }, + { + type: "uint256", + name: "deadline", + }, + { + type: "bytes", + name: "hookData", + }, + ], + }, +] as const; +const FN_OUTPUTS = [ + { + type: "uint256", + name: "amountIn", + }, + { + type: "uint256", + name: "amountOut", + }, +] as const; + +/** + * Checks if the `sell` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `sell` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isSellSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isSellSupported(["0x..."]); + * ``` + */ +export function isSellSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "sell" function. + * @param options - The options for the sell function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeSellParams } from "thirdweb/extensions/tokens"; + * const result = encodeSellParams({ + * asset: ..., + * params: ..., + * }); + * ``` + */ +export function encodeSellParams(options: SellParams) { + return encodeAbiParameters(FN_INPUTS, [options.asset, options.params]); +} + +/** + * Encodes the "sell" function into a Hex string with its parameters. + * @param options - The options for the sell function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeSell } from "thirdweb/extensions/tokens"; + * const result = encodeSell({ + * asset: ..., + * params: ..., + * }); + * ``` + */ +export function encodeSell(options: SellParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeSellParams(options).slice(2)) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "sell" function on the contract. + * @param options - The options for the "sell" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { sell } from "thirdweb/extensions/tokens"; + * + * const transaction = sell({ + * contract, + * asset: ..., + * params: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function sell( + options: BaseTransactionOptions< + | SellParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.asset, resolvedOptions.params] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/setAirdrop.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/setAirdrop.ts new file mode 100644 index 00000000000..c3ed838daaf --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/setAirdrop.ts @@ -0,0 +1,139 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "setAirdrop" function. + */ +export type SetAirdropParams = WithOverrides<{ + airdrop: AbiParameterToPrimitiveType<{ type: "address"; name: "airdrop" }>; +}>; + +export const FN_SELECTOR = "0x72820dbc" as const; +const FN_INPUTS = [ + { + type: "address", + name: "airdrop", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `setAirdrop` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `setAirdrop` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isSetAirdropSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isSetAirdropSupported(["0x..."]); + * ``` + */ +export function isSetAirdropSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "setAirdrop" function. + * @param options - The options for the setAirdrop function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeSetAirdropParams } from "thirdweb/extensions/tokens"; + * const result = encodeSetAirdropParams({ + * airdrop: ..., + * }); + * ``` + */ +export function encodeSetAirdropParams(options: SetAirdropParams) { + return encodeAbiParameters(FN_INPUTS, [options.airdrop]); +} + +/** + * Encodes the "setAirdrop" function into a Hex string with its parameters. + * @param options - The options for the setAirdrop function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeSetAirdrop } from "thirdweb/extensions/tokens"; + * const result = encodeSetAirdrop({ + * airdrop: ..., + * }); + * ``` + */ +export function encodeSetAirdrop(options: SetAirdropParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeSetAirdropParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "setAirdrop" function on the contract. + * @param options - The options for the "setAirdrop" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { setAirdrop } from "thirdweb/extensions/tokens"; + * + * const transaction = setAirdrop({ + * contract, + * airdrop: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function setAirdrop( + options: BaseTransactionOptions< + | SetAirdropParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.airdrop] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/setRewardLocker.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/setRewardLocker.ts new file mode 100644 index 00000000000..999a8183e97 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/setRewardLocker.ts @@ -0,0 +1,142 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "setRewardLocker" function. + */ +export type SetRewardLockerParams = WithOverrides<{ + rewardLocker: AbiParameterToPrimitiveType<{ + type: "address"; + name: "rewardLocker"; + }>; +}>; + +export const FN_SELECTOR = "0xeb7fb197" as const; +const FN_INPUTS = [ + { + type: "address", + name: "rewardLocker", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `setRewardLocker` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `setRewardLocker` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isSetRewardLockerSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isSetRewardLockerSupported(["0x..."]); + * ``` + */ +export function isSetRewardLockerSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "setRewardLocker" function. + * @param options - The options for the setRewardLocker function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeSetRewardLockerParams } from "thirdweb/extensions/tokens"; + * const result = encodeSetRewardLockerParams({ + * rewardLocker: ..., + * }); + * ``` + */ +export function encodeSetRewardLockerParams(options: SetRewardLockerParams) { + return encodeAbiParameters(FN_INPUTS, [options.rewardLocker]); +} + +/** + * Encodes the "setRewardLocker" function into a Hex string with its parameters. + * @param options - The options for the setRewardLocker function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeSetRewardLocker } from "thirdweb/extensions/tokens"; + * const result = encodeSetRewardLocker({ + * rewardLocker: ..., + * }); + * ``` + */ +export function encodeSetRewardLocker(options: SetRewardLockerParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeSetRewardLockerParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "setRewardLocker" function on the contract. + * @param options - The options for the "setRewardLocker" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { setRewardLocker } from "thirdweb/extensions/tokens"; + * + * const transaction = setRewardLocker({ + * contract, + * rewardLocker: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function setRewardLocker( + options: BaseTransactionOptions< + | SetRewardLockerParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.rewardLocker] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/setRouter.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/setRouter.ts new file mode 100644 index 00000000000..2c4c7054648 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/setRouter.ts @@ -0,0 +1,139 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "setRouter" function. + */ +export type SetRouterParams = WithOverrides<{ + router: AbiParameterToPrimitiveType<{ type: "address"; name: "router" }>; +}>; + +export const FN_SELECTOR = "0xc0d78655" as const; +const FN_INPUTS = [ + { + type: "address", + name: "router", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `setRouter` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `setRouter` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isSetRouterSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isSetRouterSupported(["0x..."]); + * ``` + */ +export function isSetRouterSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "setRouter" function. + * @param options - The options for the setRouter function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeSetRouterParams } from "thirdweb/extensions/tokens"; + * const result = encodeSetRouterParams({ + * router: ..., + * }); + * ``` + */ +export function encodeSetRouterParams(options: SetRouterParams) { + return encodeAbiParameters(FN_INPUTS, [options.router]); +} + +/** + * Encodes the "setRouter" function into a Hex string with its parameters. + * @param options - The options for the setRouter function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeSetRouter } from "thirdweb/extensions/tokens"; + * const result = encodeSetRouter({ + * router: ..., + * }); + * ``` + */ +export function encodeSetRouter(options: SetRouterParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeSetRouterParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "setRouter" function on the contract. + * @param options - The options for the "setRouter" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { setRouter } from "thirdweb/extensions/tokens"; + * + * const transaction = setRouter({ + * contract, + * router: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function setRouter( + options: BaseTransactionOptions< + | SetRouterParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.router] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/transferOwnership.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/transferOwnership.ts new file mode 100644 index 00000000000..108df00ea3f --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/transferOwnership.ts @@ -0,0 +1,141 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "transferOwnership" function. + */ +export type TransferOwnershipParams = WithOverrides<{ + newOwner: AbiParameterToPrimitiveType<{ type: "address"; name: "newOwner" }>; +}>; + +export const FN_SELECTOR = "0xf2fde38b" as const; +const FN_INPUTS = [ + { + type: "address", + name: "newOwner", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `transferOwnership` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `transferOwnership` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isTransferOwnershipSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isTransferOwnershipSupported(["0x..."]); + * ``` + */ +export function isTransferOwnershipSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "transferOwnership" function. + * @param options - The options for the transferOwnership function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeTransferOwnershipParams } from "thirdweb/extensions/tokens"; + * const result = encodeTransferOwnershipParams({ + * newOwner: ..., + * }); + * ``` + */ +export function encodeTransferOwnershipParams( + options: TransferOwnershipParams, +) { + return encodeAbiParameters(FN_INPUTS, [options.newOwner]); +} + +/** + * Encodes the "transferOwnership" function into a Hex string with its parameters. + * @param options - The options for the transferOwnership function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeTransferOwnership } from "thirdweb/extensions/tokens"; + * const result = encodeTransferOwnership({ + * newOwner: ..., + * }); + * ``` + */ +export function encodeTransferOwnership(options: TransferOwnershipParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeTransferOwnershipParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "transferOwnership" function on the contract. + * @param options - The options for the "transferOwnership" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { transferOwnership } from "thirdweb/extensions/tokens"; + * + * const transaction = transferOwnership({ + * contract, + * newOwner: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function transferOwnership( + options: BaseTransactionOptions< + | TransferOwnershipParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.newOwner] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/upgradeToAndCall.ts b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/upgradeToAndCall.ts new file mode 100644 index 00000000000..d5af1b33184 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/ERC20Entrypoint/write/upgradeToAndCall.ts @@ -0,0 +1,153 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "upgradeToAndCall" function. + */ +export type UpgradeToAndCallParams = WithOverrides<{ + newImplementation: AbiParameterToPrimitiveType<{ + type: "address"; + name: "newImplementation"; + }>; + data: AbiParameterToPrimitiveType<{ type: "bytes"; name: "data" }>; +}>; + +export const FN_SELECTOR = "0x4f1ef286" as const; +const FN_INPUTS = [ + { + type: "address", + name: "newImplementation", + }, + { + type: "bytes", + name: "data", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `upgradeToAndCall` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `upgradeToAndCall` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isUpgradeToAndCallSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isUpgradeToAndCallSupported(["0x..."]); + * ``` + */ +export function isUpgradeToAndCallSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "upgradeToAndCall" function. + * @param options - The options for the upgradeToAndCall function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeUpgradeToAndCallParams } from "thirdweb/extensions/tokens"; + * const result = encodeUpgradeToAndCallParams({ + * newImplementation: ..., + * data: ..., + * }); + * ``` + */ +export function encodeUpgradeToAndCallParams(options: UpgradeToAndCallParams) { + return encodeAbiParameters(FN_INPUTS, [ + options.newImplementation, + options.data, + ]); +} + +/** + * Encodes the "upgradeToAndCall" function into a Hex string with its parameters. + * @param options - The options for the upgradeToAndCall function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeUpgradeToAndCall } from "thirdweb/extensions/tokens"; + * const result = encodeUpgradeToAndCall({ + * newImplementation: ..., + * data: ..., + * }); + * ``` + */ +export function encodeUpgradeToAndCall(options: UpgradeToAndCallParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeUpgradeToAndCallParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "upgradeToAndCall" function on the contract. + * @param options - The options for the "upgradeToAndCall" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { upgradeToAndCall } from "thirdweb/extensions/tokens"; + * + * const transaction = upgradeToAndCall({ + * contract, + * newImplementation: ..., + * data: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function upgradeToAndCall( + options: BaseTransactionOptions< + | UpgradeToAndCallParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.newImplementation, resolvedOptions.data] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/FeeConfigUpdated.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/FeeConfigUpdated.ts new file mode 100644 index 00000000000..548796d5d9e --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/FeeConfigUpdated.ts @@ -0,0 +1,49 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "FeeConfigUpdated" event. + */ +export type FeeConfigUpdatedEventFilters = Partial<{ + target: AbiParameterToPrimitiveType<{ + type: "address"; + name: "target"; + indexed: true; + }>; + action: AbiParameterToPrimitiveType<{ + type: "bytes4"; + name: "action"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the FeeConfigUpdated event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { feeConfigUpdatedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * feeConfigUpdatedEvent({ + * target: ..., + * action: ..., + * }) + * ], + * }); + * ``` + */ +export function feeConfigUpdatedEvent( + filters: FeeConfigUpdatedEventFilters = {}, +) { + return prepareEvent({ + signature: + "event FeeConfigUpdated(address indexed target, bytes4 indexed action, address recipient, uint8 feeType, uint256 value)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/FeeConfigUpdatedBySignature.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/FeeConfigUpdatedBySignature.ts new file mode 100644 index 00000000000..9eff4a197ea --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/FeeConfigUpdatedBySignature.ts @@ -0,0 +1,55 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "FeeConfigUpdatedBySignature" event. + */ +export type FeeConfigUpdatedBySignatureEventFilters = Partial<{ + signer: AbiParameterToPrimitiveType<{ + type: "address"; + name: "signer"; + indexed: true; + }>; + target: AbiParameterToPrimitiveType<{ + type: "address"; + name: "target"; + indexed: true; + }>; + action: AbiParameterToPrimitiveType<{ + type: "bytes4"; + name: "action"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the FeeConfigUpdatedBySignature event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { feeConfigUpdatedBySignatureEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * feeConfigUpdatedBySignatureEvent({ + * signer: ..., + * target: ..., + * action: ..., + * }) + * ], + * }); + * ``` + */ +export function feeConfigUpdatedBySignatureEvent( + filters: FeeConfigUpdatedBySignatureEventFilters = {}, +) { + return prepareEvent({ + signature: + "event FeeConfigUpdatedBySignature(address indexed signer, address indexed target, bytes4 indexed action, address recipient, uint8 feeType, uint256 value)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/FeeRecipientUpdated.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/FeeRecipientUpdated.ts new file mode 100644 index 00000000000..a5a1b024dec --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/FeeRecipientUpdated.ts @@ -0,0 +1,24 @@ +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Creates an event object for the FeeRecipientUpdated event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { feeRecipientUpdatedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * feeRecipientUpdatedEvent() + * ], + * }); + * ``` + */ +export function feeRecipientUpdatedEvent() { + return prepareEvent({ + signature: "event FeeRecipientUpdated(address feeRecipient)", + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/OwnershipHandoverCanceled.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/OwnershipHandoverCanceled.ts new file mode 100644 index 00000000000..39a285efa35 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/OwnershipHandoverCanceled.ts @@ -0,0 +1,42 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "OwnershipHandoverCanceled" event. + */ +export type OwnershipHandoverCanceledEventFilters = Partial<{ + pendingOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "pendingOwner"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the OwnershipHandoverCanceled event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { ownershipHandoverCanceledEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * ownershipHandoverCanceledEvent({ + * pendingOwner: ..., + * }) + * ], + * }); + * ``` + */ +export function ownershipHandoverCanceledEvent( + filters: OwnershipHandoverCanceledEventFilters = {}, +) { + return prepareEvent({ + signature: "event OwnershipHandoverCanceled(address indexed pendingOwner)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/OwnershipHandoverRequested.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/OwnershipHandoverRequested.ts new file mode 100644 index 00000000000..75704cff765 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/OwnershipHandoverRequested.ts @@ -0,0 +1,42 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "OwnershipHandoverRequested" event. + */ +export type OwnershipHandoverRequestedEventFilters = Partial<{ + pendingOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "pendingOwner"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the OwnershipHandoverRequested event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { ownershipHandoverRequestedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * ownershipHandoverRequestedEvent({ + * pendingOwner: ..., + * }) + * ], + * }); + * ``` + */ +export function ownershipHandoverRequestedEvent( + filters: OwnershipHandoverRequestedEventFilters = {}, +) { + return prepareEvent({ + signature: "event OwnershipHandoverRequested(address indexed pendingOwner)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/OwnershipTransferred.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/OwnershipTransferred.ts new file mode 100644 index 00000000000..91dcf136312 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/OwnershipTransferred.ts @@ -0,0 +1,49 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "OwnershipTransferred" event. + */ +export type OwnershipTransferredEventFilters = Partial<{ + oldOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "oldOwner"; + indexed: true; + }>; + newOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "newOwner"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the OwnershipTransferred event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { ownershipTransferredEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * ownershipTransferredEvent({ + * oldOwner: ..., + * newOwner: ..., + * }) + * ], + * }); + * ``` + */ +export function ownershipTransferredEvent( + filters: OwnershipTransferredEventFilters = {}, +) { + return prepareEvent({ + signature: + "event OwnershipTransferred(address indexed oldOwner, address indexed newOwner)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/RolesUpdated.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/RolesUpdated.ts new file mode 100644 index 00000000000..947e5eed192 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/events/RolesUpdated.ts @@ -0,0 +1,47 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "RolesUpdated" event. + */ +export type RolesUpdatedEventFilters = Partial<{ + user: AbiParameterToPrimitiveType<{ + type: "address"; + name: "user"; + indexed: true; + }>; + roles: AbiParameterToPrimitiveType<{ + type: "uint256"; + name: "roles"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the RolesUpdated event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { rolesUpdatedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * rolesUpdatedEvent({ + * user: ..., + * roles: ..., + * }) + * ], + * }); + * ``` + */ +export function rolesUpdatedEvent(filters: RolesUpdatedEventFilters = {}) { + return prepareEvent({ + signature: + "event RolesUpdated(address indexed user, uint256 indexed roles)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/ROLE_FEE_MANAGER.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/ROLE_FEE_MANAGER.ts new file mode 100644 index 00000000000..79f8f1a40e9 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/ROLE_FEE_MANAGER.ts @@ -0,0 +1,69 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0x99ba5936" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "uint256", + }, +] as const; + +/** + * Checks if the `ROLE_FEE_MANAGER` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `ROLE_FEE_MANAGER` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isROLE_FEE_MANAGERSupported } from "thirdweb/extensions/tokens"; + * const supported = isROLE_FEE_MANAGERSupported(["0x..."]); + * ``` + */ +export function isROLE_FEE_MANAGERSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the ROLE_FEE_MANAGER function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeROLE_FEE_MANAGERResult } from "thirdweb/extensions/tokens"; + * const result = decodeROLE_FEE_MANAGERResultResult("..."); + * ``` + */ +export function decodeROLE_FEE_MANAGERResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "ROLE_FEE_MANAGER" function on the contract. + * @param options - The options for the ROLE_FEE_MANAGER function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { ROLE_FEE_MANAGER } from "thirdweb/extensions/tokens"; + * + * const result = await ROLE_FEE_MANAGER({ + * contract, + * }); + * + * ``` + */ +export async function ROLE_FEE_MANAGER(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/calculateFee.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/calculateFee.ts new file mode 100644 index 00000000000..567150a2376 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/calculateFee.ts @@ -0,0 +1,167 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "calculateFee" function. + */ +export type CalculateFeeParams = { + payer: AbiParameterToPrimitiveType<{ type: "address"; name: "payer" }>; + action: AbiParameterToPrimitiveType<{ type: "bytes4"; name: "action" }>; + amount: AbiParameterToPrimitiveType<{ type: "uint256"; name: "amount" }>; + maxFeeAmount: AbiParameterToPrimitiveType<{ + type: "uint256"; + name: "maxFeeAmount"; + }>; +}; + +export const FN_SELECTOR = "0x69588801" as const; +const FN_INPUTS = [ + { + type: "address", + name: "payer", + }, + { + type: "bytes4", + name: "action", + }, + { + type: "uint256", + name: "amount", + }, + { + type: "uint256", + name: "maxFeeAmount", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "address", + name: "recipient", + }, + { + type: "uint256", + name: "feeAmount", + }, +] as const; + +/** + * Checks if the `calculateFee` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `calculateFee` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isCalculateFeeSupported } from "thirdweb/extensions/tokens"; + * const supported = isCalculateFeeSupported(["0x..."]); + * ``` + */ +export function isCalculateFeeSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "calculateFee" function. + * @param options - The options for the calculateFee function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeCalculateFeeParams } from "thirdweb/extensions/tokens"; + * const result = encodeCalculateFeeParams({ + * payer: ..., + * action: ..., + * amount: ..., + * maxFeeAmount: ..., + * }); + * ``` + */ +export function encodeCalculateFeeParams(options: CalculateFeeParams) { + return encodeAbiParameters(FN_INPUTS, [ + options.payer, + options.action, + options.amount, + options.maxFeeAmount, + ]); +} + +/** + * Encodes the "calculateFee" function into a Hex string with its parameters. + * @param options - The options for the calculateFee function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeCalculateFee } from "thirdweb/extensions/tokens"; + * const result = encodeCalculateFee({ + * payer: ..., + * action: ..., + * amount: ..., + * maxFeeAmount: ..., + * }); + * ``` + */ +export function encodeCalculateFee(options: CalculateFeeParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeCalculateFeeParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the calculateFee function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeCalculateFeeResult } from "thirdweb/extensions/tokens"; + * const result = decodeCalculateFeeResultResult("..."); + * ``` + */ +export function decodeCalculateFeeResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result); +} + +/** + * Calls the "calculateFee" function on the contract. + * @param options - The options for the calculateFee function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { calculateFee } from "thirdweb/extensions/tokens"; + * + * const result = await calculateFee({ + * contract, + * payer: ..., + * action: ..., + * amount: ..., + * maxFeeAmount: ..., + * }); + * + * ``` + */ +export async function calculateFee( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [ + options.payer, + options.action, + options.amount, + options.maxFeeAmount, + ], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/domainSeparator.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/domainSeparator.ts new file mode 100644 index 00000000000..530414e18dd --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/domainSeparator.ts @@ -0,0 +1,69 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0xf698da25" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "bytes32", + }, +] as const; + +/** + * Checks if the `domainSeparator` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `domainSeparator` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isDomainSeparatorSupported } from "thirdweb/extensions/tokens"; + * const supported = isDomainSeparatorSupported(["0x..."]); + * ``` + */ +export function isDomainSeparatorSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the domainSeparator function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeDomainSeparatorResult } from "thirdweb/extensions/tokens"; + * const result = decodeDomainSeparatorResultResult("..."); + * ``` + */ +export function decodeDomainSeparatorResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "domainSeparator" function on the contract. + * @param options - The options for the domainSeparator function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { domainSeparator } from "thirdweb/extensions/tokens"; + * + * const result = await domainSeparator({ + * contract, + * }); + * + * ``` + */ +export async function domainSeparator(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/eip712Domain.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/eip712Domain.ts new file mode 100644 index 00000000000..40c013ad46b --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/eip712Domain.ts @@ -0,0 +1,94 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0x84b0196e" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "bytes1", + name: "fields", + }, + { + type: "string", + name: "name", + }, + { + type: "string", + name: "version", + }, + { + type: "uint256", + name: "chainId", + }, + { + type: "address", + name: "verifyingContract", + }, + { + type: "bytes32", + name: "salt", + }, + { + type: "uint256[]", + name: "extensions", + }, +] as const; + +/** + * Checks if the `eip712Domain` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `eip712Domain` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isEip712DomainSupported } from "thirdweb/extensions/tokens"; + * const supported = isEip712DomainSupported(["0x..."]); + * ``` + */ +export function isEip712DomainSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the eip712Domain function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeEip712DomainResult } from "thirdweb/extensions/tokens"; + * const result = decodeEip712DomainResultResult("..."); + * ``` + */ +export function decodeEip712DomainResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result); +} + +/** + * Calls the "eip712Domain" function on the contract. + * @param options - The options for the eip712Domain function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { eip712Domain } from "thirdweb/extensions/tokens"; + * + * const result = await eip712Domain({ + * contract, + * }); + * + * ``` + */ +export async function eip712Domain(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/feeConfigs.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/feeConfigs.ts new file mode 100644 index 00000000000..41d9e902587 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/feeConfigs.ts @@ -0,0 +1,142 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "feeConfigs" function. + */ +export type FeeConfigsParams = { + target: AbiParameterToPrimitiveType<{ type: "address"; name: "target" }>; + action: AbiParameterToPrimitiveType<{ type: "bytes4"; name: "action" }>; +}; + +export const FN_SELECTOR = "0x758515e1" as const; +const FN_INPUTS = [ + { + type: "address", + name: "target", + }, + { + type: "bytes4", + name: "action", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "address", + name: "recipient", + }, + { + type: "uint8", + name: "feeType", + }, + { + type: "uint256", + name: "value", + }, +] as const; + +/** + * Checks if the `feeConfigs` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `feeConfigs` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isFeeConfigsSupported } from "thirdweb/extensions/tokens"; + * const supported = isFeeConfigsSupported(["0x..."]); + * ``` + */ +export function isFeeConfigsSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "feeConfigs" function. + * @param options - The options for the feeConfigs function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeFeeConfigsParams } from "thirdweb/extensions/tokens"; + * const result = encodeFeeConfigsParams({ + * target: ..., + * action: ..., + * }); + * ``` + */ +export function encodeFeeConfigsParams(options: FeeConfigsParams) { + return encodeAbiParameters(FN_INPUTS, [options.target, options.action]); +} + +/** + * Encodes the "feeConfigs" function into a Hex string with its parameters. + * @param options - The options for the feeConfigs function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeFeeConfigs } from "thirdweb/extensions/tokens"; + * const result = encodeFeeConfigs({ + * target: ..., + * action: ..., + * }); + * ``` + */ +export function encodeFeeConfigs(options: FeeConfigsParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeFeeConfigsParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the feeConfigs function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeFeeConfigsResult } from "thirdweb/extensions/tokens"; + * const result = decodeFeeConfigsResultResult("..."); + * ``` + */ +export function decodeFeeConfigsResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result); +} + +/** + * Calls the "feeConfigs" function on the contract. + * @param options - The options for the feeConfigs function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { feeConfigs } from "thirdweb/extensions/tokens"; + * + * const result = await feeConfigs({ + * contract, + * target: ..., + * action: ..., + * }); + * + * ``` + */ +export async function feeConfigs( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.target, options.action], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/feeRecipient.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/feeRecipient.ts new file mode 100644 index 00000000000..ddd961ece01 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/feeRecipient.ts @@ -0,0 +1,69 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0x46904840" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "address", + }, +] as const; + +/** + * Checks if the `feeRecipient` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `feeRecipient` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isFeeRecipientSupported } from "thirdweb/extensions/tokens"; + * const supported = isFeeRecipientSupported(["0x..."]); + * ``` + */ +export function isFeeRecipientSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the feeRecipient function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeFeeRecipientResult } from "thirdweb/extensions/tokens"; + * const result = decodeFeeRecipientResultResult("..."); + * ``` + */ +export function decodeFeeRecipientResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "feeRecipient" function on the contract. + * @param options - The options for the feeRecipient function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { feeRecipient } from "thirdweb/extensions/tokens"; + * + * const result = await feeRecipient({ + * contract, + * }); + * + * ``` + */ +export async function feeRecipient(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/getFeeConfig.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/getFeeConfig.ts new file mode 100644 index 00000000000..486a16008dc --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/getFeeConfig.ts @@ -0,0 +1,148 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "getFeeConfig" function. + */ +export type GetFeeConfigParams = { + target: AbiParameterToPrimitiveType<{ type: "address"; name: "target" }>; + action: AbiParameterToPrimitiveType<{ type: "bytes4"; name: "action" }>; +}; + +export const FN_SELECTOR = "0x17305ee1" as const; +const FN_INPUTS = [ + { + type: "address", + name: "target", + }, + { + type: "bytes4", + name: "action", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "tuple", + name: "config", + components: [ + { + type: "address", + name: "recipient", + }, + { + type: "uint8", + name: "feeType", + }, + { + type: "uint256", + name: "value", + }, + ], + }, +] as const; + +/** + * Checks if the `getFeeConfig` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `getFeeConfig` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isGetFeeConfigSupported } from "thirdweb/extensions/tokens"; + * const supported = isGetFeeConfigSupported(["0x..."]); + * ``` + */ +export function isGetFeeConfigSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "getFeeConfig" function. + * @param options - The options for the getFeeConfig function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeGetFeeConfigParams } from "thirdweb/extensions/tokens"; + * const result = encodeGetFeeConfigParams({ + * target: ..., + * action: ..., + * }); + * ``` + */ +export function encodeGetFeeConfigParams(options: GetFeeConfigParams) { + return encodeAbiParameters(FN_INPUTS, [options.target, options.action]); +} + +/** + * Encodes the "getFeeConfig" function into a Hex string with its parameters. + * @param options - The options for the getFeeConfig function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeGetFeeConfig } from "thirdweb/extensions/tokens"; + * const result = encodeGetFeeConfig({ + * target: ..., + * action: ..., + * }); + * ``` + */ +export function encodeGetFeeConfig(options: GetFeeConfigParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeGetFeeConfigParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the getFeeConfig function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeGetFeeConfigResult } from "thirdweb/extensions/tokens"; + * const result = decodeGetFeeConfigResultResult("..."); + * ``` + */ +export function decodeGetFeeConfigResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "getFeeConfig" function on the contract. + * @param options - The options for the getFeeConfig function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { getFeeConfig } from "thirdweb/extensions/tokens"; + * + * const result = await getFeeConfig({ + * contract, + * target: ..., + * action: ..., + * }); + * + * ``` + */ +export async function getFeeConfig( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.target, options.action], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/hasAllRoles.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/hasAllRoles.ts new file mode 100644 index 00000000000..b005d7cb405 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/hasAllRoles.ts @@ -0,0 +1,133 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "hasAllRoles" function. + */ +export type HasAllRolesParams = { + user: AbiParameterToPrimitiveType<{ type: "address"; name: "user" }>; + roles: AbiParameterToPrimitiveType<{ type: "uint256"; name: "roles" }>; +}; + +export const FN_SELECTOR = "0x1cd64df4" as const; +const FN_INPUTS = [ + { + type: "address", + name: "user", + }, + { + type: "uint256", + name: "roles", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "bool", + }, +] as const; + +/** + * Checks if the `hasAllRoles` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `hasAllRoles` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isHasAllRolesSupported } from "thirdweb/extensions/tokens"; + * const supported = isHasAllRolesSupported(["0x..."]); + * ``` + */ +export function isHasAllRolesSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "hasAllRoles" function. + * @param options - The options for the hasAllRoles function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeHasAllRolesParams } from "thirdweb/extensions/tokens"; + * const result = encodeHasAllRolesParams({ + * user: ..., + * roles: ..., + * }); + * ``` + */ +export function encodeHasAllRolesParams(options: HasAllRolesParams) { + return encodeAbiParameters(FN_INPUTS, [options.user, options.roles]); +} + +/** + * Encodes the "hasAllRoles" function into a Hex string with its parameters. + * @param options - The options for the hasAllRoles function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeHasAllRoles } from "thirdweb/extensions/tokens"; + * const result = encodeHasAllRoles({ + * user: ..., + * roles: ..., + * }); + * ``` + */ +export function encodeHasAllRoles(options: HasAllRolesParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeHasAllRolesParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the hasAllRoles function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeHasAllRolesResult } from "thirdweb/extensions/tokens"; + * const result = decodeHasAllRolesResultResult("..."); + * ``` + */ +export function decodeHasAllRolesResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "hasAllRoles" function on the contract. + * @param options - The options for the hasAllRoles function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { hasAllRoles } from "thirdweb/extensions/tokens"; + * + * const result = await hasAllRoles({ + * contract, + * user: ..., + * roles: ..., + * }); + * + * ``` + */ +export async function hasAllRoles( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.user, options.roles], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/hasAnyRole.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/hasAnyRole.ts new file mode 100644 index 00000000000..ed6eba92071 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/hasAnyRole.ts @@ -0,0 +1,133 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "hasAnyRole" function. + */ +export type HasAnyRoleParams = { + user: AbiParameterToPrimitiveType<{ type: "address"; name: "user" }>; + roles: AbiParameterToPrimitiveType<{ type: "uint256"; name: "roles" }>; +}; + +export const FN_SELECTOR = "0x514e62fc" as const; +const FN_INPUTS = [ + { + type: "address", + name: "user", + }, + { + type: "uint256", + name: "roles", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "bool", + }, +] as const; + +/** + * Checks if the `hasAnyRole` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `hasAnyRole` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isHasAnyRoleSupported } from "thirdweb/extensions/tokens"; + * const supported = isHasAnyRoleSupported(["0x..."]); + * ``` + */ +export function isHasAnyRoleSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "hasAnyRole" function. + * @param options - The options for the hasAnyRole function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeHasAnyRoleParams } from "thirdweb/extensions/tokens"; + * const result = encodeHasAnyRoleParams({ + * user: ..., + * roles: ..., + * }); + * ``` + */ +export function encodeHasAnyRoleParams(options: HasAnyRoleParams) { + return encodeAbiParameters(FN_INPUTS, [options.user, options.roles]); +} + +/** + * Encodes the "hasAnyRole" function into a Hex string with its parameters. + * @param options - The options for the hasAnyRole function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeHasAnyRole } from "thirdweb/extensions/tokens"; + * const result = encodeHasAnyRole({ + * user: ..., + * roles: ..., + * }); + * ``` + */ +export function encodeHasAnyRole(options: HasAnyRoleParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeHasAnyRoleParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the hasAnyRole function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeHasAnyRoleResult } from "thirdweb/extensions/tokens"; + * const result = decodeHasAnyRoleResultResult("..."); + * ``` + */ +export function decodeHasAnyRoleResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "hasAnyRole" function on the contract. + * @param options - The options for the hasAnyRole function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { hasAnyRole } from "thirdweb/extensions/tokens"; + * + * const result = await hasAnyRole({ + * contract, + * user: ..., + * roles: ..., + * }); + * + * ``` + */ +export async function hasAnyRole( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.user, options.roles], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/owner.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/owner.ts new file mode 100644 index 00000000000..b0d99f234f0 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/owner.ts @@ -0,0 +1,70 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0x8da5cb5b" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "address", + name: "result", + }, +] as const; + +/** + * Checks if the `owner` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `owner` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isOwnerSupported } from "thirdweb/extensions/tokens"; + * const supported = isOwnerSupported(["0x..."]); + * ``` + */ +export function isOwnerSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the owner function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeOwnerResult } from "thirdweb/extensions/tokens"; + * const result = decodeOwnerResultResult("..."); + * ``` + */ +export function decodeOwnerResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "owner" function on the contract. + * @param options - The options for the owner function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { owner } from "thirdweb/extensions/tokens"; + * + * const result = await owner({ + * contract, + * }); + * + * ``` + */ +export async function owner(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/ownershipHandoverExpiresAt.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/ownershipHandoverExpiresAt.ts new file mode 100644 index 00000000000..0313d621929 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/ownershipHandoverExpiresAt.ts @@ -0,0 +1,135 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "ownershipHandoverExpiresAt" function. + */ +export type OwnershipHandoverExpiresAtParams = { + pendingOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "pendingOwner"; + }>; +}; + +export const FN_SELECTOR = "0xfee81cf4" as const; +const FN_INPUTS = [ + { + type: "address", + name: "pendingOwner", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "uint256", + name: "result", + }, +] as const; + +/** + * Checks if the `ownershipHandoverExpiresAt` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `ownershipHandoverExpiresAt` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isOwnershipHandoverExpiresAtSupported } from "thirdweb/extensions/tokens"; + * const supported = isOwnershipHandoverExpiresAtSupported(["0x..."]); + * ``` + */ +export function isOwnershipHandoverExpiresAtSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "ownershipHandoverExpiresAt" function. + * @param options - The options for the ownershipHandoverExpiresAt function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeOwnershipHandoverExpiresAtParams } from "thirdweb/extensions/tokens"; + * const result = encodeOwnershipHandoverExpiresAtParams({ + * pendingOwner: ..., + * }); + * ``` + */ +export function encodeOwnershipHandoverExpiresAtParams( + options: OwnershipHandoverExpiresAtParams, +) { + return encodeAbiParameters(FN_INPUTS, [options.pendingOwner]); +} + +/** + * Encodes the "ownershipHandoverExpiresAt" function into a Hex string with its parameters. + * @param options - The options for the ownershipHandoverExpiresAt function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeOwnershipHandoverExpiresAt } from "thirdweb/extensions/tokens"; + * const result = encodeOwnershipHandoverExpiresAt({ + * pendingOwner: ..., + * }); + * ``` + */ +export function encodeOwnershipHandoverExpiresAt( + options: OwnershipHandoverExpiresAtParams, +) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeOwnershipHandoverExpiresAtParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the ownershipHandoverExpiresAt function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeOwnershipHandoverExpiresAtResult } from "thirdweb/extensions/tokens"; + * const result = decodeOwnershipHandoverExpiresAtResultResult("..."); + * ``` + */ +export function decodeOwnershipHandoverExpiresAtResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "ownershipHandoverExpiresAt" function on the contract. + * @param options - The options for the ownershipHandoverExpiresAt function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { ownershipHandoverExpiresAt } from "thirdweb/extensions/tokens"; + * + * const result = await ownershipHandoverExpiresAt({ + * contract, + * pendingOwner: ..., + * }); + * + * ``` + */ +export async function ownershipHandoverExpiresAt( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.pendingOwner], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/rolesOf.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/rolesOf.ts new file mode 100644 index 00000000000..c4681f40e5c --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/rolesOf.ts @@ -0,0 +1,122 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "rolesOf" function. + */ +export type RolesOfParams = { + user: AbiParameterToPrimitiveType<{ type: "address"; name: "user" }>; +}; + +export const FN_SELECTOR = "0x2de94807" as const; +const FN_INPUTS = [ + { + type: "address", + name: "user", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "uint256", + name: "roles", + }, +] as const; + +/** + * Checks if the `rolesOf` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `rolesOf` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isRolesOfSupported } from "thirdweb/extensions/tokens"; + * const supported = isRolesOfSupported(["0x..."]); + * ``` + */ +export function isRolesOfSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "rolesOf" function. + * @param options - The options for the rolesOf function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeRolesOfParams } from "thirdweb/extensions/tokens"; + * const result = encodeRolesOfParams({ + * user: ..., + * }); + * ``` + */ +export function encodeRolesOfParams(options: RolesOfParams) { + return encodeAbiParameters(FN_INPUTS, [options.user]); +} + +/** + * Encodes the "rolesOf" function into a Hex string with its parameters. + * @param options - The options for the rolesOf function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeRolesOf } from "thirdweb/extensions/tokens"; + * const result = encodeRolesOf({ + * user: ..., + * }); + * ``` + */ +export function encodeRolesOf(options: RolesOfParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeRolesOfParams(options).slice(2)) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the rolesOf function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeRolesOfResult } from "thirdweb/extensions/tokens"; + * const result = decodeRolesOfResultResult("..."); + * ``` + */ +export function decodeRolesOfResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "rolesOf" function on the contract. + * @param options - The options for the rolesOf function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { rolesOf } from "thirdweb/extensions/tokens"; + * + * const result = await rolesOf({ + * contract, + * user: ..., + * }); + * + * ``` + */ +export async function rolesOf(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.user], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/usedNonces.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/usedNonces.ts new file mode 100644 index 00000000000..3fe2b4eb3a7 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/read/usedNonces.ts @@ -0,0 +1,129 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "usedNonces" function. + */ +export type UsedNoncesParams = { + signerNonce: AbiParameterToPrimitiveType<{ + type: "bytes32"; + name: "signerNonce"; + }>; +}; + +export const FN_SELECTOR = "0xfeb61724" as const; +const FN_INPUTS = [ + { + type: "bytes32", + name: "signerNonce", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "bool", + name: "used", + }, +] as const; + +/** + * Checks if the `usedNonces` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `usedNonces` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isUsedNoncesSupported } from "thirdweb/extensions/tokens"; + * const supported = isUsedNoncesSupported(["0x..."]); + * ``` + */ +export function isUsedNoncesSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "usedNonces" function. + * @param options - The options for the usedNonces function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeUsedNoncesParams } from "thirdweb/extensions/tokens"; + * const result = encodeUsedNoncesParams({ + * signerNonce: ..., + * }); + * ``` + */ +export function encodeUsedNoncesParams(options: UsedNoncesParams) { + return encodeAbiParameters(FN_INPUTS, [options.signerNonce]); +} + +/** + * Encodes the "usedNonces" function into a Hex string with its parameters. + * @param options - The options for the usedNonces function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeUsedNonces } from "thirdweb/extensions/tokens"; + * const result = encodeUsedNonces({ + * signerNonce: ..., + * }); + * ``` + */ +export function encodeUsedNonces(options: UsedNoncesParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeUsedNoncesParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the usedNonces function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeUsedNoncesResult } from "thirdweb/extensions/tokens"; + * const result = decodeUsedNoncesResultResult("..."); + * ``` + */ +export function decodeUsedNoncesResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "usedNonces" function on the contract. + * @param options - The options for the usedNonces function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { usedNonces } from "thirdweb/extensions/tokens"; + * + * const result = await usedNonces({ + * contract, + * signerNonce: ..., + * }); + * + * ``` + */ +export async function usedNonces( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.signerNonce], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/cancelOwnershipHandover.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/cancelOwnershipHandover.ts new file mode 100644 index 00000000000..dcbc74fc6af --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/cancelOwnershipHandover.ts @@ -0,0 +1,52 @@ +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; + +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; + +export const FN_SELECTOR = "0x54d1f13d" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `cancelOwnershipHandover` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `cancelOwnershipHandover` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isCancelOwnershipHandoverSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isCancelOwnershipHandoverSupported(["0x..."]); + * ``` + */ +export function isCancelOwnershipHandoverSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Prepares a transaction to call the "cancelOwnershipHandover" function on the contract. + * @param options - The options for the "cancelOwnershipHandover" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { cancelOwnershipHandover } from "thirdweb/extensions/tokens"; + * + * const transaction = cancelOwnershipHandover(); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function cancelOwnershipHandover(options: BaseTransactionOptions) { + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/completeOwnershipHandover.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/completeOwnershipHandover.ts new file mode 100644 index 00000000000..21cad20a483 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/completeOwnershipHandover.ts @@ -0,0 +1,148 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "completeOwnershipHandover" function. + */ +export type CompleteOwnershipHandoverParams = WithOverrides<{ + pendingOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "pendingOwner"; + }>; +}>; + +export const FN_SELECTOR = "0xf04e283e" as const; +const FN_INPUTS = [ + { + type: "address", + name: "pendingOwner", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `completeOwnershipHandover` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `completeOwnershipHandover` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isCompleteOwnershipHandoverSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isCompleteOwnershipHandoverSupported(["0x..."]); + * ``` + */ +export function isCompleteOwnershipHandoverSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "completeOwnershipHandover" function. + * @param options - The options for the completeOwnershipHandover function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeCompleteOwnershipHandoverParams } from "thirdweb/extensions/tokens"; + * const result = encodeCompleteOwnershipHandoverParams({ + * pendingOwner: ..., + * }); + * ``` + */ +export function encodeCompleteOwnershipHandoverParams( + options: CompleteOwnershipHandoverParams, +) { + return encodeAbiParameters(FN_INPUTS, [options.pendingOwner]); +} + +/** + * Encodes the "completeOwnershipHandover" function into a Hex string with its parameters. + * @param options - The options for the completeOwnershipHandover function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeCompleteOwnershipHandover } from "thirdweb/extensions/tokens"; + * const result = encodeCompleteOwnershipHandover({ + * pendingOwner: ..., + * }); + * ``` + */ +export function encodeCompleteOwnershipHandover( + options: CompleteOwnershipHandoverParams, +) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeCompleteOwnershipHandoverParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "completeOwnershipHandover" function on the contract. + * @param options - The options for the "completeOwnershipHandover" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { completeOwnershipHandover } from "thirdweb/extensions/tokens"; + * + * const transaction = completeOwnershipHandover({ + * contract, + * pendingOwner: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function completeOwnershipHandover( + options: BaseTransactionOptions< + | CompleteOwnershipHandoverParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.pendingOwner] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/grantRoles.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/grantRoles.ts new file mode 100644 index 00000000000..7643c1e7899 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/grantRoles.ts @@ -0,0 +1,147 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "grantRoles" function. + */ +export type GrantRolesParams = WithOverrides<{ + user: AbiParameterToPrimitiveType<{ type: "address"; name: "user" }>; + roles: AbiParameterToPrimitiveType<{ type: "uint256"; name: "roles" }>; +}>; + +export const FN_SELECTOR = "0x1c10893f" as const; +const FN_INPUTS = [ + { + type: "address", + name: "user", + }, + { + type: "uint256", + name: "roles", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `grantRoles` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `grantRoles` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isGrantRolesSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isGrantRolesSupported(["0x..."]); + * ``` + */ +export function isGrantRolesSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "grantRoles" function. + * @param options - The options for the grantRoles function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeGrantRolesParams } from "thirdweb/extensions/tokens"; + * const result = encodeGrantRolesParams({ + * user: ..., + * roles: ..., + * }); + * ``` + */ +export function encodeGrantRolesParams(options: GrantRolesParams) { + return encodeAbiParameters(FN_INPUTS, [options.user, options.roles]); +} + +/** + * Encodes the "grantRoles" function into a Hex string with its parameters. + * @param options - The options for the grantRoles function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeGrantRoles } from "thirdweb/extensions/tokens"; + * const result = encodeGrantRoles({ + * user: ..., + * roles: ..., + * }); + * ``` + */ +export function encodeGrantRoles(options: GrantRolesParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeGrantRolesParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "grantRoles" function on the contract. + * @param options - The options for the "grantRoles" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { grantRoles } from "thirdweb/extensions/tokens"; + * + * const transaction = grantRoles({ + * contract, + * user: ..., + * roles: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function grantRoles( + options: BaseTransactionOptions< + | GrantRolesParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.user, resolvedOptions.roles] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/renounceOwnership.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/renounceOwnership.ts new file mode 100644 index 00000000000..622553c35e4 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/renounceOwnership.ts @@ -0,0 +1,50 @@ +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; + +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; + +export const FN_SELECTOR = "0x715018a6" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `renounceOwnership` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `renounceOwnership` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isRenounceOwnershipSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isRenounceOwnershipSupported(["0x..."]); + * ``` + */ +export function isRenounceOwnershipSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Prepares a transaction to call the "renounceOwnership" function on the contract. + * @param options - The options for the "renounceOwnership" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { renounceOwnership } from "thirdweb/extensions/tokens"; + * + * const transaction = renounceOwnership(); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function renounceOwnership(options: BaseTransactionOptions) { + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/renounceRoles.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/renounceRoles.ts new file mode 100644 index 00000000000..b9ca3a80944 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/renounceRoles.ts @@ -0,0 +1,139 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "renounceRoles" function. + */ +export type RenounceRolesParams = WithOverrides<{ + roles: AbiParameterToPrimitiveType<{ type: "uint256"; name: "roles" }>; +}>; + +export const FN_SELECTOR = "0x183a4f6e" as const; +const FN_INPUTS = [ + { + type: "uint256", + name: "roles", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `renounceRoles` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `renounceRoles` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isRenounceRolesSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isRenounceRolesSupported(["0x..."]); + * ``` + */ +export function isRenounceRolesSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "renounceRoles" function. + * @param options - The options for the renounceRoles function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeRenounceRolesParams } from "thirdweb/extensions/tokens"; + * const result = encodeRenounceRolesParams({ + * roles: ..., + * }); + * ``` + */ +export function encodeRenounceRolesParams(options: RenounceRolesParams) { + return encodeAbiParameters(FN_INPUTS, [options.roles]); +} + +/** + * Encodes the "renounceRoles" function into a Hex string with its parameters. + * @param options - The options for the renounceRoles function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeRenounceRoles } from "thirdweb/extensions/tokens"; + * const result = encodeRenounceRoles({ + * roles: ..., + * }); + * ``` + */ +export function encodeRenounceRoles(options: RenounceRolesParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeRenounceRolesParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "renounceRoles" function on the contract. + * @param options - The options for the "renounceRoles" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { renounceRoles } from "thirdweb/extensions/tokens"; + * + * const transaction = renounceRoles({ + * contract, + * roles: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function renounceRoles( + options: BaseTransactionOptions< + | RenounceRolesParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.roles] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/requestOwnershipHandover.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/requestOwnershipHandover.ts new file mode 100644 index 00000000000..91b716f38a8 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/requestOwnershipHandover.ts @@ -0,0 +1,52 @@ +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; + +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; + +export const FN_SELECTOR = "0x25692962" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `requestOwnershipHandover` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `requestOwnershipHandover` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isRequestOwnershipHandoverSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isRequestOwnershipHandoverSupported(["0x..."]); + * ``` + */ +export function isRequestOwnershipHandoverSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Prepares a transaction to call the "requestOwnershipHandover" function on the contract. + * @param options - The options for the "requestOwnershipHandover" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { requestOwnershipHandover } from "thirdweb/extensions/tokens"; + * + * const transaction = requestOwnershipHandover(); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function requestOwnershipHandover(options: BaseTransactionOptions) { + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/revokeRoles.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/revokeRoles.ts new file mode 100644 index 00000000000..d8a69363eb4 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/revokeRoles.ts @@ -0,0 +1,147 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "revokeRoles" function. + */ +export type RevokeRolesParams = WithOverrides<{ + user: AbiParameterToPrimitiveType<{ type: "address"; name: "user" }>; + roles: AbiParameterToPrimitiveType<{ type: "uint256"; name: "roles" }>; +}>; + +export const FN_SELECTOR = "0x4a4ee7b1" as const; +const FN_INPUTS = [ + { + type: "address", + name: "user", + }, + { + type: "uint256", + name: "roles", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `revokeRoles` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `revokeRoles` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isRevokeRolesSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isRevokeRolesSupported(["0x..."]); + * ``` + */ +export function isRevokeRolesSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "revokeRoles" function. + * @param options - The options for the revokeRoles function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeRevokeRolesParams } from "thirdweb/extensions/tokens"; + * const result = encodeRevokeRolesParams({ + * user: ..., + * roles: ..., + * }); + * ``` + */ +export function encodeRevokeRolesParams(options: RevokeRolesParams) { + return encodeAbiParameters(FN_INPUTS, [options.user, options.roles]); +} + +/** + * Encodes the "revokeRoles" function into a Hex string with its parameters. + * @param options - The options for the revokeRoles function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeRevokeRoles } from "thirdweb/extensions/tokens"; + * const result = encodeRevokeRoles({ + * user: ..., + * roles: ..., + * }); + * ``` + */ +export function encodeRevokeRoles(options: RevokeRolesParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeRevokeRolesParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "revokeRoles" function on the contract. + * @param options - The options for the "revokeRoles" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { revokeRoles } from "thirdweb/extensions/tokens"; + * + * const transaction = revokeRoles({ + * contract, + * user: ..., + * roles: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function revokeRoles( + options: BaseTransactionOptions< + | RevokeRolesParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.user, resolvedOptions.roles] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/setFeeConfig.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/setFeeConfig.ts new file mode 100644 index 00000000000..3bc6b013df5 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/setFeeConfig.ts @@ -0,0 +1,163 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "setFeeConfig" function. + */ +export type SetFeeConfigParams = WithOverrides<{ + action: AbiParameterToPrimitiveType<{ type: "bytes4"; name: "action" }>; + feeType: AbiParameterToPrimitiveType<{ type: "uint8"; name: "feeType" }>; + value: AbiParameterToPrimitiveType<{ type: "uint256"; name: "value" }>; +}>; + +export const FN_SELECTOR = "0x636d2be9" as const; +const FN_INPUTS = [ + { + type: "bytes4", + name: "action", + }, + { + type: "uint8", + name: "feeType", + }, + { + type: "uint256", + name: "value", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `setFeeConfig` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `setFeeConfig` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isSetFeeConfigSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isSetFeeConfigSupported(["0x..."]); + * ``` + */ +export function isSetFeeConfigSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "setFeeConfig" function. + * @param options - The options for the setFeeConfig function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeSetFeeConfigParams } from "thirdweb/extensions/tokens"; + * const result = encodeSetFeeConfigParams({ + * action: ..., + * feeType: ..., + * value: ..., + * }); + * ``` + */ +export function encodeSetFeeConfigParams(options: SetFeeConfigParams) { + return encodeAbiParameters(FN_INPUTS, [ + options.action, + options.feeType, + options.value, + ]); +} + +/** + * Encodes the "setFeeConfig" function into a Hex string with its parameters. + * @param options - The options for the setFeeConfig function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeSetFeeConfig } from "thirdweb/extensions/tokens"; + * const result = encodeSetFeeConfig({ + * action: ..., + * feeType: ..., + * value: ..., + * }); + * ``` + */ +export function encodeSetFeeConfig(options: SetFeeConfigParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeSetFeeConfigParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "setFeeConfig" function on the contract. + * @param options - The options for the "setFeeConfig" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { setFeeConfig } from "thirdweb/extensions/tokens"; + * + * const transaction = setFeeConfig({ + * contract, + * action: ..., + * feeType: ..., + * value: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function setFeeConfig( + options: BaseTransactionOptions< + | SetFeeConfigParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [ + resolvedOptions.action, + resolvedOptions.feeType, + resolvedOptions.value, + ] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/setFeeConfigBySignature.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/setFeeConfigBySignature.ts new file mode 100644 index 00000000000..401a5122861 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/setFeeConfigBySignature.ts @@ -0,0 +1,222 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "setFeeConfigBySignature" function. + */ +export type SetFeeConfigBySignatureParams = WithOverrides<{ + target: AbiParameterToPrimitiveType<{ type: "address"; name: "target" }>; + action: AbiParameterToPrimitiveType<{ type: "bytes4"; name: "action" }>; + recipient: AbiParameterToPrimitiveType<{ + type: "address"; + name: "recipient"; + }>; + feeType: AbiParameterToPrimitiveType<{ type: "uint8"; name: "feeType" }>; + value: AbiParameterToPrimitiveType<{ type: "uint256"; name: "value" }>; + nonce: AbiParameterToPrimitiveType<{ type: "uint256"; name: "nonce" }>; + deadline: AbiParameterToPrimitiveType<{ type: "uint256"; name: "deadline" }>; + signature: AbiParameterToPrimitiveType<{ type: "bytes"; name: "signature" }>; +}>; + +export const FN_SELECTOR = "0x9ba861e3" as const; +const FN_INPUTS = [ + { + type: "address", + name: "target", + }, + { + type: "bytes4", + name: "action", + }, + { + type: "address", + name: "recipient", + }, + { + type: "uint8", + name: "feeType", + }, + { + type: "uint256", + name: "value", + }, + { + type: "uint256", + name: "nonce", + }, + { + type: "uint256", + name: "deadline", + }, + { + type: "bytes", + name: "signature", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `setFeeConfigBySignature` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `setFeeConfigBySignature` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isSetFeeConfigBySignatureSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isSetFeeConfigBySignatureSupported(["0x..."]); + * ``` + */ +export function isSetFeeConfigBySignatureSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "setFeeConfigBySignature" function. + * @param options - The options for the setFeeConfigBySignature function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeSetFeeConfigBySignatureParams } from "thirdweb/extensions/tokens"; + * const result = encodeSetFeeConfigBySignatureParams({ + * target: ..., + * action: ..., + * recipient: ..., + * feeType: ..., + * value: ..., + * nonce: ..., + * deadline: ..., + * signature: ..., + * }); + * ``` + */ +export function encodeSetFeeConfigBySignatureParams( + options: SetFeeConfigBySignatureParams, +) { + return encodeAbiParameters(FN_INPUTS, [ + options.target, + options.action, + options.recipient, + options.feeType, + options.value, + options.nonce, + options.deadline, + options.signature, + ]); +} + +/** + * Encodes the "setFeeConfigBySignature" function into a Hex string with its parameters. + * @param options - The options for the setFeeConfigBySignature function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeSetFeeConfigBySignature } from "thirdweb/extensions/tokens"; + * const result = encodeSetFeeConfigBySignature({ + * target: ..., + * action: ..., + * recipient: ..., + * feeType: ..., + * value: ..., + * nonce: ..., + * deadline: ..., + * signature: ..., + * }); + * ``` + */ +export function encodeSetFeeConfigBySignature( + options: SetFeeConfigBySignatureParams, +) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeSetFeeConfigBySignatureParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "setFeeConfigBySignature" function on the contract. + * @param options - The options for the "setFeeConfigBySignature" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { setFeeConfigBySignature } from "thirdweb/extensions/tokens"; + * + * const transaction = setFeeConfigBySignature({ + * contract, + * target: ..., + * action: ..., + * recipient: ..., + * feeType: ..., + * value: ..., + * nonce: ..., + * deadline: ..., + * signature: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function setFeeConfigBySignature( + options: BaseTransactionOptions< + | SetFeeConfigBySignatureParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [ + resolvedOptions.target, + resolvedOptions.action, + resolvedOptions.recipient, + resolvedOptions.feeType, + resolvedOptions.value, + resolvedOptions.nonce, + resolvedOptions.deadline, + resolvedOptions.signature, + ] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/setFeeRecipient.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/setFeeRecipient.ts new file mode 100644 index 00000000000..fab5f82cd55 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/setFeeRecipient.ts @@ -0,0 +1,142 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "setFeeRecipient" function. + */ +export type SetFeeRecipientParams = WithOverrides<{ + feeRecipient: AbiParameterToPrimitiveType<{ + type: "address"; + name: "_feeRecipient"; + }>; +}>; + +export const FN_SELECTOR = "0xe74b981b" as const; +const FN_INPUTS = [ + { + type: "address", + name: "_feeRecipient", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `setFeeRecipient` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `setFeeRecipient` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isSetFeeRecipientSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isSetFeeRecipientSupported(["0x..."]); + * ``` + */ +export function isSetFeeRecipientSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "setFeeRecipient" function. + * @param options - The options for the setFeeRecipient function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeSetFeeRecipientParams } from "thirdweb/extensions/tokens"; + * const result = encodeSetFeeRecipientParams({ + * feeRecipient: ..., + * }); + * ``` + */ +export function encodeSetFeeRecipientParams(options: SetFeeRecipientParams) { + return encodeAbiParameters(FN_INPUTS, [options.feeRecipient]); +} + +/** + * Encodes the "setFeeRecipient" function into a Hex string with its parameters. + * @param options - The options for the setFeeRecipient function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeSetFeeRecipient } from "thirdweb/extensions/tokens"; + * const result = encodeSetFeeRecipient({ + * feeRecipient: ..., + * }); + * ``` + */ +export function encodeSetFeeRecipient(options: SetFeeRecipientParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeSetFeeRecipientParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "setFeeRecipient" function on the contract. + * @param options - The options for the "setFeeRecipient" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { setFeeRecipient } from "thirdweb/extensions/tokens"; + * + * const transaction = setFeeRecipient({ + * contract, + * feeRecipient: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function setFeeRecipient( + options: BaseTransactionOptions< + | SetFeeRecipientParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.feeRecipient] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/setTargetFeeConfig.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/setTargetFeeConfig.ts new file mode 100644 index 00000000000..619d7783d67 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/setTargetFeeConfig.ts @@ -0,0 +1,188 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "setTargetFeeConfig" function. + */ +export type SetTargetFeeConfigParams = WithOverrides<{ + target: AbiParameterToPrimitiveType<{ type: "address"; name: "target" }>; + action: AbiParameterToPrimitiveType<{ type: "bytes4"; name: "action" }>; + recipient: AbiParameterToPrimitiveType<{ + type: "address"; + name: "recipient"; + }>; + feeType: AbiParameterToPrimitiveType<{ type: "uint8"; name: "feeType" }>; + value: AbiParameterToPrimitiveType<{ type: "uint256"; name: "value" }>; +}>; + +export const FN_SELECTOR = "0xd20caa1a" as const; +const FN_INPUTS = [ + { + type: "address", + name: "target", + }, + { + type: "bytes4", + name: "action", + }, + { + type: "address", + name: "recipient", + }, + { + type: "uint8", + name: "feeType", + }, + { + type: "uint256", + name: "value", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `setTargetFeeConfig` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `setTargetFeeConfig` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isSetTargetFeeConfigSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isSetTargetFeeConfigSupported(["0x..."]); + * ``` + */ +export function isSetTargetFeeConfigSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "setTargetFeeConfig" function. + * @param options - The options for the setTargetFeeConfig function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeSetTargetFeeConfigParams } from "thirdweb/extensions/tokens"; + * const result = encodeSetTargetFeeConfigParams({ + * target: ..., + * action: ..., + * recipient: ..., + * feeType: ..., + * value: ..., + * }); + * ``` + */ +export function encodeSetTargetFeeConfigParams( + options: SetTargetFeeConfigParams, +) { + return encodeAbiParameters(FN_INPUTS, [ + options.target, + options.action, + options.recipient, + options.feeType, + options.value, + ]); +} + +/** + * Encodes the "setTargetFeeConfig" function into a Hex string with its parameters. + * @param options - The options for the setTargetFeeConfig function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeSetTargetFeeConfig } from "thirdweb/extensions/tokens"; + * const result = encodeSetTargetFeeConfig({ + * target: ..., + * action: ..., + * recipient: ..., + * feeType: ..., + * value: ..., + * }); + * ``` + */ +export function encodeSetTargetFeeConfig(options: SetTargetFeeConfigParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeSetTargetFeeConfigParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "setTargetFeeConfig" function on the contract. + * @param options - The options for the "setTargetFeeConfig" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { setTargetFeeConfig } from "thirdweb/extensions/tokens"; + * + * const transaction = setTargetFeeConfig({ + * contract, + * target: ..., + * action: ..., + * recipient: ..., + * feeType: ..., + * value: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function setTargetFeeConfig( + options: BaseTransactionOptions< + | SetTargetFeeConfigParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [ + resolvedOptions.target, + resolvedOptions.action, + resolvedOptions.recipient, + resolvedOptions.feeType, + resolvedOptions.value, + ] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/transferOwnership.ts b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/transferOwnership.ts new file mode 100644 index 00000000000..108df00ea3f --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/FeeManager/write/transferOwnership.ts @@ -0,0 +1,141 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "transferOwnership" function. + */ +export type TransferOwnershipParams = WithOverrides<{ + newOwner: AbiParameterToPrimitiveType<{ type: "address"; name: "newOwner" }>; +}>; + +export const FN_SELECTOR = "0xf2fde38b" as const; +const FN_INPUTS = [ + { + type: "address", + name: "newOwner", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `transferOwnership` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `transferOwnership` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isTransferOwnershipSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isTransferOwnershipSupported(["0x..."]); + * ``` + */ +export function isTransferOwnershipSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "transferOwnership" function. + * @param options - The options for the transferOwnership function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeTransferOwnershipParams } from "thirdweb/extensions/tokens"; + * const result = encodeTransferOwnershipParams({ + * newOwner: ..., + * }); + * ``` + */ +export function encodeTransferOwnershipParams( + options: TransferOwnershipParams, +) { + return encodeAbiParameters(FN_INPUTS, [options.newOwner]); +} + +/** + * Encodes the "transferOwnership" function into a Hex string with its parameters. + * @param options - The options for the transferOwnership function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeTransferOwnership } from "thirdweb/extensions/tokens"; + * const result = encodeTransferOwnership({ + * newOwner: ..., + * }); + * ``` + */ +export function encodeTransferOwnership(options: TransferOwnershipParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeTransferOwnershipParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "transferOwnership" function on the contract. + * @param options - The options for the "transferOwnership" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { transferOwnership } from "thirdweb/extensions/tokens"; + * + * const transaction = transferOwnership({ + * contract, + * newOwner: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function transferOwnership( + options: BaseTransactionOptions< + | TransferOwnershipParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.newOwner] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/events/PositionLocked.ts b/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/events/PositionLocked.ts new file mode 100644 index 00000000000..beb43a7b08e --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/events/PositionLocked.ts @@ -0,0 +1,47 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "PositionLocked" event. + */ +export type PositionLockedEventFilters = Partial<{ + owner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "owner"; + indexed: true; + }>; + asset: AbiParameterToPrimitiveType<{ + type: "address"; + name: "asset"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the PositionLocked event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { positionLockedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * positionLockedEvent({ + * owner: ..., + * asset: ..., + * }) + * ], + * }); + * ``` + */ +export function positionLockedEvent(filters: PositionLockedEventFilters = {}) { + return prepareEvent({ + signature: + "event PositionLocked(address indexed owner, address indexed asset, address positionManager, uint256 tokenId, address recipient, address referrer)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/events/RewardCollected.ts b/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/events/RewardCollected.ts new file mode 100644 index 00000000000..ed150b0173c --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/events/RewardCollected.ts @@ -0,0 +1,49 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "RewardCollected" event. + */ +export type RewardCollectedEventFilters = Partial<{ + owner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "owner"; + indexed: true; + }>; + asset: AbiParameterToPrimitiveType<{ + type: "address"; + name: "asset"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the RewardCollected event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { rewardCollectedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * rewardCollectedEvent({ + * owner: ..., + * asset: ..., + * }) + * ], + * }); + * ``` + */ +export function rewardCollectedEvent( + filters: RewardCollectedEventFilters = {}, +) { + return prepareEvent({ + signature: + "event RewardCollected(address indexed owner, address indexed asset, address positionManager, uint256 tokenId, uint256 amount0, uint256 amount1)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/read/feeManager.ts b/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/read/feeManager.ts new file mode 100644 index 00000000000..281a03eec01 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/read/feeManager.ts @@ -0,0 +1,69 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0xd0fb0203" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "address", + }, +] as const; + +/** + * Checks if the `feeManager` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `feeManager` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isFeeManagerSupported } from "thirdweb/extensions/tokens"; + * const supported = isFeeManagerSupported(["0x..."]); + * ``` + */ +export function isFeeManagerSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the feeManager function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeFeeManagerResult } from "thirdweb/extensions/tokens"; + * const result = decodeFeeManagerResultResult("..."); + * ``` + */ +export function decodeFeeManagerResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "feeManager" function on the contract. + * @param options - The options for the feeManager function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { feeManager } from "thirdweb/extensions/tokens"; + * + * const result = await feeManager({ + * contract, + * }); + * + * ``` + */ +export async function feeManager(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/read/positions.ts b/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/read/positions.ts new file mode 100644 index 00000000000..25b8fc3b814 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/read/positions.ts @@ -0,0 +1,150 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "positions" function. + */ +export type PositionsParams = { + owner: AbiParameterToPrimitiveType<{ type: "address"; name: "owner" }>; + asset: AbiParameterToPrimitiveType<{ type: "address"; name: "asset" }>; +}; + +export const FN_SELECTOR = "0x4bd21445" as const; +const FN_INPUTS = [ + { + type: "address", + name: "owner", + }, + { + type: "address", + name: "asset", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "address", + name: "positionManager", + }, + { + type: "uint256", + name: "tokenId", + }, + { + type: "address", + name: "recipient", + }, + { + type: "address", + name: "referrer", + }, + { + type: "uint16", + name: "referrerBps", + }, +] as const; + +/** + * Checks if the `positions` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `positions` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isPositionsSupported } from "thirdweb/extensions/tokens"; + * const supported = isPositionsSupported(["0x..."]); + * ``` + */ +export function isPositionsSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "positions" function. + * @param options - The options for the positions function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodePositionsParams } from "thirdweb/extensions/tokens"; + * const result = encodePositionsParams({ + * owner: ..., + * asset: ..., + * }); + * ``` + */ +export function encodePositionsParams(options: PositionsParams) { + return encodeAbiParameters(FN_INPUTS, [options.owner, options.asset]); +} + +/** + * Encodes the "positions" function into a Hex string with its parameters. + * @param options - The options for the positions function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodePositions } from "thirdweb/extensions/tokens"; + * const result = encodePositions({ + * owner: ..., + * asset: ..., + * }); + * ``` + */ +export function encodePositions(options: PositionsParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodePositionsParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the positions function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodePositionsResult } from "thirdweb/extensions/tokens"; + * const result = decodePositionsResultResult("..."); + * ``` + */ +export function decodePositionsResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result); +} + +/** + * Calls the "positions" function on the contract. + * @param options - The options for the positions function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { positions } from "thirdweb/extensions/tokens"; + * + * const result = await positions({ + * contract, + * owner: ..., + * asset: ..., + * }); + * + * ``` + */ +export async function positions( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.owner, options.asset], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/read/v3PositionManager.ts b/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/read/v3PositionManager.ts new file mode 100644 index 00000000000..c832b641015 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/read/v3PositionManager.ts @@ -0,0 +1,69 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0x39406c50" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "address", + }, +] as const; + +/** + * Checks if the `v3PositionManager` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `v3PositionManager` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isV3PositionManagerSupported } from "thirdweb/extensions/tokens"; + * const supported = isV3PositionManagerSupported(["0x..."]); + * ``` + */ +export function isV3PositionManagerSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the v3PositionManager function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeV3PositionManagerResult } from "thirdweb/extensions/tokens"; + * const result = decodeV3PositionManagerResultResult("..."); + * ``` + */ +export function decodeV3PositionManagerResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "v3PositionManager" function on the contract. + * @param options - The options for the v3PositionManager function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { v3PositionManager } from "thirdweb/extensions/tokens"; + * + * const result = await v3PositionManager({ + * contract, + * }); + * + * ``` + */ +export async function v3PositionManager(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/read/v4PositionManager.ts b/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/read/v4PositionManager.ts new file mode 100644 index 00000000000..3a5300aab46 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/read/v4PositionManager.ts @@ -0,0 +1,69 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0xe2f4dd43" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "address", + }, +] as const; + +/** + * Checks if the `v4PositionManager` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `v4PositionManager` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isV4PositionManagerSupported } from "thirdweb/extensions/tokens"; + * const supported = isV4PositionManagerSupported(["0x..."]); + * ``` + */ +export function isV4PositionManagerSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the v4PositionManager function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeV4PositionManagerResult } from "thirdweb/extensions/tokens"; + * const result = decodeV4PositionManagerResultResult("..."); + * ``` + */ +export function decodeV4PositionManagerResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "v4PositionManager" function on the contract. + * @param options - The options for the v4PositionManager function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { v4PositionManager } from "thirdweb/extensions/tokens"; + * + * const result = await v4PositionManager({ + * contract, + * }); + * + * ``` + */ +export async function v4PositionManager(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/write/collectReward.ts b/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/write/collectReward.ts new file mode 100644 index 00000000000..39333e90e28 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/write/collectReward.ts @@ -0,0 +1,164 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "collectReward" function. + */ +export type CollectRewardParams = WithOverrides<{ + owner: AbiParameterToPrimitiveType<{ type: "address"; name: "owner" }>; + asset: AbiParameterToPrimitiveType<{ type: "address"; name: "asset" }>; +}>; + +export const FN_SELECTOR = "0x7bb87377" as const; +const FN_INPUTS = [ + { + type: "address", + name: "owner", + }, + { + type: "address", + name: "asset", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "address", + name: "token0", + }, + { + type: "address", + name: "token1", + }, + { + type: "uint256", + name: "amount0", + }, + { + type: "uint256", + name: "amount1", + }, +] as const; + +/** + * Checks if the `collectReward` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `collectReward` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isCollectRewardSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isCollectRewardSupported(["0x..."]); + * ``` + */ +export function isCollectRewardSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "collectReward" function. + * @param options - The options for the collectReward function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeCollectRewardParams } from "thirdweb/extensions/tokens"; + * const result = encodeCollectRewardParams({ + * owner: ..., + * asset: ..., + * }); + * ``` + */ +export function encodeCollectRewardParams(options: CollectRewardParams) { + return encodeAbiParameters(FN_INPUTS, [options.owner, options.asset]); +} + +/** + * Encodes the "collectReward" function into a Hex string with its parameters. + * @param options - The options for the collectReward function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeCollectReward } from "thirdweb/extensions/tokens"; + * const result = encodeCollectReward({ + * owner: ..., + * asset: ..., + * }); + * ``` + */ +export function encodeCollectReward(options: CollectRewardParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeCollectRewardParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "collectReward" function on the contract. + * @param options - The options for the "collectReward" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { collectReward } from "thirdweb/extensions/tokens"; + * + * const transaction = collectReward({ + * contract, + * owner: ..., + * asset: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function collectReward( + options: BaseTransactionOptions< + | CollectRewardParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.owner, resolvedOptions.asset] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/write/lockPosition.ts b/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/write/lockPosition.ts new file mode 100644 index 00000000000..14e9b1dd933 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/RewardLocker/write/lockPosition.ts @@ -0,0 +1,202 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "lockPosition" function. + */ +export type LockPositionParams = WithOverrides<{ + asset: AbiParameterToPrimitiveType<{ type: "address"; name: "asset" }>; + positionManager: AbiParameterToPrimitiveType<{ + type: "address"; + name: "positionManager"; + }>; + tokenId: AbiParameterToPrimitiveType<{ type: "uint256"; name: "tokenId" }>; + recipient: AbiParameterToPrimitiveType<{ + type: "address"; + name: "recipient"; + }>; + referrer: AbiParameterToPrimitiveType<{ type: "address"; name: "referrer" }>; + referrerBps: AbiParameterToPrimitiveType<{ + type: "uint16"; + name: "referrerBps"; + }>; +}>; + +export const FN_SELECTOR = "0x2cde40c2" as const; +const FN_INPUTS = [ + { + type: "address", + name: "asset", + }, + { + type: "address", + name: "positionManager", + }, + { + type: "uint256", + name: "tokenId", + }, + { + type: "address", + name: "recipient", + }, + { + type: "address", + name: "referrer", + }, + { + type: "uint16", + name: "referrerBps", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `lockPosition` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `lockPosition` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isLockPositionSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isLockPositionSupported(["0x..."]); + * ``` + */ +export function isLockPositionSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "lockPosition" function. + * @param options - The options for the lockPosition function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeLockPositionParams } from "thirdweb/extensions/tokens"; + * const result = encodeLockPositionParams({ + * asset: ..., + * positionManager: ..., + * tokenId: ..., + * recipient: ..., + * referrer: ..., + * referrerBps: ..., + * }); + * ``` + */ +export function encodeLockPositionParams(options: LockPositionParams) { + return encodeAbiParameters(FN_INPUTS, [ + options.asset, + options.positionManager, + options.tokenId, + options.recipient, + options.referrer, + options.referrerBps, + ]); +} + +/** + * Encodes the "lockPosition" function into a Hex string with its parameters. + * @param options - The options for the lockPosition function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeLockPosition } from "thirdweb/extensions/tokens"; + * const result = encodeLockPosition({ + * asset: ..., + * positionManager: ..., + * tokenId: ..., + * recipient: ..., + * referrer: ..., + * referrerBps: ..., + * }); + * ``` + */ +export function encodeLockPosition(options: LockPositionParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeLockPositionParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "lockPosition" function on the contract. + * @param options - The options for the "lockPosition" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { lockPosition } from "thirdweb/extensions/tokens"; + * + * const transaction = lockPosition({ + * contract, + * asset: ..., + * positionManager: ..., + * tokenId: ..., + * recipient: ..., + * referrer: ..., + * referrerBps: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function lockPosition( + options: BaseTransactionOptions< + | LockPositionParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [ + resolvedOptions.asset, + resolvedOptions.positionManager, + resolvedOptions.tokenId, + resolvedOptions.recipient, + resolvedOptions.referrer, + resolvedOptions.referrerBps, + ] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/AdapterDisabled.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/AdapterDisabled.ts new file mode 100644 index 00000000000..deace9d05de --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/AdapterDisabled.ts @@ -0,0 +1,24 @@ +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Creates an event object for the AdapterDisabled event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { adapterDisabledEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * adapterDisabledEvent() + * ], + * }); + * ``` + */ +export function adapterDisabledEvent() { + return prepareEvent({ + signature: "event AdapterDisabled(uint8 adapterType)", + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/AdapterEnabled.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/AdapterEnabled.ts new file mode 100644 index 00000000000..20810cdef23 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/AdapterEnabled.ts @@ -0,0 +1,24 @@ +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Creates an event object for the AdapterEnabled event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { adapterEnabledEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * adapterEnabledEvent() + * ], + * }); + * ``` + */ +export function adapterEnabledEvent() { + return prepareEvent({ + signature: "event AdapterEnabled(uint8 adapterType)", + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/Initialized.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/Initialized.ts new file mode 100644 index 00000000000..1061653b3d4 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/Initialized.ts @@ -0,0 +1,24 @@ +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Creates an event object for the Initialized event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { initializedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * initializedEvent() + * ], + * }); + * ``` + */ +export function initializedEvent() { + return prepareEvent({ + signature: "event Initialized(uint64 version)", + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/OwnershipHandoverCanceled.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/OwnershipHandoverCanceled.ts new file mode 100644 index 00000000000..39a285efa35 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/OwnershipHandoverCanceled.ts @@ -0,0 +1,42 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "OwnershipHandoverCanceled" event. + */ +export type OwnershipHandoverCanceledEventFilters = Partial<{ + pendingOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "pendingOwner"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the OwnershipHandoverCanceled event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { ownershipHandoverCanceledEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * ownershipHandoverCanceledEvent({ + * pendingOwner: ..., + * }) + * ], + * }); + * ``` + */ +export function ownershipHandoverCanceledEvent( + filters: OwnershipHandoverCanceledEventFilters = {}, +) { + return prepareEvent({ + signature: "event OwnershipHandoverCanceled(address indexed pendingOwner)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/OwnershipHandoverRequested.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/OwnershipHandoverRequested.ts new file mode 100644 index 00000000000..75704cff765 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/OwnershipHandoverRequested.ts @@ -0,0 +1,42 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "OwnershipHandoverRequested" event. + */ +export type OwnershipHandoverRequestedEventFilters = Partial<{ + pendingOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "pendingOwner"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the OwnershipHandoverRequested event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { ownershipHandoverRequestedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * ownershipHandoverRequestedEvent({ + * pendingOwner: ..., + * }) + * ], + * }); + * ``` + */ +export function ownershipHandoverRequestedEvent( + filters: OwnershipHandoverRequestedEventFilters = {}, +) { + return prepareEvent({ + signature: "event OwnershipHandoverRequested(address indexed pendingOwner)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/OwnershipTransferred.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/OwnershipTransferred.ts new file mode 100644 index 00000000000..91dcf136312 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/OwnershipTransferred.ts @@ -0,0 +1,49 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "OwnershipTransferred" event. + */ +export type OwnershipTransferredEventFilters = Partial<{ + oldOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "oldOwner"; + indexed: true; + }>; + newOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "newOwner"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the OwnershipTransferred event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { ownershipTransferredEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * ownershipTransferredEvent({ + * oldOwner: ..., + * newOwner: ..., + * }) + * ], + * }); + * ``` + */ +export function ownershipTransferredEvent( + filters: OwnershipTransferredEventFilters = {}, +) { + return prepareEvent({ + signature: + "event OwnershipTransferred(address indexed oldOwner, address indexed newOwner)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/SwapExecuted.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/SwapExecuted.ts new file mode 100644 index 00000000000..256a6eaa372 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/SwapExecuted.ts @@ -0,0 +1,53 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "SwapExecuted" event. + */ +export type SwapExecutedEventFilters = Partial<{ + sender: AbiParameterToPrimitiveType<{ + type: "address"; + name: "sender"; + indexed: true; + }>; + tokenIn: AbiParameterToPrimitiveType<{ + type: "address"; + name: "tokenIn"; + indexed: true; + }>; + tokenOut: AbiParameterToPrimitiveType<{ + type: "address"; + name: "tokenOut"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the SwapExecuted event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { swapExecutedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * swapExecutedEvent({ + * sender: ..., + * tokenIn: ..., + * tokenOut: ..., + * }) + * ], + * }); + * ``` + */ +export function swapExecutedEvent(filters: SwapExecutedEventFilters = {}) { + return prepareEvent({ + signature: + "event SwapExecuted(address indexed sender, address indexed tokenIn, address indexed tokenOut, uint256 amountIn, uint256 amountOut, uint8 adapterUsed)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/Upgraded.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/Upgraded.ts new file mode 100644 index 00000000000..115091371cf --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/events/Upgraded.ts @@ -0,0 +1,40 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareEvent } from "../../../../../event/prepare-event.js"; + +/** + * Represents the filters for the "Upgraded" event. + */ +export type UpgradedEventFilters = Partial<{ + implementation: AbiParameterToPrimitiveType<{ + type: "address"; + name: "implementation"; + indexed: true; + }>; +}>; + +/** + * Creates an event object for the Upgraded event. + * @param filters - Optional filters to apply to the event. + * @returns The prepared event object. + * @extension TOKENS + * @example + * ```ts + * import { getContractEvents } from "thirdweb"; + * import { upgradedEvent } from "thirdweb/extensions/tokens"; + * + * const events = await getContractEvents({ + * contract, + * events: [ + * upgradedEvent({ + * implementation: ..., + * }) + * ], + * }); + * ``` + */ +export function upgradedEvent(filters: UpgradedEventFilters = {}) { + return prepareEvent({ + signature: "event Upgraded(address indexed implementation)", + filters, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/read/NATIVE_TOKEN.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/read/NATIVE_TOKEN.ts new file mode 100644 index 00000000000..d2f731a87de --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/read/NATIVE_TOKEN.ts @@ -0,0 +1,69 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0x31f7d964" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "address", + }, +] as const; + +/** + * Checks if the `NATIVE_TOKEN` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `NATIVE_TOKEN` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isNATIVE_TOKENSupported } from "thirdweb/extensions/tokens"; + * const supported = isNATIVE_TOKENSupported(["0x..."]); + * ``` + */ +export function isNATIVE_TOKENSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the NATIVE_TOKEN function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeNATIVE_TOKENResult } from "thirdweb/extensions/tokens"; + * const result = decodeNATIVE_TOKENResultResult("..."); + * ``` + */ +export function decodeNATIVE_TOKENResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "NATIVE_TOKEN" function on the contract. + * @param options - The options for the NATIVE_TOKEN function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { NATIVE_TOKEN } from "thirdweb/extensions/tokens"; + * + * const result = await NATIVE_TOKEN({ + * contract, + * }); + * + * ``` + */ +export async function NATIVE_TOKEN(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/read/owner.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/read/owner.ts new file mode 100644 index 00000000000..b0d99f234f0 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/read/owner.ts @@ -0,0 +1,70 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0x8da5cb5b" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "address", + name: "result", + }, +] as const; + +/** + * Checks if the `owner` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `owner` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isOwnerSupported } from "thirdweb/extensions/tokens"; + * const supported = isOwnerSupported(["0x..."]); + * ``` + */ +export function isOwnerSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the owner function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeOwnerResult } from "thirdweb/extensions/tokens"; + * const result = decodeOwnerResultResult("..."); + * ``` + */ +export function decodeOwnerResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "owner" function on the contract. + * @param options - The options for the owner function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { owner } from "thirdweb/extensions/tokens"; + * + * const result = await owner({ + * contract, + * }); + * + * ``` + */ +export async function owner(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/read/ownershipHandoverExpiresAt.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/read/ownershipHandoverExpiresAt.ts new file mode 100644 index 00000000000..0313d621929 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/read/ownershipHandoverExpiresAt.ts @@ -0,0 +1,135 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +/** + * Represents the parameters for the "ownershipHandoverExpiresAt" function. + */ +export type OwnershipHandoverExpiresAtParams = { + pendingOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "pendingOwner"; + }>; +}; + +export const FN_SELECTOR = "0xfee81cf4" as const; +const FN_INPUTS = [ + { + type: "address", + name: "pendingOwner", + }, +] as const; +const FN_OUTPUTS = [ + { + type: "uint256", + name: "result", + }, +] as const; + +/** + * Checks if the `ownershipHandoverExpiresAt` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `ownershipHandoverExpiresAt` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isOwnershipHandoverExpiresAtSupported } from "thirdweb/extensions/tokens"; + * const supported = isOwnershipHandoverExpiresAtSupported(["0x..."]); + * ``` + */ +export function isOwnershipHandoverExpiresAtSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "ownershipHandoverExpiresAt" function. + * @param options - The options for the ownershipHandoverExpiresAt function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeOwnershipHandoverExpiresAtParams } from "thirdweb/extensions/tokens"; + * const result = encodeOwnershipHandoverExpiresAtParams({ + * pendingOwner: ..., + * }); + * ``` + */ +export function encodeOwnershipHandoverExpiresAtParams( + options: OwnershipHandoverExpiresAtParams, +) { + return encodeAbiParameters(FN_INPUTS, [options.pendingOwner]); +} + +/** + * Encodes the "ownershipHandoverExpiresAt" function into a Hex string with its parameters. + * @param options - The options for the ownershipHandoverExpiresAt function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeOwnershipHandoverExpiresAt } from "thirdweb/extensions/tokens"; + * const result = encodeOwnershipHandoverExpiresAt({ + * pendingOwner: ..., + * }); + * ``` + */ +export function encodeOwnershipHandoverExpiresAt( + options: OwnershipHandoverExpiresAtParams, +) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeOwnershipHandoverExpiresAtParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Decodes the result of the ownershipHandoverExpiresAt function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeOwnershipHandoverExpiresAtResult } from "thirdweb/extensions/tokens"; + * const result = decodeOwnershipHandoverExpiresAtResultResult("..."); + * ``` + */ +export function decodeOwnershipHandoverExpiresAtResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "ownershipHandoverExpiresAt" function on the contract. + * @param options - The options for the ownershipHandoverExpiresAt function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { ownershipHandoverExpiresAt } from "thirdweb/extensions/tokens"; + * + * const result = await ownershipHandoverExpiresAt({ + * contract, + * pendingOwner: ..., + * }); + * + * ``` + */ +export async function ownershipHandoverExpiresAt( + options: BaseTransactionOptions, +) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [options.pendingOwner], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/read/proxiableUUID.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/read/proxiableUUID.ts new file mode 100644 index 00000000000..f9b76fe556a --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/read/proxiableUUID.ts @@ -0,0 +1,69 @@ +import { decodeAbiParameters } from "viem"; +import { readContract } from "../../../../../transaction/read-contract.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import type { Hex } from "../../../../../utils/encoding/hex.js"; + +export const FN_SELECTOR = "0x52d1902d" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [ + { + type: "bytes32", + }, +] as const; + +/** + * Checks if the `proxiableUUID` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `proxiableUUID` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isProxiableUUIDSupported } from "thirdweb/extensions/tokens"; + * const supported = isProxiableUUIDSupported(["0x..."]); + * ``` + */ +export function isProxiableUUIDSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Decodes the result of the proxiableUUID function call. + * @param result - The hexadecimal result to decode. + * @returns The decoded result as per the FN_OUTPUTS definition. + * @extension TOKENS + * @example + * ```ts + * import { decodeProxiableUUIDResult } from "thirdweb/extensions/tokens"; + * const result = decodeProxiableUUIDResultResult("..."); + * ``` + */ +export function decodeProxiableUUIDResult(result: Hex) { + return decodeAbiParameters(FN_OUTPUTS, result)[0]; +} + +/** + * Calls the "proxiableUUID" function on the contract. + * @param options - The options for the proxiableUUID function. + * @returns The parsed result of the function call. + * @extension TOKENS + * @example + * ```ts + * import { proxiableUUID } from "thirdweb/extensions/tokens"; + * + * const result = await proxiableUUID({ + * contract, + * }); + * + * ``` + */ +export async function proxiableUUID(options: BaseTransactionOptions) { + return readContract({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: [], + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/cancelOwnershipHandover.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/cancelOwnershipHandover.ts new file mode 100644 index 00000000000..dcbc74fc6af --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/cancelOwnershipHandover.ts @@ -0,0 +1,52 @@ +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; + +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; + +export const FN_SELECTOR = "0x54d1f13d" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `cancelOwnershipHandover` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `cancelOwnershipHandover` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isCancelOwnershipHandoverSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isCancelOwnershipHandoverSupported(["0x..."]); + * ``` + */ +export function isCancelOwnershipHandoverSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Prepares a transaction to call the "cancelOwnershipHandover" function on the contract. + * @param options - The options for the "cancelOwnershipHandover" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { cancelOwnershipHandover } from "thirdweb/extensions/tokens"; + * + * const transaction = cancelOwnershipHandover(); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function cancelOwnershipHandover(options: BaseTransactionOptions) { + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/completeOwnershipHandover.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/completeOwnershipHandover.ts new file mode 100644 index 00000000000..21cad20a483 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/completeOwnershipHandover.ts @@ -0,0 +1,148 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "completeOwnershipHandover" function. + */ +export type CompleteOwnershipHandoverParams = WithOverrides<{ + pendingOwner: AbiParameterToPrimitiveType<{ + type: "address"; + name: "pendingOwner"; + }>; +}>; + +export const FN_SELECTOR = "0xf04e283e" as const; +const FN_INPUTS = [ + { + type: "address", + name: "pendingOwner", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `completeOwnershipHandover` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `completeOwnershipHandover` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isCompleteOwnershipHandoverSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isCompleteOwnershipHandoverSupported(["0x..."]); + * ``` + */ +export function isCompleteOwnershipHandoverSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "completeOwnershipHandover" function. + * @param options - The options for the completeOwnershipHandover function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeCompleteOwnershipHandoverParams } from "thirdweb/extensions/tokens"; + * const result = encodeCompleteOwnershipHandoverParams({ + * pendingOwner: ..., + * }); + * ``` + */ +export function encodeCompleteOwnershipHandoverParams( + options: CompleteOwnershipHandoverParams, +) { + return encodeAbiParameters(FN_INPUTS, [options.pendingOwner]); +} + +/** + * Encodes the "completeOwnershipHandover" function into a Hex string with its parameters. + * @param options - The options for the completeOwnershipHandover function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeCompleteOwnershipHandover } from "thirdweb/extensions/tokens"; + * const result = encodeCompleteOwnershipHandover({ + * pendingOwner: ..., + * }); + * ``` + */ +export function encodeCompleteOwnershipHandover( + options: CompleteOwnershipHandoverParams, +) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeCompleteOwnershipHandoverParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "completeOwnershipHandover" function on the contract. + * @param options - The options for the "completeOwnershipHandover" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { completeOwnershipHandover } from "thirdweb/extensions/tokens"; + * + * const transaction = completeOwnershipHandover({ + * contract, + * pendingOwner: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function completeOwnershipHandover( + options: BaseTransactionOptions< + | CompleteOwnershipHandoverParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.pendingOwner] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/createPool.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/createPool.ts new file mode 100644 index 00000000000..8b6a8118e25 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/createPool.ts @@ -0,0 +1,202 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "createPool" function. + */ +export type CreatePoolParams = WithOverrides<{ + createPoolConfig: AbiParameterToPrimitiveType<{ + type: "tuple"; + name: "createPoolConfig"; + components: [ + { type: "address"; name: "recipient" }, + { type: "address"; name: "referrer" }, + { type: "address"; name: "tokenA" }, + { type: "address"; name: "tokenB" }, + { type: "uint256"; name: "amountA" }, + { type: "uint256"; name: "amountB" }, + { type: "bytes"; name: "data" }, + ]; + }>; +}>; + +export const FN_SELECTOR = "0xa1970c55" as const; +const FN_INPUTS = [ + { + type: "tuple", + name: "createPoolConfig", + components: [ + { + type: "address", + name: "recipient", + }, + { + type: "address", + name: "referrer", + }, + { + type: "address", + name: "tokenA", + }, + { + type: "address", + name: "tokenB", + }, + { + type: "uint256", + name: "amountA", + }, + { + type: "uint256", + name: "amountB", + }, + { + type: "bytes", + name: "data", + }, + ], + }, +] as const; +const FN_OUTPUTS = [ + { + type: "address", + name: "pool", + }, + { + type: "address", + name: "position", + }, + { + type: "uint256", + name: "positionId", + }, + { + type: "uint256", + name: "refundAmount0", + }, + { + type: "uint256", + name: "refundAmount1", + }, +] as const; + +/** + * Checks if the `createPool` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `createPool` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isCreatePoolSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isCreatePoolSupported(["0x..."]); + * ``` + */ +export function isCreatePoolSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "createPool" function. + * @param options - The options for the createPool function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeCreatePoolParams } from "thirdweb/extensions/tokens"; + * const result = encodeCreatePoolParams({ + * createPoolConfig: ..., + * }); + * ``` + */ +export function encodeCreatePoolParams(options: CreatePoolParams) { + return encodeAbiParameters(FN_INPUTS, [options.createPoolConfig]); +} + +/** + * Encodes the "createPool" function into a Hex string with its parameters. + * @param options - The options for the createPool function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeCreatePool } from "thirdweb/extensions/tokens"; + * const result = encodeCreatePool({ + * createPoolConfig: ..., + * }); + * ``` + */ +export function encodeCreatePool(options: CreatePoolParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeCreatePoolParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "createPool" function on the contract. + * @param options - The options for the "createPool" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { createPool } from "thirdweb/extensions/tokens"; + * + * const transaction = createPool({ + * contract, + * createPoolConfig: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function createPool( + options: BaseTransactionOptions< + | CreatePoolParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.createPoolConfig] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/disableAdapter.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/disableAdapter.ts new file mode 100644 index 00000000000..c05be76bf9b --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/disableAdapter.ts @@ -0,0 +1,142 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "disableAdapter" function. + */ +export type DisableAdapterParams = WithOverrides<{ + adapterType: AbiParameterToPrimitiveType<{ + type: "uint8"; + name: "adapterType"; + }>; +}>; + +export const FN_SELECTOR = "0xa3f3a7bd" as const; +const FN_INPUTS = [ + { + type: "uint8", + name: "adapterType", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `disableAdapter` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `disableAdapter` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isDisableAdapterSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isDisableAdapterSupported(["0x..."]); + * ``` + */ +export function isDisableAdapterSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "disableAdapter" function. + * @param options - The options for the disableAdapter function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeDisableAdapterParams } from "thirdweb/extensions/tokens"; + * const result = encodeDisableAdapterParams({ + * adapterType: ..., + * }); + * ``` + */ +export function encodeDisableAdapterParams(options: DisableAdapterParams) { + return encodeAbiParameters(FN_INPUTS, [options.adapterType]); +} + +/** + * Encodes the "disableAdapter" function into a Hex string with its parameters. + * @param options - The options for the disableAdapter function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeDisableAdapter } from "thirdweb/extensions/tokens"; + * const result = encodeDisableAdapter({ + * adapterType: ..., + * }); + * ``` + */ +export function encodeDisableAdapter(options: DisableAdapterParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeDisableAdapterParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "disableAdapter" function on the contract. + * @param options - The options for the "disableAdapter" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { disableAdapter } from "thirdweb/extensions/tokens"; + * + * const transaction = disableAdapter({ + * contract, + * adapterType: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function disableAdapter( + options: BaseTransactionOptions< + | DisableAdapterParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.adapterType] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/enableAdapter.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/enableAdapter.ts new file mode 100644 index 00000000000..fe212085318 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/enableAdapter.ts @@ -0,0 +1,150 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "enableAdapter" function. + */ +export type EnableAdapterParams = WithOverrides<{ + adapterType: AbiParameterToPrimitiveType<{ + type: "uint8"; + name: "adapterType"; + }>; + config: AbiParameterToPrimitiveType<{ type: "bytes"; name: "config" }>; +}>; + +export const FN_SELECTOR = "0xab348bdb" as const; +const FN_INPUTS = [ + { + type: "uint8", + name: "adapterType", + }, + { + type: "bytes", + name: "config", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `enableAdapter` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `enableAdapter` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isEnableAdapterSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isEnableAdapterSupported(["0x..."]); + * ``` + */ +export function isEnableAdapterSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "enableAdapter" function. + * @param options - The options for the enableAdapter function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeEnableAdapterParams } from "thirdweb/extensions/tokens"; + * const result = encodeEnableAdapterParams({ + * adapterType: ..., + * config: ..., + * }); + * ``` + */ +export function encodeEnableAdapterParams(options: EnableAdapterParams) { + return encodeAbiParameters(FN_INPUTS, [options.adapterType, options.config]); +} + +/** + * Encodes the "enableAdapter" function into a Hex string with its parameters. + * @param options - The options for the enableAdapter function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeEnableAdapter } from "thirdweb/extensions/tokens"; + * const result = encodeEnableAdapter({ + * adapterType: ..., + * config: ..., + * }); + * ``` + */ +export function encodeEnableAdapter(options: EnableAdapterParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeEnableAdapterParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "enableAdapter" function on the contract. + * @param options - The options for the "enableAdapter" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { enableAdapter } from "thirdweb/extensions/tokens"; + * + * const transaction = enableAdapter({ + * contract, + * adapterType: ..., + * config: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function enableAdapter( + options: BaseTransactionOptions< + | EnableAdapterParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.adapterType, resolvedOptions.config] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/initialize.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/initialize.ts new file mode 100644 index 00000000000..d34d8491cfb --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/initialize.ts @@ -0,0 +1,139 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "initialize" function. + */ +export type InitializeParams = WithOverrides<{ + owner: AbiParameterToPrimitiveType<{ type: "address"; name: "owner" }>; +}>; + +export const FN_SELECTOR = "0xc4d66de8" as const; +const FN_INPUTS = [ + { + type: "address", + name: "owner", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `initialize` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `initialize` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isInitializeSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isInitializeSupported(["0x..."]); + * ``` + */ +export function isInitializeSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "initialize" function. + * @param options - The options for the initialize function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeInitializeParams } from "thirdweb/extensions/tokens"; + * const result = encodeInitializeParams({ + * owner: ..., + * }); + * ``` + */ +export function encodeInitializeParams(options: InitializeParams) { + return encodeAbiParameters(FN_INPUTS, [options.owner]); +} + +/** + * Encodes the "initialize" function into a Hex string with its parameters. + * @param options - The options for the initialize function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeInitialize } from "thirdweb/extensions/tokens"; + * const result = encodeInitialize({ + * owner: ..., + * }); + * ``` + */ +export function encodeInitialize(options: InitializeParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeInitializeParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "initialize" function on the contract. + * @param options - The options for the "initialize" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { initialize } from "thirdweb/extensions/tokens"; + * + * const transaction = initialize({ + * contract, + * owner: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function initialize( + options: BaseTransactionOptions< + | InitializeParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.owner] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/renounceOwnership.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/renounceOwnership.ts new file mode 100644 index 00000000000..622553c35e4 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/renounceOwnership.ts @@ -0,0 +1,50 @@ +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; + +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; + +export const FN_SELECTOR = "0x715018a6" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `renounceOwnership` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `renounceOwnership` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isRenounceOwnershipSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isRenounceOwnershipSupported(["0x..."]); + * ``` + */ +export function isRenounceOwnershipSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Prepares a transaction to call the "renounceOwnership" function on the contract. + * @param options - The options for the "renounceOwnership" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { renounceOwnership } from "thirdweb/extensions/tokens"; + * + * const transaction = renounceOwnership(); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function renounceOwnership(options: BaseTransactionOptions) { + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/requestOwnershipHandover.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/requestOwnershipHandover.ts new file mode 100644 index 00000000000..91b716f38a8 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/requestOwnershipHandover.ts @@ -0,0 +1,52 @@ +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { BaseTransactionOptions } from "../../../../../transaction/types.js"; + +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; + +export const FN_SELECTOR = "0x25692962" as const; +const FN_INPUTS = [] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `requestOwnershipHandover` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `requestOwnershipHandover` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isRequestOwnershipHandoverSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isRequestOwnershipHandoverSupported(["0x..."]); + * ``` + */ +export function isRequestOwnershipHandoverSupported( + availableSelectors: string[], +) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Prepares a transaction to call the "requestOwnershipHandover" function on the contract. + * @param options - The options for the "requestOwnershipHandover" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { requestOwnershipHandover } from "thirdweb/extensions/tokens"; + * + * const transaction = requestOwnershipHandover(); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function requestOwnershipHandover(options: BaseTransactionOptions) { + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/swap.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/swap.ts new file mode 100644 index 00000000000..cf10c5e2d01 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/swap.ts @@ -0,0 +1,203 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "swap" function. + */ +export type SwapParams = WithOverrides<{ + config: AbiParameterToPrimitiveType<{ + type: "tuple"; + name: "config"; + components: [ + { type: "address"; name: "tokenIn" }, + { type: "address"; name: "tokenOut" }, + { type: "uint256"; name: "amountIn" }, + { type: "uint256"; name: "minAmountOut" }, + { type: "address"; name: "recipient" }, + { type: "address"; name: "refundRecipient" }, + { type: "uint256"; name: "deadline" }, + { type: "bytes"; name: "data" }, + ]; + }>; +}>; + +export const FN_SELECTOR = "0x8892376c" as const; +const FN_INPUTS = [ + { + type: "tuple", + name: "config", + components: [ + { + type: "address", + name: "tokenIn", + }, + { + type: "address", + name: "tokenOut", + }, + { + type: "uint256", + name: "amountIn", + }, + { + type: "uint256", + name: "minAmountOut", + }, + { + type: "address", + name: "recipient", + }, + { + type: "address", + name: "refundRecipient", + }, + { + type: "uint256", + name: "deadline", + }, + { + type: "bytes", + name: "data", + }, + ], + }, +] as const; +const FN_OUTPUTS = [ + { + type: "tuple", + name: "result", + components: [ + { + type: "uint256", + name: "amountIn", + }, + { + type: "uint256", + name: "amountOut", + }, + { + type: "address", + name: "source", + }, + ], + }, +] as const; + +/** + * Checks if the `swap` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `swap` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isSwapSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isSwapSupported(["0x..."]); + * ``` + */ +export function isSwapSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "swap" function. + * @param options - The options for the swap function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeSwapParams } from "thirdweb/extensions/tokens"; + * const result = encodeSwapParams({ + * config: ..., + * }); + * ``` + */ +export function encodeSwapParams(options: SwapParams) { + return encodeAbiParameters(FN_INPUTS, [options.config]); +} + +/** + * Encodes the "swap" function into a Hex string with its parameters. + * @param options - The options for the swap function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeSwap } from "thirdweb/extensions/tokens"; + * const result = encodeSwap({ + * config: ..., + * }); + * ``` + */ +export function encodeSwap(options: SwapParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeSwapParams(options).slice(2)) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "swap" function on the contract. + * @param options - The options for the "swap" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { swap } from "thirdweb/extensions/tokens"; + * + * const transaction = swap({ + * contract, + * config: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function swap( + options: BaseTransactionOptions< + | SwapParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.config] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/transferOwnership.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/transferOwnership.ts new file mode 100644 index 00000000000..108df00ea3f --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/transferOwnership.ts @@ -0,0 +1,141 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "transferOwnership" function. + */ +export type TransferOwnershipParams = WithOverrides<{ + newOwner: AbiParameterToPrimitiveType<{ type: "address"; name: "newOwner" }>; +}>; + +export const FN_SELECTOR = "0xf2fde38b" as const; +const FN_INPUTS = [ + { + type: "address", + name: "newOwner", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `transferOwnership` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `transferOwnership` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isTransferOwnershipSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isTransferOwnershipSupported(["0x..."]); + * ``` + */ +export function isTransferOwnershipSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "transferOwnership" function. + * @param options - The options for the transferOwnership function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeTransferOwnershipParams } from "thirdweb/extensions/tokens"; + * const result = encodeTransferOwnershipParams({ + * newOwner: ..., + * }); + * ``` + */ +export function encodeTransferOwnershipParams( + options: TransferOwnershipParams, +) { + return encodeAbiParameters(FN_INPUTS, [options.newOwner]); +} + +/** + * Encodes the "transferOwnership" function into a Hex string with its parameters. + * @param options - The options for the transferOwnership function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeTransferOwnership } from "thirdweb/extensions/tokens"; + * const result = encodeTransferOwnership({ + * newOwner: ..., + * }); + * ``` + */ +export function encodeTransferOwnership(options: TransferOwnershipParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeTransferOwnershipParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "transferOwnership" function on the contract. + * @param options - The options for the "transferOwnership" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { transferOwnership } from "thirdweb/extensions/tokens"; + * + * const transaction = transferOwnership({ + * contract, + * newOwner: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function transferOwnership( + options: BaseTransactionOptions< + | TransferOwnershipParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.newOwner] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/upgradeToAndCall.ts b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/upgradeToAndCall.ts new file mode 100644 index 00000000000..d5af1b33184 --- /dev/null +++ b/packages/thirdweb/src/extensions/tokens/__generated__/Router/write/upgradeToAndCall.ts @@ -0,0 +1,153 @@ +import type { AbiParameterToPrimitiveType } from "abitype"; +import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js"; +import type { + BaseTransactionOptions, + WithOverrides, +} from "../../../../../transaction/types.js"; +import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js"; +import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js"; +import { once } from "../../../../../utils/promise/once.js"; + +/** + * Represents the parameters for the "upgradeToAndCall" function. + */ +export type UpgradeToAndCallParams = WithOverrides<{ + newImplementation: AbiParameterToPrimitiveType<{ + type: "address"; + name: "newImplementation"; + }>; + data: AbiParameterToPrimitiveType<{ type: "bytes"; name: "data" }>; +}>; + +export const FN_SELECTOR = "0x4f1ef286" as const; +const FN_INPUTS = [ + { + type: "address", + name: "newImplementation", + }, + { + type: "bytes", + name: "data", + }, +] as const; +const FN_OUTPUTS = [] as const; + +/** + * Checks if the `upgradeToAndCall` method is supported by the given contract. + * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. + * @returns A boolean indicating if the `upgradeToAndCall` method is supported. + * @extension TOKENS + * @example + * ```ts + * import { isUpgradeToAndCallSupported } from "thirdweb/extensions/tokens"; + * + * const supported = isUpgradeToAndCallSupported(["0x..."]); + * ``` + */ +export function isUpgradeToAndCallSupported(availableSelectors: string[]) { + return detectMethod({ + availableSelectors, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + }); +} + +/** + * Encodes the parameters for the "upgradeToAndCall" function. + * @param options - The options for the upgradeToAndCall function. + * @returns The encoded ABI parameters. + * @extension TOKENS + * @example + * ```ts + * import { encodeUpgradeToAndCallParams } from "thirdweb/extensions/tokens"; + * const result = encodeUpgradeToAndCallParams({ + * newImplementation: ..., + * data: ..., + * }); + * ``` + */ +export function encodeUpgradeToAndCallParams(options: UpgradeToAndCallParams) { + return encodeAbiParameters(FN_INPUTS, [ + options.newImplementation, + options.data, + ]); +} + +/** + * Encodes the "upgradeToAndCall" function into a Hex string with its parameters. + * @param options - The options for the upgradeToAndCall function. + * @returns The encoded hexadecimal string. + * @extension TOKENS + * @example + * ```ts + * import { encodeUpgradeToAndCall } from "thirdweb/extensions/tokens"; + * const result = encodeUpgradeToAndCall({ + * newImplementation: ..., + * data: ..., + * }); + * ``` + */ +export function encodeUpgradeToAndCall(options: UpgradeToAndCallParams) { + // we do a "manual" concat here to avoid the overhead of the "concatHex" function + // we can do this because we know the specific formats of the values + return (FN_SELECTOR + + encodeUpgradeToAndCallParams(options).slice( + 2, + )) as `${typeof FN_SELECTOR}${string}`; +} + +/** + * Prepares a transaction to call the "upgradeToAndCall" function on the contract. + * @param options - The options for the "upgradeToAndCall" function. + * @returns A prepared transaction object. + * @extension TOKENS + * @example + * ```ts + * import { sendTransaction } from "thirdweb"; + * import { upgradeToAndCall } from "thirdweb/extensions/tokens"; + * + * const transaction = upgradeToAndCall({ + * contract, + * newImplementation: ..., + * data: ..., + * overrides: { + * ... + * } + * }); + * + * // Send the transaction + * await sendTransaction({ transaction, account }); + * ``` + */ +export function upgradeToAndCall( + options: BaseTransactionOptions< + | UpgradeToAndCallParams + | { + asyncParams: () => Promise; + } + >, +) { + const asyncOptions = once(async () => { + return "asyncParams" in options ? await options.asyncParams() : options; + }); + + return prepareContractCall({ + contract: options.contract, + method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, + params: async () => { + const resolvedOptions = await asyncOptions(); + return [resolvedOptions.newImplementation, resolvedOptions.data] as const; + }, + value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, + }); +} diff --git a/packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactInput.ts b/packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactInput.ts index 17b942605db..93ca28a8d86 100644 --- a/packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactInput.ts +++ b/packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactInput.ts @@ -19,18 +19,18 @@ export type QuoteExactInputParams = WithOverrides<{ export const FN_SELECTOR = "0xcdca1753" as const; const FN_INPUTS = [ { - name: "path", type: "bytes", + name: "path", }, { - name: "amountIn", type: "uint256", + name: "amountIn", }, ] as const; const FN_OUTPUTS = [ { - name: "amountOut", type: "uint256", + name: "amountOut", }, ] as const; @@ -130,23 +130,23 @@ export function quoteExactInput( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.path, resolvedOptions.amountIn] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactInputSingle.ts b/packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactInputSingle.ts index d7c41d1dd30..f2baf013d7b 100644 --- a/packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactInputSingle.ts +++ b/packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactInputSingle.ts @@ -25,30 +25,30 @@ export type QuoteExactInputSingleParams = WithOverrides<{ export const FN_SELECTOR = "0xf7729d43" as const; const FN_INPUTS = [ { - name: "tokenIn", type: "address", + name: "tokenIn", }, { - name: "tokenOut", type: "address", + name: "tokenOut", }, { - name: "fee", type: "uint24", + name: "fee", }, { - name: "amountIn", type: "uint256", + name: "amountIn", }, { - name: "sqrtPriceLimitX96", type: "uint160", + name: "sqrtPriceLimitX96", }, ] as const; const FN_OUTPUTS = [ { - name: "amountOut", type: "uint256", + name: "amountOut", }, ] as const; @@ -167,19 +167,8 @@ export function quoteExactInputSingle( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -191,5 +180,16 @@ export function quoteExactInputSingle( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactOutput.ts b/packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactOutput.ts index 256a91b26a4..948e8b4716b 100644 --- a/packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactOutput.ts +++ b/packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactOutput.ts @@ -22,18 +22,18 @@ export type QuoteExactOutputParams = WithOverrides<{ export const FN_SELECTOR = "0x2f80bb1d" as const; const FN_INPUTS = [ { - name: "path", type: "bytes", + name: "path", }, { - name: "amountOut", type: "uint256", + name: "amountOut", }, ] as const; const FN_OUTPUTS = [ { - name: "amountIn", type: "uint256", + name: "amountIn", }, ] as const; @@ -133,23 +133,23 @@ export function quoteExactOutput( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.path, resolvedOptions.amountOut] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactOutputSingle.ts b/packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactOutputSingle.ts index 664bccb2532..962e1b2233d 100644 --- a/packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactOutputSingle.ts +++ b/packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactOutputSingle.ts @@ -28,30 +28,30 @@ export type QuoteExactOutputSingleParams = WithOverrides<{ export const FN_SELECTOR = "0x30d07f21" as const; const FN_INPUTS = [ { - name: "tokenIn", type: "address", + name: "tokenIn", }, { - name: "tokenOut", type: "address", + name: "tokenOut", }, { - name: "fee", type: "uint24", + name: "fee", }, { - name: "amountOut", type: "uint256", + name: "amountOut", }, { - name: "sqrtPriceLimitX96", type: "uint160", + name: "sqrtPriceLimitX96", }, ] as const; const FN_OUTPUTS = [ { - name: "amountIn", type: "uint256", + name: "amountIn", }, ] as const; @@ -172,19 +172,8 @@ export function quoteExactOutputSingle( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -196,5 +185,16 @@ export function quoteExactOutputSingle( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactInput.ts b/packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactInput.ts index 2122be61c0b..e8c72448821 100644 --- a/packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactInput.ts +++ b/packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactInput.ts @@ -28,36 +28,36 @@ export type ExactInputParams = WithOverrides<{ export const FN_SELECTOR = "0xc04b8d59" as const; const FN_INPUTS = [ { + type: "tuple", + name: "params", components: [ { - name: "path", type: "bytes", + name: "path", }, { - name: "recipient", type: "address", + name: "recipient", }, { - name: "deadline", type: "uint256", + name: "deadline", }, { - name: "amountIn", type: "uint256", + name: "amountIn", }, { - name: "amountOutMinimum", type: "uint256", + name: "amountOutMinimum", }, ], - name: "params", - type: "tuple", }, ] as const; const FN_OUTPUTS = [ { - name: "amountOut", type: "uint256", + name: "amountOut", }, ] as const; @@ -154,23 +154,23 @@ export function exactInput( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.params] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactInputSingle.ts b/packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactInputSingle.ts index 16ef0dc642e..74801a6fd77 100644 --- a/packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactInputSingle.ts +++ b/packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactInputSingle.ts @@ -31,48 +31,48 @@ export type ExactInputSingleParams = WithOverrides<{ export const FN_SELECTOR = "0x414bf389" as const; const FN_INPUTS = [ { + type: "tuple", + name: "params", components: [ { - name: "tokenIn", type: "address", + name: "tokenIn", }, { - name: "tokenOut", type: "address", + name: "tokenOut", }, { - name: "fee", type: "uint24", + name: "fee", }, { - name: "recipient", type: "address", + name: "recipient", }, { - name: "deadline", type: "uint256", + name: "deadline", }, { - name: "amountIn", type: "uint256", + name: "amountIn", }, { - name: "amountOutMinimum", type: "uint256", + name: "amountOutMinimum", }, { - name: "sqrtPriceLimitX96", type: "uint160", + name: "sqrtPriceLimitX96", }, ], - name: "params", - type: "tuple", }, ] as const; const FN_OUTPUTS = [ { - name: "amountOut", type: "uint256", + name: "amountOut", }, ] as const; @@ -169,23 +169,23 @@ export function exactInputSingle( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.params] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactOutput.ts b/packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactOutput.ts index 940aa4c4349..ad12cfeb388 100644 --- a/packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactOutput.ts +++ b/packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactOutput.ts @@ -28,36 +28,36 @@ export type ExactOutputParams = WithOverrides<{ export const FN_SELECTOR = "0xf28c0498" as const; const FN_INPUTS = [ { + type: "tuple", + name: "params", components: [ { - name: "path", type: "bytes", + name: "path", }, { - name: "recipient", type: "address", + name: "recipient", }, { - name: "deadline", type: "uint256", + name: "deadline", }, { - name: "amountOut", type: "uint256", + name: "amountOut", }, { - name: "amountInMaximum", type: "uint256", + name: "amountInMaximum", }, ], - name: "params", - type: "tuple", }, ] as const; const FN_OUTPUTS = [ { - name: "amountIn", type: "uint256", + name: "amountIn", }, ] as const; @@ -154,23 +154,23 @@ export function exactOutput( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.params] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactOutputSingle.ts b/packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactOutputSingle.ts index ab60bfb7b4c..d49a1333baf 100644 --- a/packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactOutputSingle.ts +++ b/packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactOutputSingle.ts @@ -31,48 +31,48 @@ export type ExactOutputSingleParams = WithOverrides<{ export const FN_SELECTOR = "0xdb3e2198" as const; const FN_INPUTS = [ { + type: "tuple", + name: "params", components: [ { - name: "tokenIn", type: "address", + name: "tokenIn", }, { - name: "tokenOut", type: "address", + name: "tokenOut", }, { - name: "fee", type: "uint24", + name: "fee", }, { - name: "recipient", type: "address", + name: "recipient", }, { - name: "deadline", type: "uint256", + name: "deadline", }, { - name: "amountOut", type: "uint256", + name: "amountOut", }, { - name: "amountInMaximum", type: "uint256", + name: "amountInMaximum", }, { - name: "sqrtPriceLimitX96", type: "uint160", + name: "sqrtPriceLimitX96", }, ], - name: "params", - type: "tuple", }, ] as const; const FN_OUTPUTS = [ { - name: "amountIn", type: "uint256", + name: "amountIn", }, ] as const; @@ -171,23 +171,23 @@ export function exactOutputSingle( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.params] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/events/OwnerChanged.ts b/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/events/OwnerChanged.ts index 30f6cb7997e..0a338fba5a1 100644 --- a/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/events/OwnerChanged.ts +++ b/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/events/OwnerChanged.ts @@ -40,8 +40,8 @@ export type OwnerChangedEventFilters = Partial<{ */ export function ownerChangedEvent(filters: OwnerChangedEventFilters = {}) { return prepareEvent({ - filters, signature: "event OwnerChanged(address indexed oldOwner, address indexed newOwner)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/events/PoolCreated.ts b/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/events/PoolCreated.ts index 4cd77819ff1..08c5be9c5c5 100644 --- a/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/events/PoolCreated.ts +++ b/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/events/PoolCreated.ts @@ -46,8 +46,8 @@ export type PoolCreatedEventFilters = Partial<{ */ export function poolCreatedEvent(filters: PoolCreatedEventFilters = {}) { return prepareEvent({ - filters, signature: "event PoolCreated(address indexed token0, address indexed token1, uint24 fee, int24 tickLower, int24 tickUpper, uint128 liquidity, address indexed sender)", + filters, }); } diff --git a/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/read/feeAmountTickSpacing.ts b/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/read/feeAmountTickSpacing.ts index feed9aec478..0bdf634fbb2 100644 --- a/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/read/feeAmountTickSpacing.ts +++ b/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/read/feeAmountTickSpacing.ts @@ -16,8 +16,8 @@ export type FeeAmountTickSpacingParams = { export const FN_SELECTOR = "0x22afcccb" as const; const FN_INPUTS = [ { - name: "fee", type: "uint24", + name: "fee", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/read/getPool.ts b/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/read/getPool.ts index a176b876892..5464e0e6f11 100644 --- a/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/read/getPool.ts +++ b/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/read/getPool.ts @@ -18,22 +18,22 @@ export type GetPoolParams = { export const FN_SELECTOR = "0x1698ee82" as const; const FN_INPUTS = [ { - name: "tokenA", type: "address", + name: "tokenA", }, { - name: "tokenB", type: "address", + name: "tokenB", }, { - name: "fee", type: "uint24", + name: "fee", }, ] as const; const FN_OUTPUTS = [ { - name: "pool", type: "address", + name: "pool", }, ] as const; diff --git a/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/createPool.ts b/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/createPool.ts index 3a0e4d3e1bb..7a0564dfebb 100644 --- a/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/createPool.ts +++ b/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/createPool.ts @@ -20,22 +20,22 @@ export type CreatePoolParams = WithOverrides<{ export const FN_SELECTOR = "0xa1671295" as const; const FN_INPUTS = [ { - name: "tokenA", type: "address", + name: "tokenA", }, { - name: "tokenB", type: "address", + name: "tokenB", }, { - name: "fee", type: "uint24", + name: "fee", }, ] as const; const FN_OUTPUTS = [ { - name: "pool", type: "address", + name: "pool", }, ] as const; @@ -142,19 +142,8 @@ export function createPool( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -164,5 +153,16 @@ export function createPool( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/enableFeeAmount.ts b/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/enableFeeAmount.ts index c0f8917eedb..02a8bbc64a1 100644 --- a/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/enableFeeAmount.ts +++ b/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/enableFeeAmount.ts @@ -22,12 +22,12 @@ export type EnableFeeAmountParams = WithOverrides<{ export const FN_SELECTOR = "0x8a7c195f" as const; const FN_INPUTS = [ { - name: "fee", type: "uint24", + name: "fee", }, { - name: "tickSpacing", type: "int24", + name: "tickSpacing", }, ] as const; const FN_OUTPUTS = [] as const; @@ -128,23 +128,23 @@ export function enableFeeAmount( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.fee, resolvedOptions.tickSpacing] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/setOwner.ts b/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/setOwner.ts index 95cdc0516de..dc6112bab1d 100644 --- a/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/setOwner.ts +++ b/packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/setOwner.ts @@ -18,8 +18,8 @@ export type SetOwnerParams = WithOverrides<{ export const FN_SELECTOR = "0x13af4035" as const; const FN_INPUTS = [ { - name: "newOwner", type: "address", + name: "newOwner", }, ] as const; const FN_OUTPUTS = [] as const; @@ -115,23 +115,23 @@ export function setOwner( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.newOwner] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/exists.ts b/packages/thirdweb/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/exists.ts index b62fc51aefe..f53337ebd10 100644 --- a/packages/thirdweb/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/exists.ts +++ b/packages/thirdweb/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/exists.ts @@ -16,8 +16,8 @@ export type ExistsParams = { export const FN_SELECTOR = "0x4f558e79" as const; const FN_INPUTS = [ { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/getMany.ts b/packages/thirdweb/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/getMany.ts index f4660917967..2a5b24385b4 100644 --- a/packages/thirdweb/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/getMany.ts +++ b/packages/thirdweb/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/getMany.ts @@ -17,18 +17,18 @@ export type GetManyParams = { export const FN_SELECTOR = "0x1bd8cc1a" as const; const FN_INPUTS = [ { - name: "keys", type: "string[]", + name: "keys", }, { - name: "tokenId", type: "uint256", + name: "tokenId", }, ] as const; const FN_OUTPUTS = [ { - name: "values", type: "string[]", + name: "values", }, ] as const; diff --git a/packages/thirdweb/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/namehash.ts b/packages/thirdweb/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/namehash.ts index 78b61ec5e6f..d56c354bfee 100644 --- a/packages/thirdweb/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/namehash.ts +++ b/packages/thirdweb/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/namehash.ts @@ -16,14 +16,14 @@ export type NamehashParams = { export const FN_SELECTOR = "0x276fabb1" as const; const FN_INPUTS = [ { - name: "labels", type: "string[]", + name: "labels", }, ] as const; const FN_OUTPUTS = [ { - name: "hash", type: "uint256", + name: "hash", }, ] as const; diff --git a/packages/thirdweb/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/reverseNameOf.ts b/packages/thirdweb/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/reverseNameOf.ts index b6e9564a151..42f892a3904 100644 --- a/packages/thirdweb/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/reverseNameOf.ts +++ b/packages/thirdweb/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/reverseNameOf.ts @@ -16,14 +16,14 @@ export type ReverseNameOfParams = { export const FN_SELECTOR = "0xbebec6b4" as const; const FN_INPUTS = [ { - name: "addr", type: "address", + name: "addr", }, ] as const; const FN_OUTPUTS = [ { - name: "reverseUri", type: "string", + name: "reverseUri", }, ] as const; diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/getAllProposals.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/getAllProposals.ts index 6f22db94aec..67cf2f01d31 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/getAllProposals.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/getAllProposals.ts @@ -8,46 +8,46 @@ export const FN_SELECTOR = "0xcceb68f5" as const; const FN_INPUTS = [] as const; const FN_OUTPUTS = [ { + type: "tuple[]", + name: "allProposals", components: [ { - name: "proposalId", type: "uint256", + name: "proposalId", }, { - name: "proposer", type: "address", + name: "proposer", }, { - name: "targets", type: "address[]", + name: "targets", }, { - name: "values", type: "uint256[]", + name: "values", }, { - name: "signatures", type: "string[]", + name: "signatures", }, { - name: "calldatas", type: "bytes[]", + name: "calldatas", }, { - name: "startBlock", type: "uint256", + name: "startBlock", }, { - name: "endBlock", type: "uint256", + name: "endBlock", }, { - name: "description", type: "string", + name: "description", }, ], - name: "allProposals", - type: "tuple[]", }, ] as const; diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/getVotes.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/getVotes.ts index 9a0da285da8..341cb80315b 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/getVotes.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/getVotes.ts @@ -20,12 +20,12 @@ export type GetVotesParams = { export const FN_SELECTOR = "0xeb9019d4" as const; const FN_INPUTS = [ { - name: "account", type: "address", + name: "account", }, { - name: "blockNumber", type: "uint256", + name: "blockNumber", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/getVotesWithParams.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/getVotesWithParams.ts index dfbae849b8b..2034cf1dddc 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/getVotesWithParams.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/getVotesWithParams.ts @@ -21,16 +21,16 @@ export type GetVotesWithParamsParams = { export const FN_SELECTOR = "0x9a802a6d" as const; const FN_INPUTS = [ { - name: "account", type: "address", + name: "account", }, { - name: "blockNumber", type: "uint256", + name: "blockNumber", }, { - name: "params", type: "bytes", + name: "params", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/hasVoted.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/hasVoted.ts index eacb9d77023..f2b60cf3bca 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/hasVoted.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/hasVoted.ts @@ -20,12 +20,12 @@ export type HasVotedParams = { export const FN_SELECTOR = "0x43859632" as const; const FN_INPUTS = [ { - name: "proposalId", type: "uint256", + name: "proposalId", }, { - name: "account", type: "address", + name: "account", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/hashProposal.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/hashProposal.ts index 5259840fe3c..1639665197e 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/hashProposal.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/hashProposal.ts @@ -25,20 +25,20 @@ export type HashProposalParams = { export const FN_SELECTOR = "0xc59057e4" as const; const FN_INPUTS = [ { - name: "targets", type: "address[]", + name: "targets", }, { - name: "values", type: "uint256[]", + name: "values", }, { - name: "calldatas", type: "bytes[]", + name: "calldatas", }, { - name: "descriptionHash", type: "bytes32", + name: "descriptionHash", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalDeadline.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalDeadline.ts index aa55ad0e79c..2e4f570cd64 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalDeadline.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalDeadline.ts @@ -19,8 +19,8 @@ export type ProposalDeadlineParams = { export const FN_SELECTOR = "0xc01f9e37" as const; const FN_INPUTS = [ { - name: "proposalId", type: "uint256", + name: "proposalId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalSnapshot.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalSnapshot.ts index ecdd310f479..e1667b05f5d 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalSnapshot.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalSnapshot.ts @@ -19,8 +19,8 @@ export type ProposalSnapshotParams = { export const FN_SELECTOR = "0x2d63f693" as const; const FN_INPUTS = [ { - name: "proposalId", type: "uint256", + name: "proposalId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalVotes.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalVotes.ts index 9220e63ab34..8a510a2aa46 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalVotes.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalVotes.ts @@ -19,22 +19,22 @@ export type ProposalVotesParams = { export const FN_SELECTOR = "0x544ffc9c" as const; const FN_INPUTS = [ { - name: "proposalId", type: "uint256", + name: "proposalId", }, ] as const; const FN_OUTPUTS = [ { - name: "againstVotes", type: "uint256", + name: "againstVotes", }, { - name: "forVotes", type: "uint256", + name: "forVotes", }, { - name: "abstainVotes", type: "uint256", + name: "abstainVotes", }, ] as const; diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposals.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposals.ts index 04fe41b8e1b..d58e899e6d7 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposals.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposals.ts @@ -16,30 +16,30 @@ export type ProposalsParams = { export const FN_SELECTOR = "0x013cf08b" as const; const FN_INPUTS = [ { - name: "key", type: "uint256", + name: "key", }, ] as const; const FN_OUTPUTS = [ { - name: "proposalId", type: "uint256", + name: "proposalId", }, { - name: "proposer", type: "address", + name: "proposer", }, { - name: "startBlock", type: "uint256", + name: "startBlock", }, { - name: "endBlock", type: "uint256", + name: "endBlock", }, { - name: "description", type: "string", + name: "description", }, ] as const; diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/quorum.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/quorum.ts index 8ca849b0c87..dce30a0a265 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/quorum.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/quorum.ts @@ -19,8 +19,8 @@ export type QuorumParams = { export const FN_SELECTOR = "0xf8ce560a" as const; const FN_INPUTS = [ { - name: "blockNumber", type: "uint256", + name: "blockNumber", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/state.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/state.ts index 57a47c9faa2..e9b56d165e4 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/state.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/read/state.ts @@ -19,8 +19,8 @@ export type StateParams = { export const FN_SELECTOR = "0x3e4f49e6" as const; const FN_INPUTS = [ { - name: "proposalId", type: "uint256", + name: "proposalId", }, ] as const; const FN_OUTPUTS = [ diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVote.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVote.ts index dab01bb13e5..2666f84fa71 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVote.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVote.ts @@ -22,12 +22,12 @@ export type CastVoteParams = WithOverrides<{ export const FN_SELECTOR = "0x56781388" as const; const FN_INPUTS = [ { - name: "proposalId", type: "uint256", + name: "proposalId", }, { - name: "support", type: "uint8", + name: "support", }, ] as const; const FN_OUTPUTS = [ @@ -130,23 +130,23 @@ export function castVote( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.proposalId, resolvedOptions.support] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteBySig.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteBySig.ts index e09620b20f8..adfd1fc076b 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteBySig.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteBySig.ts @@ -25,24 +25,24 @@ export type CastVoteBySigParams = WithOverrides<{ export const FN_SELECTOR = "0x3bccf4fd" as const; const FN_INPUTS = [ { - name: "proposalId", type: "uint256", + name: "proposalId", }, { - name: "support", type: "uint8", + name: "support", }, { - name: "v", type: "uint8", + name: "v", }, { - name: "r", type: "bytes32", + name: "r", }, { - name: "s", type: "bytes32", + name: "s", }, ] as const; const FN_OUTPUTS = [ @@ -162,19 +162,8 @@ export function castVoteBySig( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -186,5 +175,16 @@ export function castVoteBySig( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteWithReason.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteWithReason.ts index 48027e963a1..d32e7363312 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteWithReason.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteWithReason.ts @@ -23,16 +23,16 @@ export type CastVoteWithReasonParams = WithOverrides<{ export const FN_SELECTOR = "0x7b3c71d3" as const; const FN_INPUTS = [ { - name: "proposalId", type: "uint256", + name: "proposalId", }, { - name: "support", type: "uint8", + name: "support", }, { - name: "reason", type: "string", + name: "reason", }, ] as const; const FN_OUTPUTS = [ @@ -146,19 +146,8 @@ export function castVoteWithReason( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -168,5 +157,16 @@ export function castVoteWithReason( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteWithReasonAndParams.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteWithReasonAndParams.ts index 622e146f4e5..978cb26a8fa 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteWithReasonAndParams.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteWithReasonAndParams.ts @@ -24,20 +24,20 @@ export type CastVoteWithReasonAndParamsParams = WithOverrides<{ export const FN_SELECTOR = "0x5f398a14" as const; const FN_INPUTS = [ { - name: "proposalId", type: "uint256", + name: "proposalId", }, { - name: "support", type: "uint8", + name: "support", }, { - name: "reason", type: "string", + name: "reason", }, { - name: "params", type: "bytes", + name: "params", }, ] as const; const FN_OUTPUTS = [ @@ -159,19 +159,8 @@ export function castVoteWithReasonAndParams( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -182,5 +171,16 @@ export function castVoteWithReasonAndParams( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteWithReasonAndParamsBySig.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteWithReasonAndParamsBySig.ts index 055e6ebb49f..a2e92478f18 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteWithReasonAndParamsBySig.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteWithReasonAndParamsBySig.ts @@ -27,32 +27,32 @@ export type CastVoteWithReasonAndParamsBySigParams = WithOverrides<{ export const FN_SELECTOR = "0x03420181" as const; const FN_INPUTS = [ { - name: "proposalId", type: "uint256", + name: "proposalId", }, { - name: "support", type: "uint8", + name: "support", }, { - name: "reason", type: "string", + name: "reason", }, { - name: "params", type: "bytes", + name: "params", }, { - name: "v", type: "uint8", + name: "v", }, { - name: "r", type: "bytes32", + name: "r", }, { - name: "s", type: "bytes32", + name: "s", }, ] as const; const FN_OUTPUTS = [ @@ -186,19 +186,8 @@ export function castVoteWithReasonAndParamsBySig( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -212,5 +201,16 @@ export function castVoteWithReasonAndParamsBySig( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/execute.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/execute.ts index 74443dd4c8f..9012c2dfc6b 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/execute.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/execute.ts @@ -27,20 +27,20 @@ export type ExecuteParams = WithOverrides<{ export const FN_SELECTOR = "0x2656227d" as const; const FN_INPUTS = [ { - name: "targets", type: "address[]", + name: "targets", }, { - name: "values", type: "uint256[]", + name: "values", }, { - name: "calldatas", type: "bytes[]", + name: "calldatas", }, { - name: "descriptionHash", type: "bytes32", + name: "descriptionHash", }, ] as const; const FN_OUTPUTS = [ @@ -154,19 +154,8 @@ export function execute( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -177,5 +166,16 @@ export function execute( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/propose.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/propose.ts index 85ecd849904..6262ae30b0f 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/propose.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/propose.ts @@ -27,26 +27,26 @@ export type ProposeParams = WithOverrides<{ export const FN_SELECTOR = "0x7d5e81e2" as const; const FN_INPUTS = [ { - name: "targets", type: "address[]", + name: "targets", }, { - name: "values", type: "uint256[]", + name: "values", }, { - name: "calldatas", type: "bytes[]", + name: "calldatas", }, { - name: "description", type: "string", + name: "description", }, ] as const; const FN_OUTPUTS = [ { - name: "proposalId", type: "uint256", + name: "proposalId", }, ] as const; @@ -155,19 +155,8 @@ export function propose( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -178,5 +167,16 @@ export function propose( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/relay.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/relay.ts index 2097326cb98..785a2a588d1 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/relay.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/relay.ts @@ -20,16 +20,16 @@ export type RelayParams = WithOverrides<{ export const FN_SELECTOR = "0xc28bc2fa" as const; const FN_INPUTS = [ { - name: "target", type: "address", + name: "target", }, { - name: "value", type: "uint256", + name: "value", }, { - name: "data", type: "bytes", + name: "data", }, ] as const; const FN_OUTPUTS = [] as const; @@ -135,19 +135,8 @@ export function relay( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [ @@ -157,5 +146,16 @@ export function relay( ] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/setProposalThreshold.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/setProposalThreshold.ts index d0456bd84d2..ece4ee5abf3 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/setProposalThreshold.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/setProposalThreshold.ts @@ -21,8 +21,8 @@ export type SetProposalThresholdParams = WithOverrides<{ export const FN_SELECTOR = "0xece40cc1" as const; const FN_INPUTS = [ { - name: "newProposalThreshold", type: "uint256", + name: "newProposalThreshold", }, ] as const; const FN_OUTPUTS = [] as const; @@ -124,23 +124,23 @@ export function setProposalThreshold( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.newProposalThreshold] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/setVotingDelay.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/setVotingDelay.ts index 32a50d073d2..3b34e86231e 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/setVotingDelay.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/setVotingDelay.ts @@ -21,8 +21,8 @@ export type SetVotingDelayParams = WithOverrides<{ export const FN_SELECTOR = "0x70b0f660" as const; const FN_INPUTS = [ { - name: "newVotingDelay", type: "uint256", + name: "newVotingDelay", }, ] as const; const FN_OUTPUTS = [] as const; @@ -120,23 +120,23 @@ export function setVotingDelay( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.newVotingDelay] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/setVotingPeriod.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/setVotingPeriod.ts index eae17976887..1f4740dd710 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/setVotingPeriod.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/setVotingPeriod.ts @@ -21,8 +21,8 @@ export type SetVotingPeriodParams = WithOverrides<{ export const FN_SELECTOR = "0xea0217cf" as const; const FN_INPUTS = [ { - name: "newVotingPeriod", type: "uint256", + name: "newVotingPeriod", }, ] as const; const FN_OUTPUTS = [] as const; @@ -120,23 +120,23 @@ export function setVotingPeriod( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.newVotingPeriod] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/updateQuorumNumerator.ts b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/updateQuorumNumerator.ts index 3431c12a84b..d76a5f43144 100644 --- a/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/updateQuorumNumerator.ts +++ b/packages/thirdweb/src/extensions/vote/__generated__/Vote/write/updateQuorumNumerator.ts @@ -21,8 +21,8 @@ export type UpdateQuorumNumeratorParams = WithOverrides<{ export const FN_SELECTOR = "0x06f3f9e6" as const; const FN_INPUTS = [ { - name: "newQuorumNumerator", type: "uint256", + name: "newQuorumNumerator", }, ] as const; const FN_OUTPUTS = [] as const; @@ -124,23 +124,23 @@ export function updateQuorumNumerator( }); return prepareContractCall({ - accessList: async () => (await asyncOptions()).overrides?.accessList, - authorizationList: async () => - (await asyncOptions()).overrides?.authorizationList, contract: options.contract, - erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, - extraGas: async () => (await asyncOptions()).overrides?.extraGas, - gas: async () => (await asyncOptions()).overrides?.gas, - gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, - maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, - maxPriorityFeePerGas: async () => - (await asyncOptions()).overrides?.maxPriorityFeePerGas, method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const, - nonce: async () => (await asyncOptions()).overrides?.nonce, params: async () => { const resolvedOptions = await asyncOptions(); return [resolvedOptions.newQuorumNumerator] as const; }, value: async () => (await asyncOptions()).overrides?.value, + accessList: async () => (await asyncOptions()).overrides?.accessList, + gas: async () => (await asyncOptions()).overrides?.gas, + gasPrice: async () => (await asyncOptions()).overrides?.gasPrice, + maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas, + maxPriorityFeePerGas: async () => + (await asyncOptions()).overrides?.maxPriorityFeePerGas, + nonce: async () => (await asyncOptions()).overrides?.nonce, + extraGas: async () => (await asyncOptions()).overrides?.extraGas, + erc20Value: async () => (await asyncOptions()).overrides?.erc20Value, + authorizationList: async () => + (await asyncOptions()).overrides?.authorizationList, }); } diff --git a/packages/thirdweb/src/extensions/zksync/__generated__/ContractDeployer/events/ContractDeployed.ts b/packages/thirdweb/src/extensions/zksync/__generated__/ContractDeployer/events/ContractDeployed.ts index 68fc917edd2..328036ce944 100644 --- a/packages/thirdweb/src/extensions/zksync/__generated__/ContractDeployer/events/ContractDeployed.ts +++ b/packages/thirdweb/src/extensions/zksync/__generated__/ContractDeployer/events/ContractDeployed.ts @@ -48,8 +48,8 @@ export function contractDeployedEvent( filters: ContractDeployedEventFilters = {}, ) { return prepareEvent({ - filters, signature: "event ContractDeployed(address indexed deployerAddress, bytes32 indexed bytecodeHash, address indexed contractAddress)", + filters, }); } diff --git a/packages/thirdweb/src/tokens/constants.ts b/packages/thirdweb/src/tokens/constants.ts new file mode 100644 index 00000000000..1d1a96c0e65 --- /dev/null +++ b/packages/thirdweb/src/tokens/constants.ts @@ -0,0 +1,30 @@ +export const DEFAULT_MAX_SUPPLY_ERC20 = 1_000_000_000n; +export const DEFAULT_POOL_INITIAL_TICK = 230200; +export const DEFAULT_INFRA_ADMIN = "0x1a472863cf21d5aa27f417df9140400324c48f22"; + +export const DEFAULT_REFERRER_REWARD_BPS = 625; // 6.25% (6.25% * 80% = 5%) +export const DEFAULT_REFERRER_ADDRESS = + "0x1Af20C6B23373350aD464700B5965CE4B0D2aD94"; + +export const IMPLEMENTATIONS: Record> = { + 8453: { + AssetEntrypointERC20: "0x70458B0b8afA1113b5716C0e213Bc3a48bFcFF74", + }, + 84532: { + AssetEntrypointERC20: "0x69e8298bB5c52FF8385a5Ea51688dbEe13e75ece", + }, +}; + +// export enum ImplementationType { +// CLONE = 0, +// CLONE_WITH_IMMUTABLE_ARGS = 1, +// ERC1967 = 2, +// ERC1967_WITH_IMMUTABLE_ARGS = 3, +// } + +// export enum CreateHook { +// NONE = 0, // do nothing +// CREATE_POOL = 1, // create a DEX pool via Router +// DISTRIBUTE = 2, // distribute tokens to recipients +// EXTERNAL_HOOK = 3, // call an external hook contract +// } diff --git a/packages/thirdweb/src/tokens/create-token.ts b/packages/thirdweb/src/tokens/create-token.ts new file mode 100644 index 00000000000..b5823af3e01 --- /dev/null +++ b/packages/thirdweb/src/tokens/create-token.ts @@ -0,0 +1,60 @@ +import { bytesToHex, randomBytes } from "@noble/hashes/utils"; +import type { Hex } from "viem"; +import { parseEventLogs } from "../event/actions/parse-logs.js"; +import { createdEvent } from "../extensions/tokens/__generated__/ERC20Entrypoint/events/Created.js"; +import { create } from "../extensions/tokens/__generated__/ERC20Entrypoint/write/create.js"; +import { sendAndConfirmTransaction } from "../transaction/actions/send-and-confirm-transaction.js"; +import { DEFAULT_REFERRER_ADDRESS } from "./constants.js"; +import { getOrDeployEntrypointERC20 } from "./get-entrypoint-erc20.js"; +import { + encodeInitParams, + encodePoolConfig, + generateSalt, +} from "./token-utils.js"; +import type { CreateTokenOptions } from "./types.js"; + +export async function createToken(options: CreateTokenOptions) { + const { client, account, params, launchConfig } = options; + + const creator = params.owner || account.address; + const encodedInitData = await encodeInitParams({ + client, + creator, + params, + }); + + const salt: Hex = generateSalt(options.salt || bytesToHex(randomBytes(31))); + + const entrypoint = await getOrDeployEntrypointERC20(options); + + let hookData: Hex = "0x"; + if (launchConfig?.kind === "pool") { + hookData = encodePoolConfig(launchConfig.config); + } + + const transaction = create({ + contract: entrypoint, + createParams: { + data: encodedInitData, + hookData, + referrer: options.referrerAddress || DEFAULT_REFERRER_ADDRESS, + salt, + }, + creator, + }); + + const receipt = await sendAndConfirmTransaction({ account, transaction }); + const assetEvent = createdEvent(); + const decodedEvent = parseEventLogs({ + events: [assetEvent], + logs: receipt.logs, + }); + + if (decodedEvent.length === 0 || !decodedEvent[0]) { + throw new Error( + `No AssetCreated event found in transaction: ${receipt.transactionHash}`, + ); + } + + return decodedEvent[0]?.args.asset; +} diff --git a/packages/thirdweb/src/tokens/distribute-token.ts b/packages/thirdweb/src/tokens/distribute-token.ts new file mode 100644 index 00000000000..c3e0233a3c4 --- /dev/null +++ b/packages/thirdweb/src/tokens/distribute-token.ts @@ -0,0 +1,26 @@ +import { distribute } from "../extensions/tokens/__generated__/ERC20Entrypoint/write/distribute.js"; +import type { ClientAndChain } from "../utils/types.js"; +import { toUnits } from "../utils/units.js"; +import { getDeployedEntrypointERC20 } from "./get-entrypoint-erc20.js"; +import type { DistributeContent } from "./types.js"; + +type DistrbuteTokenParams = ClientAndChain & { + tokenAddress: string; + contents: DistributeContent[]; +}; + +export async function distributeToken(options: DistrbuteTokenParams) { + const entrypoint = await getDeployedEntrypointERC20(options); + + if (!entrypoint) { + throw new Error(`Entrypoint not found on chain: ${options.chain.id}`); + } + + return distribute({ + asset: options.tokenAddress, + contents: options.contents.map((a) => { + return { ...a, amount: toUnits(a.amount.toString(), 18) }; + }), + contract: entrypoint, + }); +} diff --git a/packages/thirdweb/src/tokens/get-entrypoint-erc20.ts b/packages/thirdweb/src/tokens/get-entrypoint-erc20.ts new file mode 100644 index 00000000000..b5c411f26c6 --- /dev/null +++ b/packages/thirdweb/src/tokens/get-entrypoint-erc20.ts @@ -0,0 +1,37 @@ +import { getContract, type ThirdwebContract } from "../contract/contract.js"; +import type { + ClientAndChain, + ClientAndChainAndAccount, +} from "../utils/types.js"; +import { IMPLEMENTATIONS } from "./constants.js"; + +export async function getOrDeployEntrypointERC20( + options: ClientAndChainAndAccount, +): Promise { + const implementations = IMPLEMENTATIONS[options.chain.id]; + + if (implementations?.AssetEntrypointERC20) { + return getContract({ + address: implementations.AssetEntrypointERC20, + chain: options.chain, + client: options.client, + }); + } + + // TODO: Dynamically deploy asset factory if not already deployed + throw new Error("Asset factory deployment is not deployed yet."); +} + +export async function getDeployedEntrypointERC20(options: ClientAndChain) { + const implementations = IMPLEMENTATIONS[options.chain.id]; + + if (implementations?.AssetEntrypointERC20) { + return getContract({ + address: implementations.AssetEntrypointERC20, + chain: options.chain, + client: options.client, + }); + } + + throw new Error("Asset factory deployment is not deployed yet."); +} diff --git a/packages/thirdweb/src/tokens/is-router-enabled.ts b/packages/thirdweb/src/tokens/is-router-enabled.ts new file mode 100644 index 00000000000..c7c1a5ec061 --- /dev/null +++ b/packages/thirdweb/src/tokens/is-router-enabled.ts @@ -0,0 +1,20 @@ +import { ZERO_ADDRESS } from "../constants/addresses.js"; +import { getRouter } from "../extensions/tokens/__generated__/ERC20Entrypoint/read/getRouter.js"; +import type { ClientAndChain } from "../utils/types.js"; +import { getDeployedEntrypointERC20 } from "./get-entrypoint-erc20.js"; + +export async function isRouterEnabled( + options: ClientAndChain, +): Promise { + const entrypoint = await getDeployedEntrypointERC20(options); + + if (!entrypoint) { + return false; + } + + const router = await getRouter({ + contract: entrypoint, + }); + + return router !== ZERO_ADDRESS; +} diff --git a/packages/thirdweb/src/tokens/token-utils.test.ts b/packages/thirdweb/src/tokens/token-utils.test.ts new file mode 100644 index 00000000000..05adb3e9904 --- /dev/null +++ b/packages/thirdweb/src/tokens/token-utils.test.ts @@ -0,0 +1,46 @@ +import { isHex } from "viem/utils"; +import { describe, expect, it } from "vitest"; + +import { generateSalt, SaltFlag } from "./token-utils.js"; + +// Helper to validate the generated salt meets core guarantees +function assertValidSalt(out: string, expectedFlagHex: string) { + // should be valid hex + console.log("out", out); + expect(isHex(out)).toBe(true); + // 0x prefix + 64 hex chars → 32 bytes + expect(out.length).toBe(66); + // first byte must match the expected flag + expect(out.slice(0, 4).toLowerCase()).toBe(expectedFlagHex.toLowerCase()); +} + +describe("generateSalt", () => { + it("handles hex shorter than 32 bytes (padding)", () => { + const shortHex = "0x123456"; // 3 bytes < 32 bytes + const out = generateSalt(shortHex); + assertValidSalt(out, "0x01"); // default flag is MIX_SENDER (0x01) + }); + + it("handles exactly 32-byte hex and overrides explicit flag with salt's flag", () => { + const hex32 = `0x20${"aa".repeat(31)}`; // first byte 0x20, total 32 bytes + const out = generateSalt(hex32, SaltFlag.BYPASS); // pass a different flag intentionally + // even though we requested BYPASS (0x80), the salt's first byte (0x20) wins + assertValidSalt(out, "0x20"); + }); + + it("handles hex longer than 32 bytes (hashing)", () => { + const longHex = `0x${"ff".repeat(80)}`; // 80 bytes > 32 bytes + const out = generateSalt(longHex); + assertValidSalt(out, "0x01"); // default flag retained + }); + + it("handles arbitrary non-hex string (hashed)", () => { + const out = generateSalt("hello world"); + assertValidSalt(out, "0x01"); + }); + + it("respects explicit flag parameter when provided", () => { + const out = generateSalt("foobar", SaltFlag.BYPASS); + assertValidSalt(out, "0x80"); + }); +}); diff --git a/packages/thirdweb/src/tokens/token-utils.ts b/packages/thirdweb/src/tokens/token-utils.ts new file mode 100644 index 00000000000..b01a92dc18f --- /dev/null +++ b/packages/thirdweb/src/tokens/token-utils.ts @@ -0,0 +1,157 @@ +import { type Hex, keccak256 } from "viem"; +import { isHex, toBytes } from "viem/utils"; +import type { ThirdwebClient } from "../client/client.js"; +import { NATIVE_TOKEN_ADDRESS } from "../constants/addresses.js"; +import { encodeInitialize } from "../extensions/tokens/__generated__/ERC20Asset/write/initialize.js"; +import { upload } from "../storage/upload.js"; +import { encodeAbiParameters } from "../utils/abi/encodeAbiParameters.js"; +import { toUnits } from "../utils/units.js"; +import { + DEFAULT_MAX_SUPPLY_ERC20, + DEFAULT_POOL_INITIAL_TICK, + DEFAULT_REFERRER_REWARD_BPS, +} from "./constants.js"; +import type { PoolConfig, TokenParams } from "./types.js"; + +export const SaltFlag = { + /** Mix in msg.sender */ + MIX_SENDER: 0x01, + /** Mix in block.chainid */ + MIX_CHAIN_ID: 0x02, + /** Mix in block.number */ + MIX_BLOCK_NUMBER: 0x04, + /** Mix in contractInitData */ + MIX_CONTRACT_INIT_DATA: 0x08, + /** Mix in hookInitData */ + MIX_HOOK_INIT_DATA: 0x10, + /** Mix in creator address */ + MIX_CREATOR: 0x20, + /** Bypass mode – disable all transformations */ + BYPASS: 0x80, +} as const; + +export type SaltFlagType = (typeof SaltFlag)[keyof typeof SaltFlag]; + +export async function encodeInitParams(options: { + client: ThirdwebClient; + params: TokenParams; + creator: string; +}): Promise { + const { client, params, creator } = options; + + const contractURI = + options.params.contractURI || + (await upload({ + client, + files: [ + { + description: params.description, + external_link: params.external_link, + image: params.image, + name: params.name, + social_urls: params.social_urls, + symbol: params.symbol, + }, + ], + })) || + ""; + + return encodeInitialize({ + contractURI, + owner: creator, + name: params.name, + symbol: params.symbol || params.name, + maxSupply: toUnits( + params.maxSupply.toString() || DEFAULT_MAX_SUPPLY_ERC20.toString(), + 18, + ), + }); +} + +export function encodePoolConfig(poolConfig: PoolConfig): Hex { + const POOL_PARAMS = [ + { + name: "amount", + type: "uint256", + }, + { + name: "currency", + type: "address", + }, + { + name: "initialTick", + type: "int24", + }, + { + name: "referrerRewardBps", + type: "uint16", + }, + ] as const; + + return encodeAbiParameters(POOL_PARAMS, [ + toUnits(poolConfig.amount.toString(), 18), + poolConfig.currency || NATIVE_TOKEN_ADDRESS, + poolConfig.initialTick || DEFAULT_POOL_INITIAL_TICK, + poolConfig.referrerRewardBps || DEFAULT_REFERRER_REWARD_BPS, + ]); +} + +export function generateSalt( + salt: Hex | string, + flags: SaltFlagType = SaltFlag.MIX_SENDER, +): Hex { + /* + * The salt layout follows the on-chain convention documented in the `guardSalt` Solidity helper. + * [0x00] – 1 byte : flags (bits 0-7) + * [0x01-0x1F] – 31 bytes : user-provided entropy + * + * This helper makes it easy to prepare a salt off-chain that can be passed to + * the contract. It guarantees the returned value is always 32 bytes (66 hex + * chars including the `0x` prefix) and allows callers to optionally pass a + * custom salt and/or explicit flag byte. + */ + + let flagByte: number = flags; + + // If the salt is already a valid 32-byte hex string, we can use it as is and extract the flag byte + if (salt && isHex(salt)) { + const hex = salt.replace(/^0x/i, ""); + if (hex.length === 64) { + flagByte = parseInt(hex.slice(0, 2), 16) as SaltFlagType; + salt = `0x${hex.slice(2)}` as Hex; + } else if (hex.length < 64) { + // If the salt is less than 31 bytes, we need to pad it with zeros (first 2 bytes are the flag byte) + salt = `0x${hex.padStart(62, "0")}` as Hex; + } else if (hex.length > 64) { + // If the salt is greater than 32 bytes, we need to keccak256 it. + // first 2 bytes are the flag byte, and truncate to 31 bytes + salt = `0x${keccak256(toBytes(hex)).slice(4)}` as Hex; + } + } else if (salt && !isHex(salt)) { + // 31 bytes of salt data + salt = `0x${keccak256(toBytes(salt)).slice(4)}` as Hex; + } + + // If the flag byte is not a valid 8-bit unsigned integer, throw an error + if (flagByte < 0 || flagByte > 0xff) { + throw new Error("flags must be an 8-bit unsigned integer (0-255)"); + } + + const saltData = salt.replace(/^0x/i, ""); + if (saltData.length !== 62) { + // 31 bytes * 2 hex chars + throw new Error( + "salt data (excluding flag byte) cannot exceed 31 bytes (62 hex characters)", + ); + } + + const result = + `0x${flagByte.toString(16).padStart(2, "0")}${saltData}` as Hex; + + // Final sanity check – should always be 32 bytes / 66 hex chars (including 0x) + if (result.length !== 66) { + throw new Error("generated salt must be 32 bytes"); + } + + return result; +} diff --git a/packages/thirdweb/src/tokens/types.ts b/packages/thirdweb/src/tokens/types.ts new file mode 100644 index 00000000000..b5726050d48 --- /dev/null +++ b/packages/thirdweb/src/tokens/types.ts @@ -0,0 +1,48 @@ +import type { Hex } from "viem"; +import type { FileOrBufferOrString } from "../storage/upload/types.js"; +import type { ClientAndChainAndAccount } from "../utils/types.js"; + +export type TokenParams = { + name: string; + description?: string; + image?: FileOrBufferOrString; + external_link?: string; + social_urls?: Record; + symbol?: string; + contractURI?: string; + maxSupply: bigint; + owner?: string; +}; + +export type PoolConfig = { + amount: bigint; + currency?: string; + initialTick?: number; + referrerRewardBps?: number; +}; + +export type DistributeContent = { + amount: bigint; + recipient: string; +}; + +type DistributeConfig = { + content: DistributeContent[]; +}; + +type LaunchConfig = + | { kind: "pool"; config: PoolConfig } + | { kind: "distribute"; config: DistributeConfig }; + +export type CreateTokenOptions = ClientAndChainAndAccount & { + salt?: Hex; + params: TokenParams; + launchConfig?: LaunchConfig; + referrerAddress?: string; +}; + +export type CreateTokenByImplementationConfigOptions = + ClientAndChainAndAccount & + CreateTokenOptions & { + implementationAddress: string; + };