Integrate modular core contracts + mintableERCxxx extensions (#3413)
Co-authored-by: Krishang <[email protected]> Co-authored-by: Yash <[email protected]> Co-authored-by: Yash <[email protected]>
This commit is contained in:
co-authored by
Krishang
Yash
Yash
parent
bf61c4bf2a
commit
87d6b6a5b5
@@ -113,58 +113,32 @@
|
||||
"import": "./dist/esm/exports/wallets/*.js",
|
||||
"default": "./dist/cjs/exports/wallets/*.js"
|
||||
},
|
||||
"./modules": {
|
||||
"types": "./dist/types/exports/modules.d.ts",
|
||||
"import": "./dist/esm/exports/modules.js",
|
||||
"default": "./dist/cjs/exports/modules.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"adapters/*": [
|
||||
"./dist/types/exports/adapters/*.d.ts"
|
||||
],
|
||||
"auth": [
|
||||
"./dist/types/exports/auth.d.ts"
|
||||
],
|
||||
"chains": [
|
||||
"./dist/types/exports/chains.d.ts"
|
||||
],
|
||||
"contract": [
|
||||
"./dist/types/exports/contract.d.ts"
|
||||
],
|
||||
"deploys": [
|
||||
"./dist/types/exports/deploys.d.ts"
|
||||
],
|
||||
"event": [
|
||||
"./dist/types/exports/event.d.ts"
|
||||
],
|
||||
"extensions/*": [
|
||||
"./dist/types/exports/extensions/*.d.ts"
|
||||
],
|
||||
"pay": [
|
||||
"./dist/types/exports/pay.d.ts"
|
||||
],
|
||||
"react": [
|
||||
"./dist/types/exports/react.d.ts"
|
||||
],
|
||||
"react-native": [
|
||||
"./dist/types/exports/react-native.d.ts"
|
||||
],
|
||||
"rpc": [
|
||||
"./dist/types/exports/rpc.d.ts"
|
||||
],
|
||||
"storage": [
|
||||
"./dist/types/exports/storage.d.ts"
|
||||
],
|
||||
"transaction": [
|
||||
"./dist/types/exports/transaction.d.ts"
|
||||
],
|
||||
"utils": [
|
||||
"./dist/types/exports/utils.d.ts"
|
||||
],
|
||||
"wallets": [
|
||||
"./dist/types/exports/wallets.d.ts"
|
||||
],
|
||||
"wallets/*": [
|
||||
"./dist/types/exports/wallets/*.d.ts"
|
||||
]
|
||||
"adapters/*": ["./dist/types/exports/adapters/*.d.ts"],
|
||||
"auth": ["./dist/types/exports/auth.d.ts"],
|
||||
"chains": ["./dist/types/exports/chains.d.ts"],
|
||||
"contract": ["./dist/types/exports/contract.d.ts"],
|
||||
"deploys": ["./dist/types/exports/deploys.d.ts"],
|
||||
"event": ["./dist/types/exports/event.d.ts"],
|
||||
"extensions/*": ["./dist/types/exports/extensions/*.d.ts"],
|
||||
"pay": ["./dist/types/exports/pay.d.ts"],
|
||||
"react": ["./dist/types/exports/react.d.ts"],
|
||||
"react-native": ["./dist/types/exports/react-native.d.ts"],
|
||||
"rpc": ["./dist/types/exports/rpc.d.ts"],
|
||||
"storage": ["./dist/types/exports/storage.d.ts"],
|
||||
"transaction": ["./dist/types/exports/transaction.d.ts"],
|
||||
"utils": ["./dist/types/exports/utils.d.ts"],
|
||||
"wallets": ["./dist/types/exports/wallets.d.ts"],
|
||||
"wallets/*": ["./dist/types/exports/wallets/*.d.ts"],
|
||||
"modules": ["./dist/types/exports/modules.d.ts"]
|
||||
}
|
||||
},
|
||||
"browser": {
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
[
|
||||
"function getAllMetadataBatches() view returns ((uint256 startTokenIdInclusive, uint256 endTokenIdInclusive, string baseURI)[])",
|
||||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)",
|
||||
"function onTokenURI(uint256 _id) view returns (string)",
|
||||
"function uploadMetadata(uint256 _amount, string _baseURI)",
|
||||
"event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId)",
|
||||
"event NewMetadataBatch(uint256 indexed startTokenIdInclusive, uint256 indexed endTokenIdNonInclusive, string baseURI)",
|
||||
"error BatchMetadataNoMetadataForTokenId()",
|
||||
"error BatchMetadataZeroAmount()"
|
||||
]
|
||||
@@ -1,10 +0,0 @@
|
||||
[
|
||||
"function getAllMetadataBatches() view returns ((uint256 startTokenIdInclusive, uint256 endTokenIdInclusive, string baseURI)[])",
|
||||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)",
|
||||
"function onTokenURI(uint256 _id) view returns (string)",
|
||||
"function uploadMetadata(uint256 _amount, string _baseURI)",
|
||||
"event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId)",
|
||||
"event NewMetadataBatch(uint256 indexed startTokenIdInclusive, uint256 indexed endTokenIdNonInclusive, string baseURI)",
|
||||
"error BatchMetadataNoMetadataForTokenId()",
|
||||
"error BatchMetadataZeroAmount()"
|
||||
]
|
||||
@@ -1,25 +0,0 @@
|
||||
[
|
||||
"function beforeMintERC1155(address _to, uint256 _id, uint256 _quantity, bytes _data) payable returns (bytes)",
|
||||
"function eip712Domain() view returns (bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions)",
|
||||
"function encodeBytesBeforeMintERC1155(((uint256 tokenId, uint48 startTimestamp, uint48 endTimestamp, address recipient, uint256 quantity, address currency, uint256 pricePerUnit, bytes32 uid) request, bytes signature, address currency, uint256 pricePerUnit, bytes32[] recipientAllowlistProof) params) pure returns (bytes)",
|
||||
"function encodeBytesOnInstall(address primarySaleRecipient) pure returns (bytes)",
|
||||
"function encodeBytesOnUninstall() pure returns (bytes)",
|
||||
"function getClaimConditionByTokenId(uint256 _id) view returns ((uint256 availableSupply, bytes32 allowlistMerkleRoot, uint256 pricePerUnit, address currency, uint48 startTimestamp, uint48 endTimestamp, string auxData) claimCondition)",
|
||||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)",
|
||||
"function getSaleConfig() view returns (address primarySaleRecipient)",
|
||||
"function onInstall(bytes data)",
|
||||
"function onUninstall(bytes data)",
|
||||
"function setClaimConditionByTokenId(uint256 _id, (uint256 availableSupply, bytes32 allowlistMerkleRoot, uint256 pricePerUnit, address currency, uint48 startTimestamp, uint48 endTimestamp, string auxData) _claimCondition)",
|
||||
"function setSaleConfig(address _primarySaleRecipient)",
|
||||
"error BeforeMintCallbackERC1155NotImplemented()",
|
||||
"error ClaimableIncorrectNativeTokenSent()",
|
||||
"error ClaimableIncorrectPriceOrCurrency()",
|
||||
"error ClaimableNotInAllowlist()",
|
||||
"error ClaimableOutOfSupply()",
|
||||
"error ClaimableOutOfTimeWindow()",
|
||||
"error ClaimableRequestInvalidToken()",
|
||||
"error ClaimableRequestMismatch()",
|
||||
"error ClaimableRequestOutOfTimeWindow()",
|
||||
"error ClaimableRequestUidReused()",
|
||||
"error ClaimableRequestUnauthorizedSignature()"
|
||||
]
|
||||
@@ -1,24 +0,0 @@
|
||||
[
|
||||
"function beforeMintERC20(address _to, uint256 _amount, bytes _data) payable returns (bytes)",
|
||||
"function eip712Domain() view returns (bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions)",
|
||||
"function encodeBytesBeforeMintERC20(((uint48 startTimestamp, uint48 endTimestamp, address recipient, uint256 quantity, address currency, uint256 pricePerUnit, bytes32 uid) request, bytes signature, address currency, uint256 pricePerUnit, bytes32[] recipientAllowlistProof) params) pure returns (bytes)",
|
||||
"function encodeBytesOnInstall(address primarySaleRecipient) pure returns (bytes)",
|
||||
"function encodeBytesOnUninstall() pure returns (bytes)",
|
||||
"function getClaimCondition() view returns ((uint256 availableSupply, bytes32 allowlistMerkleRoot, uint256 pricePerUnit, address currency, uint48 startTimestamp, uint48 endTimestamp, string auxData) claimCondition)",
|
||||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)",
|
||||
"function getSaleConfig() view returns (address primarySaleRecipient)",
|
||||
"function onInstall(bytes data)",
|
||||
"function onUninstall(bytes data)",
|
||||
"function setClaimCondition((uint256 availableSupply, bytes32 allowlistMerkleRoot, uint256 pricePerUnit, address currency, uint48 startTimestamp, uint48 endTimestamp, string auxData) _claimCondition)",
|
||||
"function setSaleConfig(address _primarySaleRecipient)",
|
||||
"error BeforeMintCallbackERC20NotImplemented()",
|
||||
"error ClaimableIncorrectNativeTokenSent()",
|
||||
"error ClaimableIncorrectPriceOrCurrency()",
|
||||
"error ClaimableNotInAllowlist()",
|
||||
"error ClaimableOutOfSupply()",
|
||||
"error ClaimableOutOfTimeWindow()",
|
||||
"error ClaimableRequestMismatch()",
|
||||
"error ClaimableRequestOutOfTimeWindow()",
|
||||
"error ClaimableRequestUidReused()",
|
||||
"error ClaimableRequestUnauthorizedSignature()"
|
||||
]
|
||||
@@ -1,24 +0,0 @@
|
||||
[
|
||||
"function beforeMintERC721(address _to, uint256 _startTokenId, uint256 _quantity, bytes _data) payable returns (bytes)",
|
||||
"function eip712Domain() view returns (bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions)",
|
||||
"function encodeBytesBeforeMintERC721(((uint48 startTimestamp, uint48 endTimestamp, address recipient, uint256 quantity, address currency, uint256 pricePerUnit, bytes32 uid) request, bytes signature, address currency, uint256 pricePerUnit, bytes32[] recipientAllowlistProof) params) pure returns (bytes)",
|
||||
"function encodeBytesOnInstall(address primarySaleRecipient) pure returns (bytes)",
|
||||
"function encodeBytesOnUninstall() pure returns (bytes)",
|
||||
"function getClaimCondition() view returns ((uint256 availableSupply, bytes32 allowlistMerkleRoot, uint256 pricePerUnit, address currency, uint48 startTimestamp, uint48 endTimestamp, string auxData) claimCondition)",
|
||||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)",
|
||||
"function getSaleConfig() view returns (address primarySaleRecipient)",
|
||||
"function onInstall(bytes data)",
|
||||
"function onUninstall(bytes data)",
|
||||
"function setClaimCondition((uint256 availableSupply, bytes32 allowlistMerkleRoot, uint256 pricePerUnit, address currency, uint48 startTimestamp, uint48 endTimestamp, string auxData) _claimCondition)",
|
||||
"function setSaleConfig(address _primarySaleRecipient)",
|
||||
"error BeforeMintCallbackERC721NotImplemented()",
|
||||
"error ClaimableIncorrectNativeTokenSent()",
|
||||
"error ClaimableIncorrectPriceOrCurrency()",
|
||||
"error ClaimableNotInAllowlist()",
|
||||
"error ClaimableOutOfSupply()",
|
||||
"error ClaimableOutOfTimeWindow()",
|
||||
"error ClaimableRequestMismatch()",
|
||||
"error ClaimableRequestOutOfTimeWindow()",
|
||||
"error ClaimableRequestUidReused()",
|
||||
"error ClaimableRequestUnauthorizedSignature()"
|
||||
]
|
||||
@@ -1,15 +0,0 @@
|
||||
[
|
||||
"function encodeBytesUploadMetadata(bytes encryptedURI, bytes32 provenanceHash) pure returns (bytes)",
|
||||
"function getAllMetadataBatches() view returns ((uint256 startTokenIdInclusive, uint256 endTokenIdInclusive, string baseURI, bytes encryptedData)[])",
|
||||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)",
|
||||
"function onTokenURI(uint256 _id) view returns (string)",
|
||||
"function reveal(uint256 _index, bytes _key) returns (string revealedURI)",
|
||||
"function uploadMetadata(uint256 _amount, string _baseURI, bytes _data)",
|
||||
"event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId)",
|
||||
"event NewMetadataBatch(uint256 indexed startTokenIdInclusive, uint256 indexed endTokenIdNonInclusive, string baseURI)",
|
||||
"event TokenURIRevealed(uint256 indexed index, string revealedURI)",
|
||||
"error BatchMetadataNoMetadataForTokenId()",
|
||||
"error BatchMetadataZeroAmount()",
|
||||
"error DelayedRevealIncorrectDecryptionKey(bytes32 expected, bytes32 actual)",
|
||||
"error DelayedRevealNothingToReveal()"
|
||||
]
|
||||
@@ -1,23 +0,0 @@
|
||||
[
|
||||
"function beforeMintERC1155(address _to, uint256 _id, uint256 _quantity, bytes _data) payable returns (bytes)",
|
||||
"function eip712Domain() view returns (bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions)",
|
||||
"function encodeBytesBeforeMintERC1155(((uint256 tokenId, uint48 startTimestamp, uint48 endTimestamp, address recipient, uint256 quantity, address currency, uint256 pricePerUnit, string metadataURI, bytes32 uid) request, bytes signature, string metadataURI) params) pure returns (bytes)",
|
||||
"function encodeBytesOnInstall(address primarySaleRecipient) pure returns (bytes)",
|
||||
"function encodeBytesOnUninstall() pure returns (bytes)",
|
||||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)",
|
||||
"function getSaleConfig() view returns (address primarySaleRecipient)",
|
||||
"function onInstall(bytes data)",
|
||||
"function onTokenURI(uint256 _tokenId) view returns (string)",
|
||||
"function onUninstall(bytes data)",
|
||||
"function setSaleConfig(address _primarySaleRecipient)",
|
||||
"function setTokenURI(uint256 _tokenId, string _tokenURI)",
|
||||
"event MetadataUpdate(uint256 id)",
|
||||
"event MintableTokenURIUpdated(uint256 tokenId, string tokenURI)",
|
||||
"error BeforeMintCallbackERC1155NotImplemented()",
|
||||
"error MintableIncorrectNativeTokenSent()",
|
||||
"error MintableRequestMismatch()",
|
||||
"error MintableRequestOutOfTimeWindow()",
|
||||
"error MintableRequestUidReused()",
|
||||
"error MintableRequestUnauthorized()",
|
||||
"error OnTokenURICallbackNotImplemented()"
|
||||
]
|
||||
@@ -1,39 +0,0 @@
|
||||
[
|
||||
"function beforeMintERC20(address _to, uint256 _quantity, bytes _data) payable returns (bytes)",
|
||||
"function cancelOwnershipHandover() payable",
|
||||
"function completeOwnershipHandover(address pendingOwner) payable",
|
||||
"function eip712Domain() view returns (bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions)",
|
||||
"function encodeBytesBeforeMintERC20(((uint48 startTimestamp, uint48 endTimestamp, address recipient, uint256 quantity, address currency, uint256 pricePerUnit, bytes32 uid) request, bytes signature) params) pure returns (bytes)",
|
||||
"function encodeBytesOnInstall(address primarySaleRecipient) pure returns (bytes)",
|
||||
"function encodeBytesOnUninstall() pure returns (bytes)",
|
||||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)",
|
||||
"function getSaleConfig() view returns (address primarySaleRecipient)",
|
||||
"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 onInstall(bytes data)",
|
||||
"function onUninstall(bytes data)",
|
||||
"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 setSaleConfig(address _primarySaleRecipient)",
|
||||
"function transferOwnership(address newOwner) payable",
|
||||
"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 BeforeMintCallbackERC20NotImplemented()",
|
||||
"error MintableIncorrectNativeTokenSent()",
|
||||
"error MintableRequestMismatch()",
|
||||
"error MintableRequestOutOfTimeWindow()",
|
||||
"error MintableRequestUidReused()",
|
||||
"error MintableRequestUnauthorized()",
|
||||
"error NewOwnerIsZeroAddress()",
|
||||
"error NoHandoverRequest()",
|
||||
"error Unauthorized()"
|
||||
]
|
||||
@@ -1,25 +0,0 @@
|
||||
[
|
||||
"function beforeMintERC721(address _to, uint256 _startTokenId, uint256 _quantity, bytes _data) payable returns (bytes)",
|
||||
"function eip712Domain() view returns (bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions)",
|
||||
"function encodeBytesBeforeMintERC721(((uint48 startTimestamp, uint48 endTimestamp, address recipient, uint256 quantity, address currency, uint256 pricePerUnit, string baseURI, bytes32 uid) request, bytes signature, string baseURI) params) pure returns (bytes)",
|
||||
"function encodeBytesOnInstall(address primarySaleRecipient) pure returns (bytes)",
|
||||
"function encodeBytesOnUninstall() pure returns (bytes)",
|
||||
"function getAllMetadataBatches() view returns ((uint256 startTokenIdInclusive, uint256 endTokenIdInclusive, string baseURI)[])",
|
||||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)",
|
||||
"function getSaleConfig() view returns (address primarySaleRecipient)",
|
||||
"function onInstall(bytes data)",
|
||||
"function onTokenURI(uint256 _id) view returns (string)",
|
||||
"function onUninstall(bytes data)",
|
||||
"function setSaleConfig(address _primarySaleRecipient)",
|
||||
"event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId)",
|
||||
"event NewMetadataBatch(uint256 indexed startTokenIdInclusive, uint256 indexed endTokenIdNonInclusive, string baseURI)",
|
||||
"error BeforeMintCallbackERC721NotImplemented()",
|
||||
"error MintableIncorrectNativeTokenSent()",
|
||||
"error MintableNoMetadataForTokenId()",
|
||||
"error MintableRequestInvalidToken()",
|
||||
"error MintableRequestMismatch()",
|
||||
"error MintableRequestOutOfTimeWindow()",
|
||||
"error MintableRequestUidReused()",
|
||||
"error MintableRequestUnauthorized()",
|
||||
"error OnTokenURICallbackNotImplemented()"
|
||||
]
|
||||
@@ -1,43 +0,0 @@
|
||||
[
|
||||
"function cancelOwnershipHandover() payable",
|
||||
"function completeOwnershipHandover(address pendingOwner) payable",
|
||||
"function getInstalledModules() view returns ((address implementation, (bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)[] _installedModules)",
|
||||
"function getSupportedCallbackFunctions() pure returns ((bytes4 selector, uint8 mode)[])",
|
||||
"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 installModule(address _module, bytes _data) payable",
|
||||
"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 supportsInterface(bytes4 interfaceId) view returns (bool)",
|
||||
"function transferOwnership(address newOwner) payable",
|
||||
"function uninstallModule(address _module, bytes _data) payable",
|
||||
"event ModuleInstalled(address caller, address implementation, address installedModule)",
|
||||
"event ModuleUninstalled(address caller, address implementation, address installedModule)",
|
||||
"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 CallbackExecutionReverted()",
|
||||
"error CallbackFunctionAlreadyInstalled()",
|
||||
"error CallbackFunctionNotSupported()",
|
||||
"error CallbackFunctionRequired()",
|
||||
"error CallbackFunctionUnauthorizedCall()",
|
||||
"error FallbackFunctionAlreadyInstalled()",
|
||||
"error FallbackFunctionNotInstalled()",
|
||||
"error IndexOutOfBounds()",
|
||||
"error ModuleAlreadyInstalled()",
|
||||
"error ModuleInterfaceNotCompatible(bytes4 requiredInterfaceId)",
|
||||
"error ModuleNotInstalled()",
|
||||
"error ModuleOutOfSync()",
|
||||
"error NewOwnerIsZeroAddress()",
|
||||
"error NoHandoverRequest()",
|
||||
"error Reentrancy()",
|
||||
"error Unauthorized()"
|
||||
]
|
||||
@@ -1,3 +0,0 @@
|
||||
[
|
||||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions))"
|
||||
]
|
||||
@@ -1,8 +0,0 @@
|
||||
[
|
||||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)",
|
||||
"function onTokenURI(uint256 _id) view returns (string)",
|
||||
"function setSharedMetadata((string name, string description, string imageURI, string animationURI) _metadata)",
|
||||
"event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId)",
|
||||
"event SharedMetadataUpdated(string name, string description, string imageURI, string animationURI)",
|
||||
"error BatchMetadataNoMetadataForTokenId()"
|
||||
]
|
||||
@@ -1,8 +0,0 @@
|
||||
[
|
||||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)",
|
||||
"function onTokenURI(uint256 _id) view returns (string)",
|
||||
"function setSharedMetadata((string name, string description, string imageURI, string animationURI) _metadata)",
|
||||
"event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId)",
|
||||
"event SharedMetadataUpdated(string name, string description, string imageURI, string animationURI)",
|
||||
"error BatchMetadataNoMetadataForTokenId()"
|
||||
]
|
||||
@@ -1,15 +0,0 @@
|
||||
[
|
||||
"function encodeBytesOnInstall(address royaltyRecipient, uint256 royaltyBps) pure returns (bytes)",
|
||||
"function encodeBytesOnUninstall() pure returns (bytes)",
|
||||
"function getDefaultRoyaltyInfo() view returns (address, uint16)",
|
||||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)",
|
||||
"function getRoyaltyInfoForToken(uint256 _tokenId) view returns (address, uint16)",
|
||||
"function onInstall(bytes data)",
|
||||
"function onUninstall(bytes data)",
|
||||
"function royaltyInfo(uint256 _tokenId, uint256 _salePrice) view returns (address receiver, uint256 royaltyAmount)",
|
||||
"function setDefaultRoyaltyInfo(address _royaltyRecipient, uint256 _royaltyBps)",
|
||||
"function setRoyaltyInfoForToken(uint256 _tokenId, address _recipient, uint256 _bps)",
|
||||
"event DefaultRoyaltyUpdate(address indexed recipient, uint256 bps)",
|
||||
"event TokenRoyaltyUpdate(uint256 indexed tokenId, address indexed recipient, uint256 bps)",
|
||||
"error RoyaltyExceedsMaxBps()"
|
||||
]
|
||||
@@ -1,15 +0,0 @@
|
||||
[
|
||||
"function encodeBytesOnInstall(address royaltyRecipient, uint256 royaltyBps) pure returns (bytes)",
|
||||
"function encodeBytesOnUninstall() pure returns (bytes)",
|
||||
"function getDefaultRoyaltyInfo() view returns (address, uint16)",
|
||||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)",
|
||||
"function getRoyaltyInfoForToken(uint256 _tokenId) view returns (address, uint16)",
|
||||
"function onInstall(bytes data)",
|
||||
"function onUninstall(bytes data)",
|
||||
"function royaltyInfo(uint256 _tokenId, uint256 _salePrice) view returns (address receiver, uint256 royaltyAmount)",
|
||||
"function setDefaultRoyaltyInfo(address _royaltyRecipient, uint256 _royaltyBps)",
|
||||
"function setRoyaltyInfoForToken(uint256 _tokenId, address _recipient, uint256 _bps)",
|
||||
"event DefaultRoyaltyUpdate(address indexed recipient, uint256 bps)",
|
||||
"event TokenRoyaltyUpdate(uint256 indexed tokenId, address indexed recipient, uint256 bps)",
|
||||
"error RoyaltyExceedsMaxBps()"
|
||||
]
|
||||
@@ -1,7 +0,0 @@
|
||||
[
|
||||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)",
|
||||
"function onTokenURI(uint256 _id) view returns (string uri)",
|
||||
"function setTokenURI(uint256 _id, string _uri)",
|
||||
"event MetadataUpdate(uint256 id)",
|
||||
"error MetadataNoMetadataForTokenId()"
|
||||
]
|
||||
@@ -1,7 +0,0 @@
|
||||
[
|
||||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)",
|
||||
"function onTokenURI(uint256 _id) view returns (string uri)",
|
||||
"function setTokenURI(uint256 _id, string _uri)",
|
||||
"event MetadataUpdate(uint256 id)",
|
||||
"error MetadataNoMetadataForTokenId()"
|
||||
]
|
||||
@@ -0,0 +1,6 @@
|
||||
[
|
||||
"function encodeBytesOnInstall() pure returns (bytes)",
|
||||
"function getAllMetadataBatches() view returns ((uint256 startTokenIdInclusive, uint256 endTokenIdInclusive, string baseURI)[])",
|
||||
"function uploadMetadata(uint256 _amount, string _baseURI)",
|
||||
"event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId)"
|
||||
]
|
||||
@@ -0,0 +1,6 @@
|
||||
[
|
||||
"function encodeBytesOnInstall() pure returns (bytes)",
|
||||
"function getAllMetadataBatches() view returns ((uint256 startTokenIdInclusive, uint256 endTokenIdInclusive, string baseURI)[])",
|
||||
"function uploadMetadata(uint256 _amount, string _baseURI)",
|
||||
"event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId)"
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
"function encodeBytesBeforeMintERC1155((address currency, uint256 pricePerUnit, bytes32[] recipientAllowlistProof) params) pure returns (bytes)",
|
||||
"function encodeBytesBeforeMintWithSignatureERC1155((uint48 startTimestamp, uint48 endTimestamp, address currency, uint256 maxMintPerWallet, uint256 pricePerUnit, bytes32 uid) params) pure returns (bytes)",
|
||||
"function encodeBytesOnInstall(address primarySaleRecipient) pure returns (bytes)",
|
||||
"function getClaimConditionByTokenId(uint256 tokenId) view returns ((uint256 availableSupply, bytes32 allowlistMerkleRoot, uint256 pricePerUnit, address currency, uint256 maxMintPerWallet, uint48 startTimestamp, uint48 endTimestamp, string auxData) claimCondition)",
|
||||
"function getSaleConfig() view returns (address primarySaleRecipient)",
|
||||
"function setClaimConditionByTokenId(uint256 tokenId, (uint256 availableSupply, bytes32 allowlistMerkleRoot, uint256 pricePerUnit, address currency, uint256 maxMintPerWallet, uint48 startTimestamp, uint48 endTimestamp, string auxData) _claimCondition)",
|
||||
"function setSaleConfig(address _primarySaleRecipient)"
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
"function encodeBytesBeforeMintERC20((address currency, uint256 pricePerUnit, bytes32[] recipientAllowlistProof) params) pure returns (bytes)",
|
||||
"function encodeBytesBeforeMintWithSignatureERC20((uint48 startTimestamp, uint48 endTimestamp, address currency, uint256 maxMintPerWallet, uint256 pricePerUnit, bytes32 uid) params) pure returns (bytes)",
|
||||
"function encodeBytesOnInstall(address primarySaleRecipient) pure returns (bytes)",
|
||||
"function getClaimCondition() view returns ((uint256 availableSupply, bytes32 allowlistMerkleRoot, uint256 pricePerUnit, address currency, uint256 maxMintPerWallet, uint48 startTimestamp, uint48 endTimestamp, string auxData) claimCondition)",
|
||||
"function getSaleConfig() view returns (address primarySaleRecipient)",
|
||||
"function setClaimCondition((uint256 availableSupply, bytes32 allowlistMerkleRoot, uint256 pricePerUnit, address currency, uint256 maxMintPerWallet, uint48 startTimestamp, uint48 endTimestamp, string auxData) _claimCondition)",
|
||||
"function setSaleConfig(address _primarySaleRecipient)"
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
"function encodeBytesBeforeMintERC721((address currency, uint256 pricePerUnit, bytes32[] recipientAllowlistProof) params) pure returns (bytes)",
|
||||
"function encodeBytesBeforeMintWithSignatureERC721((uint48 startTimestamp, uint48 endTimestamp, address currency, uint256 maxMintPerWallet, uint256 pricePerUnit, bytes32 uid) params) pure returns (bytes)",
|
||||
"function encodeBytesOnInstall(address primarySaleRecipient) pure returns (bytes)",
|
||||
"function getClaimCondition() view returns ((uint256 availableSupply, bytes32 allowlistMerkleRoot, uint256 pricePerUnit, address currency, uint256 maxMintPerWallet, uint48 startTimestamp, uint48 endTimestamp, string auxData) claimCondition)",
|
||||
"function getSaleConfig() view returns (address primarySaleRecipient)",
|
||||
"function setClaimCondition((uint256 availableSupply, bytes32 allowlistMerkleRoot, uint256 pricePerUnit, address currency, uint256 maxMintPerWallet, uint48 startTimestamp, uint48 endTimestamp, string auxData) _claimCondition)",
|
||||
"function setSaleConfig(address _primarySaleRecipient)"
|
||||
]
|
||||
@@ -0,0 +1,6 @@
|
||||
[
|
||||
"function burn(address from, uint256 tokenId, uint256 value, bytes data) payable",
|
||||
"function initialize(string _name, string _symbol, string _contractURI, address _owner, address[] _modules, bytes[] _moduleInstallData) payable",
|
||||
"function mint(address to, uint256 tokenId, uint256 amount, string baseURI, bytes data) payable",
|
||||
"function mintWithSignature(address to, uint256 tokenId,uint256 amount, string baseURI, bytes data, bytes signature) payable"
|
||||
]
|
||||
@@ -0,0 +1,6 @@
|
||||
[
|
||||
"function burn(address from, uint256 amount, bytes data) payable",
|
||||
"function initialize(string _name, string _symbol, string _contractURI, address _owner, address[] _modules, bytes[] _moduleInstallData) payable",
|
||||
"function mint(address to, uint256 amount, bytes data) payable",
|
||||
"function mintWithSignature(address to, uint256 amount, bytes data, bytes signature) payable"
|
||||
]
|
||||
@@ -0,0 +1,7 @@
|
||||
[
|
||||
"function burn(uint256 tokenId, bytes data) payable",
|
||||
"function initialize(string _name, string _symbol, string _contractURI, address _owner, address[] _modules, bytes[] _moduleInstallData) payable",
|
||||
"function mint(address to, uint256 amount, string baseURI, bytes data) payable",
|
||||
"function mintWithSignature(address to, uint256 amount, string baseURI, bytes data, bytes signature) payable",
|
||||
"function totalMinted() view returns (uint256)"
|
||||
]
|
||||
+3
-1
@@ -3,5 +3,7 @@
|
||||
"function getSupportedCallbackFunctions() pure returns ((bytes4 selector, uint8 mode)[])",
|
||||
"function installModule(address moduleContract, bytes data) payable",
|
||||
"function supportsInterface(bytes4 interfaceID) view returns (bool)",
|
||||
"function uninstallModule(address moduleContract, bytes data) payable"
|
||||
"function uninstallModule(address moduleContract, bytes data) payable",
|
||||
"event ModuleInstalled(address caller, address implementation, address installedModule)",
|
||||
"event ModuleUninstalled(address caller, address implementation, address installedModule)"
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
"function encodeBytesBeforeMintWithSignatureERC1155((uint48 startTimestamp, uint48 endTimestamp, address currency, uint256 pricePerUnit, bytes32 uid) params) pure returns (bytes)",
|
||||
"function encodeBytesOnInstall(address primarySaleRecipient) pure returns (bytes)",
|
||||
"function getSaleConfig() view returns (address primarySaleRecipient)",
|
||||
"function setSaleConfig(address _primarySaleRecipient) nonpayable",
|
||||
"function setTokenURI(uint256 _tokenId, string _tokenURI) nonpayable",
|
||||
"event MetadataUpdate(uint256 id)",
|
||||
"event MintableTokenURIUpdated(uint256 tokenId, string tokenURI)"
|
||||
]
|
||||
@@ -0,0 +1,6 @@
|
||||
[
|
||||
"function encodeBytesBeforeMintWithSignatureERC20((uint48 startTimestamp, uint48 endTimestamp, address currency, uint256 pricePerUnit, bytes32 uid) params) pure returns (bytes)",
|
||||
"function encodeBytesOnInstall(address primarySaleRecipient) pure returns (bytes)",
|
||||
"function getSaleConfig() view returns (address primarySaleRecipient)",
|
||||
"function setSaleConfig(address _primarySaleRecipient) nonpayable"
|
||||
]
|
||||
@@ -0,0 +1,8 @@
|
||||
[
|
||||
"function encodeBytesBeforeMintWithSignatureERC721((uint48 startTimestamp, uint48 endTimestamp, address currency, uint256 pricePerUnit, bytes32 uid) params) pure returns (bytes)",
|
||||
"function encodeBytesOnInstall(address primarySaleRecipient) pure returns (bytes)",
|
||||
"function getSaleConfig() view returns (address primarySaleRecipient)",
|
||||
"function setSaleConfig(address _primarySaleRecipient) nonpayable",
|
||||
"event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId)",
|
||||
"event NewMetadataBatch(uint256 indexed startTokenIdInclusive, uint256 indexed endTokenIdNonInclusive, string baseURI)"
|
||||
]
|
||||
@@ -0,0 +1,7 @@
|
||||
[
|
||||
"function encodeBytesOnInstall() pure returns (bytes)",
|
||||
"function onTokenURI(uint256 _id) view returns (string)",
|
||||
"function setSharedMetadata((string name, string description, string imageURI, string animationURI) _metadata)",
|
||||
"event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId)",
|
||||
"event SharedMetadataUpdated(string name, string description, string imageURI, string animationURI)"
|
||||
]
|
||||
@@ -0,0 +1,19 @@
|
||||
[
|
||||
"function cancelOwnershipHandover() payable",
|
||||
"function completeOwnershipHandover(address pendingOwner) payable",
|
||||
"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 transferOwnership(address newOwner) payable",
|
||||
"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)"
|
||||
]
|
||||
@@ -0,0 +1,14 @@
|
||||
[
|
||||
"function encodeBytesOnInstall(address royaltyRecipient, uint16 royaltyBps, address transferValidator) pure returns (bytes)",
|
||||
"function getDefaultRoyaltyInfo() view returns (address, uint16)",
|
||||
"function getRoyaltyInfoForToken(uint256 _tokenId) view returns (address, uint16)",
|
||||
"function getTransferValidationFunction() pure returns (bytes4 functionSignature, bool isViewFunction)",
|
||||
"function getTransferValidator() view returns (address validator)",
|
||||
"function royaltyInfo(uint256 _tokenId, uint256 _salePrice) view returns (address receiver, uint256 royaltyAmount)",
|
||||
"function setDefaultRoyaltyInfo(address _royaltyRecipient, uint16 _royaltyBps)",
|
||||
"function setRoyaltyInfoForToken(uint256 _tokenId, address _recipient, uint16 _bps)",
|
||||
"function setTransferValidator(address validator)",
|
||||
"event DefaultRoyaltyUpdated(address indexed recipient, uint16 bps)",
|
||||
"event TokenRoyaltyUpdated(uint256 indexed tokenId, address indexed recipient, uint16 bps)",
|
||||
"event TransferValidatorUpdated(address oldValidator, address newValidator)"
|
||||
]
|
||||
@@ -0,0 +1,14 @@
|
||||
[
|
||||
"function encodeBytesOnInstall(address royaltyRecipient, uint16 royaltyBps, address transferValidator) pure returns (bytes)",
|
||||
"function getDefaultRoyaltyInfo() view returns (address, uint16)",
|
||||
"function getRoyaltyInfoForToken(uint256 _tokenId) view returns (address, uint16)",
|
||||
"function getTransferValidationFunction() pure returns (bytes4 functionSignature, bool isViewFunction)",
|
||||
"function getTransferValidator() view returns (address validator)",
|
||||
"function royaltyInfo(uint256 _tokenId, uint256 _salePrice) view returns (address receiver, uint256 royaltyAmount)",
|
||||
"function setDefaultRoyaltyInfo(address _royaltyRecipient, uint16 _royaltyBps)",
|
||||
"function setRoyaltyInfoForToken(uint256 _tokenId, address _recipient, uint16 _bps)",
|
||||
"function setTransferValidator(address validator)",
|
||||
"event DefaultRoyaltyUpdated(address indexed recipient, uint256 bps)",
|
||||
"event TokenRoyaltyUpdated(uint256 indexed tokenId, address indexed recipient, uint16 bps)",
|
||||
"event TransferValidatorUpdated(address oldValidator, address newValidator)"
|
||||
]
|
||||
@@ -0,0 +1,6 @@
|
||||
[
|
||||
"function encodeBytesOnInstall() pure returns (bytes)",
|
||||
"function getNextTokenId() view returns (uint256)",
|
||||
"error SequentialTokenIdInvalidTokenId()",
|
||||
"error UpdateTokenIdCallbackERC1155NotImplemented()"
|
||||
]
|
||||
@@ -0,0 +1,7 @@
|
||||
[
|
||||
"function encodeBytesOnInstall() pure returns (bytes)",
|
||||
"function isTransferEnabled() view returns (bool)",
|
||||
"function isTransferEnabledFor(address target) view returns (bool)",
|
||||
"function setTransferable(bool enableTransfer)",
|
||||
"function setTransferableFor(address target, bool enableTransfer)"
|
||||
]
|
||||
@@ -0,0 +1,7 @@
|
||||
[
|
||||
"function encodeBytesOnInstall() pure returns (bytes)",
|
||||
"function isTransferEnabled() view returns (bool)",
|
||||
"function isTransferEnabledFor(address target) view returns (bool)",
|
||||
"function setTransferable(bool enableTransfer)",
|
||||
"function setTransferableFor(address target, bool enableTransfer)"
|
||||
]
|
||||
@@ -0,0 +1,7 @@
|
||||
[
|
||||
"function encodeBytesOnInstall() pure returns (bytes)",
|
||||
"function isTransferEnabled() view returns (bool)",
|
||||
"function isTransferEnabledFor(address target) view returns (bool)",
|
||||
"function setTransferable(bool enableTransfer)",
|
||||
"function setTransferableFor(address target, bool enableTransfer)"
|
||||
]
|
||||
@@ -0,0 +1,14 @@
|
||||
import fs from "node:fs";
|
||||
import { formatAbi } from "abitype";
|
||||
|
||||
const contract = "ClaimableERC1155";
|
||||
|
||||
const file = JSON.parse(
|
||||
fs.readFileSync(
|
||||
`../../../modular-contracts/out/${contract}.sol/${contract}.json`,
|
||||
"utf-8",
|
||||
),
|
||||
);
|
||||
const parsed = formatAbi(file.abi);
|
||||
|
||||
console.log(parsed);
|
||||
@@ -28,13 +28,23 @@ export async function generateFromAbi(
|
||||
const overloadedWrites = new Set<string>();
|
||||
// split functions into read and write
|
||||
const readFunctions: AbiFunction[] = [];
|
||||
const encodeFunctions: AbiFunction[] = [];
|
||||
const writeFunctions: AbiFunction[] = [];
|
||||
const installFunctions: AbiFunction[] = [];
|
||||
for (const f of functions) {
|
||||
if (f.stateMutability === "view" || f.stateMutability === "pure") {
|
||||
if (overloadedReads.has(f.name)) {
|
||||
continue;
|
||||
}
|
||||
readFunctions.push(f);
|
||||
if (f.name.startsWith("encodeBytesOnInstall")) {
|
||||
// installable modules all need a encodeBytesOnInstall function in the abi file
|
||||
installFunctions.push(f);
|
||||
}
|
||||
if (f.name.startsWith("encode") && f.inputs.length > 0) {
|
||||
encodeFunctions.push(f);
|
||||
} else {
|
||||
readFunctions.push(f);
|
||||
}
|
||||
overloadedReads.add(f.name);
|
||||
} else {
|
||||
if (overloadedWrites.has(f.name)) {
|
||||
@@ -55,7 +65,7 @@ export async function generateFromAbi(
|
||||
events.map(async (e) => {
|
||||
await writeFile(
|
||||
join(outFolder, extensionFileName, "./events", `${e.name}.ts`),
|
||||
await format(generateEvent(e, extensionName), {
|
||||
await format(generateEvent(e, extensionName, extensionFileName), {
|
||||
parser: "babel-ts",
|
||||
trailingComma: "all",
|
||||
}),
|
||||
@@ -74,7 +84,48 @@ export async function generateFromAbi(
|
||||
readFunctions.map(async (f) => {
|
||||
await writeFile(
|
||||
join(outFolder, extensionFileName, "./read", `${f.name}.ts`),
|
||||
await format(generateReadFunction(f, extensionName), {
|
||||
await format(
|
||||
generateReadFunction(f, extensionName, extensionFileName),
|
||||
{
|
||||
parser: "babel-ts",
|
||||
trailingComma: "all",
|
||||
},
|
||||
),
|
||||
"utf-8",
|
||||
);
|
||||
}),
|
||||
);
|
||||
}
|
||||
if (encodeFunctions.length) {
|
||||
// make a folder for the read functions
|
||||
await mkdir(join(outFolder, extensionFileName, "./encode"), {
|
||||
recursive: true,
|
||||
});
|
||||
// process every read function
|
||||
await Promise.all(
|
||||
encodeFunctions.map(async (f) => {
|
||||
await writeFile(
|
||||
join(outFolder, extensionFileName, "./encode", `${f.name}.ts`),
|
||||
await format(generateEncodeFunction(f, extensionName), {
|
||||
parser: "babel-ts",
|
||||
trailingComma: "all",
|
||||
}),
|
||||
"utf-8",
|
||||
);
|
||||
}),
|
||||
);
|
||||
}
|
||||
if (installFunctions.length) {
|
||||
// make a folder for the read functions
|
||||
await mkdir(join(outFolder, extensionFileName, "./module"), {
|
||||
recursive: true,
|
||||
});
|
||||
// process every read function
|
||||
await Promise.all(
|
||||
installFunctions.map(async (f) => {
|
||||
await writeFile(
|
||||
join(outFolder, extensionFileName, "./module/install.ts"),
|
||||
await format(generateInstallFunction(extensionFileName, f), {
|
||||
parser: "babel-ts",
|
||||
trailingComma: "all",
|
||||
}),
|
||||
@@ -93,10 +144,13 @@ export async function generateFromAbi(
|
||||
writeFunctions.map(async (f) => {
|
||||
await writeFile(
|
||||
join(outFolder, extensionFileName, "./write", `${f.name}.ts`),
|
||||
await format(generateWriteFunction(f, extensionName), {
|
||||
parser: "babel-ts",
|
||||
trailingComma: "all",
|
||||
}),
|
||||
await format(
|
||||
generateWriteFunction(f, extensionName, extensionFileName),
|
||||
{
|
||||
parser: "babel-ts",
|
||||
trailingComma: "all",
|
||||
},
|
||||
),
|
||||
"utf-8",
|
||||
);
|
||||
}),
|
||||
@@ -104,10 +158,19 @@ export async function generateFromAbi(
|
||||
}
|
||||
}
|
||||
|
||||
function generateWriteFunction(f: AbiFunction, extensionName: string): string {
|
||||
function generateWriteFunction(
|
||||
f: AbiFunction,
|
||||
extensionName: string,
|
||||
extensionFileName: string,
|
||||
): string {
|
||||
const preparedMethod = prepareMethod(f);
|
||||
const needsAbiParamToPrimitiveType = f.inputs.length > 0;
|
||||
const inputTypeName = `${uppercaseFirstLetter(f.name)}Params`;
|
||||
const info = getFunctionOrModuleInfo(
|
||||
f.name,
|
||||
extensionName,
|
||||
extensionFileName,
|
||||
);
|
||||
|
||||
return `${
|
||||
needsAbiParamToPrimitiveType
|
||||
@@ -153,14 +216,12 @@ const FN_OUTPUTS = ${JSON.stringify(preparedMethod[2], null, 2)} as const;
|
||||
* Checks if the \`${f.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 \`${f.name}\` method is supported.
|
||||
* @extension ${extensionName.toUpperCase()}
|
||||
* ${info.getTsDocTag()}
|
||||
* @example
|
||||
* \`\`\`ts
|
||||
* import { is${uppercaseFirstLetter(
|
||||
f.name,
|
||||
)}Supported } from "thirdweb/extensions/${extensionName}";
|
||||
* ${info.getImportPath("supported")}
|
||||
*
|
||||
* const supported = is${uppercaseFirstLetter(f.name)}Supported(["0x..."]);
|
||||
* const supported = ${info.getFnName("supported")}(["0x..."]);
|
||||
* \`\`\`
|
||||
*/
|
||||
export function is${uppercaseFirstLetter(f.name)}Supported(availableSelectors: string[]) {
|
||||
@@ -173,13 +234,11 @@ ${
|
||||
* Encodes the parameters for the "${f.name}" function.
|
||||
* @param options - The options for the ${f.name} function.
|
||||
* @returns The encoded ABI parameters.
|
||||
* @extension ${extensionName.toUpperCase()}
|
||||
* ${info.getTsDocTag()}
|
||||
* @example
|
||||
* \`\`\`ts
|
||||
* import { encode${uppercaseFirstLetter(
|
||||
f.name,
|
||||
)}Params } "thirdweb/extensions/${extensionName}";
|
||||
* const result = encode${uppercaseFirstLetter(f.name)}Params({\n * ${f.inputs
|
||||
* ${info.getImportPath("encodeParams")}
|
||||
* const result = ${info.getFnName("encodeParams")}({\n * ${f.inputs
|
||||
.map((x) => ` ${removeLeadingUnderscore(x.name)}: ...,`)
|
||||
.join("\n * ")}\n * });
|
||||
* \`\`\`
|
||||
@@ -200,13 +259,11 @@ ${
|
||||
* Encodes the "${f.name}" function into a Hex string with its parameters.
|
||||
* @param options - The options for the ${f.name} function.
|
||||
* @returns The encoded hexadecimal string.
|
||||
* @extension ${extensionName.toUpperCase()}
|
||||
* ${info.getTsDocTag()}
|
||||
* @example
|
||||
* \`\`\`ts
|
||||
* import { encode${uppercaseFirstLetter(
|
||||
f.name,
|
||||
)} } "thirdweb/extensions/${extensionName}";
|
||||
* const result = encode${uppercaseFirstLetter(f.name)}({\n * ${f.inputs
|
||||
* ${info.getImportPath("encode")}
|
||||
* const result = ${info.getFnName("encode")}({\n * ${f.inputs
|
||||
.map((x) => ` ${removeLeadingUnderscore(x.name)}: ...,`)
|
||||
.join("\n * ")}\n * });
|
||||
* \`\`\`
|
||||
@@ -223,12 +280,13 @@ export function encode${uppercaseFirstLetter(f.name)}(options: ${inputTypeName})
|
||||
* Prepares a transaction to call the "${f.name}" function on the contract.
|
||||
* @param options - The options for the "${f.name}" function.
|
||||
* @returns A prepared transaction object.
|
||||
* @extension ${extensionName.toUpperCase()}
|
||||
* ${info.getTsDocTag()}
|
||||
* @example
|
||||
* \`\`\`ts
|
||||
* import { ${f.name} } from "thirdweb/extensions/${extensionName}";
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* ${info.getImportPath("function")}
|
||||
*
|
||||
* const transaction = ${f.name}(${
|
||||
* const transaction = ${info.getFnName("function")}(${
|
||||
f.inputs.length > 0
|
||||
? `{\n * contract,\n * ${f.inputs
|
||||
.map((x) => ` ${removeLeadingUnderscore(x.name)}: ...,`)
|
||||
@@ -237,8 +295,7 @@ export function encode${uppercaseFirstLetter(f.name)}(options: ${inputTypeName})
|
||||
});
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* \`\`\`
|
||||
*/
|
||||
export function ${f.name}(
|
||||
@@ -287,9 +344,89 @@ export function ${f.name}(
|
||||
`;
|
||||
}
|
||||
|
||||
function generateReadFunction(f: AbiFunction, extensionName: string): string {
|
||||
function getFunctionOrModuleInfo(
|
||||
abiName: string,
|
||||
extensionName: string,
|
||||
extensionFileName: string,
|
||||
) {
|
||||
// TODO: should make every extension an exported named object: ERC20.balanceOf, etc.
|
||||
const isModule =
|
||||
extensionName === "modules" &&
|
||||
extensionFileName !== "IModularCore" &&
|
||||
extensionFileName !== "IModule" &&
|
||||
extensionFileName !== "OwnableRoles";
|
||||
const moduleName = extensionFileName;
|
||||
|
||||
function getFnName(
|
||||
type:
|
||||
| "function"
|
||||
| "encode"
|
||||
| "decode"
|
||||
| "encodeParams"
|
||||
| "supported"
|
||||
| "event",
|
||||
) {
|
||||
const detectName = `is${uppercaseFirstLetter(abiName)}Supported`;
|
||||
const encodeName = `encode${uppercaseFirstLetter(abiName)}`;
|
||||
const encodeParamsName = `encode${uppercaseFirstLetter(abiName)}Params`;
|
||||
const decodeName = `decode${uppercaseFirstLetter(abiName)}Result`;
|
||||
switch (type) {
|
||||
case "function":
|
||||
return isModule ? `${moduleName}.${abiName}` : abiName;
|
||||
case "encode":
|
||||
return isModule ? `${moduleName}.${encodeName}` : encodeName;
|
||||
case "decode":
|
||||
return isModule ? `${moduleName}.${decodeName}` : decodeName;
|
||||
case "encodeParams":
|
||||
return isModule
|
||||
? `${moduleName}.${encodeParamsName}`
|
||||
: encodeParamsName;
|
||||
case "supported":
|
||||
return isModule ? `${moduleName}.${detectName}` : detectName;
|
||||
case "event":
|
||||
return isModule
|
||||
? `${moduleName}.${eventNameToPreparedEventName(abiName)}`
|
||||
: eventNameToPreparedEventName(abiName);
|
||||
}
|
||||
}
|
||||
function getImportPath(
|
||||
type:
|
||||
| "function"
|
||||
| "encode"
|
||||
| "decode"
|
||||
| "encodeParams"
|
||||
| "supported"
|
||||
| "event",
|
||||
) {
|
||||
const importPath = isModule
|
||||
? `import { ${moduleName} } from "thirdweb/modules";`
|
||||
: `import { ${getFnName(type)} } from "thirdweb/extensions/${extensionName}";`;
|
||||
return importPath;
|
||||
}
|
||||
function getTsDocTag() {
|
||||
return isModule
|
||||
? `@module ${moduleName}`
|
||||
: `@extension ${extensionName.toUpperCase()}`;
|
||||
}
|
||||
return {
|
||||
getFnName,
|
||||
getImportPath,
|
||||
getTsDocTag,
|
||||
};
|
||||
}
|
||||
|
||||
function generateReadFunction(
|
||||
f: AbiFunction,
|
||||
extensionName: string,
|
||||
extensionFileName: string,
|
||||
): string {
|
||||
const preparedMethod = prepareMethod(f);
|
||||
const needsAbiParamToPrimitiveType = f.inputs.length > 0;
|
||||
const info = getFunctionOrModuleInfo(
|
||||
f.name,
|
||||
extensionName,
|
||||
extensionFileName,
|
||||
);
|
||||
return `${
|
||||
needsAbiParamToPrimitiveType
|
||||
? `import type { AbiParameterToPrimitiveType } from "abitype";\n`
|
||||
@@ -335,14 +472,11 @@ const FN_OUTPUTS = ${JSON.stringify(preparedMethod[2], null, 2)} as const;
|
||||
* Checks if the \`${f.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 \`${f.name}\` method is supported.
|
||||
* @extension ${extensionName.toUpperCase()}
|
||||
* ${info.getTsDocTag()}
|
||||
* @example
|
||||
* \`\`\`ts
|
||||
* import { is${uppercaseFirstLetter(
|
||||
f.name,
|
||||
)}Supported } from "thirdweb/extensions/${extensionName}";
|
||||
*
|
||||
* const supported = is${uppercaseFirstLetter(f.name)}Supported(["0x..."]);
|
||||
* ${info.getImportPath("supported")}
|
||||
* const supported = ${info.getFnName("supported")}(["0x..."]);
|
||||
* \`\`\`
|
||||
*/
|
||||
export function is${uppercaseFirstLetter(f.name)}Supported(availableSelectors: string[]) {
|
||||
@@ -355,13 +489,11 @@ ${
|
||||
* Encodes the parameters for the "${f.name}" function.
|
||||
* @param options - The options for the ${f.name} function.
|
||||
* @returns The encoded ABI parameters.
|
||||
* @extension ${extensionName.toUpperCase()}
|
||||
* ${info.getTsDocTag()}
|
||||
* @example
|
||||
* \`\`\`ts
|
||||
* import { encode${uppercaseFirstLetter(
|
||||
f.name,
|
||||
)}Params } "thirdweb/extensions/${extensionName}";
|
||||
* const result = encode${uppercaseFirstLetter(f.name)}Params({\n * ${f.inputs
|
||||
* ${info.getImportPath("encodeParams")}
|
||||
* const result = ${info.getFnName("encodeParams")}({\n * ${f.inputs
|
||||
.map((x) => ` ${removeLeadingUnderscore(x.name)}: ...,`)
|
||||
.join("\n * ")}\n * });
|
||||
* \`\`\`
|
||||
@@ -382,13 +514,11 @@ ${
|
||||
* Encodes the "${f.name}" function into a Hex string with its parameters.
|
||||
* @param options - The options for the ${f.name} function.
|
||||
* @returns The encoded hexadecimal string.
|
||||
* @extension ${extensionName.toUpperCase()}
|
||||
* ${info.getTsDocTag()}
|
||||
* @example
|
||||
* \`\`\`ts
|
||||
* import { encode${uppercaseFirstLetter(
|
||||
f.name,
|
||||
)} } "thirdweb/extensions/${extensionName}";
|
||||
* const result = encode${uppercaseFirstLetter(f.name)}({\n * ${f.inputs
|
||||
* ${info.getImportPath("encode")}
|
||||
* const result = ${info.getFnName("encode")}({\n * ${f.inputs
|
||||
.map((x) => ` ${removeLeadingUnderscore(x.name)}: ...,`)
|
||||
.join("\n * ")}\n * });
|
||||
* \`\`\`
|
||||
@@ -409,13 +539,11 @@ ${
|
||||
* Decodes the result of the ${f.name} function call.
|
||||
* @param result - The hexadecimal result to decode.
|
||||
* @returns The decoded result as per the FN_OUTPUTS definition.
|
||||
* @extension ${extensionName.toUpperCase()}
|
||||
* ${info.getTsDocTag()}
|
||||
* @example
|
||||
* \`\`\`ts
|
||||
* import { decode${uppercaseFirstLetter(
|
||||
f.name,
|
||||
)}Result } from "thirdweb/extensions/${extensionName}";
|
||||
* const result = decode${uppercaseFirstLetter(f.name)}Result("...");
|
||||
* ${info.getImportPath("decode")}
|
||||
* const result = ${info.getFnName("decode")}Result("...");
|
||||
* \`\`\`
|
||||
*/
|
||||
export function decode${uppercaseFirstLetter(f.name)}Result(result: Hex) {
|
||||
@@ -434,12 +562,12 @@ export function decode${uppercaseFirstLetter(f.name)}Result(result: Hex) {
|
||||
* Calls the "${f.name}" function on the contract.
|
||||
* @param options - The options for the ${f.name} function.
|
||||
* @returns The parsed result of the function call.
|
||||
* @extension ${extensionName.toUpperCase()}
|
||||
* ${info.getTsDocTag()}
|
||||
* @example
|
||||
* \`\`\`ts
|
||||
* import { ${f.name} } from "thirdweb/extensions/${extensionName}";
|
||||
* ${info.getImportPath("function")}
|
||||
*
|
||||
* const result = await ${f.name}({
|
||||
* const result = await ${info.getFnName("function")}({
|
||||
* contract, ${
|
||||
f.inputs.length > 0
|
||||
? `\n * ${f.inputs
|
||||
@@ -466,8 +594,203 @@ export async function ${f.name}(
|
||||
`;
|
||||
}
|
||||
|
||||
function generateEvent(e: AbiEvent, extensionName: string): string {
|
||||
function generateInstallFunction(moduleName: string, f: AbiFunction): string {
|
||||
const needsParams =
|
||||
f.name.startsWith("encodeBytesOnInstall") && f.inputs.length > 0;
|
||||
return `
|
||||
import type { Chain } from "../../../../../chains/types.js";
|
||||
import type { ThirdwebClient } from "../../../../../client/client.js";
|
||||
import type { ThirdwebContract } from "../../../../../contract/contract.js";
|
||||
import type { PreparedTransaction } from "../../../../../transaction/prepare-transaction.js";
|
||||
import type { Address } from "../../../../../utils/address.js";
|
||||
import type { Account } from "../../../../../wallets/interfaces/wallet.js";
|
||||
${
|
||||
needsParams
|
||||
? `import {
|
||||
type EncodeBytesOnInstallParams,
|
||||
encodeBytesOnInstallParams,
|
||||
} from "../encode/encodeBytesOnInstall.js";`
|
||||
: ""
|
||||
}
|
||||
import { getOrDeployModule } from "../../../common/getOrDeployModule.js";
|
||||
import { installPublishedModule } from "../../../common/installPublishedModule.js";
|
||||
|
||||
const contractId = "${moduleName}";
|
||||
|
||||
/**
|
||||
* Convenience function to add the ${moduleName} module as a default module on a core contract.
|
||||
* @param params - The parameters for the module.
|
||||
* @returns - The module function.
|
||||
* @example
|
||||
* \`\`\`ts
|
||||
* import { ${moduleName}, deployModularContract } from "thirdweb/modules";
|
||||
*
|
||||
* const deployed = deployModularContract({
|
||||
* client,
|
||||
* chain,
|
||||
* account,
|
||||
* core: "${moduleName.slice(moduleName.indexOf("ERC"))}",
|
||||
* params: {
|
||||
* name: "My Modular Contract",
|
||||
* },
|
||||
* modules: [
|
||||
* ${moduleName}.module(${
|
||||
needsParams
|
||||
? `{\n * ${f.inputs
|
||||
.map((x) => ` ${removeLeadingUnderscore(x.name)}: ...,`)
|
||||
.join("\n * ")}\n * })`
|
||||
: ")"
|
||||
},
|
||||
* ],
|
||||
* });
|
||||
* \`\`\`
|
||||
* @module ${moduleName}
|
||||
*/
|
||||
export function module(${needsParams ? "params: EncodeBytesOnInstallParams & { publisher?: string }" : "params?: { publisher?: string }"}) {
|
||||
return async (args: {
|
||||
client: ThirdwebClient;
|
||||
chain: Chain;
|
||||
account: Account;
|
||||
}) => {
|
||||
// deploys if needed
|
||||
const moduleContract = await getOrDeployModule({
|
||||
account: args.account,
|
||||
chain: args.chain,
|
||||
client: args.client,
|
||||
contractId,
|
||||
publisher: params?.publisher,
|
||||
});
|
||||
return {
|
||||
module: moduleContract.address as Address,
|
||||
data: ${needsParams ? "encodeInstall(params)" : `"0x" as const`},
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Installs the ${moduleName} module on a core contract.
|
||||
* @param options
|
||||
* @returns the transaction to install the module
|
||||
* @example
|
||||
* \`\`\`ts
|
||||
* import { ${moduleName} } from "thirdweb/modules";
|
||||
*
|
||||
* const transaction = ${moduleName}.install({
|
||||
* contract: coreContract,
|
||||
* account: account,
|
||||
${
|
||||
needsParams
|
||||
? `* params: {\n * ${f.inputs
|
||||
.map((x) => ` ${removeLeadingUnderscore(x.name)}: ...,`)
|
||||
.join("\n * ")}\n * },`
|
||||
: ""
|
||||
}
|
||||
* });
|
||||
*
|
||||
* await sendTransaction({
|
||||
* transaction,
|
||||
* account,
|
||||
* });
|
||||
* \`\`\`
|
||||
* @module ${moduleName}
|
||||
*/
|
||||
export function install(options: {
|
||||
contract: ThirdwebContract;
|
||||
account: Account;
|
||||
${needsParams ? "params: EncodeBytesOnInstallParams & { publisher?: string };" : "params?: { publisher?: string }"}
|
||||
}): PreparedTransaction {
|
||||
return installPublishedModule({
|
||||
account: options.account,
|
||||
contract: options.contract,
|
||||
moduleName: contractId,
|
||||
moduleData: ${needsParams ? "encodeInstall(options.params)" : `"0x" as const`},
|
||||
publisher: options.params?.publisher,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodes the install data for the ${moduleName} module.
|
||||
* @param params - The parameters for the module.
|
||||
* @returns - The encoded data.
|
||||
* @module ${moduleName}
|
||||
*/
|
||||
export const encodeInstall = ${needsParams ? "encodeBytesOnInstallParams" : "() => '0x'"}
|
||||
`;
|
||||
}
|
||||
|
||||
function generateEncodeFunction(f: AbiFunction, extensionName: string): string {
|
||||
const preparedMethod = prepareMethod(f);
|
||||
const needsAbiParamToPrimitiveType = f.inputs.length > 0;
|
||||
return `${
|
||||
needsAbiParamToPrimitiveType
|
||||
? `import type { AbiParameterToPrimitiveType } from "abitype";\n`
|
||||
: ""
|
||||
}
|
||||
${
|
||||
f.inputs.length > 0
|
||||
? `import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js";`
|
||||
: ""
|
||||
}
|
||||
|
||||
${
|
||||
f.inputs.length > 0
|
||||
? `/**
|
||||
* Represents the parameters for the "${f.name}" function.
|
||||
*/
|
||||
export type ${uppercaseFirstLetter(f.name)}Params = {
|
||||
${f.inputs
|
||||
.map(
|
||||
(x) =>
|
||||
`${removeLeadingUnderscore(
|
||||
x.name,
|
||||
)}: AbiParameterToPrimitiveType<${JSON.stringify(x)}>`,
|
||||
)
|
||||
.join("\n")}
|
||||
};`
|
||||
: ""
|
||||
}
|
||||
|
||||
export const FN_SELECTOR = "${preparedMethod[0]}" as const;
|
||||
const FN_INPUTS = ${JSON.stringify(preparedMethod[1], null, 2)} as const;
|
||||
|
||||
${
|
||||
f.inputs.length > 0
|
||||
? `/**
|
||||
* Encodes the parameters for the "${f.name}" function.
|
||||
* @param options - The options for the ${f.name} function.
|
||||
* @returns The encoded ABI parameters.
|
||||
* @extension ${extensionName.toUpperCase()}
|
||||
* @example
|
||||
* \`\`\`ts
|
||||
* import { encode${uppercaseFirstLetter(
|
||||
f.name,
|
||||
)}Params } "thirdweb/extensions/${extensionName}";
|
||||
* const result = encode${uppercaseFirstLetter(f.name)}Params({\n * ${f.inputs
|
||||
.map((x) => ` ${removeLeadingUnderscore(x.name)}: ...,`)
|
||||
.join("\n * ")}\n * });
|
||||
* \`\`\`
|
||||
*/
|
||||
export function ${f.name}Params(options: ${uppercaseFirstLetter(f.name)}Params) {
|
||||
return encodeAbiParameters(FN_INPUTS, [${f.inputs
|
||||
.map((x) => `options.${removeLeadingUnderscore(x.name)}`)
|
||||
.join(", ")}]);
|
||||
}
|
||||
`
|
||||
: ""
|
||||
}`;
|
||||
}
|
||||
|
||||
function generateEvent(
|
||||
e: AbiEvent,
|
||||
extensionName: string,
|
||||
extensionFileName: string,
|
||||
): string {
|
||||
const indexedInputs = e.inputs.filter((x) => x.indexed);
|
||||
const info = getFunctionOrModuleInfo(
|
||||
e.name,
|
||||
extensionName,
|
||||
extensionFileName,
|
||||
);
|
||||
|
||||
return `import { prepareEvent } from "../../../../../event/prepare-event.js";
|
||||
${
|
||||
@@ -496,18 +819,16 @@ export type ${uppercaseFirstLetter(e.name)}EventFilters = Partial<{
|
||||
: ""
|
||||
}
|
||||
* @returns The prepared event object.
|
||||
* @extension ${extensionName.toUpperCase()}
|
||||
* ${info.getTsDocTag()}
|
||||
* @example
|
||||
* \`\`\`ts
|
||||
* import { getContractEvents } from "thirdweb";
|
||||
* import { ${eventNameToPreparedEventName(
|
||||
e.name,
|
||||
)} } from "thirdweb/extensions/${extensionName}";
|
||||
* ${info.getImportPath("event")}
|
||||
*
|
||||
* const events = await getContractEvents({
|
||||
* contract,
|
||||
* events: [
|
||||
* ${eventNameToPreparedEventName(e.name)}(${
|
||||
* ${info.getFnName("event")}(${
|
||||
indexedInputs.length > 0
|
||||
? `{\n * ${indexedInputs
|
||||
.map((x) => ` ${x.name}: ...,`)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type Abi, formatAbi, parseAbi } from "abitype";
|
||||
import { getInstalledModules } from "../../extensions/modular/__generated__/ModularCore/read/getInstalledModules.js";
|
||||
import { getInstalledModules } from "../../extensions/modules/__generated__/IModularCore/read/getInstalledModules.js";
|
||||
import { download } from "../../storage/download.js";
|
||||
import { extractIPFSUri } from "../../utils/bytecode/extractIPFS.js";
|
||||
import { getClientFetch } from "../../utils/fetch.js";
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
} from "../../utils/any-evm/deploy-metadata.js";
|
||||
import { extractIPFSUri } from "../../utils/bytecode/extractIPFS.js";
|
||||
import { resolveImplementation } from "../../utils/bytecode/resolveImplementation.js";
|
||||
import { withCache } from "../../utils/promise/withCache.js";
|
||||
|
||||
import { type ThirdwebContract, getContract } from "../contract.js";
|
||||
|
||||
@@ -23,22 +24,28 @@ export async function fetchPublishedContractMetadata(options: {
|
||||
publisher?: string;
|
||||
version?: string;
|
||||
}): Promise<FetchDeployMetadataResult> {
|
||||
// TODO LRU cache
|
||||
const publishedContract = await fetchPublishedContract({
|
||||
client: options.client,
|
||||
publisherAddress: options.publisher || THIRDWEB_DEPLOYER,
|
||||
contractId: options.contractId,
|
||||
version: options.version,
|
||||
});
|
||||
if (!publishedContract.publishMetadataUri) {
|
||||
throw new Error(
|
||||
`No published metadata URI found for ${options.contractId}`,
|
||||
);
|
||||
}
|
||||
return fetchDeployMetadata({
|
||||
client: options.client,
|
||||
uri: publishedContract.publishMetadataUri,
|
||||
});
|
||||
const cacheKey = `${options.contractId}-${options.publisher}-${options.version}`;
|
||||
return withCache(
|
||||
async () => {
|
||||
const publishedContract = await fetchPublishedContract({
|
||||
client: options.client,
|
||||
publisherAddress: options.publisher || THIRDWEB_DEPLOYER,
|
||||
contractId: options.contractId,
|
||||
version: options.version,
|
||||
});
|
||||
if (!publishedContract.publishMetadataUri) {
|
||||
throw new Error(
|
||||
`No published metadata URI found for ${options.contractId}`,
|
||||
);
|
||||
}
|
||||
const data = await fetchDeployMetadata({
|
||||
client: options.client,
|
||||
uri: publishedContract.publishMetadataUri,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
{ cacheKey, cacheTime: 1000 * 60 * 60 },
|
||||
);
|
||||
}
|
||||
|
||||
// TODO: clean this up
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
/**
|
||||
* READ
|
||||
*/
|
||||
export {
|
||||
getInstalledModules,
|
||||
isGetInstalledModulesSupported,
|
||||
} from "../../extensions/modular/__generated__/ModularCore/read/getInstalledModules.js";
|
||||
export {
|
||||
getSupportedCallbackFunctions,
|
||||
isGetSupportedCallbackFunctionsSupported,
|
||||
} from "../../extensions/modular/__generated__/ModularCore/read/getSupportedCallbackFunctions.js";
|
||||
export {
|
||||
hasAnyRole,
|
||||
type HasAnyRoleParams,
|
||||
} from "../../extensions/modular/__generated__/ModularCore/read/hasAnyRole.js";
|
||||
export {
|
||||
hasAllRoles,
|
||||
type HasAllRolesParams,
|
||||
} from "../../extensions/modular/__generated__/ModularCore/read/hasAllRoles.js";
|
||||
export { owner } from "../../extensions/modular/__generated__/ModularCore/read/owner.js";
|
||||
export {
|
||||
ownershipHandoverExpiresAt,
|
||||
type OwnershipHandoverExpiresAtParams,
|
||||
} from "../../extensions/modular/__generated__/ModularCore/read/ownershipHandoverExpiresAt.js";
|
||||
export {
|
||||
rolesOf,
|
||||
type RolesOfParams,
|
||||
} from "../../extensions/modular/__generated__/ModularCore/read/rolesOf.js";
|
||||
|
||||
/**
|
||||
* Write
|
||||
*/
|
||||
export { cancelOwnershipHandover } from "../../extensions/modular/__generated__/ModularCore/write/cancelOwnershipHandover.js";
|
||||
export {
|
||||
completeOwnershipHandover,
|
||||
type CompleteOwnershipHandoverParams,
|
||||
} from "../../extensions/modular/__generated__/ModularCore/write/completeOwnershipHandover.js";
|
||||
export {
|
||||
grantRoles,
|
||||
type GrantRolesParams,
|
||||
} from "../../extensions/modular/__generated__/ModularCore/write/grantRoles.js";
|
||||
export {
|
||||
installModule,
|
||||
isInstallModuleSupported,
|
||||
type InstallModuleParams,
|
||||
} from "../../extensions/modular/__generated__/ModularCore/write/installModule.js";
|
||||
export { renounceOwnership } from "../../extensions/modular/__generated__/ModularCore/write/renounceOwnership.js";
|
||||
export { requestOwnershipHandover } from "../../extensions/modular/__generated__/ModularCore/write/requestOwnershipHandover.js";
|
||||
export {
|
||||
renounceRoles,
|
||||
type RenounceRolesParams,
|
||||
} from "../../extensions/modular/__generated__/ModularCore/write/renounceRoles.js";
|
||||
export {
|
||||
revokeRoles,
|
||||
type RevokeRolesParams,
|
||||
} from "../../extensions/modular/__generated__/ModularCore/write/revokeRoles.js";
|
||||
export {
|
||||
transferOwnership,
|
||||
type TransferOwnershipParams,
|
||||
} from "../../extensions/modular/__generated__/ModularCore/write/transferOwnership.js";
|
||||
export {
|
||||
uninstallModule,
|
||||
isUninstallModuleSupported,
|
||||
type UninstallModuleParams,
|
||||
} from "../../extensions/modular/__generated__/ModularCore/write/uninstallModule.js";
|
||||
export { getModuleConfig } from "../../extensions/modular/__generated__/ModularModule/read/getModuleConfig.js";
|
||||
export {
|
||||
installPublishedModule,
|
||||
type InstallPublishedModuleOptions,
|
||||
} from "../../extensions/modular/ModularCore/write/installPublishedModule.js";
|
||||
export {
|
||||
uninstallPublishedModule,
|
||||
type UninstallPublishedModuleOptions,
|
||||
} from "../../extensions/modular/ModularCore/write/uninstallPublishedModule.js";
|
||||
export {
|
||||
uninstallModuleByProxy,
|
||||
type UninstallModuleByProxyOptions,
|
||||
} from "../../extensions/modular/ModularCore/write/uninstallModuleByProxy.js";
|
||||
@@ -0,0 +1,103 @@
|
||||
// Modules
|
||||
export * as MintableERC20 from "../extensions/modules/MintableERC20/index.js";
|
||||
export * as MintableERC721 from "../extensions/modules/MintableERC721/index.js";
|
||||
export * as MintableERC1155 from "../extensions/modules/MintableERC1155/index.js";
|
||||
export * as ClaimableERC20 from "../extensions/modules/ClaimableERC20/index.js";
|
||||
export * as ClaimableERC721 from "../extensions/modules/ClaimableERC721/index.js";
|
||||
export * as ClaimableERC1155 from "../extensions/modules/ClaimableERC1155/index.js";
|
||||
export * as OpenEditionMetadataERC721 from "../extensions/modules/OpenEditionMetadataERC721/index.js";
|
||||
export * as BatchMetadataERC721 from "../extensions/modules/BatchMetadataERC721/index.js";
|
||||
export * as BatchMetadataERC1155 from "../extensions/modules/BatchMetadataERC1155/index.js";
|
||||
export * as SequentialTokenIdERC1155 from "../extensions/modules/SequentialTokenIdERC1155/index.js";
|
||||
export * as RoyaltyERC721 from "../extensions/modules/RoyaltyERC721/index.js";
|
||||
export * as RoyaltyERC1155 from "../extensions/modules/RoyaltyERC1155/index.js";
|
||||
export * as TransferableERC20 from "../extensions/modules/TransferableERC721/index.js";
|
||||
export * as TransferableERC721 from "../extensions/modules/TransferableERC721/index.js";
|
||||
export * as TransferableERC1155 from "../extensions/modules/TransferableERC1155/index.js";
|
||||
|
||||
// Common
|
||||
export { grantMinterRole } from "../extensions/modules/common/grantMinterRole.js";
|
||||
export {
|
||||
getDeployedModule,
|
||||
getOrDeployModule,
|
||||
} from "../extensions/modules/common/getOrDeployModule.js";
|
||||
|
||||
// generated
|
||||
/**
|
||||
* READ
|
||||
*/
|
||||
export {
|
||||
getInstalledModules,
|
||||
isGetInstalledModulesSupported,
|
||||
} from "../extensions/modules/__generated__/IModularCore/read/getInstalledModules.js";
|
||||
export {
|
||||
getSupportedCallbackFunctions,
|
||||
isGetSupportedCallbackFunctionsSupported,
|
||||
} from "../extensions/modules/__generated__/IModularCore/read/getSupportedCallbackFunctions.js";
|
||||
export {
|
||||
hasAnyRole,
|
||||
type HasAnyRoleParams,
|
||||
} from "../extensions/modules/__generated__/OwnableRoles/read/hasAnyRole.js";
|
||||
export {
|
||||
hasAllRoles,
|
||||
type HasAllRolesParams,
|
||||
} from "../extensions/modules/__generated__/OwnableRoles/read/hasAllRoles.js";
|
||||
export { owner } from "../extensions/modules/__generated__/OwnableRoles/read/owner.js";
|
||||
export {
|
||||
ownershipHandoverExpiresAt,
|
||||
type OwnershipHandoverExpiresAtParams,
|
||||
} from "../extensions/modules/__generated__/OwnableRoles/read/ownershipHandoverExpiresAt.js";
|
||||
export {
|
||||
rolesOf,
|
||||
type RolesOfParams,
|
||||
} from "../extensions/modules/__generated__/OwnableRoles/read/rolesOf.js";
|
||||
|
||||
/**
|
||||
* Write
|
||||
*/
|
||||
export { cancelOwnershipHandover } from "../extensions/modules/__generated__/OwnableRoles/write/cancelOwnershipHandover.js";
|
||||
export {
|
||||
completeOwnershipHandover,
|
||||
type CompleteOwnershipHandoverParams,
|
||||
} from "../extensions/modules/__generated__/OwnableRoles/write/completeOwnershipHandover.js";
|
||||
export {
|
||||
grantRoles,
|
||||
type GrantRolesParams,
|
||||
} from "../extensions/modules/__generated__/OwnableRoles/write/grantRoles.js";
|
||||
export {
|
||||
installModule,
|
||||
isInstallModuleSupported,
|
||||
type InstallModuleParams,
|
||||
} from "../extensions/modules/__generated__/IModularCore/write/installModule.js";
|
||||
export { renounceOwnership } from "../extensions/modules/__generated__/OwnableRoles/write/renounceOwnership.js";
|
||||
export { requestOwnershipHandover } from "../extensions/modules/__generated__/OwnableRoles/write/requestOwnershipHandover.js";
|
||||
export {
|
||||
renounceRoles,
|
||||
type RenounceRolesParams,
|
||||
} from "../extensions/modules/__generated__/OwnableRoles/write/renounceRoles.js";
|
||||
export {
|
||||
revokeRoles,
|
||||
type RevokeRolesParams,
|
||||
} from "../extensions/modules/__generated__/OwnableRoles/write/revokeRoles.js";
|
||||
export {
|
||||
transferOwnership,
|
||||
type TransferOwnershipParams,
|
||||
} from "../extensions/modules/__generated__/OwnableRoles/write/transferOwnership.js";
|
||||
export {
|
||||
uninstallModule,
|
||||
isUninstallModuleSupported,
|
||||
type UninstallModuleParams,
|
||||
} from "../extensions/modules/__generated__/IModularCore/write/uninstallModule.js";
|
||||
export { getModuleConfig } from "../extensions/modules/__generated__/IModule/read/getModuleConfig.js";
|
||||
export {
|
||||
installPublishedModule,
|
||||
type InstallPublishedModuleOptions,
|
||||
} from "../extensions/modules/common/installPublishedModule.js";
|
||||
export {
|
||||
uninstallPublishedModule,
|
||||
type UninstallPublishedModuleOptions,
|
||||
} from "../extensions/modules/common/uninstallPublishedModule.js";
|
||||
export {
|
||||
uninstallModuleByProxy,
|
||||
type UninstallModuleByProxyOptions,
|
||||
} from "../extensions/modules/common/uninstallModuleByProxy.js";
|
||||
+1
-2
@@ -46,7 +46,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isEip712DomainSupported } from "thirdweb/extensions/airdrop";
|
||||
*
|
||||
* const supported = isEip712DomainSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -65,7 +64,7 @@ export function isEip712DomainSupported(availableSelectors: string[]) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeEip712DomainResult } from "thirdweb/extensions/airdrop";
|
||||
* const result = decodeEip712DomainResult("...");
|
||||
* const result = decodeEip712DomainResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeEip712DomainResult(result: Hex) {
|
||||
|
||||
+3
-4
@@ -44,7 +44,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isIsClaimedSupported } from "thirdweb/extensions/airdrop";
|
||||
*
|
||||
* const supported = isIsClaimedSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -62,7 +61,7 @@ export function isIsClaimedSupported(availableSelectors: string[]) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeIsClaimedParams } "thirdweb/extensions/airdrop";
|
||||
* import { encodeIsClaimedParams } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeIsClaimedParams({
|
||||
* receiver: ...,
|
||||
* token: ...,
|
||||
@@ -85,7 +84,7 @@ export function encodeIsClaimedParams(options: IsClaimedParams) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeIsClaimed } "thirdweb/extensions/airdrop";
|
||||
* import { encodeIsClaimed } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeIsClaimed({
|
||||
* receiver: ...,
|
||||
* token: ...,
|
||||
@@ -110,7 +109,7 @@ export function encodeIsClaimed(options: IsClaimedParams) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeIsClaimedResult } from "thirdweb/extensions/airdrop";
|
||||
* const result = decodeIsClaimedResult("...");
|
||||
* const result = decodeIsClaimedResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeIsClaimedResult(result: Hex) {
|
||||
|
||||
+1
-2
@@ -21,7 +21,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isOwnerSupported } from "thirdweb/extensions/airdrop";
|
||||
*
|
||||
* const supported = isOwnerSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -40,7 +39,7 @@ export function isOwnerSupported(availableSelectors: string[]) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeOwnerResult } from "thirdweb/extensions/airdrop";
|
||||
* const result = decodeOwnerResult("...");
|
||||
* const result = decodeOwnerResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeOwnerResult(result: Hex) {
|
||||
|
||||
+3
-4
@@ -37,7 +37,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isTokenConditionIdSupported } from "thirdweb/extensions/airdrop";
|
||||
*
|
||||
* const supported = isTokenConditionIdSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -55,7 +54,7 @@ export function isTokenConditionIdSupported(availableSelectors: string[]) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeTokenConditionIdParams } "thirdweb/extensions/airdrop";
|
||||
* import { encodeTokenConditionIdParams } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeTokenConditionIdParams({
|
||||
* tokenAddress: ...,
|
||||
* });
|
||||
@@ -72,7 +71,7 @@ export function encodeTokenConditionIdParams(options: TokenConditionIdParams) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeTokenConditionId } "thirdweb/extensions/airdrop";
|
||||
* import { encodeTokenConditionId } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeTokenConditionId({
|
||||
* tokenAddress: ...,
|
||||
* });
|
||||
@@ -95,7 +94,7 @@ export function encodeTokenConditionId(options: TokenConditionIdParams) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeTokenConditionIdResult } from "thirdweb/extensions/airdrop";
|
||||
* const result = decodeTokenConditionIdResult("...");
|
||||
* const result = decodeTokenConditionIdResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeTokenConditionIdResult(result: Hex) {
|
||||
|
||||
+3
-4
@@ -37,7 +37,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isTokenMerkleRootSupported } from "thirdweb/extensions/airdrop";
|
||||
*
|
||||
* const supported = isTokenMerkleRootSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -55,7 +54,7 @@ export function isTokenMerkleRootSupported(availableSelectors: string[]) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeTokenMerkleRootParams } "thirdweb/extensions/airdrop";
|
||||
* import { encodeTokenMerkleRootParams } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeTokenMerkleRootParams({
|
||||
* tokenAddress: ...,
|
||||
* });
|
||||
@@ -72,7 +71,7 @@ export function encodeTokenMerkleRootParams(options: TokenMerkleRootParams) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeTokenMerkleRoot } "thirdweb/extensions/airdrop";
|
||||
* import { encodeTokenMerkleRoot } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeTokenMerkleRoot({
|
||||
* tokenAddress: ...,
|
||||
* });
|
||||
@@ -95,7 +94,7 @@ export function encodeTokenMerkleRoot(options: TokenMerkleRootParams) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeTokenMerkleRootResult } from "thirdweb/extensions/airdrop";
|
||||
* const result = decodeTokenMerkleRootResult("...");
|
||||
* const result = decodeTokenMerkleRootResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeTokenMerkleRootResult(result: Hex) {
|
||||
|
||||
+4
-4
@@ -80,7 +80,7 @@ export function isAirdropERC1155Supported(availableSelectors: string[]) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeAirdropERC1155Params } "thirdweb/extensions/airdrop";
|
||||
* import { encodeAirdropERC1155Params } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeAirdropERC1155Params({
|
||||
* tokenAddress: ...,
|
||||
* contents: ...,
|
||||
@@ -101,7 +101,7 @@ export function encodeAirdropERC1155Params(options: AirdropERC1155Params) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeAirdropERC1155 } "thirdweb/extensions/airdrop";
|
||||
* import { encodeAirdropERC1155 } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeAirdropERC1155({
|
||||
* tokenAddress: ...,
|
||||
* contents: ...,
|
||||
@@ -124,6 +124,7 @@ export function encodeAirdropERC1155(options: AirdropERC1155Params) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { airdropERC1155 } from "thirdweb/extensions/airdrop";
|
||||
*
|
||||
* const transaction = airdropERC1155({
|
||||
@@ -136,8 +137,7 @@ export function encodeAirdropERC1155(options: AirdropERC1155Params) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function airdropERC1155(
|
||||
|
||||
Generated
+4
-4
@@ -106,7 +106,7 @@ export function isAirdropERC1155WithSignatureSupported(
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeAirdropERC1155WithSignatureParams } "thirdweb/extensions/airdrop";
|
||||
* import { encodeAirdropERC1155WithSignatureParams } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeAirdropERC1155WithSignatureParams({
|
||||
* req: ...,
|
||||
* signature: ...,
|
||||
@@ -126,7 +126,7 @@ export function encodeAirdropERC1155WithSignatureParams(
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeAirdropERC1155WithSignature } "thirdweb/extensions/airdrop";
|
||||
* import { encodeAirdropERC1155WithSignature } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeAirdropERC1155WithSignature({
|
||||
* req: ...,
|
||||
* signature: ...,
|
||||
@@ -151,6 +151,7 @@ export function encodeAirdropERC1155WithSignature(
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { airdropERC1155WithSignature } from "thirdweb/extensions/airdrop";
|
||||
*
|
||||
* const transaction = airdropERC1155WithSignature({
|
||||
@@ -163,8 +164,7 @@ export function encodeAirdropERC1155WithSignature(
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function airdropERC1155WithSignature(
|
||||
|
||||
+4
-4
@@ -75,7 +75,7 @@ export function isAirdropERC20Supported(availableSelectors: string[]) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeAirdropERC20Params } "thirdweb/extensions/airdrop";
|
||||
* import { encodeAirdropERC20Params } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeAirdropERC20Params({
|
||||
* tokenAddress: ...,
|
||||
* contents: ...,
|
||||
@@ -96,7 +96,7 @@ export function encodeAirdropERC20Params(options: AirdropERC20Params) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeAirdropERC20 } "thirdweb/extensions/airdrop";
|
||||
* import { encodeAirdropERC20 } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeAirdropERC20({
|
||||
* tokenAddress: ...,
|
||||
* contents: ...,
|
||||
@@ -119,6 +119,7 @@ export function encodeAirdropERC20(options: AirdropERC20Params) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { airdropERC20 } from "thirdweb/extensions/airdrop";
|
||||
*
|
||||
* const transaction = airdropERC20({
|
||||
@@ -131,8 +132,7 @@ export function encodeAirdropERC20(options: AirdropERC20Params) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function airdropERC20(
|
||||
|
||||
Generated
+4
-4
@@ -101,7 +101,7 @@ export function isAirdropERC20WithSignatureSupported(
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeAirdropERC20WithSignatureParams } "thirdweb/extensions/airdrop";
|
||||
* import { encodeAirdropERC20WithSignatureParams } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeAirdropERC20WithSignatureParams({
|
||||
* req: ...,
|
||||
* signature: ...,
|
||||
@@ -121,7 +121,7 @@ export function encodeAirdropERC20WithSignatureParams(
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeAirdropERC20WithSignature } "thirdweb/extensions/airdrop";
|
||||
* import { encodeAirdropERC20WithSignature } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeAirdropERC20WithSignature({
|
||||
* req: ...,
|
||||
* signature: ...,
|
||||
@@ -146,6 +146,7 @@ export function encodeAirdropERC20WithSignature(
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { airdropERC20WithSignature } from "thirdweb/extensions/airdrop";
|
||||
*
|
||||
* const transaction = airdropERC20WithSignature({
|
||||
@@ -158,8 +159,7 @@ export function encodeAirdropERC20WithSignature(
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function airdropERC20WithSignature(
|
||||
|
||||
+4
-4
@@ -75,7 +75,7 @@ export function isAirdropERC721Supported(availableSelectors: string[]) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeAirdropERC721Params } "thirdweb/extensions/airdrop";
|
||||
* import { encodeAirdropERC721Params } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeAirdropERC721Params({
|
||||
* tokenAddress: ...,
|
||||
* contents: ...,
|
||||
@@ -96,7 +96,7 @@ export function encodeAirdropERC721Params(options: AirdropERC721Params) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeAirdropERC721 } "thirdweb/extensions/airdrop";
|
||||
* import { encodeAirdropERC721 } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeAirdropERC721({
|
||||
* tokenAddress: ...,
|
||||
* contents: ...,
|
||||
@@ -119,6 +119,7 @@ export function encodeAirdropERC721(options: AirdropERC721Params) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { airdropERC721 } from "thirdweb/extensions/airdrop";
|
||||
*
|
||||
* const transaction = airdropERC721({
|
||||
@@ -131,8 +132,7 @@ export function encodeAirdropERC721(options: AirdropERC721Params) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function airdropERC721(
|
||||
|
||||
Generated
+4
-4
@@ -101,7 +101,7 @@ export function isAirdropERC721WithSignatureSupported(
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeAirdropERC721WithSignatureParams } "thirdweb/extensions/airdrop";
|
||||
* import { encodeAirdropERC721WithSignatureParams } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeAirdropERC721WithSignatureParams({
|
||||
* req: ...,
|
||||
* signature: ...,
|
||||
@@ -121,7 +121,7 @@ export function encodeAirdropERC721WithSignatureParams(
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeAirdropERC721WithSignature } "thirdweb/extensions/airdrop";
|
||||
* import { encodeAirdropERC721WithSignature } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeAirdropERC721WithSignature({
|
||||
* req: ...,
|
||||
* signature: ...,
|
||||
@@ -146,6 +146,7 @@ export function encodeAirdropERC721WithSignature(
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { airdropERC721WithSignature } from "thirdweb/extensions/airdrop";
|
||||
*
|
||||
* const transaction = airdropERC721WithSignature({
|
||||
@@ -158,8 +159,7 @@ export function encodeAirdropERC721WithSignature(
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function airdropERC721WithSignature(
|
||||
|
||||
Generated
+4
-4
@@ -67,7 +67,7 @@ export function isAirdropNativeTokenSupported(availableSelectors: string[]) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeAirdropNativeTokenParams } "thirdweb/extensions/airdrop";
|
||||
* import { encodeAirdropNativeTokenParams } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeAirdropNativeTokenParams({
|
||||
* contents: ...,
|
||||
* });
|
||||
@@ -86,7 +86,7 @@ export function encodeAirdropNativeTokenParams(
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeAirdropNativeToken } "thirdweb/extensions/airdrop";
|
||||
* import { encodeAirdropNativeToken } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeAirdropNativeToken({
|
||||
* contents: ...,
|
||||
* });
|
||||
@@ -108,6 +108,7 @@ export function encodeAirdropNativeToken(options: AirdropNativeTokenParams) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { airdropNativeToken } from "thirdweb/extensions/airdrop";
|
||||
*
|
||||
* const transaction = airdropNativeToken({
|
||||
@@ -119,8 +120,7 @@ export function encodeAirdropNativeToken(options: AirdropNativeTokenParams) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function airdropNativeToken(
|
||||
|
||||
+4
-4
@@ -70,7 +70,7 @@ export function isClaimERC1155Supported(availableSelectors: string[]) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeClaimERC1155Params } "thirdweb/extensions/airdrop";
|
||||
* import { encodeClaimERC1155Params } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeClaimERC1155Params({
|
||||
* token: ...,
|
||||
* receiver: ...,
|
||||
@@ -97,7 +97,7 @@ export function encodeClaimERC1155Params(options: ClaimERC1155Params) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeClaimERC1155 } "thirdweb/extensions/airdrop";
|
||||
* import { encodeClaimERC1155 } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeClaimERC1155({
|
||||
* token: ...,
|
||||
* receiver: ...,
|
||||
@@ -123,6 +123,7 @@ export function encodeClaimERC1155(options: ClaimERC1155Params) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { claimERC1155 } from "thirdweb/extensions/airdrop";
|
||||
*
|
||||
* const transaction = claimERC1155({
|
||||
@@ -138,8 +139,7 @@ export function encodeClaimERC1155(options: ClaimERC1155Params) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function claimERC1155(
|
||||
|
||||
+4
-4
@@ -65,7 +65,7 @@ export function isClaimERC20Supported(availableSelectors: string[]) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeClaimERC20Params } "thirdweb/extensions/airdrop";
|
||||
* import { encodeClaimERC20Params } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeClaimERC20Params({
|
||||
* token: ...,
|
||||
* receiver: ...,
|
||||
@@ -90,7 +90,7 @@ export function encodeClaimERC20Params(options: ClaimERC20Params) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeClaimERC20 } "thirdweb/extensions/airdrop";
|
||||
* import { encodeClaimERC20 } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeClaimERC20({
|
||||
* token: ...,
|
||||
* receiver: ...,
|
||||
@@ -115,6 +115,7 @@ export function encodeClaimERC20(options: ClaimERC20Params) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { claimERC20 } from "thirdweb/extensions/airdrop";
|
||||
*
|
||||
* const transaction = claimERC20({
|
||||
@@ -129,8 +130,7 @@ export function encodeClaimERC20(options: ClaimERC20Params) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function claimERC20(
|
||||
|
||||
+4
-4
@@ -65,7 +65,7 @@ export function isClaimERC721Supported(availableSelectors: string[]) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeClaimERC721Params } "thirdweb/extensions/airdrop";
|
||||
* import { encodeClaimERC721Params } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeClaimERC721Params({
|
||||
* token: ...,
|
||||
* receiver: ...,
|
||||
@@ -90,7 +90,7 @@ export function encodeClaimERC721Params(options: ClaimERC721Params) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeClaimERC721 } "thirdweb/extensions/airdrop";
|
||||
* import { encodeClaimERC721 } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeClaimERC721({
|
||||
* token: ...,
|
||||
* receiver: ...,
|
||||
@@ -115,6 +115,7 @@ export function encodeClaimERC721(options: ClaimERC721Params) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { claimERC721 } from "thirdweb/extensions/airdrop";
|
||||
*
|
||||
* const transaction = claimERC721({
|
||||
@@ -129,8 +130,7 @@ export function encodeClaimERC721(options: ClaimERC721Params) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function claimERC721(
|
||||
|
||||
+4
-4
@@ -53,7 +53,7 @@ export function isInitializeSupported(availableSelectors: string[]) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeInitializeParams } "thirdweb/extensions/airdrop";
|
||||
* import { encodeInitializeParams } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeInitializeParams({
|
||||
* defaultAdmin: ...,
|
||||
* });
|
||||
@@ -70,7 +70,7 @@ export function encodeInitializeParams(options: InitializeParams) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeInitialize } "thirdweb/extensions/airdrop";
|
||||
* import { encodeInitialize } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeInitialize({
|
||||
* defaultAdmin: ...,
|
||||
* });
|
||||
@@ -92,6 +92,7 @@ export function encodeInitialize(options: InitializeParams) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { initialize } from "thirdweb/extensions/airdrop";
|
||||
*
|
||||
* const transaction = initialize({
|
||||
@@ -103,8 +104,7 @@ export function encodeInitialize(options: InitializeParams) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function initialize(
|
||||
|
||||
+4
-4
@@ -66,7 +66,7 @@ export function isSetMerkleRootSupported(availableSelectors: string[]) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetMerkleRootParams } "thirdweb/extensions/airdrop";
|
||||
* import { encodeSetMerkleRootParams } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeSetMerkleRootParams({
|
||||
* token: ...,
|
||||
* tokenMerkleRoot: ...,
|
||||
@@ -89,7 +89,7 @@ export function encodeSetMerkleRootParams(options: SetMerkleRootParams) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetMerkleRoot } "thirdweb/extensions/airdrop";
|
||||
* import { encodeSetMerkleRoot } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeSetMerkleRoot({
|
||||
* token: ...,
|
||||
* tokenMerkleRoot: ...,
|
||||
@@ -113,6 +113,7 @@ export function encodeSetMerkleRoot(options: SetMerkleRootParams) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { setMerkleRoot } from "thirdweb/extensions/airdrop";
|
||||
*
|
||||
* const transaction = setMerkleRoot({
|
||||
@@ -126,8 +127,7 @@ export function encodeSetMerkleRoot(options: SetMerkleRootParams) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function setMerkleRoot(
|
||||
|
||||
+4
-4
@@ -50,7 +50,7 @@ export function isSetOwnerSupported(availableSelectors: string[]) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetOwnerParams } "thirdweb/extensions/airdrop";
|
||||
* import { encodeSetOwnerParams } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeSetOwnerParams({
|
||||
* newOwner: ...,
|
||||
* });
|
||||
@@ -67,7 +67,7 @@ export function encodeSetOwnerParams(options: SetOwnerParams) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetOwner } "thirdweb/extensions/airdrop";
|
||||
* import { encodeSetOwner } from "thirdweb/extensions/airdrop";
|
||||
* const result = encodeSetOwner({
|
||||
* newOwner: ...,
|
||||
* });
|
||||
@@ -87,6 +87,7 @@ export function encodeSetOwner(options: SetOwnerParams) {
|
||||
* @extension AIRDROP
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { setOwner } from "thirdweb/extensions/airdrop";
|
||||
*
|
||||
* const transaction = setOwner({
|
||||
@@ -98,8 +99,7 @@ export function encodeSetOwner(options: SetOwnerParams) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function setOwner(
|
||||
|
||||
+4
-4
@@ -105,7 +105,7 @@ export function isSetClaimConditionsSupported(availableSelectors: string[]) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetClaimConditionsParams } "thirdweb/extensions/common";
|
||||
* import { encodeSetClaimConditionsParams } from "thirdweb/extensions/common";
|
||||
* const result = encodeSetClaimConditionsParams({
|
||||
* phase: ...,
|
||||
* resetClaimEligibility: ...,
|
||||
@@ -128,7 +128,7 @@ export function encodeSetClaimConditionsParams(
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetClaimConditions } "thirdweb/extensions/common";
|
||||
* import { encodeSetClaimConditions } from "thirdweb/extensions/common";
|
||||
* const result = encodeSetClaimConditions({
|
||||
* phase: ...,
|
||||
* resetClaimEligibility: ...,
|
||||
@@ -151,6 +151,7 @@ export function encodeSetClaimConditions(options: SetClaimConditionsParams) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { setClaimConditions } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const transaction = setClaimConditions({
|
||||
@@ -163,8 +164,7 @@ export function encodeSetClaimConditions(options: SetClaimConditionsParams) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function setClaimConditions(
|
||||
|
||||
Generated
+1
-2
@@ -21,7 +21,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isContractURISupported } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const supported = isContractURISupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -40,7 +39,7 @@ export function isContractURISupported(availableSelectors: string[]) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeContractURIResult } from "thirdweb/extensions/common";
|
||||
* const result = decodeContractURIResult("...");
|
||||
* const result = decodeContractURIResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeContractURIResult(result: Hex) {
|
||||
|
||||
+1
-2
@@ -21,7 +21,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isNameSupported } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const supported = isNameSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -40,7 +39,7 @@ export function isNameSupported(availableSelectors: string[]) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeNameResult } from "thirdweb/extensions/common";
|
||||
* const result = decodeNameResult("...");
|
||||
* const result = decodeNameResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeNameResult(result: Hex) {
|
||||
|
||||
+1
-2
@@ -21,7 +21,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isSymbolSupported } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const supported = isSymbolSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -40,7 +39,7 @@ export function isSymbolSupported(availableSelectors: string[]) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeSymbolResult } from "thirdweb/extensions/common";
|
||||
* const result = decodeSymbolResult("...");
|
||||
* const result = decodeSymbolResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeSymbolResult(result: Hex) {
|
||||
|
||||
Generated
+4
-4
@@ -50,7 +50,7 @@ export function isSetContractURISupported(availableSelectors: string[]) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetContractURIParams } "thirdweb/extensions/common";
|
||||
* import { encodeSetContractURIParams } from "thirdweb/extensions/common";
|
||||
* const result = encodeSetContractURIParams({
|
||||
* uri: ...,
|
||||
* });
|
||||
@@ -67,7 +67,7 @@ export function encodeSetContractURIParams(options: SetContractURIParams) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetContractURI } "thirdweb/extensions/common";
|
||||
* import { encodeSetContractURI } from "thirdweb/extensions/common";
|
||||
* const result = encodeSetContractURI({
|
||||
* uri: ...,
|
||||
* });
|
||||
@@ -89,6 +89,7 @@ export function encodeSetContractURI(options: SetContractURIParams) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { setContractURI } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const transaction = setContractURI({
|
||||
@@ -100,8 +101,7 @@ export function encodeSetContractURI(options: SetContractURIParams) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function setContractURI(
|
||||
|
||||
+4
-4
@@ -55,7 +55,7 @@ export function isMulticallSupported(availableSelectors: string[]) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeMulticallParams } "thirdweb/extensions/common";
|
||||
* import { encodeMulticallParams } from "thirdweb/extensions/common";
|
||||
* const result = encodeMulticallParams({
|
||||
* data: ...,
|
||||
* });
|
||||
@@ -72,7 +72,7 @@ export function encodeMulticallParams(options: MulticallParams) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeMulticall } "thirdweb/extensions/common";
|
||||
* import { encodeMulticall } from "thirdweb/extensions/common";
|
||||
* const result = encodeMulticall({
|
||||
* data: ...,
|
||||
* });
|
||||
@@ -94,6 +94,7 @@ export function encodeMulticall(options: MulticallParams) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { multicall } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const transaction = multicall({
|
||||
@@ -105,8 +106,7 @@ export function encodeMulticall(options: MulticallParams) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function multicall(
|
||||
|
||||
+1
-2
@@ -21,7 +21,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isOwnerSupported } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const supported = isOwnerSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -40,7 +39,7 @@ export function isOwnerSupported(availableSelectors: string[]) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeOwnerResult } from "thirdweb/extensions/common";
|
||||
* const result = decodeOwnerResult("...");
|
||||
* const result = decodeOwnerResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeOwnerResult(result: Hex) {
|
||||
|
||||
+4
-4
@@ -50,7 +50,7 @@ export function isSetOwnerSupported(availableSelectors: string[]) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetOwnerParams } "thirdweb/extensions/common";
|
||||
* import { encodeSetOwnerParams } from "thirdweb/extensions/common";
|
||||
* const result = encodeSetOwnerParams({
|
||||
* newOwner: ...,
|
||||
* });
|
||||
@@ -67,7 +67,7 @@ export function encodeSetOwnerParams(options: SetOwnerParams) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetOwner } "thirdweb/extensions/common";
|
||||
* import { encodeSetOwner } from "thirdweb/extensions/common";
|
||||
* const result = encodeSetOwner({
|
||||
* newOwner: ...,
|
||||
* });
|
||||
@@ -87,6 +87,7 @@ export function encodeSetOwner(options: SetOwnerParams) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { setOwner } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const transaction = setOwner({
|
||||
@@ -98,8 +99,7 @@ export function encodeSetOwner(options: SetOwnerParams) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function setOwner(
|
||||
|
||||
Generated
+1
-2
@@ -24,7 +24,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isGetPlatformFeeInfoSupported } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const supported = isGetPlatformFeeInfoSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -43,7 +42,7 @@ export function isGetPlatformFeeInfoSupported(availableSelectors: string[]) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeGetPlatformFeeInfoResult } from "thirdweb/extensions/common";
|
||||
* const result = decodeGetPlatformFeeInfoResult("...");
|
||||
* const result = decodeGetPlatformFeeInfoResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeGetPlatformFeeInfoResult(result: Hex) {
|
||||
|
||||
Generated
+4
-4
@@ -61,7 +61,7 @@ export function isSetPlatformFeeInfoSupported(availableSelectors: string[]) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetPlatformFeeInfoParams } "thirdweb/extensions/common";
|
||||
* import { encodeSetPlatformFeeInfoParams } from "thirdweb/extensions/common";
|
||||
* const result = encodeSetPlatformFeeInfoParams({
|
||||
* platformFeeRecipient: ...,
|
||||
* platformFeeBps: ...,
|
||||
@@ -84,7 +84,7 @@ export function encodeSetPlatformFeeInfoParams(
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetPlatformFeeInfo } "thirdweb/extensions/common";
|
||||
* import { encodeSetPlatformFeeInfo } from "thirdweb/extensions/common";
|
||||
* const result = encodeSetPlatformFeeInfo({
|
||||
* platformFeeRecipient: ...,
|
||||
* platformFeeBps: ...,
|
||||
@@ -107,6 +107,7 @@ export function encodeSetPlatformFeeInfo(options: SetPlatformFeeInfoParams) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { setPlatformFeeInfo } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const transaction = setPlatformFeeInfo({
|
||||
@@ -119,8 +120,7 @@ export function encodeSetPlatformFeeInfo(options: SetPlatformFeeInfoParams) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function setPlatformFeeInfo(
|
||||
|
||||
Generated
+1
-2
@@ -21,7 +21,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isPrimarySaleRecipientSupported } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const supported = isPrimarySaleRecipientSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -40,7 +39,7 @@ export function isPrimarySaleRecipientSupported(availableSelectors: string[]) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodePrimarySaleRecipientResult } from "thirdweb/extensions/common";
|
||||
* const result = decodePrimarySaleRecipientResult("...");
|
||||
* const result = decodePrimarySaleRecipientResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodePrimarySaleRecipientResult(result: Hex) {
|
||||
|
||||
Generated
+4
-4
@@ -55,7 +55,7 @@ export function isSetPrimarySaleRecipientSupported(
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetPrimarySaleRecipientParams } "thirdweb/extensions/common";
|
||||
* import { encodeSetPrimarySaleRecipientParams } from "thirdweb/extensions/common";
|
||||
* const result = encodeSetPrimarySaleRecipientParams({
|
||||
* saleRecipient: ...,
|
||||
* });
|
||||
@@ -74,7 +74,7 @@ export function encodeSetPrimarySaleRecipientParams(
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetPrimarySaleRecipient } "thirdweb/extensions/common";
|
||||
* import { encodeSetPrimarySaleRecipient } from "thirdweb/extensions/common";
|
||||
* const result = encodeSetPrimarySaleRecipient({
|
||||
* saleRecipient: ...,
|
||||
* });
|
||||
@@ -98,6 +98,7 @@ export function encodeSetPrimarySaleRecipient(
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { setPrimarySaleRecipient } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const transaction = setPrimarySaleRecipient({
|
||||
@@ -109,8 +110,7 @@ export function encodeSetPrimarySaleRecipient(
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function setPrimarySaleRecipient(
|
||||
|
||||
Generated
+1
-2
@@ -24,7 +24,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isGetDefaultRoyaltyInfoSupported } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const supported = isGetDefaultRoyaltyInfoSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -43,7 +42,7 @@ export function isGetDefaultRoyaltyInfoSupported(availableSelectors: string[]) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeGetDefaultRoyaltyInfoResult } from "thirdweb/extensions/common";
|
||||
* const result = decodeGetDefaultRoyaltyInfoResult("...");
|
||||
* const result = decodeGetDefaultRoyaltyInfoResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeGetDefaultRoyaltyInfoResult(result: Hex) {
|
||||
|
||||
Generated
+3
-4
@@ -37,7 +37,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isGetRoyaltyInfoForTokenSupported } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const supported = isGetRoyaltyInfoForTokenSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -57,7 +56,7 @@ export function isGetRoyaltyInfoForTokenSupported(
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeGetRoyaltyInfoForTokenParams } "thirdweb/extensions/common";
|
||||
* import { encodeGetRoyaltyInfoForTokenParams } from "thirdweb/extensions/common";
|
||||
* const result = encodeGetRoyaltyInfoForTokenParams({
|
||||
* tokenId: ...,
|
||||
* });
|
||||
@@ -76,7 +75,7 @@ export function encodeGetRoyaltyInfoForTokenParams(
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeGetRoyaltyInfoForToken } "thirdweb/extensions/common";
|
||||
* import { encodeGetRoyaltyInfoForToken } from "thirdweb/extensions/common";
|
||||
* const result = encodeGetRoyaltyInfoForToken({
|
||||
* tokenId: ...,
|
||||
* });
|
||||
@@ -101,7 +100,7 @@ export function encodeGetRoyaltyInfoForToken(
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeGetRoyaltyInfoForTokenResult } from "thirdweb/extensions/common";
|
||||
* const result = decodeGetRoyaltyInfoForTokenResult("...");
|
||||
* const result = decodeGetRoyaltyInfoForTokenResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeGetRoyaltyInfoForTokenResult(result: Hex) {
|
||||
|
||||
+3
-4
@@ -47,7 +47,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isRoyaltyInfoSupported } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const supported = isRoyaltyInfoSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -65,7 +64,7 @@ export function isRoyaltyInfoSupported(availableSelectors: string[]) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeRoyaltyInfoParams } "thirdweb/extensions/common";
|
||||
* import { encodeRoyaltyInfoParams } from "thirdweb/extensions/common";
|
||||
* const result = encodeRoyaltyInfoParams({
|
||||
* tokenId: ...,
|
||||
* salePrice: ...,
|
||||
@@ -83,7 +82,7 @@ export function encodeRoyaltyInfoParams(options: RoyaltyInfoParams) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeRoyaltyInfo } "thirdweb/extensions/common";
|
||||
* import { encodeRoyaltyInfo } from "thirdweb/extensions/common";
|
||||
* const result = encodeRoyaltyInfo({
|
||||
* tokenId: ...,
|
||||
* salePrice: ...,
|
||||
@@ -107,7 +106,7 @@ export function encodeRoyaltyInfo(options: RoyaltyInfoParams) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeRoyaltyInfoResult } from "thirdweb/extensions/common";
|
||||
* const result = decodeRoyaltyInfoResult("...");
|
||||
* const result = decodeRoyaltyInfoResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeRoyaltyInfoResult(result: Hex) {
|
||||
|
||||
+3
-4
@@ -37,7 +37,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isSupportsInterfaceSupported } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const supported = isSupportsInterfaceSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -55,7 +54,7 @@ export function isSupportsInterfaceSupported(availableSelectors: string[]) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSupportsInterfaceParams } "thirdweb/extensions/common";
|
||||
* import { encodeSupportsInterfaceParams } from "thirdweb/extensions/common";
|
||||
* const result = encodeSupportsInterfaceParams({
|
||||
* interfaceId: ...,
|
||||
* });
|
||||
@@ -74,7 +73,7 @@ export function encodeSupportsInterfaceParams(
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSupportsInterface } "thirdweb/extensions/common";
|
||||
* import { encodeSupportsInterface } from "thirdweb/extensions/common";
|
||||
* const result = encodeSupportsInterface({
|
||||
* interfaceId: ...,
|
||||
* });
|
||||
@@ -97,7 +96,7 @@ export function encodeSupportsInterface(options: SupportsInterfaceParams) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeSupportsInterfaceResult } from "thirdweb/extensions/common";
|
||||
* const result = decodeSupportsInterfaceResult("...");
|
||||
* const result = decodeSupportsInterfaceResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeSupportsInterfaceResult(result: Hex) {
|
||||
|
||||
Generated
+4
-4
@@ -61,7 +61,7 @@ export function isSetDefaultRoyaltyInfoSupported(availableSelectors: string[]) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetDefaultRoyaltyInfoParams } "thirdweb/extensions/common";
|
||||
* import { encodeSetDefaultRoyaltyInfoParams } from "thirdweb/extensions/common";
|
||||
* const result = encodeSetDefaultRoyaltyInfoParams({
|
||||
* royaltyRecipient: ...,
|
||||
* royaltyBps: ...,
|
||||
@@ -84,7 +84,7 @@ export function encodeSetDefaultRoyaltyInfoParams(
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetDefaultRoyaltyInfo } "thirdweb/extensions/common";
|
||||
* import { encodeSetDefaultRoyaltyInfo } from "thirdweb/extensions/common";
|
||||
* const result = encodeSetDefaultRoyaltyInfo({
|
||||
* royaltyRecipient: ...,
|
||||
* royaltyBps: ...,
|
||||
@@ -109,6 +109,7 @@ export function encodeSetDefaultRoyaltyInfo(
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { setDefaultRoyaltyInfo } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const transaction = setDefaultRoyaltyInfo({
|
||||
@@ -121,8 +122,7 @@ export function encodeSetDefaultRoyaltyInfo(
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function setDefaultRoyaltyInfo(
|
||||
|
||||
Generated
+4
-4
@@ -65,7 +65,7 @@ export function isSetRoyaltyInfoForTokenSupported(
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetRoyaltyInfoForTokenParams } "thirdweb/extensions/common";
|
||||
* import { encodeSetRoyaltyInfoForTokenParams } from "thirdweb/extensions/common";
|
||||
* const result = encodeSetRoyaltyInfoForTokenParams({
|
||||
* tokenId: ...,
|
||||
* recipient: ...,
|
||||
@@ -90,7 +90,7 @@ export function encodeSetRoyaltyInfoForTokenParams(
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetRoyaltyInfoForToken } "thirdweb/extensions/common";
|
||||
* import { encodeSetRoyaltyInfoForToken } from "thirdweb/extensions/common";
|
||||
* const result = encodeSetRoyaltyInfoForToken({
|
||||
* tokenId: ...,
|
||||
* recipient: ...,
|
||||
@@ -116,6 +116,7 @@ export function encodeSetRoyaltyInfoForToken(
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { setRoyaltyInfoForToken } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const transaction = setRoyaltyInfoForToken({
|
||||
@@ -129,8 +130,7 @@ export function encodeSetRoyaltyInfoForToken(
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function setRoyaltyInfoForToken(
|
||||
|
||||
Generated
+3
-4
@@ -37,7 +37,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isSupportsInterfaceSupported } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const supported = isSupportsInterfaceSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -55,7 +54,7 @@ export function isSupportsInterfaceSupported(availableSelectors: string[]) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSupportsInterfaceParams } "thirdweb/extensions/common";
|
||||
* import { encodeSupportsInterfaceParams } from "thirdweb/extensions/common";
|
||||
* const result = encodeSupportsInterfaceParams({
|
||||
* interfaceId: ...,
|
||||
* });
|
||||
@@ -74,7 +73,7 @@ export function encodeSupportsInterfaceParams(
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSupportsInterface } "thirdweb/extensions/common";
|
||||
* import { encodeSupportsInterface } from "thirdweb/extensions/common";
|
||||
* const result = encodeSupportsInterface({
|
||||
* interfaceId: ...,
|
||||
* });
|
||||
@@ -97,7 +96,7 @@ export function encodeSupportsInterface(options: SupportsInterfaceParams) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeSupportsInterfaceResult } from "thirdweb/extensions/common";
|
||||
* const result = decodeSupportsInterfaceResult("...");
|
||||
* const result = decodeSupportsInterfaceResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeSupportsInterfaceResult(result: Hex) {
|
||||
|
||||
Generated
+4
-4
@@ -72,7 +72,7 @@ export function isGetRoyaltySupported(availableSelectors: string[]) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeGetRoyaltyParams } "thirdweb/extensions/common";
|
||||
* import { encodeGetRoyaltyParams } from "thirdweb/extensions/common";
|
||||
* const result = encodeGetRoyaltyParams({
|
||||
* tokenAddress: ...,
|
||||
* tokenId: ...,
|
||||
@@ -95,7 +95,7 @@ export function encodeGetRoyaltyParams(options: GetRoyaltyParams) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeGetRoyalty } "thirdweb/extensions/common";
|
||||
* import { encodeGetRoyalty } from "thirdweb/extensions/common";
|
||||
* const result = encodeGetRoyalty({
|
||||
* tokenAddress: ...,
|
||||
* tokenId: ...,
|
||||
@@ -119,6 +119,7 @@ export function encodeGetRoyalty(options: GetRoyaltyParams) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { getRoyalty } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const transaction = getRoyalty({
|
||||
@@ -132,8 +133,7 @@ export function encodeGetRoyalty(options: GetRoyaltyParams) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function getRoyalty(
|
||||
|
||||
Generated
+4
-4
@@ -53,7 +53,7 @@ export function isSetRoyaltyEngineSupported(availableSelectors: string[]) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetRoyaltyEngineParams } "thirdweb/extensions/common";
|
||||
* import { encodeSetRoyaltyEngineParams } from "thirdweb/extensions/common";
|
||||
* const result = encodeSetRoyaltyEngineParams({
|
||||
* royaltyEngineAddress: ...,
|
||||
* });
|
||||
@@ -70,7 +70,7 @@ export function encodeSetRoyaltyEngineParams(options: SetRoyaltyEngineParams) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetRoyaltyEngine } "thirdweb/extensions/common";
|
||||
* import { encodeSetRoyaltyEngine } from "thirdweb/extensions/common";
|
||||
* const result = encodeSetRoyaltyEngine({
|
||||
* royaltyEngineAddress: ...,
|
||||
* });
|
||||
@@ -92,6 +92,7 @@ export function encodeSetRoyaltyEngine(options: SetRoyaltyEngineParams) {
|
||||
* @extension COMMON
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { setRoyaltyEngine } from "thirdweb/extensions/common";
|
||||
*
|
||||
* const transaction = setRoyaltyEngine({
|
||||
@@ -103,8 +104,7 @@ export function encodeSetRoyaltyEngine(options: SetRoyaltyEngineParams) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function setRoyaltyEngine(
|
||||
|
||||
+3
-4
@@ -45,7 +45,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isABISupported } from "thirdweb/extensions/ens";
|
||||
*
|
||||
* const supported = isABISupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -63,7 +62,7 @@ export function isABISupported(availableSelectors: string[]) {
|
||||
* @extension ENS
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeABIParams } "thirdweb/extensions/ens";
|
||||
* import { encodeABIParams } from "thirdweb/extensions/ens";
|
||||
* const result = encodeABIParams({
|
||||
* name: ...,
|
||||
* contentTypes: ...,
|
||||
@@ -81,7 +80,7 @@ export function encodeABIParams(options: ABIParams) {
|
||||
* @extension ENS
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeABI } "thirdweb/extensions/ens";
|
||||
* import { encodeABI } from "thirdweb/extensions/ens";
|
||||
* const result = encodeABI({
|
||||
* name: ...,
|
||||
* contentTypes: ...,
|
||||
@@ -103,7 +102,7 @@ export function encodeABI(options: ABIParams) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeABIResult } from "thirdweb/extensions/ens";
|
||||
* const result = decodeABIResult("...");
|
||||
* const result = decodeABIResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeABIResult(result: Hex) {
|
||||
|
||||
+3
-4
@@ -34,7 +34,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isAddrSupported } from "thirdweb/extensions/ens";
|
||||
*
|
||||
* const supported = isAddrSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -52,7 +51,7 @@ export function isAddrSupported(availableSelectors: string[]) {
|
||||
* @extension ENS
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeAddrParams } "thirdweb/extensions/ens";
|
||||
* import { encodeAddrParams } from "thirdweb/extensions/ens";
|
||||
* const result = encodeAddrParams({
|
||||
* name: ...,
|
||||
* });
|
||||
@@ -69,7 +68,7 @@ export function encodeAddrParams(options: AddrParams) {
|
||||
* @extension ENS
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeAddr } "thirdweb/extensions/ens";
|
||||
* import { encodeAddr } from "thirdweb/extensions/ens";
|
||||
* const result = encodeAddr({
|
||||
* name: ...,
|
||||
* });
|
||||
@@ -90,7 +89,7 @@ export function encodeAddr(options: AddrParams) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeAddrResult } from "thirdweb/extensions/ens";
|
||||
* const result = decodeAddrResult("...");
|
||||
* const result = decodeAddrResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeAddrResult(result: Hex) {
|
||||
|
||||
+3
-4
@@ -34,7 +34,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isContenthashSupported } from "thirdweb/extensions/ens";
|
||||
*
|
||||
* const supported = isContenthashSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -52,7 +51,7 @@ export function isContenthashSupported(availableSelectors: string[]) {
|
||||
* @extension ENS
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeContenthashParams } "thirdweb/extensions/ens";
|
||||
* import { encodeContenthashParams } from "thirdweb/extensions/ens";
|
||||
* const result = encodeContenthashParams({
|
||||
* name: ...,
|
||||
* });
|
||||
@@ -69,7 +68,7 @@ export function encodeContenthashParams(options: ContenthashParams) {
|
||||
* @extension ENS
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeContenthash } "thirdweb/extensions/ens";
|
||||
* import { encodeContenthash } from "thirdweb/extensions/ens";
|
||||
* const result = encodeContenthash({
|
||||
* name: ...,
|
||||
* });
|
||||
@@ -92,7 +91,7 @@ export function encodeContenthash(options: ContenthashParams) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeContenthashResult } from "thirdweb/extensions/ens";
|
||||
* const result = decodeContenthashResult("...");
|
||||
* const result = decodeContenthashResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeContenthashResult(result: Hex) {
|
||||
|
||||
+3
-4
@@ -34,7 +34,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isNameSupported } from "thirdweb/extensions/ens";
|
||||
*
|
||||
* const supported = isNameSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -52,7 +51,7 @@ export function isNameSupported(availableSelectors: string[]) {
|
||||
* @extension ENS
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeNameParams } "thirdweb/extensions/ens";
|
||||
* import { encodeNameParams } from "thirdweb/extensions/ens";
|
||||
* const result = encodeNameParams({
|
||||
* name: ...,
|
||||
* });
|
||||
@@ -69,7 +68,7 @@ export function encodeNameParams(options: NameParams) {
|
||||
* @extension ENS
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeName } "thirdweb/extensions/ens";
|
||||
* import { encodeName } from "thirdweb/extensions/ens";
|
||||
* const result = encodeName({
|
||||
* name: ...,
|
||||
* });
|
||||
@@ -90,7 +89,7 @@ export function encodeName(options: NameParams) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeNameResult } from "thirdweb/extensions/ens";
|
||||
* const result = decodeNameResult("...");
|
||||
* const result = decodeNameResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeNameResult(result: Hex) {
|
||||
|
||||
+3
-4
@@ -39,7 +39,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isPubkeySupported } from "thirdweb/extensions/ens";
|
||||
*
|
||||
* const supported = isPubkeySupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -57,7 +56,7 @@ export function isPubkeySupported(availableSelectors: string[]) {
|
||||
* @extension ENS
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodePubkeyParams } "thirdweb/extensions/ens";
|
||||
* import { encodePubkeyParams } from "thirdweb/extensions/ens";
|
||||
* const result = encodePubkeyParams({
|
||||
* name: ...,
|
||||
* });
|
||||
@@ -74,7 +73,7 @@ export function encodePubkeyParams(options: PubkeyParams) {
|
||||
* @extension ENS
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodePubkey } "thirdweb/extensions/ens";
|
||||
* import { encodePubkey } from "thirdweb/extensions/ens";
|
||||
* const result = encodePubkey({
|
||||
* name: ...,
|
||||
* });
|
||||
@@ -95,7 +94,7 @@ export function encodePubkey(options: PubkeyParams) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodePubkeyResult } from "thirdweb/extensions/ens";
|
||||
* const result = decodePubkeyResult("...");
|
||||
* const result = decodePubkeyResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodePubkeyResult(result: Hex) {
|
||||
|
||||
+3
-4
@@ -39,7 +39,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isTextSupported } from "thirdweb/extensions/ens";
|
||||
*
|
||||
* const supported = isTextSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -57,7 +56,7 @@ export function isTextSupported(availableSelectors: string[]) {
|
||||
* @extension ENS
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeTextParams } "thirdweb/extensions/ens";
|
||||
* import { encodeTextParams } from "thirdweb/extensions/ens";
|
||||
* const result = encodeTextParams({
|
||||
* name: ...,
|
||||
* key: ...,
|
||||
@@ -75,7 +74,7 @@ export function encodeTextParams(options: TextParams) {
|
||||
* @extension ENS
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeText } "thirdweb/extensions/ens";
|
||||
* import { encodeText } from "thirdweb/extensions/ens";
|
||||
* const result = encodeText({
|
||||
* name: ...,
|
||||
* key: ...,
|
||||
@@ -97,7 +96,7 @@ export function encodeText(options: TextParams) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeTextResult } from "thirdweb/extensions/ens";
|
||||
* const result = decodeTextResult("...");
|
||||
* const result = decodeTextResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeTextResult(result: Hex) {
|
||||
|
||||
+3
-4
@@ -34,7 +34,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isNameSupported } from "thirdweb/extensions/ens";
|
||||
*
|
||||
* const supported = isNameSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -52,7 +51,7 @@ export function isNameSupported(availableSelectors: string[]) {
|
||||
* @extension ENS
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeNameParams } "thirdweb/extensions/ens";
|
||||
* import { encodeNameParams } from "thirdweb/extensions/ens";
|
||||
* const result = encodeNameParams({
|
||||
* node: ...,
|
||||
* });
|
||||
@@ -69,7 +68,7 @@ export function encodeNameParams(options: NameParams) {
|
||||
* @extension ENS
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeName } "thirdweb/extensions/ens";
|
||||
* import { encodeName } from "thirdweb/extensions/ens";
|
||||
* const result = encodeName({
|
||||
* node: ...,
|
||||
* });
|
||||
@@ -90,7 +89,7 @@ export function encodeName(options: NameParams) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeNameResult } from "thirdweb/extensions/ens";
|
||||
* const result = decodeNameResult("...");
|
||||
* const result = decodeNameResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeNameResult(result: Hex) {
|
||||
|
||||
+3
-4
@@ -42,7 +42,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isResolveSupported } from "thirdweb/extensions/ens";
|
||||
*
|
||||
* const supported = isResolveSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -60,7 +59,7 @@ export function isResolveSupported(availableSelectors: string[]) {
|
||||
* @extension ENS
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeResolveParams } "thirdweb/extensions/ens";
|
||||
* import { encodeResolveParams } from "thirdweb/extensions/ens";
|
||||
* const result = encodeResolveParams({
|
||||
* name: ...,
|
||||
* data: ...,
|
||||
@@ -78,7 +77,7 @@ export function encodeResolveParams(options: ResolveParams) {
|
||||
* @extension ENS
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeResolve } "thirdweb/extensions/ens";
|
||||
* import { encodeResolve } from "thirdweb/extensions/ens";
|
||||
* const result = encodeResolve({
|
||||
* name: ...,
|
||||
* data: ...,
|
||||
@@ -100,7 +99,7 @@ export function encodeResolve(options: ResolveParams) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeResolveResult } from "thirdweb/extensions/ens";
|
||||
* const result = decodeResolveResult("...");
|
||||
* const result = decodeResolveResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeResolveResult(result: Hex) {
|
||||
|
||||
+3
-4
@@ -46,7 +46,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isReverseSupported } from "thirdweb/extensions/ens";
|
||||
*
|
||||
* const supported = isReverseSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -64,7 +63,7 @@ export function isReverseSupported(availableSelectors: string[]) {
|
||||
* @extension ENS
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeReverseParams } "thirdweb/extensions/ens";
|
||||
* import { encodeReverseParams } from "thirdweb/extensions/ens";
|
||||
* const result = encodeReverseParams({
|
||||
* reverseName: ...,
|
||||
* });
|
||||
@@ -81,7 +80,7 @@ export function encodeReverseParams(options: ReverseParams) {
|
||||
* @extension ENS
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeReverse } "thirdweb/extensions/ens";
|
||||
* import { encodeReverse } from "thirdweb/extensions/ens";
|
||||
* const result = encodeReverse({
|
||||
* reverseName: ...,
|
||||
* });
|
||||
@@ -102,7 +101,7 @@ export function encodeReverse(options: ReverseParams) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeReverseResult } from "thirdweb/extensions/ens";
|
||||
* const result = decodeReverseResult("...");
|
||||
* const result = decodeReverseResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeReverseResult(result: Hex) {
|
||||
|
||||
Generated
+1
-2
@@ -21,7 +21,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isGetBaseURICountSupported } from "thirdweb/extensions/erc1155";
|
||||
*
|
||||
* const supported = isGetBaseURICountSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -40,7 +39,7 @@ export function isGetBaseURICountSupported(availableSelectors: string[]) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeGetBaseURICountResult } from "thirdweb/extensions/erc1155";
|
||||
* const result = decodeGetBaseURICountResult("...");
|
||||
* const result = decodeGetBaseURICountResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeGetBaseURICountResult(result: Hex) {
|
||||
|
||||
Generated
+3
-4
@@ -34,7 +34,6 @@ const FN_OUTPUTS = [
|
||||
* @example
|
||||
* ```ts
|
||||
* import { isGetBatchIdAtIndexSupported } from "thirdweb/extensions/erc1155";
|
||||
*
|
||||
* const supported = isGetBatchIdAtIndexSupported(["0x..."]);
|
||||
* ```
|
||||
*/
|
||||
@@ -52,7 +51,7 @@ export function isGetBatchIdAtIndexSupported(availableSelectors: string[]) {
|
||||
* @extension ERC1155
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeGetBatchIdAtIndexParams } "thirdweb/extensions/erc1155";
|
||||
* import { encodeGetBatchIdAtIndexParams } from "thirdweb/extensions/erc1155";
|
||||
* const result = encodeGetBatchIdAtIndexParams({
|
||||
* index: ...,
|
||||
* });
|
||||
@@ -71,7 +70,7 @@ export function encodeGetBatchIdAtIndexParams(
|
||||
* @extension ERC1155
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeGetBatchIdAtIndex } "thirdweb/extensions/erc1155";
|
||||
* import { encodeGetBatchIdAtIndex } from "thirdweb/extensions/erc1155";
|
||||
* const result = encodeGetBatchIdAtIndex({
|
||||
* index: ...,
|
||||
* });
|
||||
@@ -94,7 +93,7 @@ export function encodeGetBatchIdAtIndex(options: GetBatchIdAtIndexParams) {
|
||||
* @example
|
||||
* ```ts
|
||||
* import { decodeGetBatchIdAtIndexResult } from "thirdweb/extensions/erc1155";
|
||||
* const result = decodeGetBatchIdAtIndexResult("...");
|
||||
* const result = decodeGetBatchIdAtIndexResultResult("...");
|
||||
* ```
|
||||
*/
|
||||
export function decodeGetBatchIdAtIndexResult(result: Hex) {
|
||||
|
||||
Generated
+4
-4
@@ -50,7 +50,7 @@ export function isFreezeBatchBaseURISupported(availableSelectors: string[]) {
|
||||
* @extension ERC1155
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeFreezeBatchBaseURIParams } "thirdweb/extensions/erc1155";
|
||||
* import { encodeFreezeBatchBaseURIParams } from "thirdweb/extensions/erc1155";
|
||||
* const result = encodeFreezeBatchBaseURIParams({
|
||||
* index: ...,
|
||||
* });
|
||||
@@ -69,7 +69,7 @@ export function encodeFreezeBatchBaseURIParams(
|
||||
* @extension ERC1155
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeFreezeBatchBaseURI } "thirdweb/extensions/erc1155";
|
||||
* import { encodeFreezeBatchBaseURI } from "thirdweb/extensions/erc1155";
|
||||
* const result = encodeFreezeBatchBaseURI({
|
||||
* index: ...,
|
||||
* });
|
||||
@@ -91,6 +91,7 @@ export function encodeFreezeBatchBaseURI(options: FreezeBatchBaseURIParams) {
|
||||
* @extension ERC1155
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { freezeBatchBaseURI } from "thirdweb/extensions/erc1155";
|
||||
*
|
||||
* const transaction = freezeBatchBaseURI({
|
||||
@@ -102,8 +103,7 @@ export function encodeFreezeBatchBaseURI(options: FreezeBatchBaseURIParams) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function freezeBatchBaseURI(
|
||||
|
||||
Generated
+4
-4
@@ -58,7 +58,7 @@ export function isSetMaxTotalSupplySupported(availableSelectors: string[]) {
|
||||
* @extension ERC1155
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetMaxTotalSupplyParams } "thirdweb/extensions/erc1155";
|
||||
* import { encodeSetMaxTotalSupplyParams } from "thirdweb/extensions/erc1155";
|
||||
* const result = encodeSetMaxTotalSupplyParams({
|
||||
* tokenId: ...,
|
||||
* maxTotalSupply: ...,
|
||||
@@ -81,7 +81,7 @@ export function encodeSetMaxTotalSupplyParams(
|
||||
* @extension ERC1155
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetMaxTotalSupply } "thirdweb/extensions/erc1155";
|
||||
* import { encodeSetMaxTotalSupply } from "thirdweb/extensions/erc1155";
|
||||
* const result = encodeSetMaxTotalSupply({
|
||||
* tokenId: ...,
|
||||
* maxTotalSupply: ...,
|
||||
@@ -104,6 +104,7 @@ export function encodeSetMaxTotalSupply(options: SetMaxTotalSupplyParams) {
|
||||
* @extension ERC1155
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { setMaxTotalSupply } from "thirdweb/extensions/erc1155";
|
||||
*
|
||||
* const transaction = setMaxTotalSupply({
|
||||
@@ -116,8 +117,7 @@ export function encodeSetMaxTotalSupply(options: SetMaxTotalSupplyParams) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function setMaxTotalSupply(
|
||||
|
||||
packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/setSaleRecipientForToken.ts
Generated
+4
-4
@@ -60,7 +60,7 @@ export function isSetSaleRecipientForTokenSupported(
|
||||
* @extension ERC1155
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetSaleRecipientForTokenParams } "thirdweb/extensions/erc1155";
|
||||
* import { encodeSetSaleRecipientForTokenParams } from "thirdweb/extensions/erc1155";
|
||||
* const result = encodeSetSaleRecipientForTokenParams({
|
||||
* tokenId: ...,
|
||||
* saleRecipient: ...,
|
||||
@@ -83,7 +83,7 @@ export function encodeSetSaleRecipientForTokenParams(
|
||||
* @extension ERC1155
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeSetSaleRecipientForToken } "thirdweb/extensions/erc1155";
|
||||
* import { encodeSetSaleRecipientForToken } from "thirdweb/extensions/erc1155";
|
||||
* const result = encodeSetSaleRecipientForToken({
|
||||
* tokenId: ...,
|
||||
* saleRecipient: ...,
|
||||
@@ -108,6 +108,7 @@ export function encodeSetSaleRecipientForToken(
|
||||
* @extension ERC1155
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { setSaleRecipientForToken } from "thirdweb/extensions/erc1155";
|
||||
*
|
||||
* const transaction = setSaleRecipientForToken({
|
||||
@@ -120,8 +121,7 @@ export function encodeSetSaleRecipientForToken(
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function setSaleRecipientForToken(
|
||||
|
||||
Generated
+4
-4
@@ -55,7 +55,7 @@ export function isUpdateBatchBaseURISupported(availableSelectors: string[]) {
|
||||
* @extension ERC1155
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeUpdateBatchBaseURIParams } "thirdweb/extensions/erc1155";
|
||||
* import { encodeUpdateBatchBaseURIParams } from "thirdweb/extensions/erc1155";
|
||||
* const result = encodeUpdateBatchBaseURIParams({
|
||||
* index: ...,
|
||||
* uri: ...,
|
||||
@@ -75,7 +75,7 @@ export function encodeUpdateBatchBaseURIParams(
|
||||
* @extension ERC1155
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeUpdateBatchBaseURI } "thirdweb/extensions/erc1155";
|
||||
* import { encodeUpdateBatchBaseURI } from "thirdweb/extensions/erc1155";
|
||||
* const result = encodeUpdateBatchBaseURI({
|
||||
* index: ...,
|
||||
* uri: ...,
|
||||
@@ -98,6 +98,7 @@ export function encodeUpdateBatchBaseURI(options: UpdateBatchBaseURIParams) {
|
||||
* @extension ERC1155
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { updateBatchBaseURI } from "thirdweb/extensions/erc1155";
|
||||
*
|
||||
* const transaction = updateBatchBaseURI({
|
||||
@@ -110,8 +111,7 @@ export function encodeUpdateBatchBaseURI(options: UpdateBatchBaseURIParams) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function updateBatchBaseURI(
|
||||
|
||||
Generated
+4
-4
@@ -88,7 +88,7 @@ export function isAirdropERC1155Supported(availableSelectors: string[]) {
|
||||
* @extension ERC1155
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeAirdropERC1155Params } "thirdweb/extensions/erc1155";
|
||||
* import { encodeAirdropERC1155Params } from "thirdweb/extensions/erc1155";
|
||||
* const result = encodeAirdropERC1155Params({
|
||||
* tokenAddress: ...,
|
||||
* tokenOwner: ...,
|
||||
@@ -111,7 +111,7 @@ export function encodeAirdropERC1155Params(options: AirdropERC1155Params) {
|
||||
* @extension ERC1155
|
||||
* @example
|
||||
* ```ts
|
||||
* import { encodeAirdropERC1155 } "thirdweb/extensions/erc1155";
|
||||
* import { encodeAirdropERC1155 } from "thirdweb/extensions/erc1155";
|
||||
* const result = encodeAirdropERC1155({
|
||||
* tokenAddress: ...,
|
||||
* tokenOwner: ...,
|
||||
@@ -135,6 +135,7 @@ export function encodeAirdropERC1155(options: AirdropERC1155Params) {
|
||||
* @extension ERC1155
|
||||
* @example
|
||||
* ```ts
|
||||
* import { sendTransaction } from "thirdweb";
|
||||
* import { airdropERC1155 } from "thirdweb/extensions/erc1155";
|
||||
*
|
||||
* const transaction = airdropERC1155({
|
||||
@@ -148,8 +149,7 @@ export function encodeAirdropERC1155(options: AirdropERC1155Params) {
|
||||
* });
|
||||
*
|
||||
* // Send the transaction
|
||||
* ...
|
||||
*
|
||||
* await sendTransaction({ transaction, account });
|
||||
* ```
|
||||
*/
|
||||
export function airdropERC1155(
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user