├── .github └── workflows │ ├── dispatch_docs.yml │ └── run-tests.yml ├── .gitignore ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── abi ├── drop_erc1155.go ├── drop_erc721.go ├── ierc1155.go ├── ierc165.go ├── ierc20.go ├── ierc721.go ├── iroyalty.go ├── marketplace.go ├── multiwrap.go ├── signature_mint_erc1155.go ├── signature_mint_erc721.go ├── token_erc1155.go ├── token_erc20.go ├── token_erc721.go └── twfactory.go ├── cmd └── thirdweb │ ├── common.go │ ├── custom_commands.go │ ├── deployer_commands.go │ ├── edition_commands.go │ ├── edition_drop_commands.go │ ├── main.go │ ├── marketplace_commands.go │ ├── multiwrap_commands.go │ ├── nft_collection_commands.go │ ├── nft_drop_commands.go │ ├── storage_commands.go │ └── token_commands.go ├── docs ├── contract_deployer.md ├── contract_encoder.md ├── contract_events.md ├── custom.md ├── edition.md ├── edition_drop.md ├── edition_drop_claim_conditions.md ├── erc1155.md ├── erc1155_signature_minting.md ├── erc1155_standard.md ├── erc20.md ├── erc20_standard.md ├── erc721.md ├── erc721_signature_minting.md ├── erc721_standard.md ├── feature_snippets.json ├── index.md ├── marketplace.md ├── marketplace_encoder.md ├── multiwrap.md ├── nft_collection.md ├── nft_drop.md ├── nft_drop_claim_conditions.md ├── nft_drop_encoder.md ├── provider.md ├── sdk.md ├── snippets.json ├── storage.md ├── token.md └── wallet_authenticator.md ├── go.mod ├── go.sum ├── hardhat.config.js ├── internal ├── json │ ├── AirdropERC1155.json │ ├── AirdropERC1155Claimable.json │ ├── AirdropERC20.json │ ├── AirdropERC20Claimable.json │ ├── AirdropERC721.json │ ├── AirdropERC721Claimable.json │ ├── AppURI.json │ ├── BatchMintMetadata.json │ ├── Context.json │ ├── ContractMetadata.json │ ├── ContractMetadataLogic.json │ ├── ContractMetadataStorage.json │ ├── ContractPublisher.json │ ├── Counters.json │ ├── CurrencyTransferLib.json │ ├── DefaultOperatorFilterer.json │ ├── DefaultOperatorFiltererUpgradeable.json │ ├── DelayedReveal.json │ ├── DirectListingsLogic.json │ ├── DirectListingsStorage.json │ ├── Drop.json │ ├── Drop1155.json │ ├── DropERC1155.json │ ├── DropERC1155_V2.json │ ├── DropERC20.json │ ├── DropERC20_V2.json │ ├── DropERC721.json │ ├── DropERC721_V3.json │ ├── DropSinglePhase.json │ ├── DropSinglePhase1155.json │ ├── DropSinglePhase1155_V1.json │ ├── DropSinglePhase_V1.json │ ├── ECDSA.json │ ├── EIP712.json │ ├── EIP712ChainlessDomain.json │ ├── ERC1155.json │ ├── ERC1155Base.json │ ├── ERC1155DelayedReveal.json │ ├── ERC1155Drop.json │ ├── ERC1155Holder.json │ ├── ERC1155LazyMint.json │ ├── ERC1155PresetUpgradeable.json │ ├── ERC1155Receiver.json │ ├── ERC1155SignatureMint.json │ ├── ERC165.json │ ├── ERC1967Proxy.json │ ├── ERC1967Upgrade.json │ ├── ERC20.json │ ├── ERC20Base.json │ ├── ERC20Drop.json │ ├── ERC20DropVote.json │ ├── ERC20Permit.json │ ├── ERC20SignatureMint.json │ ├── ERC20SignatureMintVote.json │ ├── ERC20Vote.json │ ├── ERC20Votes.json │ ├── ERC2771Context.json │ ├── ERC2771ContextConsumer.json │ ├── ERC2771ContextLogic.json │ ├── ERC2771ContextStorage.json │ ├── ERC2771ContextUpgradeable.json │ ├── ERC2771ContextUpgradeableLogic.json │ ├── ERC2771ContextUpgradeableStorage.json │ ├── ERC721A.json │ ├── ERC721AUpgradeable.json │ ├── ERC721Base.json │ ├── ERC721DelayedReveal.json │ ├── ERC721Drop.json │ ├── ERC721Holder.json │ ├── ERC721LazyMint.json │ ├── ERC721Multiwrap.json │ ├── ERC721SignatureMint.json │ ├── EditionStake.json │ ├── EnglishAuctionsLogic.json │ ├── EnglishAuctionsStorage.json │ ├── EnumerableSet.json │ ├── FeeType.json │ ├── Forwarder.json │ ├── ForwarderChainlessDomain.json │ ├── ForwarderConsumer.json │ ├── ForwarderEOAOnly.json │ ├── IAirdropERC1155.json │ ├── IAirdropERC1155Claimable.json │ ├── IAirdropERC20.json │ ├── IAirdropERC20Claimable.json │ ├── IAirdropERC721.json │ ├── IAirdropERC721Claimable.json │ ├── IAppURI.json │ ├── IBeacon.json │ ├── IBurnableERC1155.json │ ├── IBurnableERC20.json │ ├── IBurnableERC721.json │ ├── IClaimCondition.json │ ├── IClaimConditionMultiPhase.json │ ├── IClaimCondition_V1.json │ ├── IClaimConditionsSinglePhase.json │ ├── IClaimableERC1155.json │ ├── IClaimableERC721.json │ ├── IContext.json │ ├── IContractDeployer.json │ ├── IContractFactory.json │ ├── IContractMetadata.json │ ├── IContractPublisher.json │ ├── IDelayedReveal.json │ ├── IDelayedRevealDeprecated.json │ ├── IDirectListings.json │ ├── IDrop.json │ ├── IDrop1155.json │ ├── IDropClaimCondition.json │ ├── IDropClaimCondition_V2.json │ ├── IDropERC1155.json │ ├── IDropERC1155_V2.json │ ├── IDropERC20.json │ ├── IDropERC20_V2.json │ ├── IDropERC721.json │ ├── IDropERC721_V3.json │ ├── IDropSinglePhase.json │ ├── IDropSinglePhase1155.json │ ├── IDropSinglePhase1155_V1.json │ ├── IDropSinglePhase_V1.json │ ├── IERC1155.json │ ├── IERC1155Enumerable.json │ ├── IERC1155Metadata.json │ ├── IERC1155Receiver.json │ ├── IERC1155Supply.json │ ├── IERC165.json │ ├── IERC1822Proxiable.json │ ├── IERC20.json │ ├── IERC20Metadata.json │ ├── IERC20Permit.json │ ├── IERC2771Context.json │ ├── IERC2981.json │ ├── IERC721.json │ ├── IERC721A.json │ ├── IERC721Enumerable.json │ ├── IERC721Metadata.json │ ├── IERC721Receiver.json │ ├── IERC721Supply.json │ ├── IEditionStake.json │ ├── IEnglishAuctions.json │ ├── IFeeTierPlacementExtension.json │ ├── ILazyMint.json │ ├── ILazyMintWithTier.json │ ├── IMarketplace.json │ ├── IMintableERC1155.json │ ├── IMintableERC20.json │ ├── IMintableERC721.json │ ├── IMulticall.json │ ├── IMultiwrap.json │ ├── INFTStake.json │ ├── IOffers.json │ ├── IOperatorFilterRegistry.json │ ├── IOperatorFilterToggle.json │ ├── IOwnable.json │ ├── IPack.json │ ├── IPackVRFDirect.json │ ├── IPermissions.json │ ├── IPermissionsEnumerable.json │ ├── IPlatformFee.json │ ├── IPluginMap.json │ ├── IPrimarySale.json │ ├── IRouter.json │ ├── IRoyalty.json │ ├── ISignatureAction.json │ ├── ISignatureMintERC1155.json │ ├── ISignatureMintERC20.json │ ├── ISignatureMintERC721.json │ ├── ISignatureMintERC721_V1.json │ ├── IStaking1155.json │ ├── IStaking20.json │ ├── IStaking721.json │ ├── ITWFee.json │ ├── ITWMultichainRegistry.json │ ├── ITWRegistry.json │ ├── IThirdwebContract.json │ ├── ITokenBundle.json │ ├── ITokenERC1155.json │ ├── ITokenERC20.json │ ├── ITokenERC721.json │ ├── ITokenStake.json │ ├── IVotes.json │ ├── IWETH.json │ ├── InitStorage.json │ ├── Initializable.json │ ├── LazyMint.json │ ├── LazyMintWithTier.json │ ├── Marketplace.json │ ├── MarketplaceV3.json │ ├── Math.json │ ├── MerkleProof.json │ ├── MinimalForwarderEOAOnly.json │ ├── Mock.json │ ├── MockContract.json │ ├── MockContractPublisher.json │ ├── Multicall.json │ ├── Multiwrap.json │ ├── NFTStake.json │ ├── OffersLogic.json │ ├── OffersStorage.json │ ├── OperatorFilterToggle.json │ ├── OperatorFilterer.json │ ├── OperatorFiltererUpgradeable.json │ ├── Ownable.json │ ├── Pack.json │ ├── PackVRFDirect.json │ ├── PaymentSplitterUpgradeable.json │ ├── Permissions.json │ ├── PermissionsEnumerable.json │ ├── PermissionsEnumerableLogic.json │ ├── PermissionsEnumerableStorage.json │ ├── PermissionsLogic.json │ ├── PermissionsStorage.json │ ├── PlatformFee.json │ ├── PlatformFeeLogic.json │ ├── PlatformFeeStorage.json │ ├── PluginMap.json │ ├── PrimarySale.json │ ├── Proxy.json │ ├── ProxyForUpgradeable.json │ ├── ReentrancyGuard.json │ ├── ReentrancyGuardLogic.json │ ├── ReentrancyGuardStorage.json │ ├── ReentrancyGuardUpgradeable.json │ ├── Router.json │ ├── RouterImmutable.json │ ├── RouterStorage.json │ ├── Royalty.json │ ├── SafeCast.json │ ├── SafeERC20.json │ ├── SafeMath.json │ ├── SignatureAction.json │ ├── SignatureActionUpgradeable.json │ ├── SignatureDrop.json │ ├── SignatureDrop_V4.json │ ├── SignatureMintERC1155.json │ ├── SignatureMintERC1155Upgradeable.json │ ├── SignatureMintERC20.json │ ├── SignatureMintERC20Upgradeable.json │ ├── SignatureMintERC721.json │ ├── SignatureMintERC721Upgradeable.json │ ├── SoulboundERC721A.json │ ├── Split.json │ ├── Staking1155.json │ ├── Staking1155Base.json │ ├── Staking1155Upgradeable.json │ ├── Staking20.json │ ├── Staking20Base.json │ ├── Staking20Upgradeable.json │ ├── Staking721.json │ ├── Staking721Base.json │ ├── Staking721Upgradeable.json │ ├── TWAddress.json │ ├── TWBitMaps.json │ ├── TWFactory.json │ ├── TWFee.json │ ├── TWMultichainRegistry.json │ ├── TWMultichainRegistryLogic.json │ ├── TWMultichainRegistryRouter.json │ ├── TWMultichainRegistryStorage.json │ ├── TWProxy.json │ ├── TWRegistry.json │ ├── TWStorageSlot.json │ ├── TWStrings.json │ ├── TieredDrop.json │ ├── TokenBundle.json │ ├── TokenERC1155.json │ ├── TokenERC20.json │ ├── TokenERC721.json │ ├── TokenStake.json │ ├── TokenStore.json │ ├── Upgradeable.json │ └── VoteERC20.json └── test │ ├── 0.jpg │ ├── 1.jpg │ └── 2.jpg ├── merkle ├── hash.go └── merkle_tree.go ├── package.json ├── scripts ├── generate-docs.mjs ├── generate-snippets.mjs └── test │ ├── await-hardhat.sh │ └── start-hardhat.sh ├── thirdweb ├── common.go ├── constants.go ├── contract_deployer.go ├── contract_encoder.go ├── contract_events.go ├── contract_events_test.go ├── contract_helper.go ├── edition.go ├── edition_drop.go ├── edition_drop_claim_conditions.go ├── edition_test.go ├── erc1155.go ├── erc1155_signature_minting.go ├── erc1155_standard.go ├── erc20.go ├── erc20_standard.go ├── erc721.go ├── erc721_signature_minting.go ├── erc721_standard.go ├── error.go ├── ipfs_storage.go ├── keys.go ├── marketplace.go ├── marketplace_encoder.go ├── marketplace_test.go ├── multiwrap.go ├── nft_collection.go ├── nft_collection_test.go ├── nft_drop.go ├── nft_drop_claim_conditions.go ├── nft_drop_encoder.go ├── nft_drop_test.go ├── provider_handler.go ├── sdk.go ├── sharded_merkle_tree.go ├── sharded_merkle_tree_test.go ├── smart_contract.go ├── snapshots.go ├── token.go ├── token_test.go ├── types.go ├── wallet_authenticator.go └── wallet_authenticator_test.go └── yarn.lock /.github/workflows/dispatch_docs.yml: -------------------------------------------------------------------------------- 1 | name: Dispatch Doc Generation 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | dispatch: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Repository Dispatch 13 | uses: peter-evans/repository-dispatch@v1.1.3 14 | with: 15 | token: ${{ secrets.REPO_ACCESS_TOKEN }} 16 | repository: thirdweb-dev/docs 17 | event-type: generate-docs -------------------------------------------------------------------------------- /.github/workflows/run-tests.yml: -------------------------------------------------------------------------------- 1 | name: Build & Test 2 | env: 3 | SDK_ALCHEMY_KEY: ${{ secrets.SDK_ALCHEMY_KEY }} 4 | THIRDWEB_SECRET_KEY: ${{ secrets.THIRDWEB_SECRET_KEY }} 5 | 6 | on: [push, pull_request] 7 | jobs: 8 | tests: 9 | name: "Build against Go ${{ matrix.os }}" 10 | strategy: 11 | matrix: 12 | go-version: [1.16.x] 13 | os: [ubuntu-latest] 14 | runs-on: ${{ matrix.os }} 15 | steps: 16 | - name: Checkout Code 17 | uses: actions/checkout@v2 18 | 19 | - name: Install Go 20 | uses: actions/setup-go@v2 21 | with: 22 | go-version: ${{ matrix.go-version }} 23 | 24 | - name: Use Node.js 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: 16.x 28 | 29 | - name: Build 30 | run: go build -v ./thirdweb 31 | 32 | - name: Test 33 | run: yarn add hardhat && make test 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | 3 | # Binaries for programs and plugins 4 | *.exe 5 | *.exe~ 6 | *.dll 7 | *.so 8 | *.dylib 9 | 10 | # Test binary, built with `go test -c` 11 | *.test 12 | 13 | # Output of the go coverage tool, specifically when used with LiteIDE 14 | *.out 15 | 16 | # Dependency directories (remove the comment below to include it) 17 | # vendor/ 18 | 19 | .DS_Store 20 | 21 | .idea 22 | bin/ 23 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:16-buster 2 | 3 | WORKDIR /code/hardhat 4 | 5 | COPY hardhat.config.js /code/hardhat/hardhat.config.js 6 | COPY package.json /code/hardhat/package.json 7 | 8 | RUN yarn 9 | 10 | COPY /scripts/test/start-hardhat.sh /code/hardhat/start-hardhat.sh 11 | RUN chmod +x /code/hardhat/start-hardhat.sh 12 | 13 | ENTRYPOINT ["/code/hardhat/start-hardhat.sh"] -------------------------------------------------------------------------------- /cmd/thirdweb/custom_commands.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "fmt" 7 | "log" 8 | 9 | "github.com/spf13/cobra" 10 | ) 11 | 12 | var ( 13 | customContractAddress string 14 | ) 15 | 16 | var customCmd = &cobra.Command{ 17 | Use: "custom [command]", 18 | Short: "Interact with an custom contract", 19 | Args: cobra.MinimumNArgs(1), 20 | Run: func(cmd *cobra.Command, args []string) { 21 | log.Println("Please input a command to run") 22 | }, 23 | } 24 | 25 | var customSetCmd = &cobra.Command{ 26 | Use: "set", 27 | Short: "Set custom contract profile in a contract `ADDRESS`", 28 | Run: func(cmd *cobra.Command, args []string) { 29 | contract, err := getCustom() 30 | if err != nil { 31 | panic(err) 32 | } 33 | 34 | data, err := contract.Call(context.Background(), "tokenURI", 0) 35 | if err != nil { 36 | panic(err) 37 | } 38 | 39 | log.Println(data) 40 | 41 | tx, err := contract.Call(context.Background(), "mintTo", thirdwebSDK.GetSignerAddress().Hex(), "ipfs://QmXCKX8MHHCXU62UWdiU38cjK3vbQ4MeL9FgXKo2hAR6Yz/0") 42 | if err != nil { 43 | panic(err) 44 | } 45 | 46 | result, _ := json.Marshal(&tx) 47 | fmt.Println(string(result)) 48 | }, 49 | } 50 | 51 | func init() { 52 | customCmd.PersistentFlags().StringVarP(&customContractAddress, "address", "a", "", "nft contract address") 53 | customCmd.AddCommand(customSetCmd) 54 | } 55 | -------------------------------------------------------------------------------- /cmd/thirdweb/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | 6 | "github.com/spf13/cobra" 7 | "github.com/spf13/viper" 8 | ) 9 | 10 | var ( 11 | privateKey string 12 | chainRpcUrl string 13 | 14 | rootCmd = &cobra.Command{ 15 | Use: "thirdweb", 16 | Short: "A CLI for the thirdweb go SDK", 17 | } 18 | ) 19 | 20 | // Execute executes the root command. 21 | func Execute() error { 22 | return rootCmd.Execute() 23 | } 24 | 25 | func init() { 26 | cobra.OnInitialize(initConfig) 27 | 28 | rootCmd.PersistentFlags().StringVarP(&privateKey, "privateKey", "k", "", "private key used to sign transactions") 29 | rootCmd.PersistentFlags().StringVarP(&chainRpcUrl, "chainRpcUrl", "u", "mumbai", "chain url where all rpc requests will be sent") 30 | _ = viper.BindPFlag("privateKey", rootCmd.PersistentFlags().Lookup("privateKey")) 31 | _ = viper.BindPFlag("chainRpcUrl", rootCmd.PersistentFlags().Lookup("chainRpcUrl")) 32 | viper.SetDefault("chainRpcUrl", "mumbai") 33 | 34 | rootCmd.AddCommand(nftCmd) 35 | rootCmd.AddCommand(editionCmd) 36 | rootCmd.AddCommand(tokenCmd) 37 | rootCmd.AddCommand(nftDropCmd) 38 | rootCmd.AddCommand(editionDropCmd) 39 | rootCmd.AddCommand(multiwrapCmd) 40 | rootCmd.AddCommand(storageCmd) 41 | rootCmd.AddCommand(customCmd) 42 | rootCmd.AddCommand(deployCmd) 43 | rootCmd.AddCommand(marketplaceCmd) 44 | } 45 | 46 | func initConfig() { 47 | viper.AutomaticEnv() 48 | 49 | if err := viper.ReadInConfig(); err == nil { 50 | log.Println("Using config file:", viper.ConfigFileUsed()) 51 | } 52 | } 53 | 54 | func main() { 55 | if err := Execute(); err != nil { 56 | panic(err) 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /cmd/thirdweb/marketplace_commands.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "context" 5 | "encoding/hex" 6 | "encoding/json" 7 | "fmt" 8 | "log" 9 | 10 | "github.com/spf13/cobra" 11 | "github.com/thirdweb-dev/go-sdk/v2/thirdweb" 12 | ) 13 | 14 | var ( 15 | marketplaceAddress string 16 | ) 17 | 18 | var marketplaceCmd = &cobra.Command{ 19 | Use: "marketplace [command]", 20 | Short: "Interact with a marketplace contract", 21 | Args: cobra.MinimumNArgs(1), 22 | Run: func(cmd *cobra.Command, args []string) { 23 | log.Println("Please input a command to run") 24 | }, 25 | } 26 | 27 | var marketplaceListCmd = &cobra.Command{ 28 | Use: "list", 29 | Short: "Mint tokens on `ADDRESS`", 30 | Run: func(cmd *cobra.Command, args []string) { 31 | marketplace, err := getMarketplace() 32 | if err != nil { 33 | panic(err) 34 | } 35 | 36 | tx, err := marketplace.CreateListing(context.Background(), &thirdweb.NewDirectListing{}) 37 | if err != nil { 38 | panic(err) 39 | } 40 | 41 | result, _ := json.Marshal(&tx) 42 | fmt.Println(string(result)) 43 | }, 44 | } 45 | 46 | var marketplaceEncodeCancelCmd = &cobra.Command{ 47 | Use: "encode", 48 | Short: "Encode cancel listing `ADDRESS`", 49 | Run: func(cmd *cobra.Command, args []string) { 50 | marketplace, err := getMarketplace() 51 | if err != nil { 52 | panic(err) 53 | } 54 | 55 | tx, err := marketplace.Encoder.CancelListing(context.Background(), "0x0000000000000000000000000000000000000000", 0) 56 | 57 | fmt.Println("Nonce:", tx.Nonce()) 58 | fmt.Println("To:", tx.To()) 59 | fmt.Println("GasLimit:", tx.Gas()) 60 | fmt.Println("GasPrice:", tx.GasPrice()) 61 | fmt.Println("Value:", tx.Value()) 62 | fmt.Println("Data:", hex.EncodeToString(tx.Data())) 63 | }, 64 | } 65 | 66 | var marketplaceGetCmd = &cobra.Command{ 67 | Use: "get", 68 | Short: "Get listing `ADDRESS`", 69 | Run: func(cmd *cobra.Command, args []string) { 70 | marketplace, err := getMarketplace() 71 | if err != nil { 72 | panic(err) 73 | } 74 | 75 | listing, err := marketplace.GetListing(context.Background(), 0) 76 | if err != nil { 77 | panic(err) 78 | } 79 | 80 | fmt.Printf("%#v", listing) 81 | fmt.Printf("%#v", listing.Asset) 82 | }, 83 | } 84 | 85 | func init() { 86 | marketplaceCmd.PersistentFlags().StringVarP(&marketplaceAddress, "address", "a", "", "marketplace contract address") 87 | marketplaceCmd.AddCommand(marketplaceListCmd) 88 | marketplaceCmd.AddCommand(marketplaceEncodeCancelCmd) 89 | marketplaceCmd.AddCommand(marketplaceGetCmd) 90 | } 91 | -------------------------------------------------------------------------------- /cmd/thirdweb/token_commands.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "fmt" 7 | "log" 8 | 9 | "github.com/spf13/cobra" 10 | 11 | "github.com/thirdweb-dev/go-sdk/v2/thirdweb" 12 | ) 13 | 14 | var ( 15 | tokenAddress string 16 | ) 17 | 18 | var tokenCmd = &cobra.Command{ 19 | Use: "token [command]", 20 | Short: "Interact with a token contract", 21 | Args: cobra.MinimumNArgs(1), 22 | Run: func(cmd *cobra.Command, args []string) { 23 | log.Println("Please input a command to run") 24 | }, 25 | } 26 | 27 | var tokenGetCmd = &cobra.Command{ 28 | Use: "get", 29 | Short: "Get token data and balance on `ADDRESS`", 30 | Run: func(cmd *cobra.Command, args []string) { 31 | token, err := getToken() 32 | if err != nil { 33 | panic(err) 34 | } 35 | 36 | data, err := token.Get(context.Background()) 37 | if err != nil { 38 | panic(err) 39 | } 40 | 41 | log.Println("Name: ", data.Name) 42 | log.Println("Symbols: ", data.Symbol) 43 | log.Println("Decimals: ", data.Decimals) 44 | 45 | balance, err := token.Balance(context.Background()) 46 | if err != nil { 47 | panic(err) 48 | } 49 | 50 | log.Println("Balance: ", balance.DisplayValue) 51 | }, 52 | } 53 | 54 | var tokenMintCmd = &cobra.Command{ 55 | Use: "mint", 56 | Short: "Mint tokens on `ADDRESS`", 57 | Run: func(cmd *cobra.Command, args []string) { 58 | token, err := getToken() 59 | if err != nil { 60 | panic(err) 61 | } 62 | 63 | tx, err := token.Mint(context.Background(), 1) 64 | if err != nil { 65 | panic(err) 66 | } 67 | 68 | result, _ := json.Marshal(&tx) 69 | fmt.Println(string(result)) 70 | }, 71 | } 72 | 73 | var tokenMintBatchCmd = &cobra.Command{ 74 | Use: "mintBatch", 75 | Short: "Mint tokens on `ADDRESS`", 76 | Run: func(cmd *cobra.Command, args []string) { 77 | token, err := getToken() 78 | if err != nil { 79 | panic(err) 80 | } 81 | 82 | tx, err := token.MintBatchTo(context.Background(), []*thirdweb.TokenAmount{ 83 | { 84 | ToAddress: "0x9e1b8A86fFEE4a7175DAE4bDB1cC12d111Dcb3D6", 85 | Amount: 1, 86 | }, 87 | { 88 | ToAddress: "0x0f14090Dc6BB0Eb36E6d386176047cbC6BF1D077", 89 | Amount: 1, 90 | }, 91 | }) 92 | if err != nil { 93 | panic(err) 94 | } 95 | 96 | result, _ := json.Marshal(&tx) 97 | fmt.Println(string(result)) 98 | }, 99 | } 100 | 101 | func init() { 102 | tokenCmd.PersistentFlags().StringVarP(&tokenAddress, "address", "a", "", "token contract address") 103 | tokenCmd.AddCommand(tokenGetCmd) 104 | tokenCmd.AddCommand(tokenMintCmd) 105 | tokenCmd.AddCommand(tokenMintBatchCmd) 106 | } 107 | -------------------------------------------------------------------------------- /docs/contract_encoder.md: -------------------------------------------------------------------------------- 1 | 2 | ## Contract Encoder 3 | 4 | This interface is currently supported by all contract encoder classes and provides a generic method to encode write function calls. 5 | 6 | ```go 7 | type ContractEncoder struct {} 8 | ``` 9 | 10 | ### func \(\*ContractEncoder\) [Encode]() 11 | 12 | ```go 13 | func (encoder *ContractEncoder) Encode(ctx context.Context, signerAddress string, method string, args ...interface{}) (*types.Transaction, error) 14 | ``` 15 | 16 | Get the unsigned transaction data for any contract call on a contract. 17 | 18 | signerAddress: the address expected to sign this transaction 19 | 20 | method: the name of the contract function to encode transaction data for 21 | 22 | args: the arguments to pass to the contract function. 23 | 24 | returns: the encoded transaction data for the transaction. 25 | 26 | #### Example 27 | 28 | ``` 29 | toAddress := "0x..." 30 | amount := 1 31 | 32 | // Now you can get the transaction data for the contract call. 33 | tx, err := contract.Encoder.Encode(context.Background(), "transfer", toAddress, amount) 34 | fmt.Println(tx.Data()) // Now you can access all transaction data, like the following fields 35 | fmt.Println(tx.Nonce()) 36 | fmt.Println(tx.Value()) 37 | ``` 38 | 39 | ## type [ContractEvent]() 40 | 41 | ```go 42 | type ContractEvent struct { 43 | EventName string 44 | Data map[string]interface{} 45 | Transaction types.Log 46 | } 47 | ``` 48 | -------------------------------------------------------------------------------- /docs/contract_events.md: -------------------------------------------------------------------------------- 1 | 2 | ## Contract Events 3 | 4 | This interface provides a way to query past events or listen for future events on any contract. It's currently support on all pre\-built and custom contracts\! 5 | 6 | ### Example 7 | 8 | ``` 9 | // First get an instance of your contract 10 | contract, _ := sdk.GetContract("0x..."); 11 | 12 | // Now, get all Transfer events from a specific block range 13 | contract.Events.GetEvents("Transfer", thirdweb.EventQueryOptions{ 14 | FromBlock: 100000000, 15 | ToBlock: 100000001, 16 | }) 17 | 18 | // And setup a listener to listen for future Transfer events 19 | contract.Events.AddEventListener("Transfer", func (event thirdweb.ContractEvent) { 20 | fmt.Printf("%#v\n", event) 21 | }) 22 | ``` 23 | 24 | ```go 25 | type ContractEvents struct {} 26 | ``` 27 | 28 | ### func \(\*ContractEvents\) [AddEventListener]() 29 | 30 | ```go 31 | func (events *ContractEvents) AddEventListener(ctx context.Context, eventName string, listener func(event ContractEvent)) EventSubscription 32 | ``` 33 | 34 | Add a listener to listen in the background for any future events of a specific type. 35 | 36 | eventName: The name of the event to listen for 37 | 38 | listener: The listener function that will be called whenever a new event is received 39 | 40 | returns: An EventSubscription object that can be used to unsubscribe from the event or check for errors 41 | 42 | #### Example 43 | 44 | ``` 45 | // Define a listener function to be called whenever a new Transfer event is received 46 | listener := func (event thirdweb.ContractEvent) { 47 | fmt.Printf("%#v\n", event) 48 | } 49 | 50 | // Add a new listener for the Transfer event 51 | subscription := contract.Events.AddEventListener(context.Background(), "Transfer", listener) 52 | 53 | // Unsubscribe from the Transfer event at some time in the future, closing the listener 54 | subscription.Unsubscribe() 55 | ``` 56 | 57 | ### func \(\*ContractEvents\) [GetEvents]() 58 | 59 | ```go 60 | func (events *ContractEvents) GetEvents(ctx context.Context, eventName string, options EventQueryOptions) ([]ContractEvent, error) 61 | ``` 62 | 63 | Query past events of a specific type on the contract. 64 | 65 | eventName: The name of the event to query for 66 | 67 | options: The options to use when querying for events, including block range specifications and filters 68 | 69 | returns: a list of ContractEvent objects that match the query 70 | 71 | #### Example 72 | 73 | ``` 74 | // First we define a filter to only get Transfer events where the "from" address is "0x..." 75 | // Note that you can only add filters for indexed parameters on events 76 | filters := map[string]interface{} { 77 | "from": common.HexToAddress("0x...") 78 | } 79 | 80 | // Now we can define the query options, including the block range and the filter 81 | queryOptions := thirdweb.EventQueryOptions{ 82 | FromBlock: 100000000, // Defaults to block 0 if you don't specify this field 83 | ToBlock: 100000001, // Defaults to latest block if you don't specify this field 84 | Filters: filters, 85 | } 86 | 87 | // Now we can query for the Transfer events 88 | events, _ := contract.Events.GetEvents("Transfer", queryOptions) 89 | ``` 90 | -------------------------------------------------------------------------------- /docs/edition_drop.md: -------------------------------------------------------------------------------- 1 | 2 | ## Edition Drop 3 | 4 | You can access the Edition Drop interface from the SDK as follows: 5 | 6 | ``` 7 | import ( 8 | "github.com/thirdweb-dev/go-sdk/v2/thirdweb" 9 | ) 10 | 11 | privateKey := "..." 12 | secretKey := "..." 13 | 14 | sdk, err := thirdweb.NewThirdwebSDK("mumbai", &thirdweb.SDKOptions{ 15 | PrivateKey: privateKey, 16 | SecretKey: secretKey 17 | }) 18 | 19 | contract, err := sdk.GetEditionDrop("{{contract_address}}") 20 | ``` 21 | 22 | ```go 23 | type EditionDrop struct { 24 | *ERC1155Standard 25 | 26 | Helper *contractHelper 27 | ClaimConditions *EditionDropClaimConditions 28 | Encoder *ContractEncoder 29 | Events *ContractEvents 30 | } 31 | ``` 32 | 33 | ### func \(\*EditionDrop\) [Claim]() 34 | 35 | ```go 36 | func (drop *EditionDrop) Claim(ctx context.Context, tokenId int, quantity int) (*types.Transaction, error) 37 | ``` 38 | 39 | Claim NFTs from this contract to the connect wallet. 40 | 41 | tokenId: the token ID of the NFT to claim 42 | 43 | quantity: the number of NFTs to claim 44 | 45 | returns: the transaction receipt of the claim 46 | 47 | ### func \(\*EditionDrop\) [ClaimTo]() 48 | 49 | ```go 50 | func (drop *EditionDrop) ClaimTo(ctx context.Context, destinationAddress string, tokenId int, quantity int) (*types.Transaction, error) 51 | ``` 52 | 53 | Claim NFTs from this contract to the connect wallet. 54 | 55 | tokenId: the token ID of the NFT to claim 56 | 57 | destinationAddress: the address of the wallet to claim the NFTs to 58 | 59 | quantity: the number of NFTs to claim 60 | 61 | returns: the transaction receipt of the claim 62 | 63 | #### Example 64 | 65 | ``` 66 | address = "{{wallet_address}}" 67 | tokenId = 0 68 | quantity = 1 69 | 70 | tx, err := contract.ClaimTo(context.Background(), address, tokenId, quantity) 71 | ``` 72 | 73 | ### func \(\*EditionDrop\) [CreateBatch]() 74 | 75 | ```go 76 | func (drop *EditionDrop) CreateBatch(ctx context.Context, metadatas []*NFTMetadataInput) (*types.Transaction, error) 77 | ``` 78 | 79 | Create a batch of NFTs on this contract. 80 | 81 | metadatas: a list of the metadatas of the NFTs to create 82 | 83 | returns: the transaction receipt of the batch creation 84 | 85 | #### Example 86 | 87 | ``` 88 | image0, err := os.Open("path/to/image/0.jpg") 89 | defer image0.Close() 90 | 91 | image1, err := os.Open("path/to/image/1.jpg") 92 | defer image1.Close() 93 | 94 | metadatasWithSupply := []*thirdweb.EditionMetadataInput{ 95 | &thirdweb.EditionMetadataInput{ 96 | Metadata: &thirdweb.NFTMetadataInput{ 97 | Name: "Cool NFT", 98 | Description: "This is a cool NFT", 99 | Image: image0, 100 | }, 101 | Supply: 100, 102 | }, 103 | &thirdweb.EditionMetadataInput{ 104 | Metadata: &thirdweb.NFTMetadataInput{ 105 | Name: "Cool NFT", 106 | Description: "This is a cool NFT", 107 | Image: image1, 108 | }, 109 | Supply: 100, 110 | }, 111 | } 112 | 113 | tx, err := contract.MintBatchTo(context.Background(), "{{wallet_address}}", metadatasWithSupply) 114 | ``` 115 | -------------------------------------------------------------------------------- /docs/edition_drop_claim_conditions.md: -------------------------------------------------------------------------------- 1 | 2 | ## Edition Drop 3 | 4 | This interface is currently accessible from the Edition Drop contract contract type via the ClaimConditions property. 5 | 6 | ```go 7 | type EditionDropClaimConditions struct {} 8 | ``` 9 | 10 | ### func \(\*EditionDropClaimConditions\) [GetActive]() 11 | 12 | ```go 13 | func (claim *EditionDropClaimConditions) GetActive(ctx context.Context, tokenId int) (*ClaimConditionOutput, error) 14 | ``` 15 | 16 | #### Get the currently active claim condition for a given token 17 | 18 | tokenId: the token ID of the token to get the active claim condition for 19 | 20 | returns: the currently active claim condition metadata 21 | 22 | #### Example 23 | 24 | ``` 25 | tokenId := 0 26 | condition, err := contract.ClaimConditions.GetActive(context.Background(), tokenId) 27 | 28 | // Now you have access to all the claim condition metadata 29 | fmt.Println("Start Time:", condition.StartTime) 30 | fmt.Println("Available:", condition.AvailableSupply) 31 | fmt.Println("Quantity:", condition.MaxQuantity) 32 | fmt.Println("Quantity Limit:", condition.QuantityLimitPerTransaction) 33 | fmt.Println("Price:", condition.Price) 34 | fmt.Println("Wait In Seconds", condition.WaitInSeconds) 35 | ``` 36 | 37 | ### func \(\*EditionDropClaimConditions\) [GetAll]() 38 | 39 | ```go 40 | func (claim *EditionDropClaimConditions) GetAll(ctx context.Context, tokenId int) ([]*ClaimConditionOutput, error) 41 | ``` 42 | 43 | #### Get all claim conditions on this contract for a given token 44 | 45 | tokenId: the token ID of the token to get the claim conditions for 46 | 47 | returns: the metadata for all the claim conditions on this contract 48 | 49 | #### Example 50 | 51 | ``` 52 | tokenId := 0 53 | conditions, err := contract.ClaimConditions.GetAll(context.Background(), tokenId) 54 | 55 | // Now you have access to all the claim condition metadata 56 | condition := conditions[0] 57 | fmt.Println("Start Time:", condition.StartTime) 58 | fmt.Println("Available:", condition.AvailableSupply) 59 | fmt.Println("Quantity:", condition.MaxQuantity) 60 | fmt.Println("Quantity Limit:", condition.QuantityLimitPerTransaction) 61 | fmt.Println("Price:", condition.Price) 62 | fmt.Println("Wait In Seconds", condition.WaitInSeconds) 63 | ``` 64 | 65 | ### func \(\*EditionDropClaimConditions\) [GetMerkleMetadata]() 66 | 67 | ```go 68 | func (claim *EditionDropClaimConditions) GetMerkleMetadata(ctx context.Context) (*map[string]string, error) 69 | ``` 70 | -------------------------------------------------------------------------------- /docs/nft_drop_claim_conditions.md: -------------------------------------------------------------------------------- 1 | 2 | ## NFT Drop Claim Conditions 3 | 4 | This interface is currently accessible from the NFT Drop contract contract type via the ClaimConditions property. 5 | 6 | ```go 7 | type NFTDropClaimConditions struct {} 8 | ``` 9 | 10 | ### func \(\*NFTDropClaimConditions\) [Get]() 11 | 12 | ```go 13 | func (claim *NFTDropClaimConditions) Get(ctx context.Context, claimConditionId int) (*ClaimConditionOutput, error) 14 | ``` 15 | 16 | ### func \(\*NFTDropClaimConditions\) [GetActive]() 17 | 18 | ```go 19 | func (claim *NFTDropClaimConditions) GetActive(ctx context.Context) (*ClaimConditionOutput, error) 20 | ``` 21 | 22 | #### Get the currently active claim condition 23 | 24 | returns: the currently active claim condition metadata 25 | 26 | #### Example 27 | 28 | ``` 29 | condition, err := contract.ClaimConditions.GetActive() 30 | 31 | // Now you have access to all the claim condition metadata 32 | fmt.Println("Start Time:", condition.StartTime) 33 | fmt.Println("Available:", condition.AvailableSupply) 34 | fmt.Println("Quantity:", condition.MaxQuantity) 35 | fmt.Println("Quantity Limit:", condition.QuantityLimitPerTransaction) 36 | fmt.Println("Price:", condition.Price) 37 | fmt.Println("Wait In Seconds", condition.WaitInSeconds) 38 | ``` 39 | 40 | ### func \(\*NFTDropClaimConditions\) [GetAll]() 41 | 42 | ```go 43 | func (claim *NFTDropClaimConditions) GetAll(ctx context.Context) ([]*ClaimConditionOutput, error) 44 | ``` 45 | 46 | #### Get all claim conditions on this contract 47 | 48 | returns: the metadata for all the claim conditions on this contract 49 | 50 | #### Example 51 | 52 | ``` 53 | conditions, err := contract.ClaimConditions.GetAll() 54 | 55 | // Now you have access to all the claim condition metadata 56 | condition := conditions[0] 57 | fmt.Println("Start Time:", condition.StartTime) 58 | fmt.Println("Available:", condition.AvailableSupply) 59 | fmt.Println("Quantity:", condition.MaxQuantity) 60 | fmt.Println("Quantity Limit:", condition.QuantityLimitPerTransaction) 61 | fmt.Println("Price:", condition.Price) 62 | fmt.Println("Wait In Seconds", condition.WaitInSeconds) 63 | ``` 64 | 65 | ### func \(\*NFTDropClaimConditions\) [GetClaimerProofs]() 66 | 67 | ```go 68 | func (claim *NFTDropClaimConditions) GetClaimerProofs(ctx context.Context, claimerAddress string) (*SnapshotEntryWithProof, error) 69 | ``` 70 | -------------------------------------------------------------------------------- /docs/nft_drop_encoder.md: -------------------------------------------------------------------------------- 1 | 2 | ## NFT Drop Encoder 3 | 4 | The nft drop encoder class is used to get the unsigned transaction data for nft drop contract contract calls that can be signed at a later time after generation. 5 | 6 | It can be accessed from the SDK through the \`Encoder\` namespace of the nft drop contract: 7 | 8 | You can access the NFTDrop interface from the SDK as follows: 9 | 10 | ``` 11 | import ( 12 | "github.com/thirdweb-dev/go-sdk/v2/thirdweb" 13 | ) 14 | 15 | privateKey := "..." 16 | secretKey := "..." 17 | 18 | sdk, err := thirdweb.NewThirdwebSDK("mumbai", &thirdweb.SDKOptions{ 19 | PrivateKey: privateKey, 20 | SecretKey: secretKey 21 | }) 22 | 23 | contract, err := sdk.GetNFTDrop("{{contract_address}}") 24 | 25 | // Now the encoder can be accessed from the contract 26 | contract.Encoder.ClaimTo(...) 27 | ``` 28 | 29 | ```go 30 | type NFTDropEncoder struct { 31 | *ContractEncoder 32 | } 33 | ``` 34 | 35 | ### func \(\*NFTDropEncoder\) [ApproveClaimTo]() 36 | 37 | ```go 38 | func (encoder *NFTDropEncoder) ApproveClaimTo(ctx context.Context, signerAddress string, quantity int) (*types.Transaction, error) 39 | ``` 40 | 41 | Get the data for the transaction data required to approve the ERC20 token transfers necessary to claim NFTs from this contract. 42 | 43 | signerAddress: the address intended to sign the transaction 44 | 45 | destinationAddress: the address of the wallet to claim the NFTs to 46 | 47 | quantity: the number of NFTs to claim 48 | 49 | returns: the transaction data of the token approval for the claim 50 | 51 | #### Example 52 | 53 | ``` 54 | // Address of the wallet we expect to sign this message 55 | signerAddress := "0x..." 56 | // Number of NFTs to claim 57 | quantity = 1 58 | 59 | tx, err := contract.Encoder.ApproveClaimTo(context.Background(), signerAddress, quantity) 60 | 61 | // Now you can get all the standard transaction data as needed 62 | fmt.Println(tx.Data()) // Ex: get the data field or the nonce field (others are available) 63 | fmt.Println(tx.Nonce()) 64 | ``` 65 | 66 | ### func \(\*NFTDropEncoder\) [ClaimTo]() 67 | 68 | ```go 69 | func (encoder *NFTDropEncoder) ClaimTo(ctx context.Context, signerAddress string, destinationAddress string, quantity int) (*types.Transaction, error) 70 | ``` 71 | 72 | Get the data for the transaction required to claim NFTs from this contract. 73 | 74 | signerAddress: the address intended to sign the transaction 75 | 76 | destinationAddress: the address of the wallet to claim the NFTs to 77 | 78 | quantity: the number of NFTs to claim 79 | 80 | returns: the transaction data of the claim 81 | 82 | #### Example 83 | 84 | ``` 85 | // Address of the wallet we expect to sign this message 86 | signerAddress := "0x..." 87 | // Address of the wallet we want to claim the NFTs to 88 | destinationAddress := "{{wallet_address}}" 89 | // Number of NFTs to claim 90 | quantity = 1 91 | 92 | tx, err := contract.Encoder.ClaimTo(context.Background(), signerAddress, destinationAddress, quantity) 93 | 94 | // Now you can get all the standard transaction data as needed 95 | fmt.Println(tx.Data()) // Ex: get the data field or the nonce field (others are available) 96 | fmt.Println(tx.Nonce()) 97 | ``` 98 | -------------------------------------------------------------------------------- /docs/provider.md: -------------------------------------------------------------------------------- 1 | 2 | ## Provider 3 | 4 | ```go 5 | type ProviderHandler struct {} 6 | ``` 7 | 8 | ### func [NewProviderHandler]() 9 | 10 | ```go 11 | func NewProviderHandler(provider *ethclient.Client, privateKey string) (*ProviderHandler, error) 12 | ``` 13 | 14 | ### func \(\*ProviderHandler\) [GetChainID]() 15 | 16 | ```go 17 | func (handler *ProviderHandler) GetChainID(ctx context.Context) (*big.Int, error) 18 | ``` 19 | 20 | ### func \(\*ProviderHandler\) [GetPrivateKey]() 21 | 22 | ```go 23 | func (handler *ProviderHandler) GetPrivateKey() *ecdsa.PrivateKey 24 | ``` 25 | 26 | ### func \(\*ProviderHandler\) [GetProvider]() 27 | 28 | ```go 29 | func (handler *ProviderHandler) GetProvider() *ethclient.Client 30 | ``` 31 | 32 | ### func \(\*ProviderHandler\) [GetRawPrivateKey]() 33 | 34 | ```go 35 | func (handler *ProviderHandler) GetRawPrivateKey() string 36 | ``` 37 | 38 | ### func \(\*ProviderHandler\) [GetSignerAddress]() 39 | 40 | ```go 41 | func (handler *ProviderHandler) GetSignerAddress() common.Address 42 | ``` 43 | 44 | ### func \(\*ProviderHandler\) [UpdatePrivateKey]() 45 | 46 | ```go 47 | func (handler *ProviderHandler) UpdatePrivateKey(privateKey string) error 48 | ``` 49 | 50 | ### func \(\*ProviderHandler\) [UpdateProvider]() 51 | 52 | ```go 53 | func (handler *ProviderHandler) UpdateProvider(provider *ethclient.Client) 54 | ``` 55 | -------------------------------------------------------------------------------- /docs/storage.md: -------------------------------------------------------------------------------- 1 | 2 | ## IPFS Storage 3 | 4 | ```go 5 | type IpfsStorage struct {} 6 | ``` 7 | 8 | ### func \(\*IpfsStorage\) [Get]() 9 | 10 | ```go 11 | func (ipfs *IpfsStorage) Get(ctx context.Context, uri string) ([]byte, error) 12 | ``` 13 | 14 | #### Get 15 | 16 | \# Get IPFS data at a given hash and return it as byte data 17 | 18 | uri: the IPFS URI to fetch data from 19 | 20 | returns: byte data of the IPFS data at the URI 21 | 22 | ### func \(\*IpfsStorage\) [Upload]() 23 | 24 | ```go 25 | func (ipfs *IpfsStorage) Upload(ctx context.Context, data map[string]interface{}, contractAddress string, signerAddress string) (string, error) 26 | ``` 27 | 28 | #### Upload 29 | 30 | Upload method can be used to upload a generic payload to IPFS. 31 | 32 | data: the individual data to upload to IPFS 33 | 34 | contractAddress: the optional contractAddress upload is being called from 35 | 36 | signerAddress: the optional signerAddress upload is being called from 37 | 38 | returns: the URI of the IPFS upload 39 | 40 | ### func \(\*IpfsStorage\) [UploadBatch]() 41 | 42 | ```go 43 | func (ipfs *IpfsStorage) UploadBatch(ctx context.Context, data []map[string]interface{}, fileStartNumber int, contractAddress string, signerAddress string) (*baseUriWithUris, error) 44 | ``` 45 | 46 | #### UploadBatch 47 | 48 | UploadBatch method can be used to upload a batch of generic payloads to IPFS. 49 | 50 | data: the array of data to upload to IPFS 51 | 52 | contractAddress: the optional contractAddress upload is being called from 53 | 54 | signerAddress: the optional signerAddress upload is being called from 55 | 56 | returns: the base URI of the IPFS upload folder with the URIs of each subfile 57 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/thirdweb-dev/go-sdk/v2 2 | 3 | go 1.16 4 | 5 | require ( 6 | github.com/ethereum/go-ethereum v1.10.15 7 | github.com/spf13/cobra v1.4.0 8 | github.com/spf13/viper v1.11.0 9 | ) 10 | 11 | require ( 12 | github.com/btcsuite/btcd v0.22.0-beta // indirect 13 | github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce 14 | github.com/cbergoon/merkletree v0.2.0 15 | github.com/fsnotify/fsnotify v1.5.4 // indirect 16 | github.com/fxamacker/cbor v1.5.1 17 | github.com/go-stack/stack v1.8.1 // indirect 18 | github.com/google/uuid v1.3.0 19 | github.com/gorilla/websocket v1.5.0 // indirect 20 | github.com/imdario/mergo v0.3.13 21 | github.com/mattn/go-runewidth v0.0.12 // indirect 22 | github.com/miguelmota/go-solidity-sha3 v0.1.1 23 | github.com/mitchellh/mapstructure v1.5.0 24 | github.com/pelletier/go-toml v1.9.5 // indirect 25 | github.com/rivo/uniseg v0.2.0 // indirect 26 | github.com/rjeczalik/notify v0.9.2 // indirect 27 | github.com/shirou/gopsutil v3.21.11+incompatible // indirect 28 | github.com/shopspring/decimal v1.3.1 29 | github.com/spf13/cast v1.5.0 // indirect 30 | github.com/stretchr/testify v1.7.1 31 | github.com/tklauser/go-sysconf v0.3.10 // indirect 32 | github.com/tklauser/numcpus v0.5.0 // indirect 33 | github.com/yusufpapurcu/wmi v1.2.2 // indirect 34 | golang.org/x/crypto v0.0.0-20220516162934-403b01795ae8 35 | golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 // indirect 36 | golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a // indirect 37 | ) 38 | -------------------------------------------------------------------------------- /hardhat.config.js: -------------------------------------------------------------------------------- 1 | 2 | // Do not modify the existing settings 3 | module.exports = { 4 | networks: { 5 | hardhat: { 6 | forking: { 7 | url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.SDK_ALCHEMY_KEY}`, 8 | }, 9 | chainId: 1, 10 | initialBaseFeePerGas: 0, // Allow 0 gas fees when testing 11 | throwOnTransactionFailures: true, // Brownie expects transactions to throw on revert 12 | throwOnCallFailures: true, // Brownie expects calls to throw on failure 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /internal/json/AppURI.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": false, 7 | "internalType": "string", 8 | "name": "prevURI", 9 | "type": "string" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "string", 14 | "name": "newURI", 15 | "type": "string" 16 | } 17 | ], 18 | "name": "AppURIUpdated", 19 | "type": "event" 20 | }, 21 | { 22 | "inputs": [], 23 | "name": "appURI", 24 | "outputs": [ 25 | { 26 | "internalType": "string", 27 | "name": "", 28 | "type": "string" 29 | } 30 | ], 31 | "stateMutability": "view", 32 | "type": "function" 33 | }, 34 | { 35 | "inputs": [ 36 | { 37 | "internalType": "string", 38 | "name": "_uri", 39 | "type": "string" 40 | } 41 | ], 42 | "name": "setAppURI", 43 | "outputs": [], 44 | "stateMutability": "nonpayable", 45 | "type": "function" 46 | } 47 | ] -------------------------------------------------------------------------------- /internal/json/BatchMintMetadata.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "getBaseURICount", 5 | "outputs": [ 6 | { 7 | "internalType": "uint256", 8 | "name": "", 9 | "type": "uint256" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | }, 15 | { 16 | "inputs": [ 17 | { 18 | "internalType": "uint256", 19 | "name": "_index", 20 | "type": "uint256" 21 | } 22 | ], 23 | "name": "getBatchIdAtIndex", 24 | "outputs": [ 25 | { 26 | "internalType": "uint256", 27 | "name": "", 28 | "type": "uint256" 29 | } 30 | ], 31 | "stateMutability": "view", 32 | "type": "function" 33 | } 34 | ] -------------------------------------------------------------------------------- /internal/json/Context.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/ContractMetadata.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": false, 7 | "internalType": "string", 8 | "name": "prevURI", 9 | "type": "string" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "string", 14 | "name": "newURI", 15 | "type": "string" 16 | } 17 | ], 18 | "name": "ContractURIUpdated", 19 | "type": "event" 20 | }, 21 | { 22 | "inputs": [], 23 | "name": "contractURI", 24 | "outputs": [ 25 | { 26 | "internalType": "string", 27 | "name": "", 28 | "type": "string" 29 | } 30 | ], 31 | "stateMutability": "view", 32 | "type": "function" 33 | }, 34 | { 35 | "inputs": [ 36 | { 37 | "internalType": "string", 38 | "name": "_uri", 39 | "type": "string" 40 | } 41 | ], 42 | "name": "setContractURI", 43 | "outputs": [], 44 | "stateMutability": "nonpayable", 45 | "type": "function" 46 | } 47 | ] -------------------------------------------------------------------------------- /internal/json/ContractMetadataLogic.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": false, 7 | "internalType": "string", 8 | "name": "prevURI", 9 | "type": "string" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "string", 14 | "name": "newURI", 15 | "type": "string" 16 | } 17 | ], 18 | "name": "ContractURIUpdated", 19 | "type": "event" 20 | }, 21 | { 22 | "inputs": [], 23 | "name": "contractURI", 24 | "outputs": [ 25 | { 26 | "internalType": "string", 27 | "name": "", 28 | "type": "string" 29 | } 30 | ], 31 | "stateMutability": "view", 32 | "type": "function" 33 | }, 34 | { 35 | "inputs": [ 36 | { 37 | "internalType": "string", 38 | "name": "_uri", 39 | "type": "string" 40 | } 41 | ], 42 | "name": "setContractURI", 43 | "outputs": [], 44 | "stateMutability": "nonpayable", 45 | "type": "function" 46 | } 47 | ] -------------------------------------------------------------------------------- /internal/json/ContractMetadataStorage.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "CONTRACT_METADATA_STORAGE_POSITION", 5 | "outputs": [ 6 | { 7 | "internalType": "bytes32", 8 | "name": "", 9 | "type": "bytes32" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/Counters.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/CurrencyTransferLib.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "NATIVE_TOKEN", 5 | "outputs": [ 6 | { 7 | "internalType": "address", 8 | "name": "", 9 | "type": "address" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/DefaultOperatorFilterer.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "operator", 7 | "type": "address" 8 | } 9 | ], 10 | "name": "OperatorNotAllowed", 11 | "type": "error" 12 | }, 13 | { 14 | "anonymous": false, 15 | "inputs": [ 16 | { 17 | "indexed": false, 18 | "internalType": "bool", 19 | "name": "restriction", 20 | "type": "bool" 21 | } 22 | ], 23 | "name": "OperatorRestriction", 24 | "type": "event" 25 | }, 26 | { 27 | "inputs": [], 28 | "name": "OPERATOR_FILTER_REGISTRY", 29 | "outputs": [ 30 | { 31 | "internalType": "contract IOperatorFilterRegistry", 32 | "name": "", 33 | "type": "address" 34 | } 35 | ], 36 | "stateMutability": "view", 37 | "type": "function" 38 | }, 39 | { 40 | "inputs": [], 41 | "name": "operatorRestriction", 42 | "outputs": [ 43 | { 44 | "internalType": "bool", 45 | "name": "", 46 | "type": "bool" 47 | } 48 | ], 49 | "stateMutability": "view", 50 | "type": "function" 51 | }, 52 | { 53 | "inputs": [ 54 | { 55 | "internalType": "bool", 56 | "name": "_restriction", 57 | "type": "bool" 58 | } 59 | ], 60 | "name": "setOperatorRestriction", 61 | "outputs": [], 62 | "stateMutability": "nonpayable", 63 | "type": "function" 64 | } 65 | ] -------------------------------------------------------------------------------- /internal/json/DefaultOperatorFiltererUpgradeable.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "operator", 7 | "type": "address" 8 | } 9 | ], 10 | "name": "OperatorNotAllowed", 11 | "type": "error" 12 | }, 13 | { 14 | "anonymous": false, 15 | "inputs": [ 16 | { 17 | "indexed": false, 18 | "internalType": "bool", 19 | "name": "restriction", 20 | "type": "bool" 21 | } 22 | ], 23 | "name": "OperatorRestriction", 24 | "type": "event" 25 | }, 26 | { 27 | "inputs": [], 28 | "name": "operatorRestriction", 29 | "outputs": [ 30 | { 31 | "internalType": "bool", 32 | "name": "", 33 | "type": "bool" 34 | } 35 | ], 36 | "stateMutability": "view", 37 | "type": "function" 38 | }, 39 | { 40 | "inputs": [ 41 | { 42 | "internalType": "bool", 43 | "name": "_restriction", 44 | "type": "bool" 45 | } 46 | ], 47 | "name": "setOperatorRestriction", 48 | "outputs": [], 49 | "stateMutability": "nonpayable", 50 | "type": "function" 51 | } 52 | ] -------------------------------------------------------------------------------- /internal/json/DelayedReveal.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "uint256", 8 | "name": "index", 9 | "type": "uint256" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "string", 14 | "name": "revealedURI", 15 | "type": "string" 16 | } 17 | ], 18 | "name": "TokenURIRevealed", 19 | "type": "event" 20 | }, 21 | { 22 | "inputs": [ 23 | { 24 | "internalType": "bytes", 25 | "name": "data", 26 | "type": "bytes" 27 | }, 28 | { 29 | "internalType": "bytes", 30 | "name": "key", 31 | "type": "bytes" 32 | } 33 | ], 34 | "name": "encryptDecrypt", 35 | "outputs": [ 36 | { 37 | "internalType": "bytes", 38 | "name": "result", 39 | "type": "bytes" 40 | } 41 | ], 42 | "stateMutability": "pure", 43 | "type": "function" 44 | }, 45 | { 46 | "inputs": [ 47 | { 48 | "internalType": "uint256", 49 | "name": "", 50 | "type": "uint256" 51 | } 52 | ], 53 | "name": "encryptedData", 54 | "outputs": [ 55 | { 56 | "internalType": "bytes", 57 | "name": "", 58 | "type": "bytes" 59 | } 60 | ], 61 | "stateMutability": "view", 62 | "type": "function" 63 | }, 64 | { 65 | "inputs": [ 66 | { 67 | "internalType": "uint256", 68 | "name": "_batchId", 69 | "type": "uint256" 70 | }, 71 | { 72 | "internalType": "bytes", 73 | "name": "_key", 74 | "type": "bytes" 75 | } 76 | ], 77 | "name": "getRevealURI", 78 | "outputs": [ 79 | { 80 | "internalType": "string", 81 | "name": "revealedURI", 82 | "type": "string" 83 | } 84 | ], 85 | "stateMutability": "view", 86 | "type": "function" 87 | }, 88 | { 89 | "inputs": [ 90 | { 91 | "internalType": "uint256", 92 | "name": "_batchId", 93 | "type": "uint256" 94 | } 95 | ], 96 | "name": "isEncryptedBatch", 97 | "outputs": [ 98 | { 99 | "internalType": "bool", 100 | "name": "", 101 | "type": "bool" 102 | } 103 | ], 104 | "stateMutability": "view", 105 | "type": "function" 106 | }, 107 | { 108 | "inputs": [ 109 | { 110 | "internalType": "uint256", 111 | "name": "identifier", 112 | "type": "uint256" 113 | }, 114 | { 115 | "internalType": "bytes", 116 | "name": "key", 117 | "type": "bytes" 118 | } 119 | ], 120 | "name": "reveal", 121 | "outputs": [ 122 | { 123 | "internalType": "string", 124 | "name": "revealedURI", 125 | "type": "string" 126 | } 127 | ], 128 | "stateMutability": "nonpayable", 129 | "type": "function" 130 | } 131 | ] -------------------------------------------------------------------------------- /internal/json/DirectListingsStorage.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "DIRECT_LISTINGS_STORAGE_POSITION", 5 | "outputs": [ 6 | { 7 | "internalType": "bytes32", 8 | "name": "", 9 | "type": "bytes32" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/ECDSA.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/EIP712.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/EIP712ChainlessDomain.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/ERC1155Holder.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "", 7 | "type": "address" 8 | }, 9 | { 10 | "internalType": "address", 11 | "name": "", 12 | "type": "address" 13 | }, 14 | { 15 | "internalType": "uint256[]", 16 | "name": "", 17 | "type": "uint256[]" 18 | }, 19 | { 20 | "internalType": "uint256[]", 21 | "name": "", 22 | "type": "uint256[]" 23 | }, 24 | { 25 | "internalType": "bytes", 26 | "name": "", 27 | "type": "bytes" 28 | } 29 | ], 30 | "name": "onERC1155BatchReceived", 31 | "outputs": [ 32 | { 33 | "internalType": "bytes4", 34 | "name": "", 35 | "type": "bytes4" 36 | } 37 | ], 38 | "stateMutability": "nonpayable", 39 | "type": "function" 40 | }, 41 | { 42 | "inputs": [ 43 | { 44 | "internalType": "address", 45 | "name": "", 46 | "type": "address" 47 | }, 48 | { 49 | "internalType": "address", 50 | "name": "", 51 | "type": "address" 52 | }, 53 | { 54 | "internalType": "uint256", 55 | "name": "", 56 | "type": "uint256" 57 | }, 58 | { 59 | "internalType": "uint256", 60 | "name": "", 61 | "type": "uint256" 62 | }, 63 | { 64 | "internalType": "bytes", 65 | "name": "", 66 | "type": "bytes" 67 | } 68 | ], 69 | "name": "onERC1155Received", 70 | "outputs": [ 71 | { 72 | "internalType": "bytes4", 73 | "name": "", 74 | "type": "bytes4" 75 | } 76 | ], 77 | "stateMutability": "nonpayable", 78 | "type": "function" 79 | }, 80 | { 81 | "inputs": [ 82 | { 83 | "internalType": "bytes4", 84 | "name": "interfaceId", 85 | "type": "bytes4" 86 | } 87 | ], 88 | "name": "supportsInterface", 89 | "outputs": [ 90 | { 91 | "internalType": "bool", 92 | "name": "", 93 | "type": "bool" 94 | } 95 | ], 96 | "stateMutability": "view", 97 | "type": "function" 98 | } 99 | ] -------------------------------------------------------------------------------- /internal/json/ERC1155Receiver.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "operator", 7 | "type": "address" 8 | }, 9 | { 10 | "internalType": "address", 11 | "name": "from", 12 | "type": "address" 13 | }, 14 | { 15 | "internalType": "uint256[]", 16 | "name": "ids", 17 | "type": "uint256[]" 18 | }, 19 | { 20 | "internalType": "uint256[]", 21 | "name": "values", 22 | "type": "uint256[]" 23 | }, 24 | { 25 | "internalType": "bytes", 26 | "name": "data", 27 | "type": "bytes" 28 | } 29 | ], 30 | "name": "onERC1155BatchReceived", 31 | "outputs": [ 32 | { 33 | "internalType": "bytes4", 34 | "name": "", 35 | "type": "bytes4" 36 | } 37 | ], 38 | "stateMutability": "nonpayable", 39 | "type": "function" 40 | }, 41 | { 42 | "inputs": [ 43 | { 44 | "internalType": "address", 45 | "name": "operator", 46 | "type": "address" 47 | }, 48 | { 49 | "internalType": "address", 50 | "name": "from", 51 | "type": "address" 52 | }, 53 | { 54 | "internalType": "uint256", 55 | "name": "id", 56 | "type": "uint256" 57 | }, 58 | { 59 | "internalType": "uint256", 60 | "name": "value", 61 | "type": "uint256" 62 | }, 63 | { 64 | "internalType": "bytes", 65 | "name": "data", 66 | "type": "bytes" 67 | } 68 | ], 69 | "name": "onERC1155Received", 70 | "outputs": [ 71 | { 72 | "internalType": "bytes4", 73 | "name": "", 74 | "type": "bytes4" 75 | } 76 | ], 77 | "stateMutability": "nonpayable", 78 | "type": "function" 79 | }, 80 | { 81 | "inputs": [ 82 | { 83 | "internalType": "bytes4", 84 | "name": "interfaceId", 85 | "type": "bytes4" 86 | } 87 | ], 88 | "name": "supportsInterface", 89 | "outputs": [ 90 | { 91 | "internalType": "bool", 92 | "name": "", 93 | "type": "bool" 94 | } 95 | ], 96 | "stateMutability": "view", 97 | "type": "function" 98 | } 99 | ] -------------------------------------------------------------------------------- /internal/json/ERC165.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "bytes4", 6 | "name": "interfaceId", 7 | "type": "bytes4" 8 | } 9 | ], 10 | "name": "supportsInterface", 11 | "outputs": [ 12 | { 13 | "internalType": "bool", 14 | "name": "", 15 | "type": "bool" 16 | } 17 | ], 18 | "stateMutability": "view", 19 | "type": "function" 20 | } 21 | ] -------------------------------------------------------------------------------- /internal/json/ERC1967Proxy.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "_logic", 7 | "type": "address" 8 | }, 9 | { 10 | "internalType": "bytes", 11 | "name": "_data", 12 | "type": "bytes" 13 | } 14 | ], 15 | "stateMutability": "payable", 16 | "type": "constructor" 17 | }, 18 | { 19 | "anonymous": false, 20 | "inputs": [ 21 | { 22 | "indexed": false, 23 | "internalType": "address", 24 | "name": "previousAdmin", 25 | "type": "address" 26 | }, 27 | { 28 | "indexed": false, 29 | "internalType": "address", 30 | "name": "newAdmin", 31 | "type": "address" 32 | } 33 | ], 34 | "name": "AdminChanged", 35 | "type": "event" 36 | }, 37 | { 38 | "anonymous": false, 39 | "inputs": [ 40 | { 41 | "indexed": true, 42 | "internalType": "address", 43 | "name": "beacon", 44 | "type": "address" 45 | } 46 | ], 47 | "name": "BeaconUpgraded", 48 | "type": "event" 49 | }, 50 | { 51 | "anonymous": false, 52 | "inputs": [ 53 | { 54 | "indexed": true, 55 | "internalType": "address", 56 | "name": "implementation", 57 | "type": "address" 58 | } 59 | ], 60 | "name": "Upgraded", 61 | "type": "event" 62 | }, 63 | { 64 | "stateMutability": "payable", 65 | "type": "fallback" 66 | }, 67 | { 68 | "stateMutability": "payable", 69 | "type": "receive" 70 | } 71 | ] -------------------------------------------------------------------------------- /internal/json/ERC1967Upgrade.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": false, 7 | "internalType": "address", 8 | "name": "previousAdmin", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "address", 14 | "name": "newAdmin", 15 | "type": "address" 16 | } 17 | ], 18 | "name": "AdminChanged", 19 | "type": "event" 20 | }, 21 | { 22 | "anonymous": false, 23 | "inputs": [ 24 | { 25 | "indexed": true, 26 | "internalType": "address", 27 | "name": "beacon", 28 | "type": "address" 29 | } 30 | ], 31 | "name": "BeaconUpgraded", 32 | "type": "event" 33 | }, 34 | { 35 | "anonymous": false, 36 | "inputs": [ 37 | { 38 | "indexed": true, 39 | "internalType": "address", 40 | "name": "implementation", 41 | "type": "address" 42 | } 43 | ], 44 | "name": "Upgraded", 45 | "type": "event" 46 | } 47 | ] -------------------------------------------------------------------------------- /internal/json/ERC2771Context.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "forwarder", 7 | "type": "address" 8 | } 9 | ], 10 | "name": "isTrustedForwarder", 11 | "outputs": [ 12 | { 13 | "internalType": "bool", 14 | "name": "", 15 | "type": "bool" 16 | } 17 | ], 18 | "stateMutability": "view", 19 | "type": "function" 20 | } 21 | ] -------------------------------------------------------------------------------- /internal/json/ERC2771ContextConsumer.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "_msgData", 5 | "outputs": [ 6 | { 7 | "internalType": "bytes", 8 | "name": "", 9 | "type": "bytes" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | }, 15 | { 16 | "inputs": [], 17 | "name": "_msgSender", 18 | "outputs": [ 19 | { 20 | "internalType": "address", 21 | "name": "sender", 22 | "type": "address" 23 | } 24 | ], 25 | "stateMutability": "view", 26 | "type": "function" 27 | } 28 | ] -------------------------------------------------------------------------------- /internal/json/ERC2771ContextLogic.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "forwarder", 7 | "type": "address" 8 | } 9 | ], 10 | "name": "isTrustedForwarder", 11 | "outputs": [ 12 | { 13 | "internalType": "bool", 14 | "name": "", 15 | "type": "bool" 16 | } 17 | ], 18 | "stateMutability": "view", 19 | "type": "function" 20 | } 21 | ] -------------------------------------------------------------------------------- /internal/json/ERC2771ContextStorage.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "ERC2771_CONTEXT_STORAGE_POSITION", 5 | "outputs": [ 6 | { 7 | "internalType": "bytes32", 8 | "name": "", 9 | "type": "bytes32" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/ERC2771ContextUpgradeable.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": false, 7 | "internalType": "uint8", 8 | "name": "version", 9 | "type": "uint8" 10 | } 11 | ], 12 | "name": "Initialized", 13 | "type": "event" 14 | }, 15 | { 16 | "inputs": [ 17 | { 18 | "internalType": "address", 19 | "name": "forwarder", 20 | "type": "address" 21 | } 22 | ], 23 | "name": "isTrustedForwarder", 24 | "outputs": [ 25 | { 26 | "internalType": "bool", 27 | "name": "", 28 | "type": "bool" 29 | } 30 | ], 31 | "stateMutability": "view", 32 | "type": "function" 33 | } 34 | ] -------------------------------------------------------------------------------- /internal/json/ERC2771ContextUpgradeableLogic.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "forwarder", 7 | "type": "address" 8 | } 9 | ], 10 | "name": "isTrustedForwarder", 11 | "outputs": [ 12 | { 13 | "internalType": "bool", 14 | "name": "", 15 | "type": "bool" 16 | } 17 | ], 18 | "stateMutability": "view", 19 | "type": "function" 20 | } 21 | ] -------------------------------------------------------------------------------- /internal/json/ERC2771ContextUpgradeableStorage.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "ERC2771_CONTEXT_UPGRADEABLE_STORAGE_POSITION", 5 | "outputs": [ 6 | { 7 | "internalType": "bytes32", 8 | "name": "", 9 | "type": "bytes32" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/ERC721Holder.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "", 7 | "type": "address" 8 | }, 9 | { 10 | "internalType": "address", 11 | "name": "", 12 | "type": "address" 13 | }, 14 | { 15 | "internalType": "uint256", 16 | "name": "", 17 | "type": "uint256" 18 | }, 19 | { 20 | "internalType": "bytes", 21 | "name": "", 22 | "type": "bytes" 23 | } 24 | ], 25 | "name": "onERC721Received", 26 | "outputs": [ 27 | { 28 | "internalType": "bytes4", 29 | "name": "", 30 | "type": "bytes4" 31 | } 32 | ], 33 | "stateMutability": "nonpayable", 34 | "type": "function" 35 | } 36 | ] -------------------------------------------------------------------------------- /internal/json/EnglishAuctionsStorage.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "ENGLISH_AUCTIONS_STORAGE_POSITION", 5 | "outputs": [ 6 | { 7 | "internalType": "bytes32", 8 | "name": "", 9 | "type": "bytes32" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/EnumerableSet.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/FeeType.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/Forwarder.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "stateMutability": "nonpayable", 5 | "type": "constructor" 6 | }, 7 | { 8 | "inputs": [ 9 | { 10 | "components": [ 11 | { 12 | "internalType": "address", 13 | "name": "from", 14 | "type": "address" 15 | }, 16 | { 17 | "internalType": "address", 18 | "name": "to", 19 | "type": "address" 20 | }, 21 | { 22 | "internalType": "uint256", 23 | "name": "value", 24 | "type": "uint256" 25 | }, 26 | { 27 | "internalType": "uint256", 28 | "name": "gas", 29 | "type": "uint256" 30 | }, 31 | { 32 | "internalType": "uint256", 33 | "name": "nonce", 34 | "type": "uint256" 35 | }, 36 | { 37 | "internalType": "bytes", 38 | "name": "data", 39 | "type": "bytes" 40 | } 41 | ], 42 | "internalType": "struct Forwarder.ForwardRequest", 43 | "name": "req", 44 | "type": "tuple" 45 | }, 46 | { 47 | "internalType": "bytes", 48 | "name": "signature", 49 | "type": "bytes" 50 | } 51 | ], 52 | "name": "execute", 53 | "outputs": [ 54 | { 55 | "internalType": "bool", 56 | "name": "", 57 | "type": "bool" 58 | }, 59 | { 60 | "internalType": "bytes", 61 | "name": "", 62 | "type": "bytes" 63 | } 64 | ], 65 | "stateMutability": "payable", 66 | "type": "function" 67 | }, 68 | { 69 | "inputs": [ 70 | { 71 | "internalType": "address", 72 | "name": "from", 73 | "type": "address" 74 | } 75 | ], 76 | "name": "getNonce", 77 | "outputs": [ 78 | { 79 | "internalType": "uint256", 80 | "name": "", 81 | "type": "uint256" 82 | } 83 | ], 84 | "stateMutability": "view", 85 | "type": "function" 86 | }, 87 | { 88 | "inputs": [ 89 | { 90 | "components": [ 91 | { 92 | "internalType": "address", 93 | "name": "from", 94 | "type": "address" 95 | }, 96 | { 97 | "internalType": "address", 98 | "name": "to", 99 | "type": "address" 100 | }, 101 | { 102 | "internalType": "uint256", 103 | "name": "value", 104 | "type": "uint256" 105 | }, 106 | { 107 | "internalType": "uint256", 108 | "name": "gas", 109 | "type": "uint256" 110 | }, 111 | { 112 | "internalType": "uint256", 113 | "name": "nonce", 114 | "type": "uint256" 115 | }, 116 | { 117 | "internalType": "bytes", 118 | "name": "data", 119 | "type": "bytes" 120 | } 121 | ], 122 | "internalType": "struct Forwarder.ForwardRequest", 123 | "name": "req", 124 | "type": "tuple" 125 | }, 126 | { 127 | "internalType": "bytes", 128 | "name": "signature", 129 | "type": "bytes" 130 | } 131 | ], 132 | "name": "verify", 133 | "outputs": [ 134 | { 135 | "internalType": "bool", 136 | "name": "", 137 | "type": "bool" 138 | } 139 | ], 140 | "stateMutability": "view", 141 | "type": "function" 142 | } 143 | ] -------------------------------------------------------------------------------- /internal/json/ForwarderChainlessDomain.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "stateMutability": "nonpayable", 5 | "type": "constructor" 6 | }, 7 | { 8 | "inputs": [ 9 | { 10 | "components": [ 11 | { 12 | "internalType": "address", 13 | "name": "from", 14 | "type": "address" 15 | }, 16 | { 17 | "internalType": "address", 18 | "name": "to", 19 | "type": "address" 20 | }, 21 | { 22 | "internalType": "uint256", 23 | "name": "value", 24 | "type": "uint256" 25 | }, 26 | { 27 | "internalType": "uint256", 28 | "name": "gas", 29 | "type": "uint256" 30 | }, 31 | { 32 | "internalType": "uint256", 33 | "name": "nonce", 34 | "type": "uint256" 35 | }, 36 | { 37 | "internalType": "bytes", 38 | "name": "data", 39 | "type": "bytes" 40 | }, 41 | { 42 | "internalType": "uint256", 43 | "name": "chainid", 44 | "type": "uint256" 45 | } 46 | ], 47 | "internalType": "struct ForwarderChainlessDomain.ForwardRequest", 48 | "name": "req", 49 | "type": "tuple" 50 | }, 51 | { 52 | "internalType": "bytes", 53 | "name": "signature", 54 | "type": "bytes" 55 | } 56 | ], 57 | "name": "execute", 58 | "outputs": [ 59 | { 60 | "internalType": "bool", 61 | "name": "", 62 | "type": "bool" 63 | }, 64 | { 65 | "internalType": "bytes", 66 | "name": "", 67 | "type": "bytes" 68 | } 69 | ], 70 | "stateMutability": "payable", 71 | "type": "function" 72 | }, 73 | { 74 | "inputs": [ 75 | { 76 | "internalType": "address", 77 | "name": "from", 78 | "type": "address" 79 | } 80 | ], 81 | "name": "getNonce", 82 | "outputs": [ 83 | { 84 | "internalType": "uint256", 85 | "name": "", 86 | "type": "uint256" 87 | } 88 | ], 89 | "stateMutability": "view", 90 | "type": "function" 91 | }, 92 | { 93 | "inputs": [ 94 | { 95 | "components": [ 96 | { 97 | "internalType": "address", 98 | "name": "from", 99 | "type": "address" 100 | }, 101 | { 102 | "internalType": "address", 103 | "name": "to", 104 | "type": "address" 105 | }, 106 | { 107 | "internalType": "uint256", 108 | "name": "value", 109 | "type": "uint256" 110 | }, 111 | { 112 | "internalType": "uint256", 113 | "name": "gas", 114 | "type": "uint256" 115 | }, 116 | { 117 | "internalType": "uint256", 118 | "name": "nonce", 119 | "type": "uint256" 120 | }, 121 | { 122 | "internalType": "bytes", 123 | "name": "data", 124 | "type": "bytes" 125 | }, 126 | { 127 | "internalType": "uint256", 128 | "name": "chainid", 129 | "type": "uint256" 130 | } 131 | ], 132 | "internalType": "struct ForwarderChainlessDomain.ForwardRequest", 133 | "name": "req", 134 | "type": "tuple" 135 | }, 136 | { 137 | "internalType": "bytes", 138 | "name": "signature", 139 | "type": "bytes" 140 | } 141 | ], 142 | "name": "verify", 143 | "outputs": [ 144 | { 145 | "internalType": "bool", 146 | "name": "", 147 | "type": "bool" 148 | } 149 | ], 150 | "stateMutability": "view", 151 | "type": "function" 152 | } 153 | ] -------------------------------------------------------------------------------- /internal/json/ForwarderConsumer.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "trustedForwarder", 7 | "type": "address" 8 | } 9 | ], 10 | "stateMutability": "nonpayable", 11 | "type": "constructor" 12 | }, 13 | { 14 | "inputs": [], 15 | "name": "caller", 16 | "outputs": [ 17 | { 18 | "internalType": "address", 19 | "name": "", 20 | "type": "address" 21 | } 22 | ], 23 | "stateMutability": "view", 24 | "type": "function" 25 | }, 26 | { 27 | "inputs": [ 28 | { 29 | "internalType": "address", 30 | "name": "forwarder", 31 | "type": "address" 32 | } 33 | ], 34 | "name": "isTrustedForwarder", 35 | "outputs": [ 36 | { 37 | "internalType": "bool", 38 | "name": "", 39 | "type": "bool" 40 | } 41 | ], 42 | "stateMutability": "view", 43 | "type": "function" 44 | }, 45 | { 46 | "inputs": [], 47 | "name": "setCaller", 48 | "outputs": [], 49 | "stateMutability": "nonpayable", 50 | "type": "function" 51 | } 52 | ] -------------------------------------------------------------------------------- /internal/json/ForwarderEOAOnly.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "stateMutability": "nonpayable", 5 | "type": "constructor" 6 | }, 7 | { 8 | "inputs": [ 9 | { 10 | "components": [ 11 | { 12 | "internalType": "address", 13 | "name": "from", 14 | "type": "address" 15 | }, 16 | { 17 | "internalType": "address", 18 | "name": "to", 19 | "type": "address" 20 | }, 21 | { 22 | "internalType": "uint256", 23 | "name": "value", 24 | "type": "uint256" 25 | }, 26 | { 27 | "internalType": "uint256", 28 | "name": "gas", 29 | "type": "uint256" 30 | }, 31 | { 32 | "internalType": "uint256", 33 | "name": "nonce", 34 | "type": "uint256" 35 | }, 36 | { 37 | "internalType": "bytes", 38 | "name": "data", 39 | "type": "bytes" 40 | } 41 | ], 42 | "internalType": "struct MinimalForwarderEOAOnly.ForwardRequest", 43 | "name": "req", 44 | "type": "tuple" 45 | }, 46 | { 47 | "internalType": "bytes", 48 | "name": "signature", 49 | "type": "bytes" 50 | } 51 | ], 52 | "name": "execute", 53 | "outputs": [ 54 | { 55 | "internalType": "bool", 56 | "name": "", 57 | "type": "bool" 58 | }, 59 | { 60 | "internalType": "bytes", 61 | "name": "", 62 | "type": "bytes" 63 | } 64 | ], 65 | "stateMutability": "payable", 66 | "type": "function" 67 | }, 68 | { 69 | "inputs": [ 70 | { 71 | "internalType": "address", 72 | "name": "from", 73 | "type": "address" 74 | } 75 | ], 76 | "name": "getNonce", 77 | "outputs": [ 78 | { 79 | "internalType": "uint256", 80 | "name": "", 81 | "type": "uint256" 82 | } 83 | ], 84 | "stateMutability": "view", 85 | "type": "function" 86 | }, 87 | { 88 | "inputs": [ 89 | { 90 | "components": [ 91 | { 92 | "internalType": "address", 93 | "name": "from", 94 | "type": "address" 95 | }, 96 | { 97 | "internalType": "address", 98 | "name": "to", 99 | "type": "address" 100 | }, 101 | { 102 | "internalType": "uint256", 103 | "name": "value", 104 | "type": "uint256" 105 | }, 106 | { 107 | "internalType": "uint256", 108 | "name": "gas", 109 | "type": "uint256" 110 | }, 111 | { 112 | "internalType": "uint256", 113 | "name": "nonce", 114 | "type": "uint256" 115 | }, 116 | { 117 | "internalType": "bytes", 118 | "name": "data", 119 | "type": "bytes" 120 | } 121 | ], 122 | "internalType": "struct MinimalForwarderEOAOnly.ForwardRequest", 123 | "name": "req", 124 | "type": "tuple" 125 | }, 126 | { 127 | "internalType": "bytes", 128 | "name": "signature", 129 | "type": "bytes" 130 | } 131 | ], 132 | "name": "verify", 133 | "outputs": [ 134 | { 135 | "internalType": "bool", 136 | "name": "", 137 | "type": "bool" 138 | } 139 | ], 140 | "stateMutability": "view", 141 | "type": "function" 142 | } 143 | ] -------------------------------------------------------------------------------- /internal/json/IAirdropERC1155Claimable.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "claimer", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "address", 14 | "name": "receiver", 15 | "type": "address" 16 | }, 17 | { 18 | "indexed": true, 19 | "internalType": "uint256", 20 | "name": "tokenId", 21 | "type": "uint256" 22 | }, 23 | { 24 | "indexed": false, 25 | "internalType": "uint256", 26 | "name": "quantityClaimed", 27 | "type": "uint256" 28 | } 29 | ], 30 | "name": "TokensClaimed", 31 | "type": "event" 32 | }, 33 | { 34 | "inputs": [ 35 | { 36 | "internalType": "address", 37 | "name": "receiver", 38 | "type": "address" 39 | }, 40 | { 41 | "internalType": "uint256", 42 | "name": "quantity", 43 | "type": "uint256" 44 | }, 45 | { 46 | "internalType": "uint256", 47 | "name": "tokenId", 48 | "type": "uint256" 49 | }, 50 | { 51 | "internalType": "bytes32[]", 52 | "name": "proofs", 53 | "type": "bytes32[]" 54 | }, 55 | { 56 | "internalType": "uint256", 57 | "name": "proofMaxQuantityForWallet", 58 | "type": "uint256" 59 | } 60 | ], 61 | "name": "claim", 62 | "outputs": [], 63 | "stateMutability": "nonpayable", 64 | "type": "function" 65 | } 66 | ] -------------------------------------------------------------------------------- /internal/json/IAirdropERC20Claimable.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "claimer", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "address", 14 | "name": "receiver", 15 | "type": "address" 16 | }, 17 | { 18 | "indexed": false, 19 | "internalType": "uint256", 20 | "name": "quantityClaimed", 21 | "type": "uint256" 22 | } 23 | ], 24 | "name": "TokensClaimed", 25 | "type": "event" 26 | }, 27 | { 28 | "inputs": [ 29 | { 30 | "internalType": "address", 31 | "name": "receiver", 32 | "type": "address" 33 | }, 34 | { 35 | "internalType": "uint256", 36 | "name": "quantity", 37 | "type": "uint256" 38 | }, 39 | { 40 | "internalType": "bytes32[]", 41 | "name": "proofs", 42 | "type": "bytes32[]" 43 | }, 44 | { 45 | "internalType": "uint256", 46 | "name": "proofMaxQuantityForWallet", 47 | "type": "uint256" 48 | } 49 | ], 50 | "name": "claim", 51 | "outputs": [], 52 | "stateMutability": "nonpayable", 53 | "type": "function" 54 | } 55 | ] -------------------------------------------------------------------------------- /internal/json/IAirdropERC721Claimable.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "claimer", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "address", 14 | "name": "receiver", 15 | "type": "address" 16 | }, 17 | { 18 | "indexed": false, 19 | "internalType": "uint256", 20 | "name": "quantityClaimed", 21 | "type": "uint256" 22 | } 23 | ], 24 | "name": "TokensClaimed", 25 | "type": "event" 26 | }, 27 | { 28 | "inputs": [ 29 | { 30 | "internalType": "address", 31 | "name": "receiver", 32 | "type": "address" 33 | }, 34 | { 35 | "internalType": "uint256", 36 | "name": "quantity", 37 | "type": "uint256" 38 | }, 39 | { 40 | "internalType": "bytes32[]", 41 | "name": "proofs", 42 | "type": "bytes32[]" 43 | }, 44 | { 45 | "internalType": "uint256", 46 | "name": "proofMaxQuantityForWallet", 47 | "type": "uint256" 48 | } 49 | ], 50 | "name": "claim", 51 | "outputs": [], 52 | "stateMutability": "nonpayable", 53 | "type": "function" 54 | } 55 | ] -------------------------------------------------------------------------------- /internal/json/IAppURI.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": false, 7 | "internalType": "string", 8 | "name": "prevURI", 9 | "type": "string" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "string", 14 | "name": "newURI", 15 | "type": "string" 16 | } 17 | ], 18 | "name": "AppURIUpdated", 19 | "type": "event" 20 | }, 21 | { 22 | "inputs": [], 23 | "name": "appURI", 24 | "outputs": [ 25 | { 26 | "internalType": "string", 27 | "name": "", 28 | "type": "string" 29 | } 30 | ], 31 | "stateMutability": "view", 32 | "type": "function" 33 | }, 34 | { 35 | "inputs": [ 36 | { 37 | "internalType": "string", 38 | "name": "_uri", 39 | "type": "string" 40 | } 41 | ], 42 | "name": "setAppURI", 43 | "outputs": [], 44 | "stateMutability": "nonpayable", 45 | "type": "function" 46 | } 47 | ] -------------------------------------------------------------------------------- /internal/json/IBeacon.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "implementation", 5 | "outputs": [ 6 | { 7 | "internalType": "address", 8 | "name": "", 9 | "type": "address" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/IBurnableERC1155.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "account", 7 | "type": "address" 8 | }, 9 | { 10 | "internalType": "uint256", 11 | "name": "id", 12 | "type": "uint256" 13 | }, 14 | { 15 | "internalType": "uint256", 16 | "name": "value", 17 | "type": "uint256" 18 | } 19 | ], 20 | "name": "burn", 21 | "outputs": [], 22 | "stateMutability": "nonpayable", 23 | "type": "function" 24 | }, 25 | { 26 | "inputs": [ 27 | { 28 | "internalType": "address", 29 | "name": "account", 30 | "type": "address" 31 | }, 32 | { 33 | "internalType": "uint256[]", 34 | "name": "ids", 35 | "type": "uint256[]" 36 | }, 37 | { 38 | "internalType": "uint256[]", 39 | "name": "values", 40 | "type": "uint256[]" 41 | } 42 | ], 43 | "name": "burnBatch", 44 | "outputs": [], 45 | "stateMutability": "nonpayable", 46 | "type": "function" 47 | } 48 | ] -------------------------------------------------------------------------------- /internal/json/IBurnableERC20.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "uint256", 6 | "name": "amount", 7 | "type": "uint256" 8 | } 9 | ], 10 | "name": "burn", 11 | "outputs": [], 12 | "stateMutability": "nonpayable", 13 | "type": "function" 14 | }, 15 | { 16 | "inputs": [ 17 | { 18 | "internalType": "address", 19 | "name": "account", 20 | "type": "address" 21 | }, 22 | { 23 | "internalType": "uint256", 24 | "name": "amount", 25 | "type": "uint256" 26 | } 27 | ], 28 | "name": "burnFrom", 29 | "outputs": [], 30 | "stateMutability": "nonpayable", 31 | "type": "function" 32 | } 33 | ] -------------------------------------------------------------------------------- /internal/json/IBurnableERC721.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "uint256", 6 | "name": "tokenId", 7 | "type": "uint256" 8 | } 9 | ], 10 | "name": "burn", 11 | "outputs": [], 12 | "stateMutability": "nonpayable", 13 | "type": "function" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/IClaimCondition.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/IClaimConditionMultiPhase.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/IClaimCondition_V1.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/IClaimConditionsSinglePhase.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "components": [ 7 | { 8 | "internalType": "uint256", 9 | "name": "startTimestamp", 10 | "type": "uint256" 11 | }, 12 | { 13 | "internalType": "uint256", 14 | "name": "maxClaimableSupply", 15 | "type": "uint256" 16 | }, 17 | { 18 | "internalType": "uint256", 19 | "name": "supplyClaimed", 20 | "type": "uint256" 21 | }, 22 | { 23 | "internalType": "uint256", 24 | "name": "quantityLimitPerWallet", 25 | "type": "uint256" 26 | }, 27 | { 28 | "internalType": "bytes32", 29 | "name": "merkleRoot", 30 | "type": "bytes32" 31 | }, 32 | { 33 | "internalType": "uint256", 34 | "name": "pricePerToken", 35 | "type": "uint256" 36 | }, 37 | { 38 | "internalType": "address", 39 | "name": "currency", 40 | "type": "address" 41 | }, 42 | { 43 | "internalType": "string", 44 | "name": "metadata", 45 | "type": "string" 46 | } 47 | ], 48 | "indexed": false, 49 | "internalType": "struct IClaimCondition.ClaimCondition", 50 | "name": "claimConditions", 51 | "type": "tuple" 52 | }, 53 | { 54 | "indexed": false, 55 | "internalType": "bool", 56 | "name": "resetClaimEligibility", 57 | "type": "bool" 58 | } 59 | ], 60 | "name": "ClaimConditionUpdated", 61 | "type": "event" 62 | }, 63 | { 64 | "inputs": [ 65 | { 66 | "components": [ 67 | { 68 | "internalType": "uint256", 69 | "name": "startTimestamp", 70 | "type": "uint256" 71 | }, 72 | { 73 | "internalType": "uint256", 74 | "name": "maxClaimableSupply", 75 | "type": "uint256" 76 | }, 77 | { 78 | "internalType": "uint256", 79 | "name": "supplyClaimed", 80 | "type": "uint256" 81 | }, 82 | { 83 | "internalType": "uint256", 84 | "name": "quantityLimitPerWallet", 85 | "type": "uint256" 86 | }, 87 | { 88 | "internalType": "bytes32", 89 | "name": "merkleRoot", 90 | "type": "bytes32" 91 | }, 92 | { 93 | "internalType": "uint256", 94 | "name": "pricePerToken", 95 | "type": "uint256" 96 | }, 97 | { 98 | "internalType": "address", 99 | "name": "currency", 100 | "type": "address" 101 | }, 102 | { 103 | "internalType": "string", 104 | "name": "metadata", 105 | "type": "string" 106 | } 107 | ], 108 | "internalType": "struct IClaimCondition.ClaimCondition", 109 | "name": "phase", 110 | "type": "tuple" 111 | }, 112 | { 113 | "internalType": "bool", 114 | "name": "resetClaimEligibility", 115 | "type": "bool" 116 | } 117 | ], 118 | "name": "setClaimConditions", 119 | "outputs": [], 120 | "stateMutability": "nonpayable", 121 | "type": "function" 122 | } 123 | ] -------------------------------------------------------------------------------- /internal/json/IClaimableERC1155.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "claimer", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "address", 14 | "name": "receiver", 15 | "type": "address" 16 | }, 17 | { 18 | "indexed": true, 19 | "internalType": "uint256", 20 | "name": "tokenId", 21 | "type": "uint256" 22 | }, 23 | { 24 | "indexed": false, 25 | "internalType": "uint256", 26 | "name": "quantityClaimed", 27 | "type": "uint256" 28 | } 29 | ], 30 | "name": "TokensClaimed", 31 | "type": "event" 32 | }, 33 | { 34 | "inputs": [ 35 | { 36 | "internalType": "address", 37 | "name": "_receiver", 38 | "type": "address" 39 | }, 40 | { 41 | "internalType": "uint256", 42 | "name": "_tokenId", 43 | "type": "uint256" 44 | }, 45 | { 46 | "internalType": "uint256", 47 | "name": "_quantity", 48 | "type": "uint256" 49 | } 50 | ], 51 | "name": "claim", 52 | "outputs": [], 53 | "stateMutability": "payable", 54 | "type": "function" 55 | }, 56 | { 57 | "inputs": [ 58 | { 59 | "internalType": "address", 60 | "name": "_claimer", 61 | "type": "address" 62 | }, 63 | { 64 | "internalType": "uint256", 65 | "name": "_tokenId", 66 | "type": "uint256" 67 | }, 68 | { 69 | "internalType": "uint256", 70 | "name": "_quantity", 71 | "type": "uint256" 72 | } 73 | ], 74 | "name": "verifyClaim", 75 | "outputs": [], 76 | "stateMutability": "view", 77 | "type": "function" 78 | } 79 | ] -------------------------------------------------------------------------------- /internal/json/IClaimableERC721.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "claimer", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "address", 14 | "name": "receiver", 15 | "type": "address" 16 | }, 17 | { 18 | "indexed": true, 19 | "internalType": "uint256", 20 | "name": "startTokenId", 21 | "type": "uint256" 22 | }, 23 | { 24 | "indexed": false, 25 | "internalType": "uint256", 26 | "name": "quantityClaimed", 27 | "type": "uint256" 28 | } 29 | ], 30 | "name": "TokensClaimed", 31 | "type": "event" 32 | }, 33 | { 34 | "inputs": [ 35 | { 36 | "internalType": "address", 37 | "name": "_receiver", 38 | "type": "address" 39 | }, 40 | { 41 | "internalType": "uint256", 42 | "name": "_quantity", 43 | "type": "uint256" 44 | } 45 | ], 46 | "name": "claim", 47 | "outputs": [], 48 | "stateMutability": "payable", 49 | "type": "function" 50 | }, 51 | { 52 | "inputs": [ 53 | { 54 | "internalType": "address", 55 | "name": "_claimer", 56 | "type": "address" 57 | }, 58 | { 59 | "internalType": "uint256", 60 | "name": "_quantity", 61 | "type": "uint256" 62 | } 63 | ], 64 | "name": "verifyClaim", 65 | "outputs": [], 66 | "stateMutability": "view", 67 | "type": "function" 68 | } 69 | ] -------------------------------------------------------------------------------- /internal/json/IContext.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "_msgData", 5 | "outputs": [ 6 | { 7 | "internalType": "bytes", 8 | "name": "", 9 | "type": "bytes" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | }, 15 | { 16 | "inputs": [], 17 | "name": "_msgSender", 18 | "outputs": [ 19 | { 20 | "internalType": "address", 21 | "name": "sender", 22 | "type": "address" 23 | } 24 | ], 25 | "stateMutability": "view", 26 | "type": "function" 27 | } 28 | ] -------------------------------------------------------------------------------- /internal/json/IContractDeployer.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "deployer", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "address", 14 | "name": "publisher", 15 | "type": "address" 16 | }, 17 | { 18 | "indexed": false, 19 | "internalType": "address", 20 | "name": "deployedContract", 21 | "type": "address" 22 | } 23 | ], 24 | "name": "ContractDeployed", 25 | "type": "event" 26 | }, 27 | { 28 | "anonymous": false, 29 | "inputs": [ 30 | { 31 | "indexed": false, 32 | "internalType": "bool", 33 | "name": "isPaused", 34 | "type": "bool" 35 | } 36 | ], 37 | "name": "Paused", 38 | "type": "event" 39 | }, 40 | { 41 | "inputs": [ 42 | { 43 | "internalType": "address", 44 | "name": "publisher", 45 | "type": "address" 46 | }, 47 | { 48 | "internalType": "bytes", 49 | "name": "contractBytecode", 50 | "type": "bytes" 51 | }, 52 | { 53 | "internalType": "bytes", 54 | "name": "constructorArgs", 55 | "type": "bytes" 56 | }, 57 | { 58 | "internalType": "bytes32", 59 | "name": "salt", 60 | "type": "bytes32" 61 | }, 62 | { 63 | "internalType": "uint256", 64 | "name": "value", 65 | "type": "uint256" 66 | }, 67 | { 68 | "internalType": "string", 69 | "name": "publishMetadataUri", 70 | "type": "string" 71 | } 72 | ], 73 | "name": "deployInstance", 74 | "outputs": [ 75 | { 76 | "internalType": "address", 77 | "name": "deployedAddress", 78 | "type": "address" 79 | } 80 | ], 81 | "stateMutability": "nonpayable", 82 | "type": "function" 83 | }, 84 | { 85 | "inputs": [ 86 | { 87 | "internalType": "address", 88 | "name": "publisher", 89 | "type": "address" 90 | }, 91 | { 92 | "internalType": "address", 93 | "name": "implementation", 94 | "type": "address" 95 | }, 96 | { 97 | "internalType": "bytes", 98 | "name": "initializeData", 99 | "type": "bytes" 100 | }, 101 | { 102 | "internalType": "bytes32", 103 | "name": "salt", 104 | "type": "bytes32" 105 | }, 106 | { 107 | "internalType": "uint256", 108 | "name": "value", 109 | "type": "uint256" 110 | }, 111 | { 112 | "internalType": "string", 113 | "name": "publishMetadataUri", 114 | "type": "string" 115 | } 116 | ], 117 | "name": "deployInstanceProxy", 118 | "outputs": [ 119 | { 120 | "internalType": "address", 121 | "name": "deployedAddress", 122 | "type": "address" 123 | } 124 | ], 125 | "stateMutability": "nonpayable", 126 | "type": "function" 127 | }, 128 | { 129 | "inputs": [ 130 | { 131 | "internalType": "address", 132 | "name": "_contract", 133 | "type": "address" 134 | } 135 | ], 136 | "name": "getContractDeployer", 137 | "outputs": [ 138 | { 139 | "internalType": "address", 140 | "name": "", 141 | "type": "address" 142 | } 143 | ], 144 | "stateMutability": "view", 145 | "type": "function" 146 | } 147 | ] -------------------------------------------------------------------------------- /internal/json/IContractFactory.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "implementation", 7 | "type": "address" 8 | }, 9 | { 10 | "internalType": "bytes", 11 | "name": "data", 12 | "type": "bytes" 13 | }, 14 | { 15 | "internalType": "bytes32", 16 | "name": "salt", 17 | "type": "bytes32" 18 | } 19 | ], 20 | "name": "deployProxyByImplementation", 21 | "outputs": [ 22 | { 23 | "internalType": "address", 24 | "name": "", 25 | "type": "address" 26 | } 27 | ], 28 | "stateMutability": "nonpayable", 29 | "type": "function" 30 | } 31 | ] -------------------------------------------------------------------------------- /internal/json/IContractMetadata.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": false, 7 | "internalType": "string", 8 | "name": "prevURI", 9 | "type": "string" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "string", 14 | "name": "newURI", 15 | "type": "string" 16 | } 17 | ], 18 | "name": "ContractURIUpdated", 19 | "type": "event" 20 | }, 21 | { 22 | "inputs": [], 23 | "name": "contractURI", 24 | "outputs": [ 25 | { 26 | "internalType": "string", 27 | "name": "", 28 | "type": "string" 29 | } 30 | ], 31 | "stateMutability": "view", 32 | "type": "function" 33 | }, 34 | { 35 | "inputs": [ 36 | { 37 | "internalType": "string", 38 | "name": "_uri", 39 | "type": "string" 40 | } 41 | ], 42 | "name": "setContractURI", 43 | "outputs": [], 44 | "stateMutability": "nonpayable", 45 | "type": "function" 46 | } 47 | ] -------------------------------------------------------------------------------- /internal/json/IDelayedReveal.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "uint256", 8 | "name": "index", 9 | "type": "uint256" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "string", 14 | "name": "revealedURI", 15 | "type": "string" 16 | } 17 | ], 18 | "name": "TokenURIRevealed", 19 | "type": "event" 20 | }, 21 | { 22 | "inputs": [ 23 | { 24 | "internalType": "bytes", 25 | "name": "data", 26 | "type": "bytes" 27 | }, 28 | { 29 | "internalType": "bytes", 30 | "name": "key", 31 | "type": "bytes" 32 | } 33 | ], 34 | "name": "encryptDecrypt", 35 | "outputs": [ 36 | { 37 | "internalType": "bytes", 38 | "name": "result", 39 | "type": "bytes" 40 | } 41 | ], 42 | "stateMutability": "pure", 43 | "type": "function" 44 | }, 45 | { 46 | "inputs": [ 47 | { 48 | "internalType": "uint256", 49 | "name": "identifier", 50 | "type": "uint256" 51 | }, 52 | { 53 | "internalType": "bytes", 54 | "name": "key", 55 | "type": "bytes" 56 | } 57 | ], 58 | "name": "reveal", 59 | "outputs": [ 60 | { 61 | "internalType": "string", 62 | "name": "revealedURI", 63 | "type": "string" 64 | } 65 | ], 66 | "stateMutability": "nonpayable", 67 | "type": "function" 68 | } 69 | ] -------------------------------------------------------------------------------- /internal/json/IDelayedRevealDeprecated.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "uint256", 8 | "name": "index", 9 | "type": "uint256" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "string", 14 | "name": "revealedURI", 15 | "type": "string" 16 | } 17 | ], 18 | "name": "TokenURIRevealed", 19 | "type": "event" 20 | }, 21 | { 22 | "inputs": [ 23 | { 24 | "internalType": "bytes", 25 | "name": "data", 26 | "type": "bytes" 27 | }, 28 | { 29 | "internalType": "bytes", 30 | "name": "key", 31 | "type": "bytes" 32 | } 33 | ], 34 | "name": "encryptDecrypt", 35 | "outputs": [ 36 | { 37 | "internalType": "bytes", 38 | "name": "result", 39 | "type": "bytes" 40 | } 41 | ], 42 | "stateMutability": "pure", 43 | "type": "function" 44 | }, 45 | { 46 | "inputs": [ 47 | { 48 | "internalType": "uint256", 49 | "name": "identifier", 50 | "type": "uint256" 51 | } 52 | ], 53 | "name": "encryptedBaseURI", 54 | "outputs": [ 55 | { 56 | "internalType": "bytes", 57 | "name": "", 58 | "type": "bytes" 59 | } 60 | ], 61 | "stateMutability": "view", 62 | "type": "function" 63 | }, 64 | { 65 | "inputs": [ 66 | { 67 | "internalType": "uint256", 68 | "name": "identifier", 69 | "type": "uint256" 70 | }, 71 | { 72 | "internalType": "bytes", 73 | "name": "key", 74 | "type": "bytes" 75 | } 76 | ], 77 | "name": "reveal", 78 | "outputs": [ 79 | { 80 | "internalType": "string", 81 | "name": "revealedURI", 82 | "type": "string" 83 | } 84 | ], 85 | "stateMutability": "nonpayable", 86 | "type": "function" 87 | } 88 | ] -------------------------------------------------------------------------------- /internal/json/IDropClaimCondition.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/IDropClaimCondition_V2.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/IERC1155Enumerable.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "nextTokenIdToMint", 5 | "outputs": [ 6 | { 7 | "internalType": "uint256", 8 | "name": "", 9 | "type": "uint256" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/IERC1155Metadata.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "uint256", 6 | "name": "_id", 7 | "type": "uint256" 8 | } 9 | ], 10 | "name": "uri", 11 | "outputs": [ 12 | { 13 | "internalType": "string", 14 | "name": "", 15 | "type": "string" 16 | } 17 | ], 18 | "stateMutability": "view", 19 | "type": "function" 20 | } 21 | ] -------------------------------------------------------------------------------- /internal/json/IERC1155Receiver.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "operator", 7 | "type": "address" 8 | }, 9 | { 10 | "internalType": "address", 11 | "name": "from", 12 | "type": "address" 13 | }, 14 | { 15 | "internalType": "uint256[]", 16 | "name": "ids", 17 | "type": "uint256[]" 18 | }, 19 | { 20 | "internalType": "uint256[]", 21 | "name": "values", 22 | "type": "uint256[]" 23 | }, 24 | { 25 | "internalType": "bytes", 26 | "name": "data", 27 | "type": "bytes" 28 | } 29 | ], 30 | "name": "onERC1155BatchReceived", 31 | "outputs": [ 32 | { 33 | "internalType": "bytes4", 34 | "name": "", 35 | "type": "bytes4" 36 | } 37 | ], 38 | "stateMutability": "nonpayable", 39 | "type": "function" 40 | }, 41 | { 42 | "inputs": [ 43 | { 44 | "internalType": "address", 45 | "name": "operator", 46 | "type": "address" 47 | }, 48 | { 49 | "internalType": "address", 50 | "name": "from", 51 | "type": "address" 52 | }, 53 | { 54 | "internalType": "uint256", 55 | "name": "id", 56 | "type": "uint256" 57 | }, 58 | { 59 | "internalType": "uint256", 60 | "name": "value", 61 | "type": "uint256" 62 | }, 63 | { 64 | "internalType": "bytes", 65 | "name": "data", 66 | "type": "bytes" 67 | } 68 | ], 69 | "name": "onERC1155Received", 70 | "outputs": [ 71 | { 72 | "internalType": "bytes4", 73 | "name": "", 74 | "type": "bytes4" 75 | } 76 | ], 77 | "stateMutability": "nonpayable", 78 | "type": "function" 79 | }, 80 | { 81 | "inputs": [ 82 | { 83 | "internalType": "bytes4", 84 | "name": "interfaceId", 85 | "type": "bytes4" 86 | } 87 | ], 88 | "name": "supportsInterface", 89 | "outputs": [ 90 | { 91 | "internalType": "bool", 92 | "name": "", 93 | "type": "bool" 94 | } 95 | ], 96 | "stateMutability": "view", 97 | "type": "function" 98 | } 99 | ] -------------------------------------------------------------------------------- /internal/json/IERC1155Supply.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "uint256", 6 | "name": "id", 7 | "type": "uint256" 8 | } 9 | ], 10 | "name": "totalSupply", 11 | "outputs": [ 12 | { 13 | "internalType": "uint256", 14 | "name": "", 15 | "type": "uint256" 16 | } 17 | ], 18 | "stateMutability": "view", 19 | "type": "function" 20 | } 21 | ] -------------------------------------------------------------------------------- /internal/json/IERC165.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "bytes4", 6 | "name": "interfaceId", 7 | "type": "bytes4" 8 | } 9 | ], 10 | "name": "supportsInterface", 11 | "outputs": [ 12 | { 13 | "internalType": "bool", 14 | "name": "", 15 | "type": "bool" 16 | } 17 | ], 18 | "stateMutability": "view", 19 | "type": "function" 20 | } 21 | ] -------------------------------------------------------------------------------- /internal/json/IERC1822Proxiable.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "proxiableUUID", 5 | "outputs": [ 6 | { 7 | "internalType": "bytes32", 8 | "name": "", 9 | "type": "bytes32" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/IERC20Metadata.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "decimals", 5 | "outputs": [ 6 | { 7 | "internalType": "uint8", 8 | "name": "", 9 | "type": "uint8" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | }, 15 | { 16 | "inputs": [], 17 | "name": "name", 18 | "outputs": [ 19 | { 20 | "internalType": "string", 21 | "name": "", 22 | "type": "string" 23 | } 24 | ], 25 | "stateMutability": "view", 26 | "type": "function" 27 | }, 28 | { 29 | "inputs": [], 30 | "name": "symbol", 31 | "outputs": [ 32 | { 33 | "internalType": "string", 34 | "name": "", 35 | "type": "string" 36 | } 37 | ], 38 | "stateMutability": "view", 39 | "type": "function" 40 | } 41 | ] -------------------------------------------------------------------------------- /internal/json/IERC20Permit.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "DOMAIN_SEPARATOR", 5 | "outputs": [ 6 | { 7 | "internalType": "bytes32", 8 | "name": "", 9 | "type": "bytes32" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | }, 15 | { 16 | "inputs": [ 17 | { 18 | "internalType": "address", 19 | "name": "owner", 20 | "type": "address" 21 | } 22 | ], 23 | "name": "nonces", 24 | "outputs": [ 25 | { 26 | "internalType": "uint256", 27 | "name": "", 28 | "type": "uint256" 29 | } 30 | ], 31 | "stateMutability": "view", 32 | "type": "function" 33 | }, 34 | { 35 | "inputs": [ 36 | { 37 | "internalType": "address", 38 | "name": "owner", 39 | "type": "address" 40 | }, 41 | { 42 | "internalType": "address", 43 | "name": "spender", 44 | "type": "address" 45 | }, 46 | { 47 | "internalType": "uint256", 48 | "name": "value", 49 | "type": "uint256" 50 | }, 51 | { 52 | "internalType": "uint256", 53 | "name": "deadline", 54 | "type": "uint256" 55 | }, 56 | { 57 | "internalType": "uint8", 58 | "name": "v", 59 | "type": "uint8" 60 | }, 61 | { 62 | "internalType": "bytes32", 63 | "name": "r", 64 | "type": "bytes32" 65 | }, 66 | { 67 | "internalType": "bytes32", 68 | "name": "s", 69 | "type": "bytes32" 70 | } 71 | ], 72 | "name": "permit", 73 | "outputs": [], 74 | "stateMutability": "nonpayable", 75 | "type": "function" 76 | } 77 | ] -------------------------------------------------------------------------------- /internal/json/IERC2771Context.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "forwarder", 7 | "type": "address" 8 | } 9 | ], 10 | "name": "isTrustedForwarder", 11 | "outputs": [ 12 | { 13 | "internalType": "bool", 14 | "name": "", 15 | "type": "bool" 16 | } 17 | ], 18 | "stateMutability": "view", 19 | "type": "function" 20 | } 21 | ] -------------------------------------------------------------------------------- /internal/json/IERC2981.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "uint256", 6 | "name": "tokenId", 7 | "type": "uint256" 8 | }, 9 | { 10 | "internalType": "uint256", 11 | "name": "salePrice", 12 | "type": "uint256" 13 | } 14 | ], 15 | "name": "royaltyInfo", 16 | "outputs": [ 17 | { 18 | "internalType": "address", 19 | "name": "receiver", 20 | "type": "address" 21 | }, 22 | { 23 | "internalType": "uint256", 24 | "name": "royaltyAmount", 25 | "type": "uint256" 26 | } 27 | ], 28 | "stateMutability": "view", 29 | "type": "function" 30 | }, 31 | { 32 | "inputs": [ 33 | { 34 | "internalType": "bytes4", 35 | "name": "interfaceId", 36 | "type": "bytes4" 37 | } 38 | ], 39 | "name": "supportsInterface", 40 | "outputs": [ 41 | { 42 | "internalType": "bool", 43 | "name": "", 44 | "type": "bool" 45 | } 46 | ], 47 | "stateMutability": "view", 48 | "type": "function" 49 | } 50 | ] -------------------------------------------------------------------------------- /internal/json/IERC721Enumerable.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "uint256", 6 | "name": "_index", 7 | "type": "uint256" 8 | } 9 | ], 10 | "name": "tokenByIndex", 11 | "outputs": [ 12 | { 13 | "internalType": "uint256", 14 | "name": "", 15 | "type": "uint256" 16 | } 17 | ], 18 | "stateMutability": "view", 19 | "type": "function" 20 | }, 21 | { 22 | "inputs": [ 23 | { 24 | "internalType": "address", 25 | "name": "_owner", 26 | "type": "address" 27 | }, 28 | { 29 | "internalType": "uint256", 30 | "name": "_index", 31 | "type": "uint256" 32 | } 33 | ], 34 | "name": "tokenOfOwnerByIndex", 35 | "outputs": [ 36 | { 37 | "internalType": "uint256", 38 | "name": "", 39 | "type": "uint256" 40 | } 41 | ], 42 | "stateMutability": "view", 43 | "type": "function" 44 | } 45 | ] -------------------------------------------------------------------------------- /internal/json/IERC721Metadata.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "name", 5 | "outputs": [ 6 | { 7 | "internalType": "string", 8 | "name": "", 9 | "type": "string" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | }, 15 | { 16 | "inputs": [], 17 | "name": "symbol", 18 | "outputs": [ 19 | { 20 | "internalType": "string", 21 | "name": "", 22 | "type": "string" 23 | } 24 | ], 25 | "stateMutability": "view", 26 | "type": "function" 27 | }, 28 | { 29 | "inputs": [ 30 | { 31 | "internalType": "uint256", 32 | "name": "_tokenId", 33 | "type": "uint256" 34 | } 35 | ], 36 | "name": "tokenURI", 37 | "outputs": [ 38 | { 39 | "internalType": "string", 40 | "name": "", 41 | "type": "string" 42 | } 43 | ], 44 | "stateMutability": "view", 45 | "type": "function" 46 | } 47 | ] -------------------------------------------------------------------------------- /internal/json/IERC721Receiver.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "operator", 7 | "type": "address" 8 | }, 9 | { 10 | "internalType": "address", 11 | "name": "from", 12 | "type": "address" 13 | }, 14 | { 15 | "internalType": "uint256", 16 | "name": "tokenId", 17 | "type": "uint256" 18 | }, 19 | { 20 | "internalType": "bytes", 21 | "name": "data", 22 | "type": "bytes" 23 | } 24 | ], 25 | "name": "onERC721Received", 26 | "outputs": [ 27 | { 28 | "internalType": "bytes4", 29 | "name": "", 30 | "type": "bytes4" 31 | } 32 | ], 33 | "stateMutability": "nonpayable", 34 | "type": "function" 35 | } 36 | ] -------------------------------------------------------------------------------- /internal/json/IERC721Supply.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "totalSupply", 5 | "outputs": [ 6 | { 7 | "internalType": "uint256", 8 | "name": "", 9 | "type": "uint256" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/IEditionStake.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": false, 7 | "internalType": "uint256", 8 | "name": "_amount", 9 | "type": "uint256" 10 | } 11 | ], 12 | "name": "RewardTokensDepositedByAdmin", 13 | "type": "event" 14 | }, 15 | { 16 | "anonymous": false, 17 | "inputs": [ 18 | { 19 | "indexed": false, 20 | "internalType": "uint256", 21 | "name": "_amount", 22 | "type": "uint256" 23 | } 24 | ], 25 | "name": "RewardTokensWithdrawnByAdmin", 26 | "type": "event" 27 | }, 28 | { 29 | "inputs": [ 30 | { 31 | "internalType": "uint256", 32 | "name": "_amount", 33 | "type": "uint256" 34 | } 35 | ], 36 | "name": "depositRewardTokens", 37 | "outputs": [], 38 | "stateMutability": "payable", 39 | "type": "function" 40 | }, 41 | { 42 | "inputs": [ 43 | { 44 | "internalType": "uint256", 45 | "name": "_amount", 46 | "type": "uint256" 47 | } 48 | ], 49 | "name": "withdrawRewardTokens", 50 | "outputs": [], 51 | "stateMutability": "nonpayable", 52 | "type": "function" 53 | } 54 | ] -------------------------------------------------------------------------------- /internal/json/IFeeTierPlacementExtension.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "deployer", 7 | "type": "address" 8 | }, 9 | { 10 | "internalType": "address", 11 | "name": "proxy", 12 | "type": "address" 13 | } 14 | ], 15 | "name": "getFeeTier", 16 | "outputs": [ 17 | { 18 | "internalType": "uint128", 19 | "name": "tierId", 20 | "type": "uint128" 21 | }, 22 | { 23 | "internalType": "uint128", 24 | "name": "validUntilTimestamp", 25 | "type": "uint128" 26 | } 27 | ], 28 | "stateMutability": "view", 29 | "type": "function" 30 | } 31 | ] -------------------------------------------------------------------------------- /internal/json/ILazyMint.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "uint256", 8 | "name": "startTokenId", 9 | "type": "uint256" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "uint256", 14 | "name": "endTokenId", 15 | "type": "uint256" 16 | }, 17 | { 18 | "indexed": false, 19 | "internalType": "string", 20 | "name": "baseURI", 21 | "type": "string" 22 | }, 23 | { 24 | "indexed": false, 25 | "internalType": "bytes", 26 | "name": "encryptedBaseURI", 27 | "type": "bytes" 28 | } 29 | ], 30 | "name": "TokensLazyMinted", 31 | "type": "event" 32 | }, 33 | { 34 | "inputs": [ 35 | { 36 | "internalType": "uint256", 37 | "name": "amount", 38 | "type": "uint256" 39 | }, 40 | { 41 | "internalType": "string", 42 | "name": "baseURIForTokens", 43 | "type": "string" 44 | }, 45 | { 46 | "internalType": "bytes", 47 | "name": "extraData", 48 | "type": "bytes" 49 | } 50 | ], 51 | "name": "lazyMint", 52 | "outputs": [ 53 | { 54 | "internalType": "uint256", 55 | "name": "batchId", 56 | "type": "uint256" 57 | } 58 | ], 59 | "stateMutability": "nonpayable", 60 | "type": "function" 61 | } 62 | ] -------------------------------------------------------------------------------- /internal/json/ILazyMintWithTier.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "string", 8 | "name": "tier", 9 | "type": "string" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "uint256", 14 | "name": "startTokenId", 15 | "type": "uint256" 16 | }, 17 | { 18 | "indexed": false, 19 | "internalType": "uint256", 20 | "name": "endTokenId", 21 | "type": "uint256" 22 | }, 23 | { 24 | "indexed": false, 25 | "internalType": "string", 26 | "name": "baseURI", 27 | "type": "string" 28 | }, 29 | { 30 | "indexed": false, 31 | "internalType": "bytes", 32 | "name": "encryptedBaseURI", 33 | "type": "bytes" 34 | } 35 | ], 36 | "name": "TokensLazyMinted", 37 | "type": "event" 38 | }, 39 | { 40 | "inputs": [ 41 | { 42 | "internalType": "uint256", 43 | "name": "amount", 44 | "type": "uint256" 45 | }, 46 | { 47 | "internalType": "string", 48 | "name": "baseURIForTokens", 49 | "type": "string" 50 | }, 51 | { 52 | "internalType": "string", 53 | "name": "tier", 54 | "type": "string" 55 | }, 56 | { 57 | "internalType": "bytes", 58 | "name": "extraData", 59 | "type": "bytes" 60 | } 61 | ], 62 | "name": "lazyMint", 63 | "outputs": [ 64 | { 65 | "internalType": "uint256", 66 | "name": "batchId", 67 | "type": "uint256" 68 | } 69 | ], 70 | "stateMutability": "nonpayable", 71 | "type": "function" 72 | } 73 | ] -------------------------------------------------------------------------------- /internal/json/IMintableERC1155.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "mintedTo", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "uint256", 14 | "name": "tokenIdMinted", 15 | "type": "uint256" 16 | }, 17 | { 18 | "indexed": false, 19 | "internalType": "string", 20 | "name": "uri", 21 | "type": "string" 22 | }, 23 | { 24 | "indexed": false, 25 | "internalType": "uint256", 26 | "name": "quantityMinted", 27 | "type": "uint256" 28 | } 29 | ], 30 | "name": "TokensMinted", 31 | "type": "event" 32 | }, 33 | { 34 | "inputs": [ 35 | { 36 | "internalType": "address", 37 | "name": "to", 38 | "type": "address" 39 | }, 40 | { 41 | "internalType": "uint256", 42 | "name": "tokenId", 43 | "type": "uint256" 44 | }, 45 | { 46 | "internalType": "string", 47 | "name": "uri", 48 | "type": "string" 49 | }, 50 | { 51 | "internalType": "uint256", 52 | "name": "amount", 53 | "type": "uint256" 54 | } 55 | ], 56 | "name": "mintTo", 57 | "outputs": [], 58 | "stateMutability": "nonpayable", 59 | "type": "function" 60 | } 61 | ] -------------------------------------------------------------------------------- /internal/json/IMintableERC20.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "mintedTo", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "uint256", 14 | "name": "quantityMinted", 15 | "type": "uint256" 16 | } 17 | ], 18 | "name": "TokensMinted", 19 | "type": "event" 20 | }, 21 | { 22 | "inputs": [ 23 | { 24 | "internalType": "address", 25 | "name": "to", 26 | "type": "address" 27 | }, 28 | { 29 | "internalType": "uint256", 30 | "name": "amount", 31 | "type": "uint256" 32 | } 33 | ], 34 | "name": "mintTo", 35 | "outputs": [], 36 | "stateMutability": "nonpayable", 37 | "type": "function" 38 | } 39 | ] -------------------------------------------------------------------------------- /internal/json/IMintableERC721.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "mintedTo", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "uint256", 14 | "name": "tokenIdMinted", 15 | "type": "uint256" 16 | }, 17 | { 18 | "indexed": false, 19 | "internalType": "string", 20 | "name": "uri", 21 | "type": "string" 22 | } 23 | ], 24 | "name": "TokensMinted", 25 | "type": "event" 26 | }, 27 | { 28 | "inputs": [ 29 | { 30 | "internalType": "address", 31 | "name": "to", 32 | "type": "address" 33 | }, 34 | { 35 | "internalType": "string", 36 | "name": "uri", 37 | "type": "string" 38 | } 39 | ], 40 | "name": "mintTo", 41 | "outputs": [ 42 | { 43 | "internalType": "uint256", 44 | "name": "", 45 | "type": "uint256" 46 | } 47 | ], 48 | "stateMutability": "nonpayable", 49 | "type": "function" 50 | } 51 | ] -------------------------------------------------------------------------------- /internal/json/IMulticall.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "bytes[]", 6 | "name": "data", 7 | "type": "bytes[]" 8 | } 9 | ], 10 | "name": "multicall", 11 | "outputs": [ 12 | { 13 | "internalType": "bytes[]", 14 | "name": "results", 15 | "type": "bytes[]" 16 | } 17 | ], 18 | "stateMutability": "nonpayable", 19 | "type": "function" 20 | } 21 | ] -------------------------------------------------------------------------------- /internal/json/IMultiwrap.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "unwrapper", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "address", 14 | "name": "recipientOfWrappedContents", 15 | "type": "address" 16 | }, 17 | { 18 | "indexed": true, 19 | "internalType": "uint256", 20 | "name": "tokenIdOfWrappedToken", 21 | "type": "uint256" 22 | } 23 | ], 24 | "name": "TokensUnwrapped", 25 | "type": "event" 26 | }, 27 | { 28 | "anonymous": false, 29 | "inputs": [ 30 | { 31 | "indexed": true, 32 | "internalType": "address", 33 | "name": "wrapper", 34 | "type": "address" 35 | }, 36 | { 37 | "indexed": true, 38 | "internalType": "address", 39 | "name": "recipientOfWrappedToken", 40 | "type": "address" 41 | }, 42 | { 43 | "indexed": true, 44 | "internalType": "uint256", 45 | "name": "tokenIdOfWrappedToken", 46 | "type": "uint256" 47 | }, 48 | { 49 | "components": [ 50 | { 51 | "internalType": "address", 52 | "name": "assetContract", 53 | "type": "address" 54 | }, 55 | { 56 | "internalType": "enum ITokenBundle.TokenType", 57 | "name": "tokenType", 58 | "type": "uint8" 59 | }, 60 | { 61 | "internalType": "uint256", 62 | "name": "tokenId", 63 | "type": "uint256" 64 | }, 65 | { 66 | "internalType": "uint256", 67 | "name": "totalAmount", 68 | "type": "uint256" 69 | } 70 | ], 71 | "indexed": false, 72 | "internalType": "struct ITokenBundle.Token[]", 73 | "name": "wrappedContents", 74 | "type": "tuple[]" 75 | } 76 | ], 77 | "name": "TokensWrapped", 78 | "type": "event" 79 | }, 80 | { 81 | "inputs": [ 82 | { 83 | "internalType": "uint256", 84 | "name": "tokenId", 85 | "type": "uint256" 86 | }, 87 | { 88 | "internalType": "address", 89 | "name": "recipient", 90 | "type": "address" 91 | } 92 | ], 93 | "name": "unwrap", 94 | "outputs": [], 95 | "stateMutability": "nonpayable", 96 | "type": "function" 97 | }, 98 | { 99 | "inputs": [ 100 | { 101 | "components": [ 102 | { 103 | "internalType": "address", 104 | "name": "assetContract", 105 | "type": "address" 106 | }, 107 | { 108 | "internalType": "enum ITokenBundle.TokenType", 109 | "name": "tokenType", 110 | "type": "uint8" 111 | }, 112 | { 113 | "internalType": "uint256", 114 | "name": "tokenId", 115 | "type": "uint256" 116 | }, 117 | { 118 | "internalType": "uint256", 119 | "name": "totalAmount", 120 | "type": "uint256" 121 | } 122 | ], 123 | "internalType": "struct ITokenBundle.Token[]", 124 | "name": "wrappedContents", 125 | "type": "tuple[]" 126 | }, 127 | { 128 | "internalType": "string", 129 | "name": "uriForWrappedToken", 130 | "type": "string" 131 | }, 132 | { 133 | "internalType": "address", 134 | "name": "recipient", 135 | "type": "address" 136 | } 137 | ], 138 | "name": "wrap", 139 | "outputs": [ 140 | { 141 | "internalType": "uint256", 142 | "name": "tokenId", 143 | "type": "uint256" 144 | } 145 | ], 146 | "stateMutability": "payable", 147 | "type": "function" 148 | } 149 | ] -------------------------------------------------------------------------------- /internal/json/INFTStake.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": false, 7 | "internalType": "uint256", 8 | "name": "_amount", 9 | "type": "uint256" 10 | } 11 | ], 12 | "name": "RewardTokensDepositedByAdmin", 13 | "type": "event" 14 | }, 15 | { 16 | "anonymous": false, 17 | "inputs": [ 18 | { 19 | "indexed": false, 20 | "internalType": "uint256", 21 | "name": "_amount", 22 | "type": "uint256" 23 | } 24 | ], 25 | "name": "RewardTokensWithdrawnByAdmin", 26 | "type": "event" 27 | }, 28 | { 29 | "inputs": [ 30 | { 31 | "internalType": "uint256", 32 | "name": "_amount", 33 | "type": "uint256" 34 | } 35 | ], 36 | "name": "depositRewardTokens", 37 | "outputs": [], 38 | "stateMutability": "payable", 39 | "type": "function" 40 | }, 41 | { 42 | "inputs": [ 43 | { 44 | "internalType": "uint256", 45 | "name": "_amount", 46 | "type": "uint256" 47 | } 48 | ], 49 | "name": "withdrawRewardTokens", 50 | "outputs": [], 51 | "stateMutability": "nonpayable", 52 | "type": "function" 53 | } 54 | ] -------------------------------------------------------------------------------- /internal/json/IOperatorFilterToggle.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": false, 7 | "internalType": "bool", 8 | "name": "restriction", 9 | "type": "bool" 10 | } 11 | ], 12 | "name": "OperatorRestriction", 13 | "type": "event" 14 | }, 15 | { 16 | "inputs": [], 17 | "name": "operatorRestriction", 18 | "outputs": [ 19 | { 20 | "internalType": "bool", 21 | "name": "", 22 | "type": "bool" 23 | } 24 | ], 25 | "stateMutability": "view", 26 | "type": "function" 27 | }, 28 | { 29 | "inputs": [ 30 | { 31 | "internalType": "bool", 32 | "name": "restriction", 33 | "type": "bool" 34 | } 35 | ], 36 | "name": "setOperatorRestriction", 37 | "outputs": [], 38 | "stateMutability": "nonpayable", 39 | "type": "function" 40 | } 41 | ] -------------------------------------------------------------------------------- /internal/json/IOwnable.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "prevOwner", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "address", 14 | "name": "newOwner", 15 | "type": "address" 16 | } 17 | ], 18 | "name": "OwnerUpdated", 19 | "type": "event" 20 | }, 21 | { 22 | "inputs": [], 23 | "name": "owner", 24 | "outputs": [ 25 | { 26 | "internalType": "address", 27 | "name": "", 28 | "type": "address" 29 | } 30 | ], 31 | "stateMutability": "view", 32 | "type": "function" 33 | }, 34 | { 35 | "inputs": [ 36 | { 37 | "internalType": "address", 38 | "name": "_newOwner", 39 | "type": "address" 40 | } 41 | ], 42 | "name": "setOwner", 43 | "outputs": [], 44 | "stateMutability": "nonpayable", 45 | "type": "function" 46 | } 47 | ] -------------------------------------------------------------------------------- /internal/json/IPermissions.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "bytes32", 8 | "name": "role", 9 | "type": "bytes32" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "bytes32", 14 | "name": "previousAdminRole", 15 | "type": "bytes32" 16 | }, 17 | { 18 | "indexed": true, 19 | "internalType": "bytes32", 20 | "name": "newAdminRole", 21 | "type": "bytes32" 22 | } 23 | ], 24 | "name": "RoleAdminChanged", 25 | "type": "event" 26 | }, 27 | { 28 | "anonymous": false, 29 | "inputs": [ 30 | { 31 | "indexed": true, 32 | "internalType": "bytes32", 33 | "name": "role", 34 | "type": "bytes32" 35 | }, 36 | { 37 | "indexed": true, 38 | "internalType": "address", 39 | "name": "account", 40 | "type": "address" 41 | }, 42 | { 43 | "indexed": true, 44 | "internalType": "address", 45 | "name": "sender", 46 | "type": "address" 47 | } 48 | ], 49 | "name": "RoleGranted", 50 | "type": "event" 51 | }, 52 | { 53 | "anonymous": false, 54 | "inputs": [ 55 | { 56 | "indexed": true, 57 | "internalType": "bytes32", 58 | "name": "role", 59 | "type": "bytes32" 60 | }, 61 | { 62 | "indexed": true, 63 | "internalType": "address", 64 | "name": "account", 65 | "type": "address" 66 | }, 67 | { 68 | "indexed": true, 69 | "internalType": "address", 70 | "name": "sender", 71 | "type": "address" 72 | } 73 | ], 74 | "name": "RoleRevoked", 75 | "type": "event" 76 | }, 77 | { 78 | "inputs": [ 79 | { 80 | "internalType": "bytes32", 81 | "name": "role", 82 | "type": "bytes32" 83 | } 84 | ], 85 | "name": "getRoleAdmin", 86 | "outputs": [ 87 | { 88 | "internalType": "bytes32", 89 | "name": "", 90 | "type": "bytes32" 91 | } 92 | ], 93 | "stateMutability": "view", 94 | "type": "function" 95 | }, 96 | { 97 | "inputs": [ 98 | { 99 | "internalType": "bytes32", 100 | "name": "role", 101 | "type": "bytes32" 102 | }, 103 | { 104 | "internalType": "address", 105 | "name": "account", 106 | "type": "address" 107 | } 108 | ], 109 | "name": "grantRole", 110 | "outputs": [], 111 | "stateMutability": "nonpayable", 112 | "type": "function" 113 | }, 114 | { 115 | "inputs": [ 116 | { 117 | "internalType": "bytes32", 118 | "name": "role", 119 | "type": "bytes32" 120 | }, 121 | { 122 | "internalType": "address", 123 | "name": "account", 124 | "type": "address" 125 | } 126 | ], 127 | "name": "hasRole", 128 | "outputs": [ 129 | { 130 | "internalType": "bool", 131 | "name": "", 132 | "type": "bool" 133 | } 134 | ], 135 | "stateMutability": "view", 136 | "type": "function" 137 | }, 138 | { 139 | "inputs": [ 140 | { 141 | "internalType": "bytes32", 142 | "name": "role", 143 | "type": "bytes32" 144 | }, 145 | { 146 | "internalType": "address", 147 | "name": "account", 148 | "type": "address" 149 | } 150 | ], 151 | "name": "renounceRole", 152 | "outputs": [], 153 | "stateMutability": "nonpayable", 154 | "type": "function" 155 | }, 156 | { 157 | "inputs": [ 158 | { 159 | "internalType": "bytes32", 160 | "name": "role", 161 | "type": "bytes32" 162 | }, 163 | { 164 | "internalType": "address", 165 | "name": "account", 166 | "type": "address" 167 | } 168 | ], 169 | "name": "revokeRole", 170 | "outputs": [], 171 | "stateMutability": "nonpayable", 172 | "type": "function" 173 | } 174 | ] -------------------------------------------------------------------------------- /internal/json/IPlatformFee.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "platformFeeRecipient", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "uint256", 14 | "name": "platformFeeBps", 15 | "type": "uint256" 16 | } 17 | ], 18 | "name": "PlatformFeeInfoUpdated", 19 | "type": "event" 20 | }, 21 | { 22 | "inputs": [], 23 | "name": "getPlatformFeeInfo", 24 | "outputs": [ 25 | { 26 | "internalType": "address", 27 | "name": "", 28 | "type": "address" 29 | }, 30 | { 31 | "internalType": "uint16", 32 | "name": "", 33 | "type": "uint16" 34 | } 35 | ], 36 | "stateMutability": "view", 37 | "type": "function" 38 | }, 39 | { 40 | "inputs": [ 41 | { 42 | "internalType": "address", 43 | "name": "_platformFeeRecipient", 44 | "type": "address" 45 | }, 46 | { 47 | "internalType": "uint256", 48 | "name": "_platformFeeBps", 49 | "type": "uint256" 50 | } 51 | ], 52 | "name": "setPlatformFeeInfo", 53 | "outputs": [], 54 | "stateMutability": "nonpayable", 55 | "type": "function" 56 | } 57 | ] -------------------------------------------------------------------------------- /internal/json/IPluginMap.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "bytes4", 8 | "name": "functionSelector", 9 | "type": "bytes4" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "string", 14 | "name": "functionSignature", 15 | "type": "string" 16 | }, 17 | { 18 | "indexed": true, 19 | "internalType": "address", 20 | "name": "pluginAddress", 21 | "type": "address" 22 | } 23 | ], 24 | "name": "PluginSet", 25 | "type": "event" 26 | }, 27 | { 28 | "inputs": [ 29 | { 30 | "internalType": "address", 31 | "name": "pluginAddress", 32 | "type": "address" 33 | } 34 | ], 35 | "name": "getAllFunctionsOfPlugin", 36 | "outputs": [ 37 | { 38 | "internalType": "bytes4[]", 39 | "name": "", 40 | "type": "bytes4[]" 41 | } 42 | ], 43 | "stateMutability": "view", 44 | "type": "function" 45 | }, 46 | { 47 | "inputs": [], 48 | "name": "getAllPlugins", 49 | "outputs": [ 50 | { 51 | "components": [ 52 | { 53 | "internalType": "bytes4", 54 | "name": "functionSelector", 55 | "type": "bytes4" 56 | }, 57 | { 58 | "internalType": "string", 59 | "name": "functionSignature", 60 | "type": "string" 61 | }, 62 | { 63 | "internalType": "address", 64 | "name": "pluginAddress", 65 | "type": "address" 66 | } 67 | ], 68 | "internalType": "struct IPluginMap.Plugin[]", 69 | "name": "", 70 | "type": "tuple[]" 71 | } 72 | ], 73 | "stateMutability": "view", 74 | "type": "function" 75 | }, 76 | { 77 | "inputs": [ 78 | { 79 | "internalType": "bytes4", 80 | "name": "functionSelector", 81 | "type": "bytes4" 82 | } 83 | ], 84 | "name": "getPluginForFunction", 85 | "outputs": [ 86 | { 87 | "internalType": "address", 88 | "name": "", 89 | "type": "address" 90 | } 91 | ], 92 | "stateMutability": "view", 93 | "type": "function" 94 | } 95 | ] -------------------------------------------------------------------------------- /internal/json/IPrimarySale.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "recipient", 9 | "type": "address" 10 | } 11 | ], 12 | "name": "PrimarySaleRecipientUpdated", 13 | "type": "event" 14 | }, 15 | { 16 | "inputs": [], 17 | "name": "primarySaleRecipient", 18 | "outputs": [ 19 | { 20 | "internalType": "address", 21 | "name": "", 22 | "type": "address" 23 | } 24 | ], 25 | "stateMutability": "view", 26 | "type": "function" 27 | }, 28 | { 29 | "inputs": [ 30 | { 31 | "internalType": "address", 32 | "name": "_saleRecipient", 33 | "type": "address" 34 | } 35 | ], 36 | "name": "setPrimarySaleRecipient", 37 | "outputs": [], 38 | "stateMutability": "nonpayable", 39 | "type": "function" 40 | } 41 | ] -------------------------------------------------------------------------------- /internal/json/ISignatureAction.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "user", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "address", 14 | "name": "signer", 15 | "type": "address" 16 | }, 17 | { 18 | "components": [ 19 | { 20 | "internalType": "uint128", 21 | "name": "validityStartTimestamp", 22 | "type": "uint128" 23 | }, 24 | { 25 | "internalType": "uint128", 26 | "name": "validityEndTimestamp", 27 | "type": "uint128" 28 | }, 29 | { 30 | "internalType": "bytes32", 31 | "name": "uid", 32 | "type": "bytes32" 33 | }, 34 | { 35 | "internalType": "bytes", 36 | "name": "data", 37 | "type": "bytes" 38 | } 39 | ], 40 | "indexed": false, 41 | "internalType": "struct ISignatureAction.GenericRequest", 42 | "name": "_req", 43 | "type": "tuple" 44 | } 45 | ], 46 | "name": "RequestExecuted", 47 | "type": "event" 48 | }, 49 | { 50 | "inputs": [ 51 | { 52 | "components": [ 53 | { 54 | "internalType": "uint128", 55 | "name": "validityStartTimestamp", 56 | "type": "uint128" 57 | }, 58 | { 59 | "internalType": "uint128", 60 | "name": "validityEndTimestamp", 61 | "type": "uint128" 62 | }, 63 | { 64 | "internalType": "bytes32", 65 | "name": "uid", 66 | "type": "bytes32" 67 | }, 68 | { 69 | "internalType": "bytes", 70 | "name": "data", 71 | "type": "bytes" 72 | } 73 | ], 74 | "internalType": "struct ISignatureAction.GenericRequest", 75 | "name": "req", 76 | "type": "tuple" 77 | }, 78 | { 79 | "internalType": "bytes", 80 | "name": "signature", 81 | "type": "bytes" 82 | } 83 | ], 84 | "name": "verify", 85 | "outputs": [ 86 | { 87 | "internalType": "bool", 88 | "name": "success", 89 | "type": "bool" 90 | }, 91 | { 92 | "internalType": "address", 93 | "name": "signer", 94 | "type": "address" 95 | } 96 | ], 97 | "stateMutability": "view", 98 | "type": "function" 99 | } 100 | ] -------------------------------------------------------------------------------- /internal/json/IStaking721.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "staker", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "uint256", 14 | "name": "rewardAmount", 15 | "type": "uint256" 16 | } 17 | ], 18 | "name": "RewardsClaimed", 19 | "type": "event" 20 | }, 21 | { 22 | "anonymous": false, 23 | "inputs": [ 24 | { 25 | "indexed": true, 26 | "internalType": "address", 27 | "name": "staker", 28 | "type": "address" 29 | }, 30 | { 31 | "indexed": true, 32 | "internalType": "uint256[]", 33 | "name": "tokenIds", 34 | "type": "uint256[]" 35 | } 36 | ], 37 | "name": "TokensStaked", 38 | "type": "event" 39 | }, 40 | { 41 | "anonymous": false, 42 | "inputs": [ 43 | { 44 | "indexed": true, 45 | "internalType": "address", 46 | "name": "staker", 47 | "type": "address" 48 | }, 49 | { 50 | "indexed": true, 51 | "internalType": "uint256[]", 52 | "name": "tokenIds", 53 | "type": "uint256[]" 54 | } 55 | ], 56 | "name": "TokensWithdrawn", 57 | "type": "event" 58 | }, 59 | { 60 | "anonymous": false, 61 | "inputs": [ 62 | { 63 | "indexed": false, 64 | "internalType": "uint256", 65 | "name": "oldRewardsPerUnitTime", 66 | "type": "uint256" 67 | }, 68 | { 69 | "indexed": false, 70 | "internalType": "uint256", 71 | "name": "newRewardsPerUnitTime", 72 | "type": "uint256" 73 | } 74 | ], 75 | "name": "UpdatedRewardsPerUnitTime", 76 | "type": "event" 77 | }, 78 | { 79 | "anonymous": false, 80 | "inputs": [ 81 | { 82 | "indexed": false, 83 | "internalType": "uint256", 84 | "name": "oldTimeUnit", 85 | "type": "uint256" 86 | }, 87 | { 88 | "indexed": false, 89 | "internalType": "uint256", 90 | "name": "newTimeUnit", 91 | "type": "uint256" 92 | } 93 | ], 94 | "name": "UpdatedTimeUnit", 95 | "type": "event" 96 | }, 97 | { 98 | "inputs": [], 99 | "name": "claimRewards", 100 | "outputs": [], 101 | "stateMutability": "nonpayable", 102 | "type": "function" 103 | }, 104 | { 105 | "inputs": [ 106 | { 107 | "internalType": "address", 108 | "name": "staker", 109 | "type": "address" 110 | } 111 | ], 112 | "name": "getStakeInfo", 113 | "outputs": [ 114 | { 115 | "internalType": "uint256[]", 116 | "name": "_tokensStaked", 117 | "type": "uint256[]" 118 | }, 119 | { 120 | "internalType": "uint256", 121 | "name": "_rewards", 122 | "type": "uint256" 123 | } 124 | ], 125 | "stateMutability": "view", 126 | "type": "function" 127 | }, 128 | { 129 | "inputs": [ 130 | { 131 | "internalType": "uint256[]", 132 | "name": "tokenIds", 133 | "type": "uint256[]" 134 | } 135 | ], 136 | "name": "stake", 137 | "outputs": [], 138 | "stateMutability": "nonpayable", 139 | "type": "function" 140 | }, 141 | { 142 | "inputs": [ 143 | { 144 | "internalType": "uint256[]", 145 | "name": "tokenIds", 146 | "type": "uint256[]" 147 | } 148 | ], 149 | "name": "withdraw", 150 | "outputs": [], 151 | "stateMutability": "nonpayable", 152 | "type": "function" 153 | } 154 | ] -------------------------------------------------------------------------------- /internal/json/ITWFee.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "_proxy", 7 | "type": "address" 8 | }, 9 | { 10 | "internalType": "uint256", 11 | "name": "_type", 12 | "type": "uint256" 13 | } 14 | ], 15 | "name": "getFeeInfo", 16 | "outputs": [ 17 | { 18 | "internalType": "address", 19 | "name": "recipient", 20 | "type": "address" 21 | }, 22 | { 23 | "internalType": "uint256", 24 | "name": "bps", 25 | "type": "uint256" 26 | } 27 | ], 28 | "stateMutability": "view", 29 | "type": "function" 30 | } 31 | ] -------------------------------------------------------------------------------- /internal/json/ITWRegistry.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "deployer", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "address", 14 | "name": "deployment", 15 | "type": "address" 16 | }, 17 | { 18 | "indexed": true, 19 | "internalType": "uint256", 20 | "name": "chainId", 21 | "type": "uint256" 22 | } 23 | ], 24 | "name": "Added", 25 | "type": "event" 26 | }, 27 | { 28 | "anonymous": false, 29 | "inputs": [ 30 | { 31 | "indexed": true, 32 | "internalType": "address", 33 | "name": "deployer", 34 | "type": "address" 35 | }, 36 | { 37 | "indexed": true, 38 | "internalType": "address", 39 | "name": "deployment", 40 | "type": "address" 41 | }, 42 | { 43 | "indexed": true, 44 | "internalType": "uint256", 45 | "name": "chainId", 46 | "type": "uint256" 47 | } 48 | ], 49 | "name": "Deleted", 50 | "type": "event" 51 | }, 52 | { 53 | "inputs": [ 54 | { 55 | "internalType": "address", 56 | "name": "_deployer", 57 | "type": "address" 58 | }, 59 | { 60 | "internalType": "address", 61 | "name": "_deployment", 62 | "type": "address" 63 | }, 64 | { 65 | "internalType": "uint256", 66 | "name": "_chainId", 67 | "type": "uint256" 68 | } 69 | ], 70 | "name": "add", 71 | "outputs": [], 72 | "stateMutability": "nonpayable", 73 | "type": "function" 74 | }, 75 | { 76 | "inputs": [ 77 | { 78 | "internalType": "address", 79 | "name": "_deployer", 80 | "type": "address" 81 | } 82 | ], 83 | "name": "count", 84 | "outputs": [ 85 | { 86 | "internalType": "uint256", 87 | "name": "deploymentCount", 88 | "type": "uint256" 89 | } 90 | ], 91 | "stateMutability": "view", 92 | "type": "function" 93 | }, 94 | { 95 | "inputs": [ 96 | { 97 | "internalType": "address", 98 | "name": "_deployer", 99 | "type": "address" 100 | } 101 | ], 102 | "name": "getAll", 103 | "outputs": [ 104 | { 105 | "components": [ 106 | { 107 | "internalType": "address", 108 | "name": "deploymentAddress", 109 | "type": "address" 110 | }, 111 | { 112 | "internalType": "uint256", 113 | "name": "chainId", 114 | "type": "uint256" 115 | } 116 | ], 117 | "internalType": "struct ITWRegistry.Deployment[]", 118 | "name": "allDeployments", 119 | "type": "tuple[]" 120 | } 121 | ], 122 | "stateMutability": "view", 123 | "type": "function" 124 | }, 125 | { 126 | "inputs": [ 127 | { 128 | "internalType": "address", 129 | "name": "_deployer", 130 | "type": "address" 131 | }, 132 | { 133 | "internalType": "address", 134 | "name": "_deployment", 135 | "type": "address" 136 | }, 137 | { 138 | "internalType": "uint256", 139 | "name": "_chainId", 140 | "type": "uint256" 141 | } 142 | ], 143 | "name": "remove", 144 | "outputs": [], 145 | "stateMutability": "nonpayable", 146 | "type": "function" 147 | } 148 | ] -------------------------------------------------------------------------------- /internal/json/IThirdwebContract.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "contractType", 5 | "outputs": [ 6 | { 7 | "internalType": "bytes32", 8 | "name": "", 9 | "type": "bytes32" 10 | } 11 | ], 12 | "stateMutability": "pure", 13 | "type": "function" 14 | }, 15 | { 16 | "inputs": [], 17 | "name": "contractURI", 18 | "outputs": [ 19 | { 20 | "internalType": "string", 21 | "name": "", 22 | "type": "string" 23 | } 24 | ], 25 | "stateMutability": "view", 26 | "type": "function" 27 | }, 28 | { 29 | "inputs": [], 30 | "name": "contractVersion", 31 | "outputs": [ 32 | { 33 | "internalType": "uint8", 34 | "name": "", 35 | "type": "uint8" 36 | } 37 | ], 38 | "stateMutability": "pure", 39 | "type": "function" 40 | }, 41 | { 42 | "inputs": [ 43 | { 44 | "internalType": "string", 45 | "name": "_uri", 46 | "type": "string" 47 | } 48 | ], 49 | "name": "setContractURI", 50 | "outputs": [], 51 | "stateMutability": "nonpayable", 52 | "type": "function" 53 | } 54 | ] -------------------------------------------------------------------------------- /internal/json/ITokenBundle.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/ITokenStake.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": false, 7 | "internalType": "uint256", 8 | "name": "_amount", 9 | "type": "uint256" 10 | } 11 | ], 12 | "name": "RewardTokensDepositedByAdmin", 13 | "type": "event" 14 | }, 15 | { 16 | "anonymous": false, 17 | "inputs": [ 18 | { 19 | "indexed": false, 20 | "internalType": "uint256", 21 | "name": "_amount", 22 | "type": "uint256" 23 | } 24 | ], 25 | "name": "RewardTokensWithdrawnByAdmin", 26 | "type": "event" 27 | }, 28 | { 29 | "inputs": [ 30 | { 31 | "internalType": "uint256", 32 | "name": "_amount", 33 | "type": "uint256" 34 | } 35 | ], 36 | "name": "depositRewardTokens", 37 | "outputs": [], 38 | "stateMutability": "payable", 39 | "type": "function" 40 | }, 41 | { 42 | "inputs": [ 43 | { 44 | "internalType": "uint256", 45 | "name": "_amount", 46 | "type": "uint256" 47 | } 48 | ], 49 | "name": "withdrawRewardTokens", 50 | "outputs": [], 51 | "stateMutability": "nonpayable", 52 | "type": "function" 53 | } 54 | ] -------------------------------------------------------------------------------- /internal/json/IWETH.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "deposit", 5 | "outputs": [], 6 | "stateMutability": "payable", 7 | "type": "function" 8 | }, 9 | { 10 | "inputs": [ 11 | { 12 | "internalType": "address", 13 | "name": "to", 14 | "type": "address" 15 | }, 16 | { 17 | "internalType": "uint256", 18 | "name": "value", 19 | "type": "uint256" 20 | } 21 | ], 22 | "name": "transfer", 23 | "outputs": [ 24 | { 25 | "internalType": "bool", 26 | "name": "", 27 | "type": "bool" 28 | } 29 | ], 30 | "stateMutability": "nonpayable", 31 | "type": "function" 32 | }, 33 | { 34 | "inputs": [ 35 | { 36 | "internalType": "uint256", 37 | "name": "amount", 38 | "type": "uint256" 39 | } 40 | ], 41 | "name": "withdraw", 42 | "outputs": [], 43 | "stateMutability": "nonpayable", 44 | "type": "function" 45 | } 46 | ] -------------------------------------------------------------------------------- /internal/json/InitStorage.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/Initializable.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": false, 7 | "internalType": "uint8", 8 | "name": "version", 9 | "type": "uint8" 10 | } 11 | ], 12 | "name": "Initialized", 13 | "type": "event" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/LazyMint.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "uint256", 8 | "name": "startTokenId", 9 | "type": "uint256" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "uint256", 14 | "name": "endTokenId", 15 | "type": "uint256" 16 | }, 17 | { 18 | "indexed": false, 19 | "internalType": "string", 20 | "name": "baseURI", 21 | "type": "string" 22 | }, 23 | { 24 | "indexed": false, 25 | "internalType": "bytes", 26 | "name": "encryptedBaseURI", 27 | "type": "bytes" 28 | } 29 | ], 30 | "name": "TokensLazyMinted", 31 | "type": "event" 32 | }, 33 | { 34 | "inputs": [], 35 | "name": "getBaseURICount", 36 | "outputs": [ 37 | { 38 | "internalType": "uint256", 39 | "name": "", 40 | "type": "uint256" 41 | } 42 | ], 43 | "stateMutability": "view", 44 | "type": "function" 45 | }, 46 | { 47 | "inputs": [ 48 | { 49 | "internalType": "uint256", 50 | "name": "_index", 51 | "type": "uint256" 52 | } 53 | ], 54 | "name": "getBatchIdAtIndex", 55 | "outputs": [ 56 | { 57 | "internalType": "uint256", 58 | "name": "", 59 | "type": "uint256" 60 | } 61 | ], 62 | "stateMutability": "view", 63 | "type": "function" 64 | }, 65 | { 66 | "inputs": [ 67 | { 68 | "internalType": "uint256", 69 | "name": "_amount", 70 | "type": "uint256" 71 | }, 72 | { 73 | "internalType": "string", 74 | "name": "_baseURIForTokens", 75 | "type": "string" 76 | }, 77 | { 78 | "internalType": "bytes", 79 | "name": "_data", 80 | "type": "bytes" 81 | } 82 | ], 83 | "name": "lazyMint", 84 | "outputs": [ 85 | { 86 | "internalType": "uint256", 87 | "name": "batchId", 88 | "type": "uint256" 89 | } 90 | ], 91 | "stateMutability": "nonpayable", 92 | "type": "function" 93 | } 94 | ] -------------------------------------------------------------------------------- /internal/json/LazyMintWithTier.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "string", 8 | "name": "tier", 9 | "type": "string" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "uint256", 14 | "name": "startTokenId", 15 | "type": "uint256" 16 | }, 17 | { 18 | "indexed": false, 19 | "internalType": "uint256", 20 | "name": "endTokenId", 21 | "type": "uint256" 22 | }, 23 | { 24 | "indexed": false, 25 | "internalType": "string", 26 | "name": "baseURI", 27 | "type": "string" 28 | }, 29 | { 30 | "indexed": false, 31 | "internalType": "bytes", 32 | "name": "encryptedBaseURI", 33 | "type": "bytes" 34 | } 35 | ], 36 | "name": "TokensLazyMinted", 37 | "type": "event" 38 | }, 39 | { 40 | "inputs": [], 41 | "name": "getBaseURICount", 42 | "outputs": [ 43 | { 44 | "internalType": "uint256", 45 | "name": "", 46 | "type": "uint256" 47 | } 48 | ], 49 | "stateMutability": "view", 50 | "type": "function" 51 | }, 52 | { 53 | "inputs": [ 54 | { 55 | "internalType": "uint256", 56 | "name": "_index", 57 | "type": "uint256" 58 | } 59 | ], 60 | "name": "getBatchIdAtIndex", 61 | "outputs": [ 62 | { 63 | "internalType": "uint256", 64 | "name": "", 65 | "type": "uint256" 66 | } 67 | ], 68 | "stateMutability": "view", 69 | "type": "function" 70 | }, 71 | { 72 | "inputs": [], 73 | "name": "getMetadataForAllTiers", 74 | "outputs": [ 75 | { 76 | "components": [ 77 | { 78 | "internalType": "string", 79 | "name": "tier", 80 | "type": "string" 81 | }, 82 | { 83 | "components": [ 84 | { 85 | "internalType": "uint256", 86 | "name": "startIdInclusive", 87 | "type": "uint256" 88 | }, 89 | { 90 | "internalType": "uint256", 91 | "name": "endIdNonInclusive", 92 | "type": "uint256" 93 | } 94 | ], 95 | "internalType": "struct LazyMintWithTier.TokenRange[]", 96 | "name": "ranges", 97 | "type": "tuple[]" 98 | }, 99 | { 100 | "internalType": "string[]", 101 | "name": "baseURIs", 102 | "type": "string[]" 103 | } 104 | ], 105 | "internalType": "struct LazyMintWithTier.TierMetadata[]", 106 | "name": "metadataForAllTiers", 107 | "type": "tuple[]" 108 | } 109 | ], 110 | "stateMutability": "view", 111 | "type": "function" 112 | }, 113 | { 114 | "inputs": [ 115 | { 116 | "internalType": "uint256", 117 | "name": "_amount", 118 | "type": "uint256" 119 | }, 120 | { 121 | "internalType": "string", 122 | "name": "_baseURIForTokens", 123 | "type": "string" 124 | }, 125 | { 126 | "internalType": "string", 127 | "name": "_tier", 128 | "type": "string" 129 | }, 130 | { 131 | "internalType": "bytes", 132 | "name": "_data", 133 | "type": "bytes" 134 | } 135 | ], 136 | "name": "lazyMint", 137 | "outputs": [ 138 | { 139 | "internalType": "uint256", 140 | "name": "batchId", 141 | "type": "uint256" 142 | } 143 | ], 144 | "stateMutability": "nonpayable", 145 | "type": "function" 146 | } 147 | ] -------------------------------------------------------------------------------- /internal/json/Math.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/MerkleProof.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/MinimalForwarderEOAOnly.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "stateMutability": "nonpayable", 5 | "type": "constructor" 6 | }, 7 | { 8 | "inputs": [ 9 | { 10 | "components": [ 11 | { 12 | "internalType": "address", 13 | "name": "from", 14 | "type": "address" 15 | }, 16 | { 17 | "internalType": "address", 18 | "name": "to", 19 | "type": "address" 20 | }, 21 | { 22 | "internalType": "uint256", 23 | "name": "value", 24 | "type": "uint256" 25 | }, 26 | { 27 | "internalType": "uint256", 28 | "name": "gas", 29 | "type": "uint256" 30 | }, 31 | { 32 | "internalType": "uint256", 33 | "name": "nonce", 34 | "type": "uint256" 35 | }, 36 | { 37 | "internalType": "bytes", 38 | "name": "data", 39 | "type": "bytes" 40 | } 41 | ], 42 | "internalType": "struct MinimalForwarderEOAOnly.ForwardRequest", 43 | "name": "req", 44 | "type": "tuple" 45 | }, 46 | { 47 | "internalType": "bytes", 48 | "name": "signature", 49 | "type": "bytes" 50 | } 51 | ], 52 | "name": "execute", 53 | "outputs": [ 54 | { 55 | "internalType": "bool", 56 | "name": "", 57 | "type": "bool" 58 | }, 59 | { 60 | "internalType": "bytes", 61 | "name": "", 62 | "type": "bytes" 63 | } 64 | ], 65 | "stateMutability": "payable", 66 | "type": "function" 67 | }, 68 | { 69 | "inputs": [ 70 | { 71 | "internalType": "address", 72 | "name": "from", 73 | "type": "address" 74 | } 75 | ], 76 | "name": "getNonce", 77 | "outputs": [ 78 | { 79 | "internalType": "uint256", 80 | "name": "", 81 | "type": "uint256" 82 | } 83 | ], 84 | "stateMutability": "view", 85 | "type": "function" 86 | }, 87 | { 88 | "inputs": [ 89 | { 90 | "components": [ 91 | { 92 | "internalType": "address", 93 | "name": "from", 94 | "type": "address" 95 | }, 96 | { 97 | "internalType": "address", 98 | "name": "to", 99 | "type": "address" 100 | }, 101 | { 102 | "internalType": "uint256", 103 | "name": "value", 104 | "type": "uint256" 105 | }, 106 | { 107 | "internalType": "uint256", 108 | "name": "gas", 109 | "type": "uint256" 110 | }, 111 | { 112 | "internalType": "uint256", 113 | "name": "nonce", 114 | "type": "uint256" 115 | }, 116 | { 117 | "internalType": "bytes", 118 | "name": "data", 119 | "type": "bytes" 120 | } 121 | ], 122 | "internalType": "struct MinimalForwarderEOAOnly.ForwardRequest", 123 | "name": "req", 124 | "type": "tuple" 125 | }, 126 | { 127 | "internalType": "bytes", 128 | "name": "signature", 129 | "type": "bytes" 130 | } 131 | ], 132 | "name": "verify", 133 | "outputs": [ 134 | { 135 | "internalType": "bool", 136 | "name": "", 137 | "type": "bool" 138 | } 139 | ], 140 | "stateMutability": "view", 141 | "type": "function" 142 | } 143 | ] -------------------------------------------------------------------------------- /internal/json/Mock.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "erc1155", 5 | "outputs": [ 6 | { 7 | "internalType": "contract IERC1155", 8 | "name": "", 9 | "type": "address" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | }, 15 | { 16 | "inputs": [], 17 | "name": "erc20", 18 | "outputs": [ 19 | { 20 | "internalType": "contract IERC20", 21 | "name": "", 22 | "type": "address" 23 | } 24 | ], 25 | "stateMutability": "view", 26 | "type": "function" 27 | }, 28 | { 29 | "inputs": [], 30 | "name": "erc721", 31 | "outputs": [ 32 | { 33 | "internalType": "contract IERC721", 34 | "name": "", 35 | "type": "address" 36 | } 37 | ], 38 | "stateMutability": "view", 39 | "type": "function" 40 | } 41 | ] -------------------------------------------------------------------------------- /internal/json/MockContract.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "bytes32", 6 | "name": "_name", 7 | "type": "bytes32" 8 | }, 9 | { 10 | "internalType": "uint8", 11 | "name": "_version", 12 | "type": "uint8" 13 | } 14 | ], 15 | "stateMutability": "nonpayable", 16 | "type": "constructor" 17 | }, 18 | { 19 | "inputs": [], 20 | "name": "contractType", 21 | "outputs": [ 22 | { 23 | "internalType": "bytes32", 24 | "name": "", 25 | "type": "bytes32" 26 | } 27 | ], 28 | "stateMutability": "view", 29 | "type": "function" 30 | }, 31 | { 32 | "inputs": [], 33 | "name": "contractVersion", 34 | "outputs": [ 35 | { 36 | "internalType": "uint8", 37 | "name": "", 38 | "type": "uint8" 39 | } 40 | ], 41 | "stateMutability": "view", 42 | "type": "function" 43 | } 44 | ] -------------------------------------------------------------------------------- /internal/json/Multicall.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "bytes[]", 6 | "name": "data", 7 | "type": "bytes[]" 8 | } 9 | ], 10 | "name": "multicall", 11 | "outputs": [ 12 | { 13 | "internalType": "bytes[]", 14 | "name": "results", 15 | "type": "bytes[]" 16 | } 17 | ], 18 | "stateMutability": "nonpayable", 19 | "type": "function" 20 | } 21 | ] -------------------------------------------------------------------------------- /internal/json/OffersStorage.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "OFFERS_STORAGE_POSITION", 5 | "outputs": [ 6 | { 7 | "internalType": "bytes32", 8 | "name": "", 9 | "type": "bytes32" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/OperatorFilterToggle.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": false, 7 | "internalType": "bool", 8 | "name": "restriction", 9 | "type": "bool" 10 | } 11 | ], 12 | "name": "OperatorRestriction", 13 | "type": "event" 14 | }, 15 | { 16 | "inputs": [], 17 | "name": "operatorRestriction", 18 | "outputs": [ 19 | { 20 | "internalType": "bool", 21 | "name": "", 22 | "type": "bool" 23 | } 24 | ], 25 | "stateMutability": "view", 26 | "type": "function" 27 | }, 28 | { 29 | "inputs": [ 30 | { 31 | "internalType": "bool", 32 | "name": "_restriction", 33 | "type": "bool" 34 | } 35 | ], 36 | "name": "setOperatorRestriction", 37 | "outputs": [], 38 | "stateMutability": "nonpayable", 39 | "type": "function" 40 | } 41 | ] -------------------------------------------------------------------------------- /internal/json/OperatorFilterer.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "operator", 7 | "type": "address" 8 | } 9 | ], 10 | "name": "OperatorNotAllowed", 11 | "type": "error" 12 | }, 13 | { 14 | "anonymous": false, 15 | "inputs": [ 16 | { 17 | "indexed": false, 18 | "internalType": "bool", 19 | "name": "restriction", 20 | "type": "bool" 21 | } 22 | ], 23 | "name": "OperatorRestriction", 24 | "type": "event" 25 | }, 26 | { 27 | "inputs": [], 28 | "name": "OPERATOR_FILTER_REGISTRY", 29 | "outputs": [ 30 | { 31 | "internalType": "contract IOperatorFilterRegistry", 32 | "name": "", 33 | "type": "address" 34 | } 35 | ], 36 | "stateMutability": "view", 37 | "type": "function" 38 | }, 39 | { 40 | "inputs": [], 41 | "name": "operatorRestriction", 42 | "outputs": [ 43 | { 44 | "internalType": "bool", 45 | "name": "", 46 | "type": "bool" 47 | } 48 | ], 49 | "stateMutability": "view", 50 | "type": "function" 51 | }, 52 | { 53 | "inputs": [ 54 | { 55 | "internalType": "bool", 56 | "name": "_restriction", 57 | "type": "bool" 58 | } 59 | ], 60 | "name": "setOperatorRestriction", 61 | "outputs": [], 62 | "stateMutability": "nonpayable", 63 | "type": "function" 64 | } 65 | ] -------------------------------------------------------------------------------- /internal/json/OperatorFiltererUpgradeable.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "operator", 7 | "type": "address" 8 | } 9 | ], 10 | "name": "OperatorNotAllowed", 11 | "type": "error" 12 | }, 13 | { 14 | "anonymous": false, 15 | "inputs": [ 16 | { 17 | "indexed": false, 18 | "internalType": "bool", 19 | "name": "restriction", 20 | "type": "bool" 21 | } 22 | ], 23 | "name": "OperatorRestriction", 24 | "type": "event" 25 | }, 26 | { 27 | "inputs": [], 28 | "name": "operatorRestriction", 29 | "outputs": [ 30 | { 31 | "internalType": "bool", 32 | "name": "", 33 | "type": "bool" 34 | } 35 | ], 36 | "stateMutability": "view", 37 | "type": "function" 38 | }, 39 | { 40 | "inputs": [ 41 | { 42 | "internalType": "bool", 43 | "name": "_restriction", 44 | "type": "bool" 45 | } 46 | ], 47 | "name": "setOperatorRestriction", 48 | "outputs": [], 49 | "stateMutability": "nonpayable", 50 | "type": "function" 51 | } 52 | ] -------------------------------------------------------------------------------- /internal/json/Ownable.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "prevOwner", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "address", 14 | "name": "newOwner", 15 | "type": "address" 16 | } 17 | ], 18 | "name": "OwnerUpdated", 19 | "type": "event" 20 | }, 21 | { 22 | "inputs": [], 23 | "name": "owner", 24 | "outputs": [ 25 | { 26 | "internalType": "address", 27 | "name": "", 28 | "type": "address" 29 | } 30 | ], 31 | "stateMutability": "view", 32 | "type": "function" 33 | }, 34 | { 35 | "inputs": [ 36 | { 37 | "internalType": "address", 38 | "name": "_newOwner", 39 | "type": "address" 40 | } 41 | ], 42 | "name": "setOwner", 43 | "outputs": [], 44 | "stateMutability": "nonpayable", 45 | "type": "function" 46 | } 47 | ] -------------------------------------------------------------------------------- /internal/json/PermissionsEnumerableStorage.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "PERMISSIONS_ENUMERABLE_STORAGE_POSITION", 5 | "outputs": [ 6 | { 7 | "internalType": "bytes32", 8 | "name": "", 9 | "type": "bytes32" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/PermissionsStorage.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "PERMISSIONS_STORAGE_POSITION", 5 | "outputs": [ 6 | { 7 | "internalType": "bytes32", 8 | "name": "", 9 | "type": "bytes32" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/PlatformFee.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "platformFeeRecipient", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "uint256", 14 | "name": "platformFeeBps", 15 | "type": "uint256" 16 | } 17 | ], 18 | "name": "PlatformFeeInfoUpdated", 19 | "type": "event" 20 | }, 21 | { 22 | "inputs": [], 23 | "name": "getPlatformFeeInfo", 24 | "outputs": [ 25 | { 26 | "internalType": "address", 27 | "name": "", 28 | "type": "address" 29 | }, 30 | { 31 | "internalType": "uint16", 32 | "name": "", 33 | "type": "uint16" 34 | } 35 | ], 36 | "stateMutability": "view", 37 | "type": "function" 38 | }, 39 | { 40 | "inputs": [ 41 | { 42 | "internalType": "address", 43 | "name": "_platformFeeRecipient", 44 | "type": "address" 45 | }, 46 | { 47 | "internalType": "uint256", 48 | "name": "_platformFeeBps", 49 | "type": "uint256" 50 | } 51 | ], 52 | "name": "setPlatformFeeInfo", 53 | "outputs": [], 54 | "stateMutability": "nonpayable", 55 | "type": "function" 56 | } 57 | ] -------------------------------------------------------------------------------- /internal/json/PlatformFeeLogic.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "platformFeeRecipient", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "uint256", 14 | "name": "platformFeeBps", 15 | "type": "uint256" 16 | } 17 | ], 18 | "name": "PlatformFeeInfoUpdated", 19 | "type": "event" 20 | }, 21 | { 22 | "inputs": [], 23 | "name": "getPlatformFeeInfo", 24 | "outputs": [ 25 | { 26 | "internalType": "address", 27 | "name": "", 28 | "type": "address" 29 | }, 30 | { 31 | "internalType": "uint16", 32 | "name": "", 33 | "type": "uint16" 34 | } 35 | ], 36 | "stateMutability": "view", 37 | "type": "function" 38 | }, 39 | { 40 | "inputs": [ 41 | { 42 | "internalType": "address", 43 | "name": "_platformFeeRecipient", 44 | "type": "address" 45 | }, 46 | { 47 | "internalType": "uint256", 48 | "name": "_platformFeeBps", 49 | "type": "uint256" 50 | } 51 | ], 52 | "name": "setPlatformFeeInfo", 53 | "outputs": [], 54 | "stateMutability": "nonpayable", 55 | "type": "function" 56 | } 57 | ] -------------------------------------------------------------------------------- /internal/json/PlatformFeeStorage.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "PLATFORM_FEE_STORAGE_POSITION", 5 | "outputs": [ 6 | { 7 | "internalType": "bytes32", 8 | "name": "", 9 | "type": "bytes32" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/PluginMap.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "components": [ 6 | { 7 | "internalType": "bytes4", 8 | "name": "functionSelector", 9 | "type": "bytes4" 10 | }, 11 | { 12 | "internalType": "string", 13 | "name": "functionSignature", 14 | "type": "string" 15 | }, 16 | { 17 | "internalType": "address", 18 | "name": "pluginAddress", 19 | "type": "address" 20 | } 21 | ], 22 | "internalType": "struct IPluginMap.Plugin[]", 23 | "name": "_pluginsToAdd", 24 | "type": "tuple[]" 25 | } 26 | ], 27 | "stateMutability": "nonpayable", 28 | "type": "constructor" 29 | }, 30 | { 31 | "anonymous": false, 32 | "inputs": [ 33 | { 34 | "indexed": true, 35 | "internalType": "bytes4", 36 | "name": "functionSelector", 37 | "type": "bytes4" 38 | }, 39 | { 40 | "indexed": true, 41 | "internalType": "string", 42 | "name": "functionSignature", 43 | "type": "string" 44 | }, 45 | { 46 | "indexed": true, 47 | "internalType": "address", 48 | "name": "pluginAddress", 49 | "type": "address" 50 | } 51 | ], 52 | "name": "PluginSet", 53 | "type": "event" 54 | }, 55 | { 56 | "inputs": [ 57 | { 58 | "internalType": "address", 59 | "name": "_pluginAddress", 60 | "type": "address" 61 | } 62 | ], 63 | "name": "getAllFunctionsOfPlugin", 64 | "outputs": [ 65 | { 66 | "internalType": "bytes4[]", 67 | "name": "registered", 68 | "type": "bytes4[]" 69 | } 70 | ], 71 | "stateMutability": "view", 72 | "type": "function" 73 | }, 74 | { 75 | "inputs": [], 76 | "name": "getAllPlugins", 77 | "outputs": [ 78 | { 79 | "components": [ 80 | { 81 | "internalType": "bytes4", 82 | "name": "functionSelector", 83 | "type": "bytes4" 84 | }, 85 | { 86 | "internalType": "string", 87 | "name": "functionSignature", 88 | "type": "string" 89 | }, 90 | { 91 | "internalType": "address", 92 | "name": "pluginAddress", 93 | "type": "address" 94 | } 95 | ], 96 | "internalType": "struct IPluginMap.Plugin[]", 97 | "name": "_plugins", 98 | "type": "tuple[]" 99 | } 100 | ], 101 | "stateMutability": "view", 102 | "type": "function" 103 | }, 104 | { 105 | "inputs": [ 106 | { 107 | "internalType": "bytes4", 108 | "name": "_selector", 109 | "type": "bytes4" 110 | } 111 | ], 112 | "name": "getPluginForFunction", 113 | "outputs": [ 114 | { 115 | "internalType": "address", 116 | "name": "", 117 | "type": "address" 118 | } 119 | ], 120 | "stateMutability": "view", 121 | "type": "function" 122 | } 123 | ] -------------------------------------------------------------------------------- /internal/json/PrimarySale.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "recipient", 9 | "type": "address" 10 | } 11 | ], 12 | "name": "PrimarySaleRecipientUpdated", 13 | "type": "event" 14 | }, 15 | { 16 | "inputs": [], 17 | "name": "primarySaleRecipient", 18 | "outputs": [ 19 | { 20 | "internalType": "address", 21 | "name": "", 22 | "type": "address" 23 | } 24 | ], 25 | "stateMutability": "view", 26 | "type": "function" 27 | }, 28 | { 29 | "inputs": [ 30 | { 31 | "internalType": "address", 32 | "name": "_saleRecipient", 33 | "type": "address" 34 | } 35 | ], 36 | "name": "setPrimarySaleRecipient", 37 | "outputs": [], 38 | "stateMutability": "nonpayable", 39 | "type": "function" 40 | } 41 | ] -------------------------------------------------------------------------------- /internal/json/Proxy.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "stateMutability": "payable", 4 | "type": "fallback" 5 | }, 6 | { 7 | "stateMutability": "payable", 8 | "type": "receive" 9 | } 10 | ] -------------------------------------------------------------------------------- /internal/json/ProxyForUpgradeable.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "_logic", 7 | "type": "address" 8 | }, 9 | { 10 | "internalType": "bytes", 11 | "name": "_data", 12 | "type": "bytes" 13 | } 14 | ], 15 | "stateMutability": "payable", 16 | "type": "constructor" 17 | }, 18 | { 19 | "anonymous": false, 20 | "inputs": [ 21 | { 22 | "indexed": false, 23 | "internalType": "address", 24 | "name": "previousAdmin", 25 | "type": "address" 26 | }, 27 | { 28 | "indexed": false, 29 | "internalType": "address", 30 | "name": "newAdmin", 31 | "type": "address" 32 | } 33 | ], 34 | "name": "AdminChanged", 35 | "type": "event" 36 | }, 37 | { 38 | "anonymous": false, 39 | "inputs": [ 40 | { 41 | "indexed": true, 42 | "internalType": "address", 43 | "name": "beacon", 44 | "type": "address" 45 | } 46 | ], 47 | "name": "BeaconUpgraded", 48 | "type": "event" 49 | }, 50 | { 51 | "anonymous": false, 52 | "inputs": [ 53 | { 54 | "indexed": true, 55 | "internalType": "address", 56 | "name": "implementation", 57 | "type": "address" 58 | } 59 | ], 60 | "name": "Upgraded", 61 | "type": "event" 62 | }, 63 | { 64 | "stateMutability": "payable", 65 | "type": "fallback" 66 | }, 67 | { 68 | "stateMutability": "payable", 69 | "type": "receive" 70 | } 71 | ] -------------------------------------------------------------------------------- /internal/json/ReentrancyGuard.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/ReentrancyGuardLogic.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/ReentrancyGuardStorage.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "REENTRANCY_GUARD_STORAGE_POSITION", 5 | "outputs": [ 6 | { 7 | "internalType": "bytes32", 8 | "name": "", 9 | "type": "bytes32" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/ReentrancyGuardUpgradeable.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": false, 7 | "internalType": "uint8", 8 | "name": "version", 9 | "type": "uint8" 10 | } 11 | ], 12 | "name": "Initialized", 13 | "type": "event" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/RouterStorage.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "ROUTER_STORAGE_POSITION", 5 | "outputs": [ 6 | { 7 | "internalType": "bytes32", 8 | "name": "", 9 | "type": "bytes32" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/SafeCast.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/SafeERC20.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/SafeMath.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/SignatureAction.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "user", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": true, 13 | "internalType": "address", 14 | "name": "signer", 15 | "type": "address" 16 | }, 17 | { 18 | "components": [ 19 | { 20 | "internalType": "uint128", 21 | "name": "validityStartTimestamp", 22 | "type": "uint128" 23 | }, 24 | { 25 | "internalType": "uint128", 26 | "name": "validityEndTimestamp", 27 | "type": "uint128" 28 | }, 29 | { 30 | "internalType": "bytes32", 31 | "name": "uid", 32 | "type": "bytes32" 33 | }, 34 | { 35 | "internalType": "bytes", 36 | "name": "data", 37 | "type": "bytes" 38 | } 39 | ], 40 | "indexed": false, 41 | "internalType": "struct ISignatureAction.GenericRequest", 42 | "name": "_req", 43 | "type": "tuple" 44 | } 45 | ], 46 | "name": "RequestExecuted", 47 | "type": "event" 48 | }, 49 | { 50 | "inputs": [ 51 | { 52 | "components": [ 53 | { 54 | "internalType": "uint128", 55 | "name": "validityStartTimestamp", 56 | "type": "uint128" 57 | }, 58 | { 59 | "internalType": "uint128", 60 | "name": "validityEndTimestamp", 61 | "type": "uint128" 62 | }, 63 | { 64 | "internalType": "bytes32", 65 | "name": "uid", 66 | "type": "bytes32" 67 | }, 68 | { 69 | "internalType": "bytes", 70 | "name": "data", 71 | "type": "bytes" 72 | } 73 | ], 74 | "internalType": "struct ISignatureAction.GenericRequest", 75 | "name": "_req", 76 | "type": "tuple" 77 | }, 78 | { 79 | "internalType": "bytes", 80 | "name": "_signature", 81 | "type": "bytes" 82 | } 83 | ], 84 | "name": "verify", 85 | "outputs": [ 86 | { 87 | "internalType": "bool", 88 | "name": "success", 89 | "type": "bool" 90 | }, 91 | { 92 | "internalType": "address", 93 | "name": "signer", 94 | "type": "address" 95 | } 96 | ], 97 | "stateMutability": "view", 98 | "type": "function" 99 | } 100 | ] -------------------------------------------------------------------------------- /internal/json/SignatureActionUpgradeable.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": false, 7 | "internalType": "uint8", 8 | "name": "version", 9 | "type": "uint8" 10 | } 11 | ], 12 | "name": "Initialized", 13 | "type": "event" 14 | }, 15 | { 16 | "anonymous": false, 17 | "inputs": [ 18 | { 19 | "indexed": true, 20 | "internalType": "address", 21 | "name": "user", 22 | "type": "address" 23 | }, 24 | { 25 | "indexed": true, 26 | "internalType": "address", 27 | "name": "signer", 28 | "type": "address" 29 | }, 30 | { 31 | "components": [ 32 | { 33 | "internalType": "uint128", 34 | "name": "validityStartTimestamp", 35 | "type": "uint128" 36 | }, 37 | { 38 | "internalType": "uint128", 39 | "name": "validityEndTimestamp", 40 | "type": "uint128" 41 | }, 42 | { 43 | "internalType": "bytes32", 44 | "name": "uid", 45 | "type": "bytes32" 46 | }, 47 | { 48 | "internalType": "bytes", 49 | "name": "data", 50 | "type": "bytes" 51 | } 52 | ], 53 | "indexed": false, 54 | "internalType": "struct ISignatureAction.GenericRequest", 55 | "name": "_req", 56 | "type": "tuple" 57 | } 58 | ], 59 | "name": "RequestExecuted", 60 | "type": "event" 61 | }, 62 | { 63 | "inputs": [ 64 | { 65 | "components": [ 66 | { 67 | "internalType": "uint128", 68 | "name": "validityStartTimestamp", 69 | "type": "uint128" 70 | }, 71 | { 72 | "internalType": "uint128", 73 | "name": "validityEndTimestamp", 74 | "type": "uint128" 75 | }, 76 | { 77 | "internalType": "bytes32", 78 | "name": "uid", 79 | "type": "bytes32" 80 | }, 81 | { 82 | "internalType": "bytes", 83 | "name": "data", 84 | "type": "bytes" 85 | } 86 | ], 87 | "internalType": "struct ISignatureAction.GenericRequest", 88 | "name": "_req", 89 | "type": "tuple" 90 | }, 91 | { 92 | "internalType": "bytes", 93 | "name": "_signature", 94 | "type": "bytes" 95 | } 96 | ], 97 | "name": "verify", 98 | "outputs": [ 99 | { 100 | "internalType": "bool", 101 | "name": "success", 102 | "type": "bool" 103 | }, 104 | { 105 | "internalType": "address", 106 | "name": "signer", 107 | "type": "address" 108 | } 109 | ], 110 | "stateMutability": "view", 111 | "type": "function" 112 | } 113 | ] -------------------------------------------------------------------------------- /internal/json/TWAddress.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/TWBitMaps.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/TWMultichainRegistryStorage.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "MULTICHAIN_REGISTRY_STORAGE_POSITION", 5 | "outputs": [ 6 | { 7 | "internalType": "bytes32", 8 | "name": "", 9 | "type": "bytes32" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | } 15 | ] -------------------------------------------------------------------------------- /internal/json/TWProxy.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "address", 6 | "name": "_logic", 7 | "type": "address" 8 | }, 9 | { 10 | "internalType": "bytes", 11 | "name": "_data", 12 | "type": "bytes" 13 | } 14 | ], 15 | "stateMutability": "payable", 16 | "type": "constructor" 17 | }, 18 | { 19 | "stateMutability": "payable", 20 | "type": "fallback" 21 | }, 22 | { 23 | "stateMutability": "payable", 24 | "type": "receive" 25 | } 26 | ] -------------------------------------------------------------------------------- /internal/json/TWStorageSlot.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/TWStrings.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /internal/json/TokenBundle.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [ 4 | { 5 | "internalType": "uint256", 6 | "name": "_bundleId", 7 | "type": "uint256" 8 | } 9 | ], 10 | "name": "getTokenCountOfBundle", 11 | "outputs": [ 12 | { 13 | "internalType": "uint256", 14 | "name": "", 15 | "type": "uint256" 16 | } 17 | ], 18 | "stateMutability": "view", 19 | "type": "function" 20 | }, 21 | { 22 | "inputs": [ 23 | { 24 | "internalType": "uint256", 25 | "name": "_bundleId", 26 | "type": "uint256" 27 | }, 28 | { 29 | "internalType": "uint256", 30 | "name": "index", 31 | "type": "uint256" 32 | } 33 | ], 34 | "name": "getTokenOfBundle", 35 | "outputs": [ 36 | { 37 | "components": [ 38 | { 39 | "internalType": "address", 40 | "name": "assetContract", 41 | "type": "address" 42 | }, 43 | { 44 | "internalType": "enum ITokenBundle.TokenType", 45 | "name": "tokenType", 46 | "type": "uint8" 47 | }, 48 | { 49 | "internalType": "uint256", 50 | "name": "tokenId", 51 | "type": "uint256" 52 | }, 53 | { 54 | "internalType": "uint256", 55 | "name": "totalAmount", 56 | "type": "uint256" 57 | } 58 | ], 59 | "internalType": "struct ITokenBundle.Token", 60 | "name": "", 61 | "type": "tuple" 62 | } 63 | ], 64 | "stateMutability": "view", 65 | "type": "function" 66 | }, 67 | { 68 | "inputs": [ 69 | { 70 | "internalType": "uint256", 71 | "name": "_bundleId", 72 | "type": "uint256" 73 | } 74 | ], 75 | "name": "getUriOfBundle", 76 | "outputs": [ 77 | { 78 | "internalType": "string", 79 | "name": "", 80 | "type": "string" 81 | } 82 | ], 83 | "stateMutability": "view", 84 | "type": "function" 85 | } 86 | ] -------------------------------------------------------------------------------- /internal/json/Upgradeable.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": false, 7 | "internalType": "address", 8 | "name": "previousAdmin", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "address", 14 | "name": "newAdmin", 15 | "type": "address" 16 | } 17 | ], 18 | "name": "AdminChanged", 19 | "type": "event" 20 | }, 21 | { 22 | "anonymous": false, 23 | "inputs": [ 24 | { 25 | "indexed": true, 26 | "internalType": "address", 27 | "name": "beacon", 28 | "type": "address" 29 | } 30 | ], 31 | "name": "BeaconUpgraded", 32 | "type": "event" 33 | }, 34 | { 35 | "anonymous": false, 36 | "inputs": [ 37 | { 38 | "indexed": true, 39 | "internalType": "address", 40 | "name": "implementation", 41 | "type": "address" 42 | } 43 | ], 44 | "name": "Upgraded", 45 | "type": "event" 46 | }, 47 | { 48 | "inputs": [], 49 | "name": "proxiableUUID", 50 | "outputs": [ 51 | { 52 | "internalType": "bytes32", 53 | "name": "", 54 | "type": "bytes32" 55 | } 56 | ], 57 | "stateMutability": "view", 58 | "type": "function" 59 | }, 60 | { 61 | "inputs": [ 62 | { 63 | "internalType": "address", 64 | "name": "newImplementation", 65 | "type": "address" 66 | } 67 | ], 68 | "name": "upgradeTo", 69 | "outputs": [], 70 | "stateMutability": "nonpayable", 71 | "type": "function" 72 | }, 73 | { 74 | "inputs": [ 75 | { 76 | "internalType": "address", 77 | "name": "newImplementation", 78 | "type": "address" 79 | }, 80 | { 81 | "internalType": "bytes", 82 | "name": "data", 83 | "type": "bytes" 84 | } 85 | ], 86 | "name": "upgradeToAndCall", 87 | "outputs": [], 88 | "stateMutability": "payable", 89 | "type": "function" 90 | } 91 | ] -------------------------------------------------------------------------------- /internal/test/0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thirdweb-dev/go-sdk/595a7c15818abea485451ca86f2a015cb4413508/internal/test/0.jpg -------------------------------------------------------------------------------- /internal/test/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thirdweb-dev/go-sdk/595a7c15818abea485451ca86f2a015cb4413508/internal/test/1.jpg -------------------------------------------------------------------------------- /internal/test/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thirdweb-dev/go-sdk/595a7c15818abea485451ca86f2a015cb4413508/internal/test/2.jpg -------------------------------------------------------------------------------- /merkle/hash.go: -------------------------------------------------------------------------------- 1 | package merkle 2 | 3 | import "crypto/sha256" 4 | 5 | // sha256Digest is the reusable digest for defaultHashFunc. 6 | var sha256Digest = sha256.New() 7 | 8 | // defaultHashFunc is used when no user hash function is specified. 9 | // It implements SHA256 hash function. 10 | func defaultHashFunc(data []byte) ([]byte, error) { 11 | defer sha256Digest.Reset() 12 | sha256Digest.Write(data) 13 | return sha256Digest.Sum(nil), nil 14 | } 15 | 16 | // defaultHashFuncParal is used by parallel algorithms when no user hash function is specified. 17 | // It implements SHA256 hash function. 18 | // When implementing hash functions for paralleled algorithms, please make sure it is concurrent safe. 19 | func defaultHashFuncParal(data []byte) ([]byte, error) { 20 | digest := sha256.New() 21 | digest.Write(data) 22 | return digest.Sum(nil), nil 23 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "hardhat": "^2.9.2" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /scripts/test/await-hardhat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | printf "%s" "waiting for hardhat node " 4 | attempts=0 5 | while ! curl 127.0.0.1:8545 &> /dev/null 6 | do 7 | if [ $attempts -gt 30 ]; then 8 | printf "%s" "timed out waiting for hardhat node" 9 | exit -1 10 | fi 11 | printf "%c" "." 12 | sleep 1 13 | attempts=$((attempts+1)) 14 | done 15 | printf "\n%s\n" "Hardhat node is up and running" -------------------------------------------------------------------------------- /scripts/test/start-hardhat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | npx hardhat node 4 | -------------------------------------------------------------------------------- /thirdweb/contract_encoder.go: -------------------------------------------------------------------------------- 1 | package thirdweb 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | "math/big" 7 | "reflect" 8 | "strings" 9 | 10 | "github.com/ethereum/go-ethereum/accounts/abi" 11 | "github.com/ethereum/go-ethereum/accounts/abi/bind" 12 | "github.com/ethereum/go-ethereum/common" 13 | "github.com/ethereum/go-ethereum/core/types" 14 | ) 15 | 16 | // This interface is currently supported by all contract encoder classes and provides a generic 17 | // method to encode write function calls. 18 | type ContractEncoder struct { 19 | abi *abi.ABI 20 | contract *bind.BoundContract 21 | helper *contractHelper 22 | } 23 | 24 | func newContractEncoder(contractAbi string, helper *contractHelper) (*ContractEncoder, error) { 25 | parsedAbi, err := abi.JSON(strings.NewReader(contractAbi)) 26 | if err != nil { 27 | return nil, err 28 | } 29 | 30 | contract := bind.NewBoundContract(helper.getAddress(), parsedAbi, helper.GetProvider(), helper.GetProvider(), helper.GetProvider()) 31 | 32 | return &ContractEncoder{ 33 | abi: &parsedAbi, 34 | contract: contract, 35 | helper: helper, 36 | }, nil 37 | } 38 | 39 | // Get the unsigned transaction data for any contract call on a contract. 40 | // 41 | // signerAddress: the address expected to sign this transaction 42 | // 43 | // method: the name of the contract function to encode transaction data for 44 | // 45 | // args: the arguments to pass to the contract function. 46 | // 47 | // returns: the encoded transaction data for the transaction. 48 | // 49 | // Example 50 | // 51 | // toAddress := "0x..." 52 | // amount := 1 53 | // 54 | // // Now you can get the transaction data for the contract call. 55 | // tx, err := contract.Encoder.Encode(context.Background(), "transfer", toAddress, amount) 56 | // fmt.Println(tx.Data()) // Now you can access all transaction data, like the following fields 57 | // fmt.Println(tx.Nonce()) 58 | // fmt.Println(tx.Value()) 59 | func (encoder *ContractEncoder) Encode(ctx context.Context, signerAddress string, method string, args ...interface{}) (*types.Transaction, error) { 60 | abiMethod, exist := encoder.abi.Methods[method] 61 | if !exist { 62 | return nil, fmt.Errorf("function '%s' not found in contract '%s'", method, encoder.helper.getAddress().String()) 63 | } 64 | 65 | if len(abiMethod.Inputs) != len(args) { 66 | return nil, fmt.Errorf( 67 | "function '%s' requires %d arguments, but %d arguments were provided.\nExpected function signature '%s'", 68 | method, 69 | len(abiMethod.Inputs), 70 | len(args), 71 | abiMethod.Sig, 72 | ) 73 | } 74 | 75 | // Validate argument input types and convert to proper input types for contract 76 | // So we can allow users to pass in string intead of address, int instead of big, etc. 77 | typedArgs := []interface{}{} 78 | for i, arg := range args { 79 | input := abiMethod.Inputs[i] 80 | inputType := fmt.Sprint(input.Type) 81 | 82 | if inputType == "address" { 83 | parsedArg, ok := arg.(string) 84 | if !ok { 85 | return nil, fmt.Errorf( 86 | "argument %d (%v) should be of type 'string', but type '%v' was provided", 87 | i, 88 | input.Name, 89 | reflect.TypeOf(arg), 90 | ) 91 | } 92 | 93 | arg = common.HexToAddress(parsedArg) 94 | } else if strings.Contains(inputType, "int") { 95 | parsedArg, ok := arg.(int) 96 | if !ok { 97 | return nil, fmt.Errorf( 98 | "argument %d (%v) should be of type 'int', but type '%v' was provided", 99 | i, 100 | input.Name, 101 | reflect.TypeOf(arg), 102 | ) 103 | } 104 | 105 | arg = big.NewInt(int64(parsedArg)) 106 | } 107 | 108 | typedArgs = append(typedArgs, arg) 109 | } 110 | 111 | txOpts, err := encoder.helper.getUnsignedTxOptions(ctx, signerAddress) 112 | if err != nil { 113 | return nil, err 114 | } 115 | return encoder.contract.Transact(txOpts, method, typedArgs...) 116 | } 117 | -------------------------------------------------------------------------------- /thirdweb/contract_events_test.go: -------------------------------------------------------------------------------- 1 | package thirdweb 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | "time" 7 | 8 | "github.com/stretchr/testify/assert" 9 | ) 10 | 11 | func TestEventListener(t *testing.T) { 12 | nft := getNft() 13 | 14 | events := []ContractEvent{} 15 | subscription := nft.Events.AddEventListener( 16 | context.Background(), 17 | "TokensMinted", 18 | func (event ContractEvent) { 19 | events = append(events, event) 20 | }, 21 | ) 22 | 23 | _, err := nft.Mint(context.Background(), &NFTMetadataInput{}) 24 | assert.Nil(t, err) 25 | 26 | _, err = nft.Mint(context.Background(), &NFTMetadataInput{}) 27 | assert.Nil(t, err) 28 | 29 | <- time.After(2 * time.Second) 30 | 31 | subscription.Unsubscribe() 32 | 33 | _, err = nft.Mint(context.Background(), &NFTMetadataInput{}) 34 | assert.Nil(t, err) 35 | 36 | <- time.After(2 * time.Second) 37 | 38 | assert.Equal(t, 2, len(events)) 39 | assert.Equal(t, events[0].EventName, "TokensMinted") 40 | } 41 | 42 | func TestGetEvents(t *testing.T) { 43 | nft := getNft() 44 | 45 | _, err := nft.Mint(context.Background(), &NFTMetadataInput{}) 46 | assert.Nil(t, err) 47 | 48 | events, err := nft.Events.GetEvents(context.Background(), "TokensMinted", EventQueryOptions{}) 49 | assert.Nil(t, err) 50 | 51 | assert.Equal(t, 1, len(events)) 52 | } -------------------------------------------------------------------------------- /thirdweb/edition_test.go: -------------------------------------------------------------------------------- 1 | package thirdweb 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func getEdition() *Edition { 11 | sdk := getSDK() 12 | address, _ := sdk.Deployer.DeployEdition(context.Background(), &DeployEditionMetadata{ 13 | Name: "Edition", 14 | }) 15 | 16 | edition, _ := sdk.GetEdition(address) 17 | 18 | return edition 19 | } 20 | 21 | func TestMintEdition(t *testing.T) { 22 | edition := getEdition() 23 | 24 | balance, _ := edition.Balance(context.Background(), 0) 25 | assert.Equal(t, 0, balance) 26 | 27 | _, err := edition.Mint( 28 | context.Background(), 29 | &EditionMetadataInput{ 30 | Metadata: &NFTMetadataInput{ 31 | Name: "NFT", 32 | }, 33 | Supply: 10, 34 | }) 35 | assert.Nil(t, err) 36 | 37 | balance, _ = edition.Balance(context.Background(), 0) 38 | assert.Equal(t, 10, balance) 39 | } 40 | 41 | func TestBatchMintEdition(t *testing.T) { 42 | edition := getEdition() 43 | 44 | balance, _ := edition.Balance(context.Background(), 0) 45 | assert.Equal(t, 0, balance) 46 | 47 | _, err := edition.MintBatchTo( 48 | context.Background(), 49 | edition.Helper.GetSignerAddress().String(), 50 | []*EditionMetadataInput{ 51 | { 52 | Metadata: &NFTMetadataInput{ 53 | Name: "NFT 1", 54 | }, 55 | Supply: 1, 56 | }, 57 | { 58 | Metadata: &NFTMetadataInput{ 59 | Name: "NFT 2", 60 | }, 61 | Supply: 2, 62 | }, 63 | }, 64 | ) 65 | assert.Nil(t, err) 66 | 67 | balance, _ = edition.Balance(context.Background(), 0) 68 | assert.Equal(t, 1, balance) 69 | 70 | balance, _ = edition.Balance(context.Background(), 1) 71 | assert.Equal(t, 2, balance) 72 | 73 | nfts, _ := edition.GetAll(context.Background()) 74 | assert.Equal(t, 2, len(nfts)) 75 | assert.Equal(t, "NFT 1", nfts[0].Metadata.Name) 76 | assert.Equal(t, "NFT 2", nfts[1].Metadata.Name) 77 | } 78 | 79 | func TestBurnEdition(t *testing.T) { 80 | edition := getEdition() 81 | 82 | edition.Mint(context.Background(), &EditionMetadataInput{ 83 | Metadata: &NFTMetadataInput{ 84 | Name: "NFT", 85 | }, 86 | Supply: 10, 87 | }) 88 | 89 | balance, _ := edition.Balance(context.Background(), 0) 90 | assert.Equal(t, 10, balance) 91 | 92 | _, err := edition.Burn(context.Background(), 0, 10) 93 | assert.Nil(t, err) 94 | 95 | balance, _ = edition.Balance(context.Background(), 0) 96 | assert.Equal(t, 0, balance) 97 | } 98 | 99 | func TestTransferEdition(t *testing.T) { 100 | edition := getEdition() 101 | 102 | edition.Mint( 103 | context.Background(), 104 | &EditionMetadataInput{ 105 | Metadata: &NFTMetadataInput{ 106 | Name: "NFT", 107 | }, 108 | Supply: 10, 109 | }) 110 | 111 | balance, _ := edition.Balance(context.Background(), 0) 112 | assert.Equal(t, 10, balance) 113 | 114 | _, err := edition.Transfer(context.Background(), secondaryWallet, 0, 10) 115 | assert.Nil(t, err) 116 | 117 | balance, _ = edition.Balance(context.Background(), 0) 118 | assert.Equal(t, 0, balance) 119 | } 120 | 121 | func TestSignatureMint(t *testing.T) { 122 | edition := getEdition() 123 | 124 | payload, err := edition.Signature.Generate( 125 | context.Background(), 126 | &Signature1155PayloadInput{ 127 | To: edition.Helper.GetSignerAddress().String(), 128 | Price: 0, 129 | CurrencyAddress: "0x0000000000000000000000000000000000000000", 130 | MintStartTime: 0, 131 | MintEndTime: 100000000000000, 132 | PrimarySaleRecipient: "0x0000000000000000000000000000000000000000", 133 | Metadata: &NFTMetadataInput{ 134 | Name: "Sigmint", 135 | }, 136 | RoyaltyRecipient: "0x0000000000000000000000000000000000000000", 137 | RoyaltyBps: 0, 138 | Quantity: 1, 139 | }, 140 | ) 141 | assert.Nil(t, err) 142 | 143 | valid, err := edition.Signature.Verify(context.Background(), payload) 144 | assert.Nil(t, err) 145 | assert.True(t, valid) 146 | 147 | _, err = edition.Signature.Mint(context.Background(), payload) 148 | assert.Nil(t, err) 149 | 150 | balance, _ := edition.Balance(context.Background(), 0) 151 | assert.Equal(t, 1, balance) 152 | } 153 | -------------------------------------------------------------------------------- /thirdweb/error.go: -------------------------------------------------------------------------------- 1 | package thirdweb 2 | 3 | import "fmt" 4 | 5 | type notFoundError struct { 6 | identifier interface{} 7 | } 8 | 9 | func (m *notFoundError) Error() string { 10 | return fmt.Sprintf("Could not find with id %v", m.identifier) 11 | } 12 | 13 | type unmarshalError struct { 14 | body string 15 | typeName string 16 | UnderlyingError error 17 | } 18 | 19 | func (m *unmarshalError) Error() string { 20 | return fmt.Sprintf("Could not unmarshal %v with body %v", m.typeName, m.body) 21 | } 22 | 23 | type noSignerError struct { 24 | typeName string 25 | Err error 26 | } 27 | 28 | func (m *noSignerError) Error() string { 29 | return fmt.Sprintf("Could not proceed with transaction in %v module, missing SigningMethod", m.typeName) 30 | } 31 | 32 | type noAddressError struct { 33 | typeName string 34 | } 35 | 36 | func (m *noAddressError) Error() string { 37 | return fmt.Sprintf("Could not proceed with transaction in %v module, missing or invalid signer address", m.typeName) 38 | } 39 | 40 | type unsupportedFunctionError struct { 41 | typeName string 42 | body string 43 | } 44 | 45 | func (m *unsupportedFunctionError) Error() string { 46 | return fmt.Sprintf("The method you're executing in the %v module is not supported yet. %v", m.typeName, m.body) 47 | } 48 | 49 | type failedToUploadError struct { 50 | statusCode int 51 | Payload interface{} 52 | UnderlyingError error 53 | } 54 | 55 | func (m *failedToUploadError) Error() string { 56 | return fmt.Sprintf("Failed to upload, status code = %d", m.statusCode) 57 | } 58 | -------------------------------------------------------------------------------- /thirdweb/keys.go: -------------------------------------------------------------------------------- 1 | package thirdweb 2 | 3 | import ( 4 | "crypto/sha256" 5 | "encoding/hex" 6 | ) 7 | 8 | func deriveClientId(secretKey string) string { 9 | hasher := sha256.New() 10 | hasher.Write([]byte(secretKey)) 11 | hashed := hex.EncodeToString(hasher.Sum(nil)) 12 | return hashed[:32] 13 | } -------------------------------------------------------------------------------- /thirdweb/nft_drop_test.go: -------------------------------------------------------------------------------- 1 | package thirdweb 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func getNftDrop() *NFTDrop { 11 | sdk := getSDK() 12 | address, _ := sdk.Deployer.DeployNFTDrop(context.Background(), &DeployNFTDropMetadata{ 13 | Name: "NFT Drop", 14 | }) 15 | drop, _ := sdk.GetNFTDrop(address) 16 | 17 | return drop 18 | } 19 | 20 | func TestCreateBatchNftDrop(t *testing.T) { 21 | drop := getNftDrop() 22 | 23 | balance, _ := drop.Balance(context.Background()) 24 | assert.Equal(t, 0, balance) 25 | 26 | _, err := drop.CreateBatch( 27 | context.Background(), 28 | []*NFTMetadataInput{ 29 | { 30 | Name: "NFT 1", 31 | }, 32 | { 33 | Name: "NFT 2", 34 | }, 35 | }, 36 | ) 37 | assert.Nil(t, err) 38 | 39 | nfts, _ := drop.GetAllUnclaimed(context.Background()) 40 | assert.Equal(t, 2, len(nfts)) 41 | assert.Equal(t, nfts[0].Name, "NFT 1") 42 | assert.Equal(t, nfts[1].Name, "NFT 2") 43 | } 44 | -------------------------------------------------------------------------------- /thirdweb/provider_handler.go: -------------------------------------------------------------------------------- 1 | package thirdweb 2 | 3 | import ( 4 | "context" 5 | "crypto/ecdsa" 6 | "errors" 7 | "math/big" 8 | 9 | "github.com/ethereum/go-ethereum/accounts/abi/bind" 10 | "github.com/ethereum/go-ethereum/common" 11 | "github.com/ethereum/go-ethereum/core/types" 12 | "github.com/ethereum/go-ethereum/crypto" 13 | "github.com/ethereum/go-ethereum/ethclient" 14 | ) 15 | 16 | type ProviderHandler struct { 17 | provider *ethclient.Client 18 | privateKey *ecdsa.PrivateKey 19 | rawPrivateKey string 20 | signerAddress common.Address 21 | } 22 | 23 | func NewProviderHandler(provider *ethclient.Client, privateKey string) (*ProviderHandler, error) { 24 | handler := &ProviderHandler{ 25 | provider: provider, 26 | } 27 | 28 | if privateKey != "" { 29 | if err := handler.updateAccount(privateKey); err != nil { 30 | return nil, err 31 | } 32 | } 33 | 34 | return handler, nil 35 | } 36 | 37 | func (handler *ProviderHandler) UpdateProvider(provider *ethclient.Client) { 38 | handler.provider = provider 39 | } 40 | 41 | func (handler *ProviderHandler) UpdatePrivateKey(privateKey string) error { 42 | if err := handler.updateAccount(privateKey); err != nil { 43 | return err 44 | } else { 45 | return nil 46 | } 47 | } 48 | 49 | func (handler *ProviderHandler) GetProvider() *ethclient.Client { 50 | return handler.provider 51 | } 52 | 53 | func (handler *ProviderHandler) GetSignerAddress() common.Address { 54 | return handler.signerAddress 55 | } 56 | 57 | func (handler *ProviderHandler) GetRawPrivateKey() string { 58 | return handler.rawPrivateKey 59 | } 60 | 61 | func (handler *ProviderHandler) GetPrivateKey() *ecdsa.PrivateKey { 62 | return handler.privateKey 63 | } 64 | 65 | func (handler *ProviderHandler) GetChainID(ctx context.Context) (*big.Int, error) { 66 | return handler.provider.ChainID(ctx) 67 | } 68 | 69 | func (handler *ProviderHandler) getSigner(ctx context.Context) (bind.SignerFn, error) { 70 | chainId, err := handler.GetChainID(ctx) 71 | if err != nil { 72 | return nil, err 73 | } 74 | return func(address common.Address, transaction *types.Transaction) (*types.Transaction, error) { 75 | return types.SignTx(transaction, types.LatestSignerForChainID(chainId), handler.privateKey) 76 | }, nil 77 | } 78 | 79 | func (handler *ProviderHandler) updateAccount(privateKey string) error { 80 | if key, publicAddress, err := processPrivateKey(privateKey); err != nil { 81 | return err 82 | } else { 83 | handler.privateKey = key 84 | handler.signerAddress = publicAddress 85 | handler.rawPrivateKey = privateKey 86 | return nil 87 | } 88 | } 89 | 90 | func getPublicAddress(key *ecdsa.PrivateKey) (common.Address, error) { 91 | publicKey := key.Public() 92 | 93 | publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) 94 | if !ok { 95 | // TODO: return better error 96 | return [20]byte{}, errors.New("Failed to decode public key from private key, maybe wrong format") 97 | } 98 | 99 | return crypto.PubkeyToAddress(*publicKeyECDSA), nil 100 | } 101 | 102 | func processPrivateKey(privateKey string) (*ecdsa.PrivateKey, common.Address, error) { 103 | key, err := crypto.HexToECDSA(privateKey) 104 | if err != nil { 105 | // TODO: return better error 106 | return nil, [20]byte{}, err 107 | } 108 | 109 | publicAddress, err := getPublicAddress(key) 110 | if err != nil { 111 | // TODO: return better error 112 | return nil, [20]byte{}, err 113 | } 114 | 115 | return key, publicAddress, nil 116 | } 117 | -------------------------------------------------------------------------------- /thirdweb/sharded_merkle_tree_test.go: -------------------------------------------------------------------------------- 1 | package thirdweb 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "encoding/hex" 7 | "encoding/json" 8 | "fmt" 9 | "net/http" 10 | "testing" 11 | 12 | "github.com/stretchr/testify/assert" 13 | ) 14 | 15 | func TestMerkleTreeSmall(t *testing.T) { 16 | sdk, err := NewThirdwebSDK("http://localhost:8545", nil) 17 | if err != nil { 18 | panic(err) 19 | } 20 | 21 | uri := "ipfs://QmeAx8aRvsYXN6mzky72b9V1HWokb271FoBmDu4tatC8hE/0" 22 | storage := newIpfsStorage("", defaultIpfsGatewayUrl, http.DefaultClient) 23 | 24 | body, err := storage.Get(context.Background(), uri) 25 | if err != nil { 26 | panic(err) 27 | } 28 | assert.Nil(t, err) 29 | 30 | var info ShardedMerkleTreeInfo 31 | if err := json.Unmarshal(body, &info); err != nil { 32 | panic(err) 33 | } 34 | 35 | tree := shardedMerkleTreeFromInfo(&info, storage) 36 | proof, err := tree.GetProof(context.Background(), "0x0000000000000000000000000000000000000000", sdk.GetProvider()) 37 | if err != nil { 38 | panic(err) 39 | } 40 | assert.Nil(t, err) 41 | 42 | fmt.Printf("%#v", proof.Proof) 43 | } 44 | 45 | func TestMerkleTreeEdgeCase(t *testing.T) { 46 | sdk, err := NewThirdwebSDK("http://localhost:8545", nil) 47 | if err != nil { 48 | panic(err) 49 | } 50 | 51 | uri := "ipfs://QmacDnA4i7Za19LpE3pngwLfUtakn71ghaKKjTkM2Phzj8/0" 52 | storage := newIpfsStorage("", defaultIpfsGatewayUrl, http.DefaultClient) 53 | 54 | body, err := storage.Get(context.Background(), uri) 55 | if err != nil { 56 | panic(err) 57 | } 58 | assert.Nil(t, err) 59 | 60 | var info ShardedMerkleTreeInfo 61 | if err := json.Unmarshal(body, &info); err != nil { 62 | panic(err) 63 | } 64 | 65 | tree := shardedMerkleTreeFromInfo(&info, storage) 66 | proof, err := tree.GetProof(context.Background(), "0x9e1b8A86fFEE4a7175DAE4bDB1cC12d111Dcb3D6", sdk.GetProvider()) 67 | if err != nil { 68 | panic(err) 69 | } 70 | assert.Nil(t, err) 71 | assert.NotNil(t, proof) 72 | 73 | correctProofs := []string{ 74 | "36f4f9e91158fce37ae8b1f3443025384d220b25db67976898893f3418722bee", 75 | "35a5350f8ef7d3351bad08b2476dba6ec6939d501b889d98e726ae6a3e822ef4", 76 | "8cbf083257ff0aa97fb2b28f0b9a07c3dc6e9820f89b584ef0137d50f82b7b71", 77 | "e0be2bf7a799f716120eb3f15b6e2139e701c070b7333d5d19baf2154c2c9f95", 78 | "91d36657024683736d0c306fcbe60f236f24dcd3c03c5c39dc48c1c0fb08418d", 79 | } 80 | 81 | for i, correctProof := range correctProofs { 82 | proofBytes, err := hex.DecodeString(correctProof) 83 | assert.Nil(t, err) 84 | 85 | assert.Equal(t, bytes.Compare(proof.Proof[i][:], proofBytes), 0) 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /thirdweb/snapshots.go: -------------------------------------------------------------------------------- 1 | package thirdweb 2 | 3 | import ( 4 | "context" 5 | "crypto/sha256" 6 | "encoding/hex" 7 | "fmt" 8 | 9 | "github.com/cbergoon/merkletree" 10 | "github.com/mitchellh/mapstructure" 11 | ) 12 | 13 | type SnapshotInput struct { 14 | Address string 15 | MaxClaimable int 16 | } 17 | 18 | type SnapshotClaim struct { 19 | Address string `json:"address"` 20 | MaxClaimable int `json:"maxClaimable"` 21 | Proof []string `json:"proof"` 22 | } 23 | 24 | type SnapshotInfo struct { 25 | MerkleRoot string `json:"merkleRoot"` 26 | Claims []SnapshotClaim `json:"claims"` 27 | } 28 | 29 | type SnapshotInfos struct { 30 | Snapshot SnapshotInfo 31 | MerkleRoot string 32 | SnapshotUri string 33 | } 34 | 35 | type MerkleContent struct { 36 | address string 37 | } 38 | 39 | func (t MerkleContent) CalculateHash() ([]byte, error) { 40 | h := sha256.New() 41 | if _, err := h.Write([]byte(t.address)); err != nil { 42 | return nil, err 43 | } 44 | 45 | return h.Sum(nil), nil 46 | } 47 | 48 | func (t MerkleContent) Equals(other merkletree.Content) (bool, error) { 49 | return t.address == other.(MerkleContent).address, nil 50 | } 51 | 52 | func createSnapshot( 53 | snapshotInput []*SnapshotInput, 54 | tokenDecimals int, 55 | storage storage, 56 | ) (*SnapshotInfos, error) { 57 | addresses := []string{} 58 | for _, s := range snapshotInput { 59 | addresses = append(addresses, s.Address) 60 | } 61 | 62 | hasDuplicates := make(map[string]bool) 63 | for _, address := range addresses { 64 | if hasDuplicates[address] { 65 | return nil, fmt.Errorf("DUPLICATE_LEAFS: Address %s is duplicated in snapshot", address) 66 | } 67 | hasDuplicates[address] = true 68 | } 69 | 70 | merkleContent := []merkletree.Content{} 71 | for _, address := range addresses { 72 | merkleContent = append(merkleContent, MerkleContent{address: address}) 73 | } 74 | 75 | tree, err := merkletree.NewTree(merkleContent) 76 | if err != nil { 77 | return nil, err 78 | } 79 | 80 | merkleRoot := hex.EncodeToString(tree.MerkleRoot()) 81 | claims := []SnapshotClaim{} 82 | for _, s := range snapshotInput { 83 | proof, _, _ := tree.GetMerklePath(MerkleContent{address: s.Address}) 84 | encodedProofs := []string{} 85 | for _, p := range proof { 86 | encodedProofs = append(encodedProofs, hex.EncodeToString(p)) 87 | } 88 | 89 | claims = append(claims, SnapshotClaim{ 90 | Address: s.Address, 91 | MaxClaimable: s.MaxClaimable, 92 | Proof: encodedProofs, 93 | }) 94 | } 95 | 96 | snapshot := SnapshotInfo{ 97 | MerkleRoot: merkleRoot, 98 | Claims: claims, 99 | } 100 | 101 | // TODO: Hash address and max claimable into content 102 | 103 | // TODO: Upload metadata to IPFS 104 | snapshotToUpload := map[string]interface{}{} 105 | if err := mapstructure.Decode(snapshot, &snapshotToUpload); err != nil { 106 | return nil, err 107 | } 108 | uri, err := storage.Upload(context.Background(), snapshotToUpload, "", "") 109 | if err != nil { 110 | return nil, err 111 | } 112 | 113 | return &SnapshotInfos{ 114 | Snapshot: snapshot, 115 | MerkleRoot: merkleRoot, 116 | SnapshotUri: uri, 117 | }, nil 118 | } 119 | -------------------------------------------------------------------------------- /thirdweb/token_test.go: -------------------------------------------------------------------------------- 1 | package thirdweb 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func getToken() *Token { 11 | sdk := getSDK() 12 | address, _ := sdk.Deployer.DeployToken(context.Background(), &DeployTokenMetadata{ 13 | Name: "Token", 14 | }) 15 | token, _ := sdk.GetToken(address) 16 | 17 | return token 18 | } 19 | 20 | func TestMintToken(t *testing.T) { 21 | token := getToken() 22 | 23 | balance, _ := token.Balance(context.Background()) 24 | assert.Equal(t, float64(0), balance.DisplayValue) 25 | 26 | _, err := token.Mint(context.Background(), 0.1) 27 | assert.Nil(t, err) 28 | 29 | balance, _ = token.Balance(context.Background()) 30 | assert.Equal(t, float64(0.1), balance.DisplayValue) 31 | } 32 | 33 | func TestBatchMintToken(t *testing.T) { 34 | token := getToken() 35 | 36 | balance, _ := token.Balance(context.Background()) 37 | assert.Equal(t, float64(0), balance.DisplayValue) 38 | 39 | _, err := token.MintBatchTo( 40 | context.Background(), 41 | []*TokenAmount{ 42 | { 43 | ToAddress: token.Helper.GetSignerAddress().String(), 44 | Amount: 1.5, 45 | }, 46 | { 47 | ToAddress: secondaryWallet, 48 | Amount: 2.5, 49 | }, 50 | }, 51 | ) 52 | assert.Nil(t, err) 53 | 54 | balance, _ = token.Balance(context.Background()) 55 | assert.Equal(t, float64(1.5), balance.DisplayValue) 56 | 57 | supply, _ := token.TotalSupply(context.Background()) 58 | assert.Equal(t, float64(4), supply.DisplayValue) 59 | } 60 | 61 | func TestBurnToken(t *testing.T) { 62 | token := getToken() 63 | 64 | token.Mint(context.Background(), 10) 65 | 66 | balance, _ := token.Balance(context.Background()) 67 | assert.Equal(t, float64(10), balance.DisplayValue) 68 | 69 | _, err := token.Burn(context.Background(), 10) 70 | assert.Nil(t, err) 71 | 72 | balance, _ = token.Balance(context.Background()) 73 | assert.Equal(t, float64(0), balance.DisplayValue) 74 | } 75 | 76 | func TestTransferToken(t *testing.T) { 77 | token := getToken() 78 | 79 | token.Mint(context.Background(), 10) 80 | 81 | balance, _ := token.Balance(context.Background()) 82 | assert.Equal(t, float64(10), balance.DisplayValue) 83 | 84 | _, err := token.Transfer(context.Background(), secondaryWallet, 10) 85 | assert.Nil(t, err) 86 | 87 | balance, _ = token.Balance(context.Background()) 88 | assert.Equal(t, float64(0), balance.DisplayValue) 89 | } 90 | --------------------------------------------------------------------------------