Compare commits

...
Author SHA1 Message Date
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
a20be881e3 Version Packages (#406)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-29 12:09:38 +13:00
Joaquim VergesandGitHub 47f8945325 [SDK] improve error parsing (#414) 2022-11-29 11:45:33 +13:00
Furqan RydhanandGitHub 1b0bf99da7 Improvements to the App Deploy Flow (#413) 2022-11-28 14:23:44 -08:00
f03be398e0 [SDK] Update signTypedData domain to match contract (#412)
Co-authored-by: Joaquim Verges <[email protected]>
2022-11-28 03:00:50 +00:00
27996cb4bc [CLI] - feat: add solana support to cli (#403)
Co-authored-by: Jarrod Watts <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
2022-11-24 01:01:00 +00:00
2eaa67acbe [CLI+SDK] app-uri (#283)
Co-authored-by: Furqan Rydhan <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
2022-11-23 09:17:29 +00:00
Jonas Daniels aafd7968df bring the registry-url back apparently it was important 2022-11-23 01:05:43 -08:00
Jonas DanielsandGitHub 48797c7cf0 [SDK] - add gasless feature detection (#408) 2022-11-23 00:53:59 -08:00
Jonas DanielsandGitHub 4edcb37100 update prettier & format (#407) 2022-11-23 06:41:39 +00:00
83dcaf7058 Expose sdk.fromWallet and wallet classes (#402)
Co-authored-by: Jonas Daniels <[email protected]>
2022-11-22 18:15:28 -05:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
b4e005be7f Version Packages (#401)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-22 14:31:57 -08:00
Nacho IacovinoandGitHub ccb7db4873 [Solana + React] Update hooks for creators/royalties (#405) 2022-11-22 19:22:51 +00:00
Jonas DanielsandGitHub 9151aa7dc8 [SDK] - expose getDefaultTrustedForwarders helper fn (#404) 2022-11-22 03:35:01 +00:00
5a01c537e3 [DO NOT MERGE] Update to Metaplex v0.17 (#305)
Co-authored-by: Jonas Daniels <[email protected]>
2022-11-21 16:14:39 -08:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
f09c153ff7 Version Packages (#391)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-21 15:22:56 -08:00
Nacho IacovinoandGitHub 15431621fd [React] Remove console.log (#400) 2022-11-21 20:03:32 +00:00
Jonas DanielsandGitHub 887af24450 [SDK] - fix error handling for nullish error values (#399) 2022-11-21 18:52:02 +00:00
Jonas DanielsandGitHub 15514f190a [SDK] - add default value option to constructorParams schema (#398) 2022-11-21 18:28:18 +00:00
Adam MajmudarandGitHub 72589ec234 Call user callback in getUser (#397) 2022-11-21 17:46:18 +00:00
Jonas DanielsandGitHub f8bceec10c fix solana claim condition native token (#395) 2022-11-19 05:36:42 +00:00
Adam MajmudarandGitHub 7c0744a006 Add support for total supply and pagination on get all (#388) 2022-11-18 02:21:32 +00:00
Nacho IacovinoandGitHub 846022e2cf [React] Fix unlimited price (#392) 2022-11-17 22:25:25 +00:00
Joaquim VergesandGitHub 96bd92e724 [SDK] Expose getAllDetectedFeatures(ABI) helper function (#390) 2022-11-17 14:07:37 -08:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
c2b6d977ed Version Packages (#383)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-16 14:02:50 -08:00
7cb8e59be4 [SDK] Add new Drop contract implementation addresses (#364)
Co-authored-by: Jonas Daniels <[email protected]>
Co-authored-by: Adam Majmudar <[email protected]>
2022-11-16 21:52:01 +00:00
Adam MajmudarandGitHub 04a47e8971 Add retroactive creator and royalty update option (#385) 2022-11-16 21:37:45 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8a6a97a3e9 Bump loader-utils from 2.0.3 to 2.0.4 (#384)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-16 19:51:40 +00:00
Jonas DanielsandGitHub 612bcdd16f [REACT] - update gnosis connector (#386) 2022-11-16 19:34:27 +00:00
Jonas DanielsandGitHub 0ed77d2c9e [SDK] - add constructorParams to schema for better release -> deploy (#382) 2022-11-15 20:47:54 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
7129aef6e1 Version Packages (#370)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-11 08:51:19 -08:00
Joaquim VergesandGitHub f50b74819d [SDK] make isConnected sync, remove useless fn (#381) 2022-11-11 06:14:24 +00:00
Joaquim VergesandGitHub 3eba69afd7 [SDK] expose signer's chain id via sdk.wallet (#380) 2022-11-11 00:42:05 +00:00
Jarrod WattsandGitHub 98c2253e8f [SDK] Docs - Add await before sdk.getContract snippets (#379) 2022-11-10 16:08:31 -08:00
32d91ef709 [REACT] Fix Border Radius for Safari (#378)
Co-authored-by: Jarrod Watts <[email protected]>
2022-11-10 09:53:17 -08:00
Adam MajmudarandGitHub b79dc18f7a Add event filtering on topics (#377) 2022-11-09 11:51:13 -05:00
Adam MajmudarandGitHub 4af785c37c Add TokensClaimed event to tiered-drop (#376) 2022-11-08 20:34:45 +00:00
Adam MajmudarandGitHub 6f818f393e Updated tiered-drop contract (#373) 2022-11-03 17:03:00 -07:00
Adam MajmudarandGitHub 97ed4779a9 Update nft drop claimTo documentation (#372) 2022-11-03 22:42:42 +00:00
Nacho IacovinoandGitHub 2d3fca5237 [React] Add useClaimerProofs hook (#369) 2022-11-03 01:17:15 +01:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
7016019f2a Version Packages (#366)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-02 15:16:25 -07:00
Joaquim VergesandGitHub 4e7b293c54 [SDK] Fix handling of old allowlist proof format (#368) 2022-11-02 14:11:13 -07:00
Jonas DanielsandGitHub c9c0e4ff39 [SDK] - make EVM side react native compatible (#365) 2022-11-02 05:38:56 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
06c24c153a Version Packages (#361)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-01 16:13:47 -07:00
aa6d9ed75d [SDK] Support new Drop claim conditions mechanics (#333)
Co-authored-by: adam-maj <[email protected]>
Co-authored-by: Adam Majmudar <[email protected]>
2022-11-01 23:07:10 +00:00
Joaquim VergesandGitHub 42a606588d [SDK] Fix fetching NFTs with numbers as ids (#362) 2022-11-01 22:01:01 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
2820761003 Version Packages (#360)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-01 13:49:34 -07:00
Adam MajmudarandGitHub 5200d5d7e7 Add support for TieredDrop in extensions (#329) 2022-11-01 13:48:48 -07:00
Joaquim VergesandGitHub e731c1a7c3 [SDK] Allow fetching claimerProofs from any claim condition (#359) 2022-10-31 23:26:27 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
2e8d3fd6e7 Version Packages (#358)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-28 18:14:35 -07:00
Nacho IacovinoandGitHub cc4613b5fd [React] Add Pack and Multiwrap as NFTContract types (#356) 2022-10-29 01:28:40 +02:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
78566babaa Version Packages (#354)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-28 10:29:57 -07:00
Joaquim VergesandGitHub 65fc7ba6ff [SDK] Expose claimCondtions.getClaimerProofs(address) (#357) 2022-10-28 10:25:36 -07:00
Nacho IacovinoandGitHub 1c24c3c3c4 [Multi] Add useUpdateCreator hook, fix CreatorInput schema (#353) 2022-10-26 18:19:32 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
408c5a81fa Version Packages (#347)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-26 08:38:25 -07:00
Joaquim VergesandGitHub 352291791e [SDK, React] expose marketplace.auction.executeSale (#352) 2022-10-26 00:19:01 +00:00
Jonas DanielsandGitHub aabbb149e8 [React] - fix wallet connection during hot reload (#351) 2022-10-25 22:48:39 +00:00
Jonas DanielsandGitHub d59450f814 do not release e2e tests (#350) 2022-10-25 20:29:22 +00:00
7d9a4c6abc Update name of useRoyalty, and update (#348)
Co-authored-by: Jonas Daniels <[email protected]>
2022-10-25 19:56:09 +00:00
Jonas DanielsandGitHub 99806e595d [VARIOUS] - exclude sizes of test files etc (#349) 2022-10-25 18:39:30 +00:00
Nacho IacovinoandGitHub 21c21c1adf resolveReleasesFromAddress -> resolveContractUriFromAddress (#344) 2022-10-24 23:43:43 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
4b10719047 Version Packages (#345)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-24 16:18:44 -07:00
Joaquim VergesandGitHub 989cf7347c [React, SDK] Small fixes for useOffers and makeOffers (#346) 2022-10-24 23:09:32 +00:00
Joaquim VergesandGitHub 72227b2e16 [SDK, React] Expose new useOffers and useMakeOffer hooks (#343) 2022-10-24 15:28:34 -07:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
ed6c54f20d Version Packages (#336)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-21 13:26:24 -07:00
Joaquim VergesandGitHub 26116a6f63 [SDK] Update to new univeral RPC endpoint (#342) 2022-10-21 13:21:11 -07:00
Jonas DanielsandGitHub f11a2719ff [workflow] github hosted runners (#340) 2022-10-20 22:02:58 -07:00
Jonas DanielsandGitHub ef27aad0aa [Various, React] - add initial e2e testing setup (#327) 2022-10-21 04:19:04 +00:00
Nacho IacovinoandGitHub b03a902145 [React] Docs update (#339) 2022-10-20 20:17:01 -07:00
Adam MajmudarandGitHub 340605b507 Clean native token address in changeset (#337) 2022-10-20 23:57:55 +00:00
Adam MajmudarandGitHub 15f8006e1f Export smart contract (#335) 2022-10-20 23:46:02 +00:00
Adam MajmudarandGitHub 811c5a1166 Update code snippets for signature minting (#334) 2022-10-20 23:29:07 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
c41a80d86d Version Packages (#331)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-20 15:35:12 -07:00
Joaquim VergesandGitHub ad851f7b4d [SDK] Fix for finding addresses in legacy merkle tree format (#332) 2022-10-20 21:35:52 +00:00
Joaquim VergesandGitHub 6218c88584 [SDK] Fix for deploy byte parameters (#330) 2022-10-20 04:47:55 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
c9b564feaf Version Packages (#323)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-19 21:19:06 -07:00
Adam MajmudarandGitHub 87fd6ab14e Update storage download on fail (#324) 2022-10-19 12:44:36 -07:00
Joaquim VergesandGitHub df74340fa5 [SDK] Import cbor-x fully for es builds (#328) 2022-10-19 17:46:54 +00:00
Joaquim VergesandGitHub a57b4f01f3 [SDK] Implement sharded merkle trees for lightweight allowlist checks (#321) 2022-10-19 16:54:09 +00:00
Jonas DanielsandGitHub 126752d7d0 [Various] - clean up extraneous dependencies (#326) 2022-10-18 23:56:04 -07:00
89ff921a7d Fix vite (#315)
Co-authored-by: Jonas Daniels <[email protected]>
Co-authored-by: Joaquim Verges <[email protected]>
2022-10-18 15:23:57 -07:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
9124b3180c Version Packages (#308)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-18 15:02:14 -07:00
Adam MajmudarandGitHub f41a443c57 Add update creators and update royalty (#320) 2022-10-18 21:50:47 +00:00
Joaquim VergesandGitHub b7cd744cd0 [SDK] Sign multiple solana claims at once (#322) 2022-10-18 21:35:03 +00:00
bb1b4e6ac3 [React] Add useMinimumNextBid hook (#318)
Co-authored-by: Jonas Daniels <[email protected]>
2022-10-18 11:57:26 -07:00
2f8ec89c4c [SDK, React] Expose total claimed/unclaimed supply for erc721 contracts (#319)
Co-authored-by: Nacho Iacovino <[email protected]>
2022-10-17 18:17:54 -07:00
Joaquim VergesandGitHub 6ae52664e5 [React] Fix passing wrong RPC url to UserWallet when using an external signer (#316) 2022-10-17 22:26:15 +00:00
Adam MajmudarandGitHub 4f867e15ed Fix supply in nft.get() (#317) 2022-10-17 19:17:43 +00:00
cc8f983615 fix typo (#314)
Co-authored-by: Joaquim Verges <[email protected]>
2022-10-16 22:27:40 +00:00
Joaquim VergesandGitHub f45ef62128 [SDK] return fallback metadata when tokenId is not found on nft contract (#313) 2022-10-16 15:15:26 -07:00
9727502eb3 Add useMintNFTSupply hook (#310)
Co-authored-by: Jonas Daniels <[email protected]>
2022-10-14 13:32:43 -07:00
Adam MajmudarandGitHub b6eec6146c [Solana] Add quantity to mint additional supply (#312) 2022-10-14 19:23:07 +00:00
88daa3c5cb [SDK] Check for undefined ABI (#309)
Co-authored-by: Joaquim Verges <[email protected]>
2022-10-14 03:37:40 +00:00
Adam MajmudarandGitHub 53c6507669 Add deploy event listener (#306) 2022-10-13 21:28:24 +00:00
YashandGitHub 782b58d3f6 [SDK] Fix multicall txns in a gasless setup (#307) 2022-10-13 11:57:02 -07:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
e17e41f4d1 Version Packages (#304)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-12 15:22:33 -07:00
Joaquim VergesandGitHub 712b11a43e [SDK] Fix not getting real owner of Solana NFTs (#303) 2022-10-12 22:12:53 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
306debb029 Version Packages (#302)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-12 10:57:32 -07:00
Joaquim VergesandGitHub 86f0ceff46 [React] Remove useAddress hook for now (#301) 2022-10-12 17:54:14 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
7f0d1ec947 Version Packages (#300)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-12 10:23:15 -07:00
Joaquim VergesandGitHub b1218cbd7d [React] Recreate SDK on wallet changes to propagate to useAddress and other hooks (#299) 2022-10-12 10:12:21 -07:00
Joaquim Verges 97ef35ce0f [SDK] docstrings for claim conditions 2022-10-12 08:48:58 -07:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
1f46f270cd Version Packages (#267)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-12 00:36:55 -07:00
Jonas DanielsandGitHub e8c25ed0f2 [React] - fix getBalance (#298) 2022-10-12 05:28:15 +00:00
Jonas DanielsandGitHub 78d6d3c159 [SDK] - fix solana getAddress (#297) 2022-10-12 04:49:39 +00:00
Joaquim Verges c72d92956a update generate snippets scripts 2022-10-11 21:28:39 -07:00
Jonas DanielsandGitHub cf88795376 [SDK, React] - useBalance hook (#296) 2022-10-12 04:15:06 +00:00
Jonas DanielsandGitHub 47287fb189 [Various] - fix lint (#295) 2022-10-11 21:02:38 -07:00
Joaquim Verges 3763326c25 [React] Fix docstrings 2022-10-11 20:32:10 -07:00
Joaquim Verges 894eb27dfa [SDK] Fix docstrings 2022-10-11 20:21:11 -07:00
Joaquim VergesandGitHub 8b3b97c8f7 [SDK] Fix getAllClaimed for Solana NFT drops (#293) 2022-10-12 00:31:19 +00:00
Jonas DanielsandGitHub 89d87a5eb3 [SDK] - fix batch upload for lazy mint (#294) 2022-10-12 00:18:15 +00:00
Jonas DanielsandGitHub 492a818079 [SOL] - expose useAddress() (#292) 2022-10-11 21:10:43 +00:00
Jonas DanielsandGitHub 86f608390a [React] - expose .program on useProgram() (#291) 2022-10-11 21:00:56 +00:00
Jonas DanielsandGitHub 8096c78b46 [SDK, React] - claim changes (#290) 2022-10-11 20:48:51 +00:00
Nacho IacovinoandGitHub 521a49c6ec [Solana] Standarize use claim (#289) 2022-10-11 10:50:35 -07:00
Joaquim VergesandGitHub 25a4773bba [SDK] Add pagination to getAll() for solana nft collections (#286) 2022-10-11 05:16:20 +00:00
18381fac73 Fix errorneous ERC20 Allowance check (#280)
Co-authored-by: Joaquim Verges <[email protected]>
2022-10-10 21:56:16 +00:00
Joaquim VergesandGitHub 89b5c6fe07 [SDK] Make solana drop creation and register transactions sequential (#285) 2022-10-10 14:43:09 -07:00
Joaquim VergesandGitHub 4dccccc6fa [SDK] Solana docs update (#284) 2022-10-10 12:44:55 -07:00
Jarrod WattsandGitHub de15e4212f [REACT] - Update Broken Links to Portal in README (#281) 2022-10-10 00:54:37 +00:00
Jarrod WattsandGitHub 1f41adbd2c [REACT] - Fix useActiveClaimCondition invariant failing for token ID 0 (#282) 2022-10-10 11:13:00 +11:00
Furqan RydhanandGitHub 1918495f2e Command Updates (detect -> build) + helper text (#279) 2022-10-09 16:21:07 -07:00
24514a6e9f Fr/command updates (#276)
Co-authored-by: Joaquim Verges <[email protected]>
2022-10-08 03:29:20 +00:00
Adam MajmudarandGitHub ad06c5b289 Add auth support to react and auth packages (#274) 2022-10-07 21:20:36 +00:00
Adam MajmudarandGitHub 9de3f8c8e9 Add support for recursive folder upload (#277) 2022-10-07 19:09:40 +00:00
Joaquim VergesandGitHub b1fa17158d [SDK] Expose maxClaimable and disallow claiming drops by default (#273) 2022-10-07 02:16:52 +00:00
Nacho IacovinoandGitHub 2bdf1984cb [Solana] Add claim conditions hooks (#272) 2022-10-07 02:36:20 +02:00
Adam MajmudarandGitHub df048af605 Add support for auth to Solana (#271) 2022-10-06 17:05:18 -07:00
Joaquim VergesandGitHub 41507d32a7 [SDK] Solana Program Registry Integration (#270) 2022-10-06 16:21:17 -07:00
Jonas DanielsandGitHub b2cadf164c [SDK, React] - remove deprecated chains (#269) 2022-10-06 00:20:53 -07:00
Adam MajmudarandGitHub 57b9c671aa [CLI] Update storage upload CLI (#268) 2022-10-05 15:29:16 -07:00
Adam MajmudarandGitHub 3b7d10ed93 [React] Add hook to create a storage upload component (#266) 2022-10-05 15:08:43 -07:00
Jonas DanielsandGitHub d6bb61b7fa [SDK] - align getProgram & make chainId getter available on EVM contracts (#263) 2022-10-05 20:06:34 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
8e591383fc Version Packages (#265)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-05 12:53:02 -07:00
Adam MajmudarandGitHub 6f95a520e6 [CLI] Add npx thirdweb upload command (#259) 2022-10-05 18:42:03 +00:00
Nacho IacovinoandGitHub f669d3ef4a [React] Use same data structure for useLazyMint (#264) 2022-10-05 11:25:42 -07:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
83575058db Version Packages (#235)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-04 21:02:13 -07:00
Jonas DanielsandGitHub 028cb78125 [SDK] - fix HexColor schema (#262) 2022-10-05 01:31:10 +00:00
Jonas DanielsandGitHub c8261b74b5 [SDK, React] - align getContract and useContract across sdk and react (#261) 2022-10-04 18:09:36 -07:00
Jonas DanielsandGitHub a36c788415 Create size.yml 2022-10-04 12:47:09 -07:00
Nacho IacovinoandGitHub ac232b5aff Accept TokenContract instead of erc20 instance (#258) 2022-10-04 18:39:13 +00:00
Jonas DanielsandGitHub ba6f45027a [SDK] - fix permissions enumerable export (#257) 2022-10-04 17:51:10 +00:00
Jonas DanielsandGitHub d677e9d634 [React] - enable permissions enumerable feature (#256) 2022-10-04 17:21:22 +00:00
Jonas DanielsandGitHub 9b92697fb7 [React] - useContract can accept an abi now (#255) 2022-10-04 04:40:16 +00:00
Joaquim VergesandGitHub c19e471f65 [React] Update react docs (#254) 2022-10-03 21:13:07 -07:00
Jonas DanielsandGitHub b6fc298d0c [React] - allow passing in contractType in useContract() (#253) 2022-10-03 20:18:07 -07:00
Jonas DanielsandGitHub ea41231b3e [React] - fix usage of Buffer (#251) 2022-10-04 01:26:37 +00:00
Joaquim VergesandGitHub 2ea3f00c41 [SDK] Expose additional claim condition information (#252) 2022-10-04 00:26:46 +00:00
20745f8cd6 [SDK] Add check if abi exists (#250)
Co-authored-by: Jonas Daniels <[email protected]>
2022-10-03 22:36:32 +02:00
Furqan RydhanandGitHub caf979537b AppURI detection enabled [SDK] (#247) 2022-10-03 19:12:09 +00:00
Joaquim VergesandGitHub e4b10bc5bd [SDK] Polish + Fixes for Solana NFT Drops (#249) 2022-10-03 12:03:16 -07:00
ef0bac7f44 Renamed initial commit message during thirdweb cli createApp (#246)
Co-authored-by: simon.lim <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
2022-10-02 16:43:30 +00:00
Jonas DanielsandGitHub 23de9eac4f Update README.md 2022-10-02 09:38:13 -07:00
Jonas DanielsandGitHub 1972f3ec0d [SDK, React] - useBurnNFT for solana (#245) 2022-10-01 01:46:07 +00:00
Adam MajmudarandGitHub ffd0fc42ae [React] Add code snippets for Solana (#244) 2022-09-30 15:28:21 -07:00
Jonas Daniels 93531a5d47 fix build outputs 2022-09-30 15:16:16 -07:00
Joaquim Verges b16aaebc4c update solana docs 2022-09-30 10:30:32 -07:00
Jonas DanielsandGitHub 1136d959ba fix persister logic (#243) 2022-09-30 04:38:40 +00:00
Jonas DanielsandGitHub db23f0588d [Storage] - send different header in tests (#242) 2022-09-29 20:14:53 -07:00
Jonas DanielsandGitHub e662408e19 [SDK] - unify program metadata return type again (#240) 2022-09-30 01:41:08 +00:00
Adam MajmudarandGitHub afe4ba6471 Update solana docs (#239) 2022-09-30 00:27:45 +00:00
Joaquim VergesandGitHub 6647f707bd [SDK, React] Unify NFT types for EVM and Solana (#238) 2022-09-30 00:12:37 +00:00
Jonas DanielsandGitHub cac373b010 [React, SDK] - solana improvements (#236) 2022-09-29 06:51:16 +00:00
Joaquim VergesandGitHub 9412d41683 [SDK] add burn function, better RPC, rename inputs (#234) 2022-09-28 22:16:09 -07:00
github-actions[bot]andGitHub 2506eeb25d Version Packages (#227) 2022-09-28 19:37:48 -07:00
ba7dcbbad8 [SDK] - Add getMinimumNextBid function to marketplace (#182)
Co-authored-by: Jonas Daniels <[email protected]>
Co-authored-by: Jarrod Watts <[email protected]>
2022-09-28 19:20:17 -07:00
Adam MajmudarandGitHub cd1abe6ba7 [Solana] Add code example snippets (#233) 2022-09-29 02:05:35 +00:00
e1bcc67ceb [CLI] - Set package.json name to the name the user entered for the project (#103)
Co-authored-by: Jarrod Watts <[email protected]>
Co-authored-by: Nacho Iacovino <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
2022-09-29 01:14:46 +00:00
d26b76872a [SDK] Dynamically import anchor library (#232)
Co-authored-by: Jonas Daniels <[email protected]>
2022-09-28 18:01:57 -07:00
9711b51067 [SOL] Add README.md (#231)
Co-authored-by: Jonas Daniels <[email protected]>
2022-09-28 22:54:57 +00:00
Jonas Daniels e2037310a6 stale is not a workflow... 2022-09-28 14:32:30 -07:00
Jonas Daniels 683d542334 handle stale issues 2022-09-28 14:32:03 -07:00
9c8a3fb6d4 [SDK, React] Add Solana claimTo, pass quantity to claim, and expose useClaim hook (#229)
Co-authored-by: Jonas Daniels <[email protected]>
2022-09-28 14:10:18 -07:00
Jonas Daniels 41accc2e21 never cache contracts-js build 2022-09-28 13:51:36 -07:00
Jonas DanielsandGitHub f2a62110c4 try out buildjet (#226) 2022-09-28 13:31:55 -07:00
Adam MajmudarandGitHub db9f811bf8 [SDK] Fix docs setup for multiple entrypoints (#230) 2022-09-28 19:44:52 +00:00
Joaquim VergesandGitHub fc5efe9521 [SDK] export TransactionTask for docs (#228) 2022-09-28 11:25:41 -07:00
82397636f4 [SDK] Get all offers for a listing (#191)
Co-authored-by: Jarrod Watts <[email protected]>
Co-authored-by: Joaquim Verges <[email protected]>
2022-09-28 18:15:18 +00:00
27a30e3ffb [SDK] - Add ability to view and update owner of a contract (#194)
Co-authored-by: Jarrod Watts <[email protected]>
Co-authored-by: Joaquim Verges <[email protected]>
2022-09-28 17:25:06 +00:00
github-actions[bot]andGitHub 2f1155239d Version Packages (#223) 2022-09-27 22:20:38 -07:00
Jonas DanielsandGitHub c295a47144 [SDK, React] - fix esm exports (#221) 2022-09-28 04:41:53 +00:00
Joaquim VergesandGitHub 0dade96d0d [SDK] Check that proxy/factory deploy flag properly is set (#224) 2022-09-28 04:17:41 +00:00
Joaquim VergesandGitHub 666ff5f694 [SOL] expose ThirdwebSDK.fromPrivateKey convenience static method (#222) 2022-09-28 02:50:38 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
8bc41cdc60 Version Packages (#214)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-27 18:08:47 -07:00
Joaquim VergesandGitHub 37a707f98c [React] lock zag version (#220) 2022-09-27 17:58:44 -07:00
Joaquim VergesandGitHub 3c8f6205e9 [SDK] expose proxy deploy for released contracts (#217) 2022-09-27 17:10:48 -07:00
Jonas DanielsandGitHub 1eaedc262f [React] - allow null and undefined for RequiredParam (#218) 2022-09-27 22:10:05 +00:00
e187d21e12 [SDK] Merge solana package into main SDK (#213)
Co-authored-by: Jonas Daniels <[email protected]>
2022-09-27 13:36:29 -07:00
YashandGitHub b030a86608 [SDK] Update addresses (#216) 2022-09-27 11:10:11 -07:00
acbabc8999 [SDK] - Relayer gas override (#206)
Co-authored-by: Jarrod Watts <[email protected]>
2022-09-27 19:05:29 +05:30
Jonas DanielsandGitHub 196195e2f9 [React] - fix small discrepancies (#215) 2022-09-27 10:27:32 +00:00
Jonas DanielsandGitHub 7c86babb86 [React] - subdivide react sdk (#208) 2022-09-27 09:35:45 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
36f2b70d57 Version Packages (#207)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-27 02:13:05 -07:00
Jarrod WattsandGitHub 849146bf5c [SDK] Docs: Update getContract snippet to use await (#212) 2022-09-27 03:41:12 +00:00
Jarrod WattsandGitHub 4cac79c45d [REACT] Docs: Remove broken link from migration guide (#210) 2022-09-27 02:17:13 +00:00
Jonas DanielsandGitHub 1bda83b114 Jd/fix react effect warning (#209) 2022-09-26 22:40:48 +00:00
Joaquim VergesandGitHub ce05bfd861 [SDK] Remove usages of Buffer to decode bytecodes (#205) 2022-09-26 13:29:24 -07:00
Jarrod WattsandGitHub d982a98b0c Jw/fix signature mint snipptes (#203) 2022-09-26 06:51:50 +00:00
Jarrod WattsandGitHub b983087101 Jw/fix signature mint snipptes (#202) 2022-09-26 05:23:08 +00:00
Jarrod WattsandGitHub b25789fa46 Jw/migration guide (#200) 2022-09-26 14:42:26 +10:00
github-actions[bot]andGitHub e39b66f309 Version Packages (#198) 2022-09-23 19:34:55 -07:00
5f5ab015e1 [SDK, SOL] Fixes for getOwned and solana balance (#199)
Co-authored-by: Jonas Daniels <[email protected]>
2022-09-24 02:11:58 +00:00
Jonas DanielsandGitHub f4f05bd9a4 [React] - make web3 button network switch obvious (#197) 2022-09-24 00:16:56 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
2f5b66bef9 Version Packages (#193)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-23 15:27:49 -07:00
63258bc9c3 [React] Expose simple provider and useSDK hook for solana (#179)
Co-authored-by: Jonas Daniels <[email protected]>
2022-09-23 19:12:24 +00:00
Jonas DanielsandGitHub a80fc97b6a [SDK] - update prebuilt contract roles to match contracts (#195) 2022-09-23 18:49:41 +00:00
Adam MajmudarandGitHub 24f66e38c2 Switch to using XHR with timeout (#192) 2022-09-23 05:32:45 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
b5bfaefa85 Version Packages (#157)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-22 17:11:41 -07:00
Adam MajmudarandGitHub 493ebf032e Add upload with gateway url for URIs (#190) 2022-09-22 17:06:59 -07:00
Adam MajmudarandGitHub d608cea197 Add progress tracking to file upload (#189) 2022-09-22 15:15:00 -07:00
Adam MajmudarandGitHub a9ec190ff9 Remove JSON types (#188) 2022-09-22 21:27:43 +00:00
3edec391be [CLI] thirdweb deploy redirects to contract deploy page if no contracts detected (#177)
Co-authored-by: Jonas Daniels <[email protected]>
Co-authored-by: Joaquim Verges <[email protected]>
2022-09-22 14:07:32 -07:00
bdec5a59af [CLI] Fix "Invalid Project name" when a project with a capital letter is entered (#184)
Co-authored-by: Jonas Daniels <[email protected]>
2022-09-22 20:20:15 +00:00
Jonas DanielsandGitHub 9d03619aab fix some lint issues (#187) 2022-09-22 19:02:22 +00:00
Jonas DanielsandGitHub 0ccbca78dc [Storage] - handle special chars (#185) 2022-09-22 11:29:42 -07:00
Adam MajmudarandGitHub 75c752cc14 Fix tests (#186) 2022-09-22 11:06:55 -07:00
Jonas DanielsandGitHub 3580182fa9 [Storage] - allow uploading the same file multiple times in uploadBatch if it is *the same file* (#183) 2022-09-22 09:33:24 +00:00
b54f95dc90 Update expected input types for storage (#163)
Co-authored-by: Jonas Daniels <[email protected]>
2022-09-22 08:12:52 +00:00
Adam MajmudarandGitHub f4074ddadc Replace schemes after replacing files (#180) 2022-09-22 06:43:22 +00:00
Jonas DanielsandGitHub 208b0389a5 [React] - use internal Signer (#168) 2022-09-22 06:04:27 +00:00
3b877ba221 [SDK] Ozdefender EOA forwarder option (#174)
Co-authored-by: Joaquim Verges <[email protected]>
2022-09-22 04:47:00 +00:00
Adam MajmudarandGitHub 45a400fd92 Change API for instantiating storage (#178) 2022-09-21 21:09:11 -07:00
Adam MajmudarandGitHub 3332fa5697 Split create contract flow into steps (#175) 2022-09-21 22:51:47 +00:00
Joaquim VergesandGitHub fdda564b1e [SOL] Fix browser build (#173) 2022-09-21 14:35:19 -07:00
Adam MajmudarandGitHub 89db3db7ff Add changeset for CLI (#172) 2022-09-21 20:15:09 +00:00
Adam MajmudarandGitHub bd9c705571 Add thirdweb deploy to end of thirdweb detect (#171) 2022-09-21 19:55:54 +00:00
Adam MajmudarandGitHub 0ad0f21bcd Display yarn build command at the end of thirdweb create --contract (#169) 2022-09-21 19:18:42 +00:00
Joaquim VergesandGitHub 4169b9428f [SDK] Syntax fixes for react native support (#167) 2022-09-21 09:35:22 -07:00
Jarrod WattsandGitHub 2f9e8aaab4 Jw/lazymintabletwfeature (#165) 2022-09-21 04:17:11 +00:00
Adam MajmudarandGitHub 421461ece0 Add README for Solana and Storage (#164) 2022-09-21 02:39:12 +00:00
Jarrod WattsandGitHub 485ebc8400 [REACT] - Feature snippet generation logic (#155) 2022-09-21 10:40:41 +10:00
Joaquim VergesandGitHub 772f8431e3 [SDK] Catch gas estimate errors in gasless tx (#162) 2022-09-20 23:00:12 +00:00
Joaquim VergesandGitHub 5345479922 [SDK] Allow forcing direct deploys to deploy implementations from release flow (#161) 2022-09-20 15:19:18 -07:00
Adam MajmudarandGitHub cfe8bbafa4 Add resolveScheme method to storage (#156) 2022-09-20 18:31:56 +00:00
Adam MajmudarandGitHub 18dc8d33ed Fix nft collection docs (#159) 2022-09-20 18:07:30 +00:00
Jonas DanielsandGitHub f8ab4779bb init paper checkout in v3 (#154) 2022-09-20 05:41:20 +00:00
Adam MajmudarandGitHub 6fe16c5bf2 Add documentation for Solana (#152) 2022-09-19 22:13:25 -07:00
Adam MajmudarandGitHub ba0e169654 Add support for string with name (#151) 2022-09-19 18:08:55 -07:00
Jarrod WattsandGitHub 27b869ed93 Update README.md (#150) 2022-09-20 00:25:11 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
091ce2eb45 Version Packages (#149)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-19 16:08:23 -07:00
Joaquim Verges e24a371508 fix changeset 2022-09-19 16:03:14 -07:00
Adam MajmudarandGitHub b86afb4b09 Add documentation for storage (#147) 2022-09-19 22:26:44 +00:00
Joaquim VergesandGitHub 964add6f20 [CLI, Storage] Fix deploy/release uploads via CLI (#148) 2022-09-19 14:56:42 -07:00
904 changed files with 37411 additions and 159121 deletions
+4 -3
View File
@@ -2,14 +2,15 @@
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "thirdweb-dev/js" }],
"commit": false,
"fixed": [],
"fixed": [["@thirdweb-dev/sdk", "@thirdweb-dev/react"]],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"ignore": ["e2e-cra-5", "e2e-next-12", "e2e-vite-3"],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"updateInternalDependents": "always"
"updateInternalDependents": "always",
"onlyUpdatePeerDependentsWhenOutOfRange": true
},
"snapshot": {
"useCalculatedVersion": true,
+60 -56
View File
@@ -1,5 +1,9 @@
# Contributing to thirdweb
You can find a full video tutorial on how to contribute to thirdweb below:
https://www.youtube.com/watch?v=TXsQ3qok3B0
## Getting Started
To get started, read the [How this repo works](#how-this-repo-works) section below to learn about the structure of this repo.
@@ -16,7 +20,7 @@ If you have any questions about the issue, feel free to ask on our [Discord serv
We use [Turborepo](https://turborepo.org/docs/getting-started) to manage the monorepo, and help speed up the [CI/CD](https://www.atlassian.com/continuous-delivery/principles/continuous-integration-vs-delivery-vs-deployment) pipeline to ship to production faster 🚢.
You can see a quick outline of each of the projects within this repo below, which each live within the [/packages](/packages) directory:
You can see a quick outline of each of the projects within this repo below, each living within the [/packages](/packages) directory:
| Package | Description | Latest Version |
| ------------------------------ | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -58,75 +62,75 @@ To begin:
Now you have got the repo on your local machine, and you're ready to start making your changes!
### Test Your Changes
We use [yalc](https://github.com/wclr/yalc) to test changes locally.
Install the yalc CLI globally:
```bash
yarn global add yalc
```
First, create a test project where you can experiment with your changes:
You can create a basic starter project with the `sdk` and `react` packages installed using the CLI:
```bash
npx thirdweb create --app
```
Use `yalc` to link your local changes in the monorepo to the test project, by running the following command from your test repo:
```bash
yalc add @thirdweb-dev/react # Link the react package
yalc add @thirdweb-dev/sdk # Link the sdk package
# etc...
```
From the monorepo, run the following command to publish your local changes to the test project:
```bash
yarn push
```
Now, each time you make a change to the monorepo, you can run `yarn push` to publish your changes to the test project.
In your test project, you need to:
1. Delete the dependencies cache. If you're using Next.js, that is the `.next` directory, and if you're using CRA, that is the `node_modules/.cache` directory.
2. Restart the development server.
<br/>
### Publish Your Changes
Once you're satisfied with your changes, you are ready to submit them for review!
1. Use [changeset](https://github.com/changesets/changesets) to generate a changeset file:
```
yarn changeset
```
```
yarn changeset
```
We follow [semantic versioning](https://semver.org/) for generating versioned releases of our packages (i.e. version = `MAJOR.MINOR.PATCH`)
We follow [semantic versioning](https://semver.org/) for generating versioned releases of our packages (i.e. version = `MAJOR.MINOR.PATCH`)
- Update `major` for breaking changes
- Update `minor` for new features,
- Update `patch` for non-breaking bug fixes, etc)
- Update `major` for breaking changes
- Update `minor` for new features,
- Update `patch` for non-breaking bug fixes, etc)
2. Commit the changeset along with your changes:
```
git commit -am "My commit message"
```
```
git commit -am "My commit message"
```
3. Push your changes to the SDK:
```
git push origin MY_BRANCH_NAME
```
```
git push origin MY_BRANCH_NAME
```
4. Create a [pull request](https://www.atlassian.com/git/tutorials/making-a-pull-request) to the `main` branch of the official (not your fork) SDK repo.
It's helpful to tag PRs with `[SDK]`, `[REACT]`, `[AUTH]`, (the name of the package you're modifying) to indicate the package that you are engaging with.
<br/>
### Testing Your Changes
When you make a pull request, your changes will be tested automatically by our CI/CD pipeline using [GitHub Actions](https://github.com/features/actions).
On your pull request, you can release your changes to a `dev` version by adding a **comment** with the following text:
```
/release-pr
```
This comment triggers the `release-pr` GitHub Action that publishes your changes to a `dev` version of the package(s) you are modifying.
Once this is done, you can test your changes by installing the `dev` version of the package(s).
If you don't already have a test project, you can use the [CLI](https://github.com/thirdweb-dev/thirdweb-cli) to create one:
```bash
npx thirdweb create
```
Inside your test project, you can install the `dev` version of the package(s) you are modifying.
For example, if you are modifying the `@thirdweb-dev/react` package, you can install the `dev` version of the package by running:
```
yarn add @thirdweb-dev/sdk@dev
```
This will install the `dev` version of the `@thirdweb-dev/react` package in your project, as you can see in the `package.json` file:
```diff
"dependencies": {
- "@thirdweb-dev/react": "^2",
+ "@thirdweb-dev/react": "^2.9.7-dev-b073878",
}
```
You can now test your changes in your test project!
It's helpful to tag PRs with `[SDK]`, `[REACT]`, `[AUTH]`, (the name of the package you're modifying) to indicate the package that you are engaging with.
+17
View File
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
+4 -6
View File
@@ -14,7 +14,7 @@ jobs:
build:
name: Build and Test
# timeout-minutes: 15
runs-on: ubuntu-latest
runs-on: ubuntu-latest-32
# To use Remote Caching, uncomment the next lines and follow the steps below.
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
@@ -24,13 +24,11 @@ jobs:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2
fetch-depth: 0
- name: Install
uses: ./.github/composite-actions/install
- name: Build
run: yarn build
- name: Test
# this already builds anything that changed...
- name: Build & Test
run: yarn test
+1 -7
View File
@@ -13,7 +13,7 @@ concurrency:
jobs:
integration-tests:
timeout-minutes: 60
runs-on: ubuntu-latest
runs-on: ubuntu-latest-32
steps:
- uses: actions/checkout@v3
@@ -27,9 +27,3 @@ jobs:
run: yarn e2e
env:
NODE_OPTIONS: "--max_old_space_size=4096"
- uses: actions/upload-artifact@v2
if: always()
with:
name: playwright-report
path: packages/react/playwright-report/
retention-days: 30
+34
View File
@@ -0,0 +1,34 @@
name: Lint
on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
# timeout-minutes: 15
# try out buildjet to speed up build and test
runs-on: ubuntu-latest
# To use Remote Caching, uncomment the next lines and follow the steps below.
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install
uses: ./.github/composite-actions/install
- name: Lint
run: yarn lint
+2 -1
View File
@@ -8,6 +8,7 @@ on:
jobs:
deploy-check:
# this just checks if ur allowed to do the action so does not need to run on a fast machine
runs-on: ubuntu-latest
steps:
- name: acknowledge deployment request to commenter
@@ -39,7 +40,7 @@ jobs:
comment_body: ${{ github.event.comment.body }}
deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-32
needs: deploy-check
if: needs.deploy-check.outputs.triggered == 'true'
steps:
+1 -1
View File
@@ -14,7 +14,7 @@ concurrency:
jobs:
release:
name: Release
runs-on: ubuntu-latest
runs-on: ubuntu-latest-32
steps:
- name: Checkout branch
uses: actions/checkout@v3
+19
View File
@@ -0,0 +1,19 @@
name: Compressed Size
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest-32
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: preactjs/compressed-size-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
strip-hash: "\\-(\\w{8})(?:\\.esm|\\.cjs)"
minimum-change-threshold: 100
# exclude source maps, node modules and any test related files
exclude: "{**/*.map,**/node_modules/**,**/test/**}"
+6 -1
View File
@@ -12,4 +12,9 @@ server/dist
public/dist
.turbo
./packages/contracts-js/abis
.idea/
.idea/
.yalc/
yalc.lock
build/
playwright-report/
.vscode/
-1
View File
@@ -1,4 +1,3 @@
lib
node_modules
dist
contracts-js
-1
View File
@@ -27,7 +27,6 @@
| [/auth](./packages/auth) | Best in class wallet authentication for Node backends | <a href="https://www.npmjs.com/package/@thirdweb-dev/auth"><img src="https://img.shields.io/npm/v/@thirdweb-dev/auth?color=red&label=npm&logo=npm" alt="npm version"/></a> |
| [/storage](./packages/storage) | Best in class decentralized storage SDK for Browser and Node | <a href="https://www.npmjs.com/package/@thirdweb-dev/storage"><img src="https://img.shields.io/npm/v/@thirdweb-dev/storage?color=red&label=npm&logo=npm" alt="npm version"/></a> |
| [/cli](./packages/cli) | Publish and deploy smart contracts without dealing with private keys | <a href="https://www.npmjs.com/package/thirdweb"><img src="https://img.shields.io/npm/v/thirdweb?color=red&label=npm&logo=npm" alt="npm version"/></a> |
| [/solana](./packages/solana) | Solana SDK for Browser, Node and React Native | <a href="https://www.npmjs.com/package/@thirdweb-dev/solana"><img src="https://img.shields.io/npm/v/@thirdweb-dev/solana?color=red&label=npm&logo=npm" alt="npm version"/></a> |
## Documentation
+9 -11
View File
@@ -8,14 +8,15 @@
"private": true,
"workspaces": {
"packages": [
"packages/*"
"packages/*",
"test/**/*"
]
},
"scripts": {
"test": "turbo run test",
"test": "turbo run test test:evm test:solana",
"e2e": "turbo run e2e",
"build": "turbo run build",
"build:release": "turbo run build --force",
"build": "turbo run build --filter=./packages/*",
"build:release": "turbo run build --force --filter=./packages/*",
"dev": "turbo run dev --no-cache --parallel --continue",
"fix:repo": "manypkg fix",
"lint": "turbo run lint",
@@ -26,12 +27,8 @@
"version-packages": "changeset version",
"release": "node ./scripts/pre-release.mjs && changeset publish",
"version-packages:nightly": "changeset version --snapshot nightly",
"release:nightly": "node ./scripts/pre-release.mjs && changeset publish --tag nightly"
},
"preconstruct": {
"packages": [
"packages/*"
]
"release:nightly": "node ./scripts/pre-release.mjs && changeset publish --tag nightly",
"push": "turbo run push --filter=./packages/*"
},
"packageManager": "[email protected]",
"dependencies": {
@@ -43,7 +40,8 @@
"eslint": "^8.21.0",
"postinstall-postinstall": "^2.1.0",
"prettier": "^2.7.1",
"turbo": "^1.4.6"
"turbo": "^1.4.6",
"yalc": "^1.0.0-pre.53"
},
"manypkg": {
"defaultBranch": "main"
+97
View File
@@ -1,5 +1,102 @@
# @thirdweb-dev/auth
## 2.0.33
## 2.0.32
## 2.0.31
### Patch Changes
- [#397](https://github.com/thirdweb-dev/js/pull/397) [`72589ec`](https://github.com/thirdweb-dev/js/commit/72589ec234d86939b67b0ca8b3b789f2e9c54cc2) Thanks [@adam-maj](https://github.com/adam-maj)! - Call user callback in getUser
## 2.0.30
## 2.0.29
## 2.0.28
## 2.0.27
## 2.0.26
## 2.0.25
## 2.0.24
## 2.0.23
## 2.0.22
## 2.0.21
### Patch Changes
- [#327](https://github.com/thirdweb-dev/js/pull/327) [`ef27aad`](https://github.com/thirdweb-dev/js/commit/ef27aad0aafc4577e85f44dc77dfbe880bd239b5) Thanks [@jnsdls](https://github.com/jnsdls)! - enable e2e testing
## 2.0.20
## 2.0.19
## 2.0.18
## 2.0.17
## 2.0.16
## 2.0.15
## 2.0.14
### Patch Changes
- [#274](https://github.com/thirdweb-dev/js/pull/274) [`ad06c5b`](https://github.com/thirdweb-dev/js/commit/ad06c5b28902422f9b416d65255c64c937a5e046) Thanks [@adam-maj](https://github.com/adam-maj)! - Add solana auth support and plugins for react and auth package
## 2.0.13
## 2.0.12
## 2.0.11
## 2.0.10
## 2.0.9
## 2.0.8
### Patch Changes
- Updated dependencies [[`ce05bfd`](https://github.com/thirdweb-dev/js/commit/ce05bfd8615a9c79664856bce53de8b43bed5c87)]:
- @thirdweb-dev/sdk@3.0.8
## 2.0.7
### Patch Changes
- Updated dependencies [[`5f5ab01`](https://github.com/thirdweb-dev/js/commit/5f5ab015e1dd3c471d6affe995ef36ec88932b3c)]:
- @thirdweb-dev/sdk@3.0.7
## 2.0.6
### Patch Changes
- Updated dependencies [[`a80fc97`](https://github.com/thirdweb-dev/js/commit/a80fc97b6a1e72ed46a400b4b602e180947fb870)]:
- @thirdweb-dev/sdk@3.0.6
## 2.0.5
### Patch Changes
- Updated dependencies [[`4169b94`](https://github.com/thirdweb-dev/js/commit/4169b9428f9001b7cad259a4e56fe610316cd191), [`3b877ba`](https://github.com/thirdweb-dev/js/commit/3b877ba221acfd85f80b99e1bc382055217f0a39), [`b54f95d`](https://github.com/thirdweb-dev/js/commit/b54f95dc906928ff2f9251748f254a16fe1f2cee), [`f8ab477`](https://github.com/thirdweb-dev/js/commit/f8ab4779bb2d6d66200e1e8fd558e0ac069a2f54), [`772f843`](https://github.com/thirdweb-dev/js/commit/772f8431e3a62d0ded62dae90a43e9a7edd5b1a2), [`a9ec190`](https://github.com/thirdweb-dev/js/commit/a9ec190ff99d2714cef2500d20ea0f3f73f07be3), [`208b038`](https://github.com/thirdweb-dev/js/commit/208b0389a50ea48bbb9600fec60fec2f1671d4b9), [`5345479`](https://github.com/thirdweb-dev/js/commit/534547992243bdd3a77e34ec2b2487b5adab366a)]:
- @thirdweb-dev/sdk@3.0.5
## 2.0.4
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@3.0.4
## 2.0.3
### Patch Changes
+4
View File
@@ -0,0 +1,4 @@
{
"main": "dist/thirdweb-dev-auth-next-evm.cjs.js",
"module": "dist/thirdweb-dev-auth-next-evm.esm.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "dist/thirdweb-dev-auth-next-solana.cjs.js",
"module": "dist/thirdweb-dev-auth-next-solana.esm.js"
}
+27 -10
View File
@@ -1,20 +1,28 @@
{
"name": "@thirdweb-dev/auth",
"version": "2.0.3",
"version": "2.0.33",
"exports": {
"./package.json": "./package.json",
"./next": {
"module": "./next/dist/thirdweb-dev-auth-next.esm.js",
"default": "./next/dist/thirdweb-dev-auth-next.cjs.js"
},
"./express": {
"module": "./express/dist/thirdweb-dev-auth-express.esm.js",
"default": "./express/dist/thirdweb-dev-auth-express.cjs.js"
},
"./next": {
"module": "./next/dist/thirdweb-dev-auth-next.esm.js",
"default": "./next/dist/thirdweb-dev-auth-express.cjs.js"
"./next/evm": {
"module": "./next/evm/dist/thirdweb-dev-auth-next-evm.esm.js",
"default": "./next/evm/dist/thirdweb-dev-auth-next-evm.cjs.js"
},
"./next-auth": {
"module": "./next-auth/dist/thirdweb-dev-auth-next-auth.esm.js",
"default": "./next-auth/dist/thirdweb-dev-auth-next-auth.cjs.js"
}
},
"./next/solana": {
"module": "./next/solana/dist/thirdweb-dev-auth-next-solana.esm.js",
"default": "./next/solana/dist/thirdweb-dev-auth-next-solana.cjs.js"
},
"./package.json": "./package.json"
},
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/auth",
"author": "thirdweb eng <[email protected]>",
@@ -35,11 +43,18 @@
"preconstruct": {
"entrypoints": [
"next/index.ts",
"next/evm/index.ts",
"next/solana/index.ts",
"express/index.ts",
"next-auth/index.ts"
]
],
"___experimentalFlags_WILL_CHANGE_IN_PATCH": {
"exports": true
},
"exports": true
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/preset-env": "^7.18.10",
"@babel/preset-typescript": "^7.18.6",
"@microsoft/api-documenter": "^7.19.4",
@@ -58,18 +73,20 @@
"eslint-plugin-inclusive-language": "^2.2.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-tsdoc": "^0.2.16",
"ethers": "^5.7.0",
"ethers": "^5.7.2",
"express": "^4.18.1",
"next": "12.2.0",
"next": "^12.2.0",
"next-auth": "^4.10.3",
"prettier": "^2.7.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.7.4"
},
"peerDependencies": {
"@thirdweb-dev/sdk": "*",
"ethers": ">=5.5.1",
"express": "^4.18.1",
"next": "12.2.0",
"next": "^12.2.0",
"next-auth": "^4.10.3"
},
"peerDependenciesMeta": {
+68
View File
@@ -0,0 +1,68 @@
import loginHandler from "./routes/login";
import logoutHandler from "./routes/logout";
import userHandler from "./routes/user";
import {
ThirdwebAuthConfig,
ThirdwebAuthRoute,
ThirdwebAuthUser,
} from "./types";
import { ThirdwebSDK } from "@thirdweb-dev/sdk";
import cookieParser from "cookie-parser";
import { Express, NextFunction, Request, Response } from "express";
export * from "./types";
export function getUser(req: Request): ThirdwebAuthUser | null {
return req.user;
}
export function ThirdwebAuth(app: Express, cfg: ThirdwebAuthConfig) {
const ctx = {
...cfg,
sdk: ThirdwebSDK.fromPrivateKey(cfg.privateKey, "mainnet"),
};
const authUrl = cfg.authUrl?.replace(/\/$/, "") || "/auth";
app.use(cookieParser());
app.use(async (req: Request, _: Response, next: NextFunction) => {
const { sdk, domain } = ctx;
let user = null;
const token = req.cookies.thirdweb_auth_token;
if (token) {
try {
const address = await sdk.auth.authenticate(domain, token);
if (ctx.callbacks?.user) {
user = await ctx.callbacks.user(address);
}
user = { ...user, address };
} catch {
// No-op
}
}
req.user = user as ThirdwebAuthUser | null;
next();
});
app.get(`${authUrl}/:route`, (req: Request, res: Response) => {
const action = req.params.route as ThirdwebAuthRoute;
switch (action) {
case "login":
return loginHandler(req, res, ctx);
case "user":
return userHandler(req, res);
case "logout":
return logoutHandler(req, res);
default:
return res.status(400).json({
message: "Invalid route for authentication.",
});
}
});
}
+1 -68
View File
@@ -1,68 +1 @@
import loginHandler from "./routes/login";
import logoutHandler from "./routes/logout";
import userHandler from "./routes/user";
import {
ThirdwebAuthConfig,
ThirdwebAuthRoute,
ThirdwebAuthUser,
} from "./types";
import { ThirdwebSDK } from "@thirdweb-dev/sdk";
import cookieParser from "cookie-parser";
import { Express, NextFunction, Request, Response } from "express";
export * from "./types";
export function getUser(req: Request): ThirdwebAuthUser | null {
return req.user;
}
export function ThirdwebAuth(app: Express, cfg: ThirdwebAuthConfig) {
const ctx = {
...cfg,
sdk: ThirdwebSDK.fromPrivateKey(cfg.privateKey, "mainnet"),
};
const authUrl = cfg.authUrl?.replace(/\/$/, "") || "/auth";
app.use(cookieParser());
app.use(async (req: Request, _: Response, next: NextFunction) => {
const { sdk, domain } = ctx;
let user = null;
const token = req.cookies.thirdweb_auth_token;
if (token) {
try {
const address = await sdk.auth.authenticate(domain, token);
if (ctx.callbacks?.user) {
user = await ctx.callbacks.user(address);
}
user = { ...user, address };
} catch {
// No-op
}
}
req.user = user as ThirdwebAuthUser | null;
next();
});
app.get(`${authUrl}/:route`, (req: Request, res: Response) => {
const action = req.params.route as ThirdwebAuthRoute;
switch (action) {
case "login":
return loginHandler(req, res, ctx);
case "user":
return userHandler(req, res);
case "logout":
return logoutHandler(req, res);
default:
return res.status(400).json({
message: "Invalid route for authentication.",
});
}
});
}
export * from "./evm";
+145
View File
@@ -0,0 +1,145 @@
import { ThirdwebNextAuthConfig } from "./types";
import { ThirdwebSDK } from "@thirdweb-dev/sdk";
import { serialize } from "cookie";
import {
GetServerSidePropsContext,
NextApiRequest,
NextApiResponse,
} from "next";
import NextAuth, {
NextAuthOptions,
Session,
unstable_getServerSession,
} from "next-auth";
import CredentialsProvider from "next-auth/providers/credentials";
export function ThirdwebNextAuth(cfg: ThirdwebNextAuthConfig) {
const sdk = ThirdwebSDK.fromPrivateKey(cfg.privateKey, "mainnet");
function ThirdwebProvider(res: GetServerSidePropsContext["res"]) {
return CredentialsProvider({
name: "ThirdwebAuth",
credentials: {
payload: {
label: "Payload",
type: "text",
placeholder: "",
},
},
async authorize({ payload }: any) {
try {
const parsed = JSON.parse(payload);
const token = await sdk.auth.generateAuthToken(cfg.domain, parsed);
const address = await sdk.auth.authenticate(cfg.domain, token);
// Securely set httpOnly cookie on request to prevent XSS on frontend
// And set path to / to enable thirdweb_auth_token usage on all endpoints
res.setHeader(
"Set-Cookie",
serialize("thirdweb_auth_token", token, {
path: "/",
httpOnly: true,
secure: true,
sameSite: "strict",
}),
);
return { address };
} catch (err) {
return null;
}
},
});
}
function nextOptions(
req: GetServerSidePropsContext["req"],
res: GetServerSidePropsContext["res"],
): NextAuthOptions {
async function session({
session: _session,
}: {
session: Session;
}): Promise<Session> {
const token = req.cookies.thirdweb_auth_token || "";
try {
const address = await sdk.auth.authenticate(cfg.domain, token);
_session.user = { ..._session.user, address } as Session["user"];
return _session;
} catch {
return _session;
}
}
function signOut() {
res.setHeader(
"Set-Cookie",
serialize("thirdweb_auth_token", "", {
path: "/",
expires: new Date(Date.now() + 5 * 1000),
}),
);
}
const providers: NextAuthOptions["providers"] = [
...cfg.nextOptions.providers,
ThirdwebProvider(res),
];
const configSession = cfg.nextOptions.callbacks?.session;
const callbacks: NextAuthOptions["callbacks"] = {
...cfg.nextOptions.callbacks,
session: configSession
? async (params) => {
params.session = await session(params);
return configSession(params);
}
: session,
};
const configSignOut = cfg.nextOptions.events?.signOut;
const events: NextAuthOptions["events"] = {
...cfg.nextOptions.events,
signOut: configSignOut
? async (params) => {
signOut();
return configSignOut(params);
}
: signOut,
};
return {
...cfg.nextOptions,
providers,
callbacks,
events,
};
}
async function getUser(
...args:
| [NextApiRequest, NextApiResponse]
| [GetServerSidePropsContext["req"], GetServerSidePropsContext["res"]]
) {
return unstable_getServerSession(
args[0],
args[1],
nextOptions(args[0], args[1]),
);
}
function NextAuthHandler(...args: [] | [NextApiRequest, NextApiResponse]) {
if (args.length === 0) {
return (req: NextApiRequest, res: NextApiResponse) => {
return NextAuth(req, res, nextOptions(req, res));
};
}
return NextAuth(args[0], args[1], nextOptions(args[0], args[1]));
}
return {
NextAuthHandler,
getUser,
};
}
+1 -145
View File
@@ -1,145 +1 @@
import { ThirdwebNextAuthConfig } from "./types";
import { ThirdwebSDK } from "@thirdweb-dev/sdk";
import { serialize } from "cookie";
import {
GetServerSidePropsContext,
NextApiRequest,
NextApiResponse,
} from "next";
import NextAuth, {
NextAuthOptions,
Session,
unstable_getServerSession,
} from "next-auth";
import CredentialsProvider from "next-auth/providers/credentials";
export function ThirdwebNextAuth(cfg: ThirdwebNextAuthConfig) {
const sdk = ThirdwebSDK.fromPrivateKey(cfg.privateKey, "mainnet");
function ThirdwebProvider(res: GetServerSidePropsContext["res"]) {
return CredentialsProvider({
name: "ThirdwebAuth",
credentials: {
payload: {
label: "Payload",
type: "text",
placeholder: "",
},
},
async authorize({ payload }: any) {
try {
const parsed = JSON.parse(payload);
const token = await sdk.auth.generateAuthToken(cfg.domain, parsed);
const address = await sdk.auth.authenticate(cfg.domain, token);
// Securely set httpOnly cookie on request to prevent XSS on frontend
// And set path to / to enable thirdweb_auth_token usage on all endpoints
res.setHeader(
"Set-Cookie",
serialize("thirdweb_auth_token", token, {
path: "/",
httpOnly: true,
secure: true,
sameSite: "strict",
}),
);
return { address };
} catch (err) {
return null;
}
},
});
}
function nextOptions(
req: GetServerSidePropsContext["req"],
res: GetServerSidePropsContext["res"],
): NextAuthOptions {
async function session({
session: _session,
}: {
session: Session;
}): Promise<Session> {
const token = req.cookies.thirdweb_auth_token || "";
try {
const address = await sdk.auth.authenticate(cfg.domain, token);
_session.user = { ..._session.user, address } as Session["user"];
return _session;
} catch {
return _session;
}
}
function signOut() {
res.setHeader(
"Set-Cookie",
serialize("thirdweb_auth_token", "", {
path: "/",
expires: new Date(Date.now() + 5 * 1000),
}),
);
}
const providers: NextAuthOptions["providers"] = [
...cfg.nextOptions.providers,
ThirdwebProvider(res),
];
const configSession = cfg.nextOptions.callbacks?.session;
const callbacks: NextAuthOptions["callbacks"] = {
...cfg.nextOptions.callbacks,
session: configSession
? async (params) => {
params.session = await session(params);
return configSession(params);
}
: session,
};
const configSignOut = cfg.nextOptions.events?.signOut;
const events: NextAuthOptions["events"] = {
...cfg.nextOptions.events,
signOut: configSignOut
? async (params) => {
signOut();
return configSignOut(params);
}
: signOut,
};
return {
...cfg.nextOptions,
providers,
callbacks,
events,
};
}
async function getUser(
...args:
| [NextApiRequest, NextApiResponse]
| [GetServerSidePropsContext["req"], GetServerSidePropsContext["res"]]
) {
return unstable_getServerSession(
args[0],
args[1],
nextOptions(args[0], args[1]),
);
}
function NextAuthHandler(...args: [] | [NextApiRequest, NextApiResponse]) {
if (args.length === 0) {
return (req: NextApiRequest, res: NextApiResponse) => {
return NextAuth(req, res, nextOptions(req, res));
};
}
return NextAuth(args[0], args[1], nextOptions(args[0], args[1]));
}
return {
NextAuthHandler,
getUser,
};
}
export * from "./evm";
+89
View File
@@ -0,0 +1,89 @@
import loginHandler from "./routes/login";
import logoutHandler from "./routes/logout";
import userHandler from "./routes/user";
import {
ThirdwebAuthConfig,
ThirdwebAuthContext,
ThirdwebAuthRoute,
ThirdwebAuthUser,
} from "./types";
import { ThirdwebSDK } from "@thirdweb-dev/sdk";
import { NextRequest } from "next/server";
import {
GetServerSidePropsContext,
NextApiRequest,
NextApiResponse,
} from "next/types";
export * from "./types";
async function ThirdwebAuthRouter(
req: NextApiRequest,
res: NextApiResponse,
ctx: ThirdwebAuthContext,
) {
// Catch-all route must be named with [...thirdweb]
const { thirdweb } = req.query;
const action = thirdweb?.[0] as ThirdwebAuthRoute;
switch (action) {
case "login":
return await loginHandler(req, res, ctx);
case "user":
return await userHandler(req, res, ctx);
case "logout":
return await logoutHandler(req, res);
default:
return res.status(400).json({
message: "Invalid route for authentication.",
});
}
}
export function ThirdwebAuth(cfg: ThirdwebAuthConfig) {
const ctx = {
...cfg,
sdk: ThirdwebSDK.fromPrivateKey(cfg.privateKey, "mainnet"),
};
function ThirdwebAuthHandler(
...args: [] | [NextApiRequest, NextApiResponse]
) {
if (args.length === 0) {
return async (req: NextApiRequest, res: NextApiResponse) =>
await ThirdwebAuthRouter(req, res, ctx);
}
return ThirdwebAuthRouter(args[0], args[1], ctx);
}
async function getUser(
req: GetServerSidePropsContext["req"] | NextRequest | NextApiRequest,
) {
const { sdk, domain } = ctx;
let user: ThirdwebAuthUser | null = null;
const token =
typeof req.cookies.get === "function"
? (req.cookies as any).get("thirdweb_auth_token")
: (req.cookies as any).thirdweb_auth_token;
if (token) {
try {
const address = await sdk.auth.authenticate(domain, token);
let data = {};
if (ctx.callbacks?.user) {
data = await ctx.callbacks.user(address);
}
user = { ...data, address };
} catch {
// No-op
}
}
return user;
}
return { ThirdwebAuthHandler, getUser };
}
+1 -83
View File
@@ -1,83 +1 @@
import loginHandler from "./routes/login";
import logoutHandler from "./routes/logout";
import userHandler from "./routes/user";
import {
ThirdwebAuthConfig,
ThirdwebAuthContext,
ThirdwebAuthRoute,
ThirdwebAuthUser,
} from "./types";
import { ThirdwebSDK } from "@thirdweb-dev/sdk";
import { NextRequest } from "next/server";
import {
GetServerSidePropsContext,
NextApiRequest,
NextApiResponse,
} from "next/types";
export * from "./types";
async function ThirdwebAuthRouter(
req: NextApiRequest,
res: NextApiResponse,
ctx: ThirdwebAuthContext,
) {
// Catch-all route must be named with [...thirdweb]
const { thirdweb } = req.query;
const action = thirdweb?.[0] as ThirdwebAuthRoute;
switch (action) {
case "login":
return await loginHandler(req, res, ctx);
case "user":
return await userHandler(req, res, ctx);
case "logout":
return await logoutHandler(req, res);
default:
return res.status(400).json({
message: "Invalid route for authentication.",
});
}
}
export function ThirdwebAuth(cfg: ThirdwebAuthConfig) {
const ctx = {
...cfg,
sdk: ThirdwebSDK.fromPrivateKey(cfg.privateKey, "mainnet"),
};
function ThirdwebAuthHandler(
...args: [] | [NextApiRequest, NextApiResponse]
) {
if (args.length === 0) {
return async (req: NextApiRequest, res: NextApiResponse) =>
await ThirdwebAuthRouter(req, res, ctx);
}
return ThirdwebAuthRouter(args[0], args[1], ctx);
}
async function getUser(
req: GetServerSidePropsContext["req"] | NextRequest | NextApiRequest,
) {
const { sdk, domain } = ctx;
let user: ThirdwebAuthUser | null = null;
const token =
typeof req.cookies.get === "function"
? (req.cookies as any).get("thirdweb_auth_token")
: (req.cookies as any).thirdweb_auth_token;
if (token) {
try {
const address = await sdk.auth.authenticate(domain, token);
user = { address };
} catch {
// No-op
}
}
return user;
}
return { ThirdwebAuthHandler, getUser };
}
export * from "./evm";
+89
View File
@@ -0,0 +1,89 @@
import loginHandler from "./routes/login";
import logoutHandler from "./routes/logout";
import userHandler from "./routes/user";
import {
ThirdwebAuthConfig,
ThirdwebAuthContext,
ThirdwebAuthRoute,
ThirdwebAuthUser,
} from "./types";
import { ThirdwebSDK } from "@thirdweb-dev/sdk/solana";
import { NextRequest } from "next/server";
import {
GetServerSidePropsContext,
NextApiRequest,
NextApiResponse,
} from "next/types";
export * from "./types";
async function ThirdwebAuthRouter(
req: NextApiRequest,
res: NextApiResponse,
ctx: ThirdwebAuthContext,
) {
// Catch-all route must be named with [...thirdweb]
const { thirdweb } = req.query;
const action = thirdweb?.[0] as ThirdwebAuthRoute;
switch (action) {
case "login":
return await loginHandler(req, res, ctx);
case "user":
return await userHandler(req, res, ctx);
case "logout":
return await logoutHandler(req, res);
default:
return res.status(400).json({
message: "Invalid route for authentication.",
});
}
}
export function ThirdwebAuth(cfg: ThirdwebAuthConfig) {
const ctx = {
...cfg,
sdk: ThirdwebSDK.fromPrivateKey("mainnet-beta", cfg.privateKey),
};
function ThirdwebAuthHandler(
...args: [] | [NextApiRequest, NextApiResponse]
) {
if (args.length === 0) {
return async (req: NextApiRequest, res: NextApiResponse) =>
await ThirdwebAuthRouter(req, res, ctx);
}
return ThirdwebAuthRouter(args[0], args[1], ctx);
}
async function getUser(
req: GetServerSidePropsContext["req"] | NextRequest | NextApiRequest,
) {
const { sdk, domain } = ctx;
let user: ThirdwebAuthUser | null = null;
const token =
typeof req.cookies.get === "function"
? (req.cookies as any).get("thirdweb_auth_token")
: (req.cookies as any).thirdweb_auth_token;
if (token) {
try {
const address = await sdk.auth.authenticate(domain, token);
let data = {};
if (ctx.callbacks?.user) {
data = await ctx.callbacks.user(address);
}
user = { ...data, address };
} catch {
// No-op
}
}
return user;
}
return { ThirdwebAuthHandler, getUser };
}
@@ -0,0 +1,60 @@
import { ThirdwebAuthContext } from "../types";
import { LoginPayload } from "@thirdweb-dev/sdk";
import { serialize } from "cookie";
import { NextApiRequest, NextApiResponse } from "next";
function redirectWithError(
req: NextApiRequest,
res: NextApiResponse,
error: string,
) {
const encodedError = encodeURIComponent(error);
const url = new URL(req.headers.referer as string);
url.searchParams.set("error", encodedError);
return res.redirect(url.toString());
}
export default async function handler(
req: NextApiRequest,
res: NextApiResponse,
ctx: ThirdwebAuthContext,
) {
if (req.method !== "GET") {
return redirectWithError(req, res, "INVALID_METHOD");
}
const { sdk, domain } = ctx;
// Get signed login payload from the frontend
const payload = JSON.parse(atob(req.query.payload as string)) as LoginPayload;
if (!payload) {
redirectWithError(req, res, "MISSING_LOGIN_PAYLOAD");
}
let token;
try {
// Generate an access token with the SDK using the signed payload
token = await sdk.auth.generateAuthToken(domain, payload);
} catch {
return redirectWithError(req, res, "INVALID_LOGIN_PAYLOAD");
}
// Securely set httpOnly cookie on request to prevent XSS on frontend
// And set path to / to enable thirdweb_auth_token usage on all endpoints
res.setHeader(
"Set-Cookie",
serialize("thirdweb_auth_token", token, {
path: "/",
httpOnly: true,
secure: true,
sameSite: "strict",
}),
);
if (ctx.callbacks?.login) {
const address = sdk.auth.verify(domain, payload);
await ctx.callbacks.login(address);
}
return res.status(301).redirect(req.query.redirect as string);
}
@@ -0,0 +1,24 @@
import { serialize } from "cookie";
import { NextApiRequest, NextApiResponse } from "next";
export default async function handler(
req: NextApiRequest,
res: NextApiResponse,
) {
if (req.method !== "GET") {
return res.status(400).json({
error: "Invalid method. Only GET supported.",
});
}
// Set the access token to 'none' and expire in 5 seconds
res.setHeader(
"Set-Cookie",
serialize("thirdweb_auth_token", "", {
path: "/",
expires: new Date(Date.now() + 5 * 1000),
}),
);
return res.status(301).redirect(req.headers.referer as string);
}
@@ -0,0 +1,34 @@
import { ThirdwebAuthContext, ThirdwebAuthUser } from "../types";
import { NextApiRequest, NextApiResponse } from "next";
export default async function handler(
req: NextApiRequest,
res: NextApiResponse,
ctx: ThirdwebAuthContext,
) {
if (req.method !== "GET") {
return res.status(400).json({
error: "Invalid method. Only GET supported.",
});
}
const { sdk, domain } = ctx;
let user = null;
const token = req.cookies.thirdweb_auth_token;
if (token) {
try {
const address = await sdk.auth.authenticate(domain, token);
if (ctx.callbacks?.user) {
user = await ctx.callbacks.user(address);
}
user = { ...user, address };
} catch {
// No-op
}
}
return res.status(200).json(user as ThirdwebAuthUser | null);
}
@@ -0,0 +1,34 @@
import { ThirdwebSDK } from "@thirdweb-dev/sdk/solana";
export type ThirdwebAuthRoute = "login" | "logout" | "user";
export type ThirdwebAuthConfig = {
privateKey: string;
domain: string;
callbacks?: {
login?: (address: string) => Promise<void> | void;
user?: (
address: string,
) =>
| Promise<Omit<ThirdwebAuthUser, "address">>
| Omit<ThirdwebAuthUser, "address">;
};
};
export type ThirdwebAuthContext = {
sdk: ThirdwebSDK;
domain: string;
callbacks?: {
login?: (address: string) => Promise<void> | void;
user?: (
address: string,
) =>
| Promise<Omit<ThirdwebAuthUser, "address">>
| Omit<ThirdwebAuthUser, "address">;
};
};
export type ThirdwebAuthUser = {
address: string;
[key: string]: any;
};
+248
View File
@@ -1,5 +1,253 @@
# thirdweb
## 0.9.0
### Minor Changes
- [#403](https://github.com/thirdweb-dev/js/pull/403) [`27996cb`](https://github.com/thirdweb-dev/js/commit/27996cb4bc6f054f45b0a66b0a3aca732e0ef610) Thanks [@avneesh0612](https://github.com/avneesh0612)! - Add CLI Support for solana with --solana flag on create command
- [#283](https://github.com/thirdweb-dev/js/pull/283) [`2eaa67a`](https://github.com/thirdweb-dev/js/commit/2eaa67acbe21464e7715d0b696afdc024460a44d) Thanks [@adam-maj](https://github.com/adam-maj)! - add capability to deploy apps
### Patch Changes
- [#413](https://github.com/thirdweb-dev/js/pull/413) [`1b0bf99`](https://github.com/thirdweb-dev/js/commit/1b0bf99da796df88ff307dd004cdaf239fb2b1ba) Thanks [@furqanrydhan](https://github.com/furqanrydhan)! - small interface tweaks
- Updated dependencies [[`48797c7`](https://github.com/thirdweb-dev/js/commit/48797c7cf0695965e33eb6bf602be4652f7085a8), [`83dcaf7`](https://github.com/thirdweb-dev/js/commit/83dcaf70584af8c5cdf0427f9fc1ba82d89f0887), [`f03be39`](https://github.com/thirdweb-dev/js/commit/f03be398e0d7b75c9c5b4fb643f35903e89a17e7), [`2eaa67a`](https://github.com/thirdweb-dev/js/commit/2eaa67acbe21464e7715d0b696afdc024460a44d), [`47f8945`](https://github.com/thirdweb-dev/js/commit/47f8945325447874b1ace0359919c1d54fd55436)]:
- @thirdweb-dev/sdk@3.6.3
## 0.8.18
### Patch Changes
- Updated dependencies [[`ccb7db4`](https://github.com/thirdweb-dev/js/commit/ccb7db48739b8dddcb2c032b3b6e3e5200485715), [`9151aa7`](https://github.com/thirdweb-dev/js/commit/9151aa7dc80754a7aa4fd3f6ce0207bccbb6451f), [`5a01c53`](https://github.com/thirdweb-dev/js/commit/5a01c537e30bd7ef562aad1012413990de6faedf)]:
- @thirdweb-dev/sdk@3.6.2
## 0.8.17
### Patch Changes
- Updated dependencies [[`15514f1`](https://github.com/thirdweb-dev/js/commit/15514f190a844d809ae5b1edb580aab46a682485), [`7c0744a`](https://github.com/thirdweb-dev/js/commit/7c0744a006e78987ad8b271b2c64f4bac7759510), [`f8bceec`](https://github.com/thirdweb-dev/js/commit/f8bceec10c60b30dc3d6f45926e2a9e018202578), [`887af24`](https://github.com/thirdweb-dev/js/commit/887af24450e316c2ea390cd49c0563cebe793c0f), [`96bd92e`](https://github.com/thirdweb-dev/js/commit/96bd92e724ec7d880d23348071b26ab8c21dd868)]:
- @thirdweb-dev/sdk@3.6.1
## 0.8.16
### Patch Changes
- Updated dependencies [[`7cb8e59`](https://github.com/thirdweb-dev/js/commit/7cb8e59be48dc923316eb36ab43a1bef7364f6b1), [`0ed77d2`](https://github.com/thirdweb-dev/js/commit/0ed77d2c9e7526444ef660aab82a950865234aa6), [`04a47e8`](https://github.com/thirdweb-dev/js/commit/04a47e8971d28da2532ebd9db824eeb459c17bd4)]:
- @thirdweb-dev/sdk@3.6.0
## 0.8.15
### Patch Changes
- Updated dependencies [[`3eba69a`](https://github.com/thirdweb-dev/js/commit/3eba69afd78b7aa472a9c00c9d4220bb69ad1d3e), [`4af785c`](https://github.com/thirdweb-dev/js/commit/4af785c37c831ecd7087c1c9eb9095922cac0855), [`6f818f3`](https://github.com/thirdweb-dev/js/commit/6f818f393eb9023b53a3358d62d60ec23a9246bd), [`b79dc18`](https://github.com/thirdweb-dev/js/commit/b79dc18f7ab5155bbf4af02dc1a953546160bad0)]:
- @thirdweb-dev/sdk@3.5.2
## 0.8.14
### Patch Changes
- Updated dependencies [[`4e7b293`](https://github.com/thirdweb-dev/js/commit/4e7b293c543244de79c150ca8c37d941221fc9a3), [`c9c0e4f`](https://github.com/thirdweb-dev/js/commit/c9c0e4ff39b054af746f3aec75fcbd0a3ef7239d)]:
- @thirdweb-dev/sdk@3.5.1
## 0.8.13
### Patch Changes
- Updated dependencies [[`5200d5d`](https://github.com/thirdweb-dev/js/commit/5200d5d7e730da58bd4d3e7c222e3c661265f913), [`42a6065`](https://github.com/thirdweb-dev/js/commit/42a606588dfed03c67c57357dd0ee1ad19fad6ea)]:
- @thirdweb-dev/sdk@3.5.0
## 0.8.12
### Patch Changes
- Updated dependencies [[`e731c1a`](https://github.com/thirdweb-dev/js/commit/e731c1a7c341e6f2b9cc42c88d5c1b036dcf4a7c)]:
- @thirdweb-dev/sdk@3.4.5
## 0.8.11
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@3.4.4
## 0.8.10
### Patch Changes
- Updated dependencies [[`1c24c3c`](https://github.com/thirdweb-dev/js/commit/1c24c3c3c48476a824f817e09e7bf0fbe67c1db5), [`65fc7ba`](https://github.com/thirdweb-dev/js/commit/65fc7ba6fff093a971b53cb0979c39768e090ba1)]:
- @thirdweb-dev/sdk@3.4.3
## 0.8.9
### Patch Changes
- Updated dependencies [[`21c21c1`](https://github.com/thirdweb-dev/js/commit/21c21c1adfd09b60ad563bfd4c308597140de33c), [`3522917`](https://github.com/thirdweb-dev/js/commit/352291791ee900e1500f84f095290497934d2f60)]:
- @thirdweb-dev/sdk@3.4.2
## 0.8.8
### Patch Changes
- Updated dependencies [[`72227b2`](https://github.com/thirdweb-dev/js/commit/72227b2e166a3a68bbb41cf2b389322f5b7547a2)]:
- @thirdweb-dev/sdk@3.4.1
## 0.8.7
### Patch Changes
- [#327](https://github.com/thirdweb-dev/js/pull/327) [`ef27aad`](https://github.com/thirdweb-dev/js/commit/ef27aad0aafc4577e85f44dc77dfbe880bd239b5) Thanks [@jnsdls](https://github.com/jnsdls)! - enable e2e testing
- Updated dependencies [[`340605b`](https://github.com/thirdweb-dev/js/commit/340605b507f384fbd2999b9c16542af3c53e84a9), [`26116a6`](https://github.com/thirdweb-dev/js/commit/26116a6f637ee845f7bd17f20ffe17caf184658e), [`15f8006`](https://github.com/thirdweb-dev/js/commit/15f8006e1fb22333b7ee239b45e7b1b12d6dccc8), [`ef27aad`](https://github.com/thirdweb-dev/js/commit/ef27aad0aafc4577e85f44dc77dfbe880bd239b5)]:
- @thirdweb-dev/sdk@3.4.0
## 0.8.6
### Patch Changes
- Updated dependencies [[`ad851f7`](https://github.com/thirdweb-dev/js/commit/ad851f7b4d6abb5ab9364ef3dec229f913e18ce5), [`6218c88`](https://github.com/thirdweb-dev/js/commit/6218c885842e6b4e44ec38ec92a9211e56c49bf4)]:
- @thirdweb-dev/sdk@3.3.1
## 0.8.5
### Patch Changes
- [#326](https://github.com/thirdweb-dev/js/pull/326) [`126752d`](https://github.com/thirdweb-dev/js/commit/126752d7d02c9a808a63fb9e67a9df6658b5682b) Thanks [@jnsdls](https://github.com/jnsdls)! - remove tons of unused dependencies, use SDK function for extracting ipfs has from bytecode
- Updated dependencies [[`126752d`](https://github.com/thirdweb-dev/js/commit/126752d7d02c9a808a63fb9e67a9df6658b5682b), [`df74340`](https://github.com/thirdweb-dev/js/commit/df74340fa51323304c32419761d6f18628b060fa), [`89ff921`](https://github.com/thirdweb-dev/js/commit/89ff921a7d9f0e42b4e6707c8b56d0aab95c1aa0), [`a57b4f0`](https://github.com/thirdweb-dev/js/commit/a57b4f01f3a49590b897101f2730582e4124a554)]:
- @thirdweb-dev/sdk@3.3.0
## 0.8.4
### Patch Changes
- Updated dependencies [[`4f867e1`](https://github.com/thirdweb-dev/js/commit/4f867e15edbe5757afbf54cab207458711a8986c), [`b6eec61`](https://github.com/thirdweb-dev/js/commit/b6eec6146c23b66a3681bbb48b173b9019254214), [`9727502`](https://github.com/thirdweb-dev/js/commit/9727502eb30ac139382b7c7c8e8fc0967cbfbcf1), [`782b58d`](https://github.com/thirdweb-dev/js/commit/782b58d3f6a3b49ff9b3d837551db5161f96171a), [`f41a443`](https://github.com/thirdweb-dev/js/commit/f41a443c5785240197607b5bf93ff18a1c8e8307), [`f45ef62`](https://github.com/thirdweb-dev/js/commit/f45ef62128cfefe06275a38440c90d45e9f3cef7), [`2f8ec89`](https://github.com/thirdweb-dev/js/commit/2f8ec89c4c83ae577092c840c198e6fcfb114e69), [`b7cd744`](https://github.com/thirdweb-dev/js/commit/b7cd744cd0482a6c3fe5ae0c858f20cd380d4114), [`53c6507`](https://github.com/thirdweb-dev/js/commit/53c65076696a43bd9a7e58a7493d4e65c172900f)]:
- @thirdweb-dev/sdk@3.2.6
## 0.8.3
### Patch Changes
- Updated dependencies [[`712b11a`](https://github.com/thirdweb-dev/js/commit/712b11a43e389ae10b7f09648779a69c05b2c913)]:
- @thirdweb-dev/sdk@3.2.5
## 0.8.2
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@3.2.4
## 0.8.1
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@3.2.3
## 0.8.0
### Minor Changes
- [#276](https://github.com/thirdweb-dev/js/pull/276) [`24514a6`](https://github.com/thirdweb-dev/js/commit/24514a6e9fc1316622c1494e5be225e53f88d26e) Thanks [@furqanrydhan](https://github.com/furqanrydhan)! - build is now default compile command, reorganized the help list
- [#279](https://github.com/thirdweb-dev/js/pull/279) [`1918495`](https://github.com/thirdweb-dev/js/commit/1918495f2ee7f50d94083d9577dab0bf1c828c94) Thanks [@furqanrydhan](https://github.com/furqanrydhan)! - Updating command list order, helper text and changed detect -> build
### Patch Changes
- [#277](https://github.com/thirdweb-dev/js/pull/277) [`9de3f8c`](https://github.com/thirdweb-dev/js/commit/9de3f8c8e954733bfc3eb6e8e0e786ff5b296f0c) Thanks [@adam-maj](https://github.com/adam-maj)! - Add recursive folder upload support
- [#268](https://github.com/thirdweb-dev/js/pull/268) [`57b9c67`](https://github.com/thirdweb-dev/js/commit/57b9c671aaf7fce0076dd332c171ba6944752e7a) Thanks [@adam-maj](https://github.com/adam-maj)! - Update storage upload cLI
- Updated dependencies [[`521a49c`](https://github.com/thirdweb-dev/js/commit/521a49c6ec6a73068adcfbc1d94d2f3f17afae86), [`8b3b97c`](https://github.com/thirdweb-dev/js/commit/8b3b97c8f7b3710ce62ed86cfeb4f6de3c23d559), [`25a4773`](https://github.com/thirdweb-dev/js/commit/25a4773bba406f4e270ac86e68c5266d24c08330), [`b2cadf1`](https://github.com/thirdweb-dev/js/commit/b2cadf164cfe9fb27081df7530356baf70ec2b3a), [`d6bb61b`](https://github.com/thirdweb-dev/js/commit/d6bb61b7fac759fff7d6293edd46f693f5a7889c), [`78d6d3c`](https://github.com/thirdweb-dev/js/commit/78d6d3c15968a449924b3f24354e151a90e4b20d), [`89d87a5`](https://github.com/thirdweb-dev/js/commit/89d87a5eb31e78e68e097718e9ae6e4c4d101868), [`41507d3`](https://github.com/thirdweb-dev/js/commit/41507d32a78c556f50c88de81c4d6109b1783c78), [`8096c78`](https://github.com/thirdweb-dev/js/commit/8096c78b466a7f5f9c2aac6e2c56a06f9d3a25d6), [`b1fa171`](https://github.com/thirdweb-dev/js/commit/b1fa17158dcac00265bc8f4d64f1f9708482cdb5), [`18381fa`](https://github.com/thirdweb-dev/js/commit/18381fac73741826934212ac6441842ed42a64a0), [`df048af`](https://github.com/thirdweb-dev/js/commit/df048af605f449279b01d7352b604e7856ac223c), [`d6bb61b`](https://github.com/thirdweb-dev/js/commit/d6bb61b7fac759fff7d6293edd46f693f5a7889c), [`cf88795`](https://github.com/thirdweb-dev/js/commit/cf88795376d3110f9d3aa839928d22276904b15a), [`89b5c6f`](https://github.com/thirdweb-dev/js/commit/89b5c6fe079e4df2cf12cb557aa9784f88c5d159)]:
- @thirdweb-dev/sdk@3.2.2
## 0.7.24
### Patch Changes
- [#259](https://github.com/thirdweb-dev/js/pull/259) [`6f95a52`](https://github.com/thirdweb-dev/js/commit/6f95a520e6cc69e08f734705e8adc71431b091cc) Thanks [@adam-maj](https://github.com/adam-maj)! - Add npx thirdweb upload command
- Updated dependencies []:
- @thirdweb-dev/sdk@3.2.1
## 0.7.23
### Patch Changes
- [#246](https://github.com/thirdweb-dev/js/pull/246) [`ef0bac7`](https://github.com/thirdweb-dev/js/commit/ef0bac7f44b93939bfc9e2706b39edaa22992eec) Thanks [@simonlim94](https://github.com/simonlim94)! - Renamed initial commit message during thirdweb cli createApp
- Updated dependencies [[`ba6f450`](https://github.com/thirdweb-dev/js/commit/ba6f45027a6ec11aebb4a1918ab2ba4f88894ede), [`c8261b7`](https://github.com/thirdweb-dev/js/commit/c8261b74b5828ac66ea3a6d7636aa57e40ea1a14), [`20745f8`](https://github.com/thirdweb-dev/js/commit/20745f8cd603235eb5039e61a39c0959c5860bca), [`2ea3f00`](https://github.com/thirdweb-dev/js/commit/2ea3f00c41b5e70d9bb634cd86790890520fc4d6), [`9412d41`](https://github.com/thirdweb-dev/js/commit/9412d416832c87ab2c858cb120c6c5de03459c50), [`d677e9d`](https://github.com/thirdweb-dev/js/commit/d677e9d6341252013762882d25408ea8f93791e5), [`e662408`](https://github.com/thirdweb-dev/js/commit/e662408e1936983485936609552f80a56cbed082), [`e4b10bc`](https://github.com/thirdweb-dev/js/commit/e4b10bc5bd12178cba8856b60255732123cb7ae5), [`caf9795`](https://github.com/thirdweb-dev/js/commit/caf979537b5acb1610f182c94afa5d95c208ec3f), [`028cb78`](https://github.com/thirdweb-dev/js/commit/028cb781252b0050943b14cfdf38132c18753a4b), [`1972f3e`](https://github.com/thirdweb-dev/js/commit/1972f3ec0d511fbc17642b2a30852a177092a09e), [`6647f70`](https://github.com/thirdweb-dev/js/commit/6647f707bdd050725264a8a74220c11912f68e57), [`cac373b`](https://github.com/thirdweb-dev/js/commit/cac373b010ce3be3615a36671b66815a27785061)]:
- @thirdweb-dev/sdk@3.2.0
## 0.7.22
### Patch Changes
- [#103](https://github.com/thirdweb-dev/js/pull/103) [`e1bcc67`](https://github.com/thirdweb-dev/js/commit/e1bcc67cebfc95fce615439ff03871b4fef0eed9) Thanks [@b4s36t4](https://github.com/b4s36t4)! - automatically re-name the created example repo to the user provided app name
- Updated dependencies [[`8239763`](https://github.com/thirdweb-dev/js/commit/82397636f41faa2b44cfe70e75212f0f42291092), [`27a30e3`](https://github.com/thirdweb-dev/js/commit/27a30e3ffb56dd7fa8412a066bc3ac0977aca8e2), [`f2a6211`](https://github.com/thirdweb-dev/js/commit/f2a62110c43e7b8f35c86a197730e732f8fcc786), [`d26b768`](https://github.com/thirdweb-dev/js/commit/d26b76872a6c85651ee06aa0732ee2967f70db27), [`ba7dcbb`](https://github.com/thirdweb-dev/js/commit/ba7dcbbad8db2b73baf1435f4175d19933cb7d4f), [`9c8a3fb`](https://github.com/thirdweb-dev/js/commit/9c8a3fb6d4520dd6cdf2d1c17f33b764e871599e)]:
- @thirdweb-dev/sdk@3.1.2
## 0.7.21
### Patch Changes
- Updated dependencies [[`666ff5f`](https://github.com/thirdweb-dev/js/commit/666ff5f694f1e146150ddb9fa3233f00533b6d60), [`0dade96`](https://github.com/thirdweb-dev/js/commit/0dade96d0d2553d25b386d822e534eb7ed0aefa9), [`c295a47`](https://github.com/thirdweb-dev/js/commit/c295a47144cd722c6f8861c1ec567b53a05ea0bf)]:
- @thirdweb-dev/sdk@3.1.1
## 0.7.20
### Patch Changes
- Updated dependencies [[`3c8f620`](https://github.com/thirdweb-dev/js/commit/3c8f6205e9b49ae9fea1f9629678210c6c9c36e6), [`e187d21`](https://github.com/thirdweb-dev/js/commit/e187d21e123a506fac0459da18f2d4fc94abae29), [`acbabc8`](https://github.com/thirdweb-dev/js/commit/acbabc8999b2b7b6e0eb89cae97e2f1ef7143501), [`b030a86`](https://github.com/thirdweb-dev/js/commit/b030a866080953bbf4e504ddc41d7050b250d2d7)]:
- @thirdweb-dev/sdk@3.1.0
## 0.7.19
### Patch Changes
- Updated dependencies [[`ce05bfd`](https://github.com/thirdweb-dev/js/commit/ce05bfd8615a9c79664856bce53de8b43bed5c87)]:
- @thirdweb-dev/sdk@3.0.8
## 0.7.18
### Patch Changes
- Updated dependencies [[`5f5ab01`](https://github.com/thirdweb-dev/js/commit/5f5ab015e1dd3c471d6affe995ef36ec88932b3c)]:
- @thirdweb-dev/sdk@3.0.7
## 0.7.17
### Patch Changes
- Updated dependencies [[`a80fc97`](https://github.com/thirdweb-dev/js/commit/a80fc97b6a1e72ed46a400b4b602e180947fb870)]:
- @thirdweb-dev/sdk@3.0.6
## 0.7.16
### Patch Changes
- [#172](https://github.com/thirdweb-dev/js/pull/172) [`89db3db`](https://github.com/thirdweb-dev/js/commit/89db3db7ff3d5af7e7a7b5f25e299b9faad44eb0) Thanks [@adam-maj](https://github.com/adam-maj)! - Add thirdweb deploy to end of thirdweb detect and yarn build to thirdweb create
- [#175](https://github.com/thirdweb-dev/js/pull/175) [`3332fa5`](https://github.com/thirdweb-dev/js/commit/3332fa5697b9ff2a4ded1f2c508304f59f434be2) Thanks [@adam-maj](https://github.com/adam-maj)! - Split create contract flow into two steps
- [#177](https://github.com/thirdweb-dev/js/pull/177) [`3edec39`](https://github.com/thirdweb-dev/js/commit/3edec391be169453aaee412846005a820939fab0) Thanks [@adam-maj](https://github.com/adam-maj)! - thirdweb deploy redirects to contract deploy page if no contracts detected
- [#184](https://github.com/thirdweb-dev/js/pull/184) [`bdec5a5`](https://github.com/thirdweb-dev/js/commit/bdec5a59af680802e206e3025b2c463fc7dcb740) Thanks [@aeither](https://github.com/aeither)! - Fix "Invalid Project name" when a project with a capital letter is entered
- Updated dependencies [[`4169b94`](https://github.com/thirdweb-dev/js/commit/4169b9428f9001b7cad259a4e56fe610316cd191), [`3b877ba`](https://github.com/thirdweb-dev/js/commit/3b877ba221acfd85f80b99e1bc382055217f0a39), [`b54f95d`](https://github.com/thirdweb-dev/js/commit/b54f95dc906928ff2f9251748f254a16fe1f2cee), [`f8ab477`](https://github.com/thirdweb-dev/js/commit/f8ab4779bb2d6d66200e1e8fd558e0ac069a2f54), [`772f843`](https://github.com/thirdweb-dev/js/commit/772f8431e3a62d0ded62dae90a43e9a7edd5b1a2), [`a9ec190`](https://github.com/thirdweb-dev/js/commit/a9ec190ff99d2714cef2500d20ea0f3f73f07be3), [`208b038`](https://github.com/thirdweb-dev/js/commit/208b0389a50ea48bbb9600fec60fec2f1671d4b9), [`5345479`](https://github.com/thirdweb-dev/js/commit/534547992243bdd3a77e34ec2b2487b5adab366a)]:
- @thirdweb-dev/sdk@3.0.5
## 0.7.15
### Patch Changes
- [#148](https://github.com/thirdweb-dev/js/pull/148) [`964add6`](https://github.com/thirdweb-dev/js/commit/964add6f205577298b8f4b9ce7298e5bf09e88e7) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Fix deploy/release CLI uploads
- Updated dependencies []:
- @thirdweb-dev/sdk@3.0.4
## 0.7.14
### Patch Changes
+3 -1
View File
@@ -1,9 +1,11 @@
export const CREATE_MESSAGES = {
typeOfProject: "What type of project do you want to create?",
projectName: "What is your project named?",
chain: "Which blockchain do you want to use?",
framework: "What framework do you want to use?",
language: "What language do you want to use?",
contract: "What contract do you want to start from?",
contract: "What type of contract do you want to start from?",
extensions: "What extensions do you want to add to your contract?",
} as const;
export const ERROR_MESSAGES = {
+3 -1
View File
@@ -2,7 +2,7 @@ import { CREATE_MESSAGES } from "../constants/constants";
import { prepareEnvironment } from "@gmrchk/cli-testing-library";
// this creates an app, can take some time that's fine
jest.setTimeout(120_000);
jest.setTimeout(150_000);
describe("npx thirdweb create", () => {
it("should create app (CRA) successfully", async () => {
@@ -16,6 +16,8 @@ describe("npx thirdweb create", () => {
await pressKey("enter");
await waitForText(CREATE_MESSAGES.projectName);
await pressKey("enter");
await waitForText(CREATE_MESSAGES.chain);
await pressKey("enter");
await waitForText(CREATE_MESSAGES.framework);
// select CRA
await pressKey("arrowDown");
+3 -3
View File
@@ -15,8 +15,8 @@ describe("npx thirdweb deploy", () => {
`${path}/BasicContract.sol`,
);
const { waitForText, waitForFinish, getExitCode, writeText, getStdout } =
await spawn("node", "./dist/cli/index.js deploy");
const { waitForText, waitForFinish, getExitCode, writeText, getStderr } =
await spawn("node", "./dist/cli/index.js deploy --contract");
expect(await exists("BasicContract.sol")).toEqual(true);
@@ -26,7 +26,7 @@ describe("npx thirdweb deploy", () => {
// wait for program to finish
await waitForFinish();
expect(getStdout().at(-1)).toContain(
expect(getStderr().at(-1)).toContain(
"https://thirdweb.com/contracts/deploy/",
);
+4 -1
View File
@@ -20,9 +20,12 @@ describe("npx thirdweb detect", () => {
// select hardhat
await create.pressKey("enter");
await create.waitForText(CREATE_MESSAGES.contract);
// select ERC721Base
// select ERC721
await create.pressKey("arrowDown");
await create.pressKey("enter");
await create.waitForText(CREATE_MESSAGES.extensions);
// select no extra extensions
await create.pressKey("enter");
// wait for program to finish
await create.waitForFinish();
+2 -2
View File
@@ -15,7 +15,7 @@ describe("npx thirdweb release", () => {
`${path}/BasicContract.sol`,
);
const { waitForText, waitForFinish, getExitCode, writeText, getStdout } =
const { waitForText, waitForFinish, getExitCode, writeText, getStderr } =
await spawn("node", "./dist/cli/index.js release");
expect(await exists("BasicContract.sol")).toEqual(true);
@@ -26,7 +26,7 @@ describe("npx thirdweb release", () => {
// wait for program to finish
await waitForFinish();
expect(getStdout().at(-1)).toContain(
expect(getStderr().at(-1)).toContain(
"https://thirdweb.com/contracts/release/",
);
+5 -13
View File
@@ -1,7 +1,7 @@
{
"name": "thirdweb",
"main": "dist/cli/index.js",
"version": "0.7.14",
"version": "0.9.0",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -10,7 +10,7 @@
},
"devDependencies": {
"@gmrchk/cli-testing-library": "^0.1.2",
"@types/async-retry": "1.3.0",
"@types/async-retry": "^1.3.0",
"@types/cross-spawn": "^6.0.2",
"@types/inquirer": "^8.2.1",
"@types/jest": "^29.0.0",
@@ -25,31 +25,23 @@
"prettier": "^2.7.1",
"ts-jest": "^28.0.8",
"ts-node": "^10.7.0",
"tsc": "^2.0.4",
"tsup": "^6.2.3",
"typescript": "^4.7.4"
},
"dependencies": {
"@thirdweb-dev/sdk": "*",
"async-retry": "^1.3.3",
"cbor": "^8.1.0",
"commander": "^9.1.0",
"cpy": "^9.0.1",
"enquirer": "^2.3.6",
"ethers": "^5.7.0",
"form-data": "^4.0.0",
"ethers": "^5.7.2",
"got": "11.8.5",
"inquirer": "^8.2.3",
"ipfs-unixfs": "^6.0.7",
"ipld-dag-pb": "^0.22.3",
"multihashes": "^4.0.3",
"open": "^8.4.0",
"prompts": "^2.4.2",
"rimraf": "^3.0.2",
"solc": "0.8.13",
"solc": "0.8.17",
"tar": "^6.1.11",
"tslog": "^3.3.3",
"update-check": "^1.5.4",
"update-notifier": "^6.0.2",
"validate-npm-package-name": "^4.0.0",
"yaml": "^2.1.1"
@@ -81,4 +73,4 @@
"sourcemap": true,
"clean": true
}
}
}
+115 -87
View File
@@ -1,11 +1,12 @@
#!/usr/bin/env node
import { installGithubAction } from "../common/ci-installer";
import { detectExtensions } from "../common/feature-detector";
import { processProject } from "../common/processor";
import { cliVersion, pkg } from "../constants/urls";
import { info, logger } from "../core/helpers/logger";
import { twCreate } from "../create/command";
import generateDashboardUrl from "../helpers/generate-dashboard-url";
import { deploy } from "../deploy";
import { upload } from "../storage/command";
import { ThirdwebStorage } from "@thirdweb-dev/storage";
import chalk from "chalk";
import { Command } from "commander";
import open from "open";
@@ -39,101 +40,41 @@ $$$$$$\\ $$$$$$$\\ $$\\ $$$$$$\\ $$$$$$$ |$$\\ $$\\ $$\\ $$$$$$\\ $$$$
.version(cliVersion, "-v, --version");
program
.command("create")
.command("create [projectType] [projectPath]")
.description(
"Create a thirdweb app from any of our official templates. Checkout some examples you can use here: https://github.com/thirdweb-example/",
"Create a web3 app from any of our official templates: https://github.com/thirdweb-example/",
)
.option("--app", `Create a thirdweb app.`)
.option("--contract", `Create a thirdweb contracts project.`)
.option("--ts, --typescript", `Initialize as a TypeScript project.`)
.option("--js, --javascript", `Initialize as a JavaScript project.`)
.option("--forge", `Initialize as a Forge project.`)
.option("--hardhat", `Initialize as a Hardhat project.`)
.option("--cra", `Initialize as a Create React App project.`)
.option("--next", `Initialize as a Next.js project.`)
.option("--vite", `Initialize as a Vite project.`)
.option("--app", "Create a web3 app.")
.option("--contract", "Create a web3 contract project")
.option("--ts, --typescript", "Initialize as a TypeScript project.")
.option("--js, --javascript", "Initialize as a JavaScript project.")
.option("--forge", "Initialize as a Forge project.")
.option("--hardhat", "Initialize as a Hardhat project.")
.option("--cra", "Initialize as a Create React App project.")
.option("--next", "Initialize as a Next.js project.")
.option("--vite", "Initialize as a Vite project.")
.option(
"--use-npm",
`Explicitly tell the CLI to bootstrap the app using npm`,
"Explicitly tell the CLI to bootstrap the app using npm",
)
.option(
"--use-pnpm",
`Explicitly tell the CLI to bootstrap the app using pnpm`,
"Explicitly tell the CLI to bootstrap the app using pnpm",
)
.option("--framework [name]", `The preferred framework.`)
.option("--framework [name]", "The preferred framework.")
.option("--solana", "Initialize as a Solana project.")
.option("--evm", "Initialize as an Ethereum project.")
.option(
"-t, --template [name]",
`A template to start your project from. You can use an template repository name from the official thirdweb-example org.`,
"A template to start your project from. You can use an template repository name from the official thirdweb-example org.",
)
.action(async (options) => {
await twCreate(options);
.action(async (type, path, options) => {
await twCreate(type, path, options);
});
program
.command("deploy")
.description(
"Deploy contracts through your thirdweb dashboard, without dealing with private keys.",
)
.option("-p, --path <project-path>", "path to project", ".")
.option("--dry-run", "dry run (skip actually publishing)")
.option("-d, --debug", "show debug logs")
.option("--ci", "Continuous Integration mode")
.option(
"-n, --name [name]",
"Name of the pre-built or released contract (such as nft-drop)",
)
.option(
"-cv, --contract-version [version]",
"Version of the released contract",
)
.action(async (options) => {
if (options.name) {
const url = generateDashboardUrl(options.name, options.contractVersion);
if (!url) {
logger.error(
chalk.red(
`Could not find a contract named ${options.name} ${
options.contractVersion || ""
}`,
),
);
return;
}
info(`Open this link to deploy your contract:`);
logger.info(chalk.blueBright(url));
open(url.toString());
return;
}
const url = await processProject(options, "deploy");
info(`Open this link to deploy your contracts:`);
logger.info(chalk.blueBright(url.toString()));
open(url.toString());
});
program
.command("release")
.description(
"Release contracts, making them available for others to deploy and unlocking SDKs, Dashboards and Analytics.",
)
.option("-p, --path <project-path>", "path to project", ".")
.option("--dry-run", "dry run (skip actually publishing)")
.option("-d, --debug", "show debug logs")
.option("--ci", "Continuous Integration mode")
.action(async (options) => {
const url = await processProject(options, "release");
info(`Open this link to release your contracts:`);
logger.info(chalk.blueBright(url.toString()));
open(url.toString());
});
program
.command("detect")
.description(
"Compile contracts and detect implemented thirdweb contract extensions",
)
.command("build")
.description("Compile contract and detect thirdweb contract extensions")
.option("-p, --path <project-path>", "path to project", ".")
.option("-d, --debug", "show debug logs")
.option("-a, --all", "run detection on all contracts")
@@ -142,12 +83,99 @@ $$$$$$\\ $$$$$$$\\ $$\\ $$$$$$\\ $$$$$$$ |$$\\ $$\\ $$\\ $$$$$$\\ $$$$
});
program
.command("install-ci")
.description(
"(alpha) Set up continuous integration for your contracts. This adds a github action to deploy the project on pull requests and pushes to branches. Publishes on push the the main branch.",
.command("deploy")
.description("Deploy your (or team) contracts securely to blockchains")
.option("-p, --path <project-path>", "path to project", ".")
.option("--dry-run", "dry run (skip actually publishing)")
.option("-d, --debug", "show debug logs")
.option("--ci", "Continuous Integration mode")
.option(
"--dist-path [distPath]",
"Path to the dist folder where the HTML based App is",
)
.option(
"-n, --name [name]",
"Name of the pre-built or released contract (such as nft-drop)",
)
.option(
"-cv, --contract-version [version]",
"Version of the released contract",
)
.option("--app", "Deploy a web app to decentralized storage")
.option("--contract", "Deploy a smart contract to blockchains")
.action(async (options) => {
await installGithubAction(options);
const url = await deploy(options);
if (url) {
open(url);
}
});
program
.command("release")
.description(
"Release your protocol so other devs can deploy them and unlock SDKs, Dashboards and Analytics",
)
.option("-p, --path <project-path>", "path to project", ".")
.option("--dry-run", "dry run (skip actually publishing)")
.option("-d, --debug", "show debug logs")
.option("--ci", "Continuous Integration mode")
.action(async (options) => {
const url = await processProject(options, "release");
info(
`Open this link to release your contracts: ${chalk.blueBright(
url.toString(),
)}`,
);
open(url.toString());
});
program
.command("upload")
.description("Upload any file or directory to decentralized storage (IPFS)")
.argument("[upload]", "path to file or directory to upload")
.action(async (path) => {
const storage = new ThirdwebStorage();
try {
const uri = await upload(storage, path);
info(
`Files stored at the following IPFS URI: ${chalk.blueBright(
uri.toString(),
)}`,
);
const url = storage.resolveScheme(uri);
info(
`Open this link to view your upload: ${chalk.blueBright(
url.toString(),
)}`,
);
} catch (err: any) {
if (
err.toString() === "No files detected in specified directory" ||
err.toString() === "Invalid path provided" ||
err.toString() === "No path provided"
) {
logger.error(
chalk.redBright(
"Please specify a valid file or directory to upload",
),
);
} else {
logger.error(chalk.redBright("Failed to upload files"), err);
}
}
});
program
.command("detect")
.description(
"(deprecated) Compile contracts and detect implemented thirdweb contract extensions",
)
.option("-p, --path <project-path>", "path to project", ".")
.option("-d, --debug", "show debug logs")
.option("-a, --all", "run detection on all contracts")
.action(async (options) => {
await detectExtensions(options);
});
await program.parseAsync();
@@ -5,8 +5,10 @@ import { logger, spinner } from "../core/helpers/logger";
import { createContractsPrompt } from "../core/helpers/selector";
import { ContractFeatures, Feature } from "../core/interfaces/ContractFeatures";
import { ContractPayload } from "../core/interfaces/ContractPayload";
import { getPkgManager } from "../create/helpers/get-pkg-manager";
import { detectFeatures, FeatureWithEnabled } from "@thirdweb-dev/sdk";
import chalk from "chalk";
import { existsSync, readFileSync } from "fs";
import ora from "ora";
import path from "path";
@@ -113,6 +115,26 @@ export async function detectExtensions(options: any) {
)} - ${chalk.dim(chalk.gray(feature.reference))}`,
);
});
let deployCmd = `npx thirdweb@latest deploy`;
if (existsSync(projectPath + "/package.json")) {
const packageManager = getPkgManager();
const useYarn = packageManager === "yarn";
const pkgJson = JSON.parse(
readFileSync(projectPath + "/package.json", "utf-8"),
);
if (pkgJson?.scripts?.deploy === deployCmd) {
deployCmd = `${packageManager}${useYarn ? "" : " run"} deploy`;
}
}
logger.info(``);
ora(
`Once you're done writing your contracts, you can run the following command to deploy them:`,
).info();
logger.info(``);
logger.info(` ${chalk.cyan(deployCmd)}`);
logger.info(``);
});
}
+28 -9
View File
@@ -1,4 +1,4 @@
import { THIRDWEB_URL, cliVersion } from "../constants/urls";
import { cliVersion, THIRDWEB_URL } from "../constants/urls";
import build from "../core/builder/build";
import detect from "../core/detection/detect";
import { execute } from "../core/helpers/exec";
@@ -8,6 +8,7 @@ import { ContractPayload } from "../core/interfaces/ContractPayload";
import { ThirdwebStorage } from "@thirdweb-dev/storage";
import chalk from "chalk";
import { readFileSync } from "fs";
import ora from "ora";
import path from "path";
export async function processProject(
@@ -35,6 +36,27 @@ export async function processProject(
const projectType = await detect(projectPath, options);
if (projectType === "none") {
if (command === "deploy") {
info(
"No contracts detected in this directory. Redirecting to the thirdweb contract deployment page.",
);
return "https://thirdweb.com/contracts";
}
error("No detected contracts in this directory.");
logger.info(``);
ora(
`Detected contract files must end with the '.sol' extension and exist in this directory or the '/contracts' subdirectory`,
).info();
logger.info(``);
ora("To create a new contracts project, run the following command:").info();
logger.info(``);
logger.info(` ${chalk.cyan(`npx thirdweb@latest create --contract`)}`);
logger.info(``);
process.exit(1);
}
if (options.ci) {
logger.info("Installing dependencies...");
try {
@@ -142,10 +164,9 @@ export async function processProject(
const metadataURIs = await Promise.all(
selectedContracts.map(async (c) => {
logger.debug(`Uploading ${c.name}...`);
const hash = await storage.upload(c.metadata, {
return await storage.upload(JSON.parse(c.metadata), {
uploadWithoutDirectory: true,
});
return `ipfs://${hash}`;
}),
);
@@ -173,15 +194,13 @@ export async function processProject(
let combinedURIs: string[] = [];
if (combinedContents.length === 1) {
// use upload single if only one contract to get a clean IPFS hash
const metadataUri = await storage.upload(
JSON.stringify(combinedContents[0]),
{ uploadWithoutDirectory: true },
);
const metadataUri = await storage.upload(combinedContents[0], {
uploadWithoutDirectory: true,
});
combinedURIs.push(metadataUri);
} else {
// otherwise upload batch
const uris = await storage.uploadBatch(combinedContents);
combinedURIs = uris;
combinedURIs = await storage.uploadBatch(combinedContents);
}
loader.succeed("Upload successful");
+2 -2
View File
@@ -21,7 +21,7 @@ contract Contract is ERC721Base {
{}
}`,
ERC721Signature: `// SPDX-License-Identifier: Apache-2.0
ERC721SignatureMint: `// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;
import "@thirdweb-dev/contracts/base/ERC721SignatureMint.sol";
@@ -113,7 +113,7 @@ contract Contract is ERC1155Base {
{}
}`,
ERC1155Signature: `// SPDX-License-Identifier: Apache-2.0
ERC1155SignatureMint: `// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;
import "@thirdweb-dev/contracts/base/ERC1155SignatureMint.sol";
@@ -1,7 +1,7 @@
import { extractIPFSHashFromBytecode } from "../helpers/ipfs";
import { logger } from "../helpers/logger";
import { CompileOptions, IBuilder } from "../interfaces/Builder";
import { ContractPayload } from "../interfaces/ContractPayload";
import { extractIPFSHashFromBytecode } from "@thirdweb-dev/sdk/evm";
export abstract class BaseBuilder implements IBuilder {
abstract compile(
+40 -11
View File
@@ -5,7 +5,9 @@ import { Detector } from "./detector";
import FoundryDetector from "./foundry";
import HardhatDetector from "./hardhat";
import TruffleDetector from "./truffle";
import fs, { existsSync } from "fs";
import inquirer from "inquirer";
import { parse } from "path";
const { Confirm } = require("enquirer");
@@ -26,18 +28,24 @@ export default async function detect(
//if there is no project returned at all then just return unknown}
if (!possibleProjectTypes.length) {
warn(`${ERROR_MESSAGES.noConfiguration} ${path}`);
const prompt = new Confirm({
name: "continue",
message:
"Do you want to continue and compile this project with solc instead?",
});
const shouldCompile = await prompt.run();
if (!shouldCompile) {
logger.warn("Aborted contract compilation");
process.exit(1);
const canCompile = hasContracts(path);
if (canCompile) {
warn(`${ERROR_MESSAGES.noConfiguration} ${path}`);
const prompt = new Confirm({
name: "continue",
message:
"Do you want to continue and compile this project with solc instead?",
});
const shouldCompile = await prompt.run();
if (!shouldCompile) {
logger.warn("Aborted contract compilation");
process.exit(1);
}
return "solc";
} else {
return "none";
}
return "unknown";
}
//if there is only one possible option just return it
if (possibleProjectTypes.length === 1) {
@@ -64,3 +72,24 @@ export default async function detect(
return answer[question];
}
}
// Check if a directory has any .sol files or a /contracts folder with .sol files
function hasContracts(path: any) {
return (
["", "/contracts"].filter((p) => {
const dirPath = path + p;
if (!existsSync(dirPath)) {
return false;
}
const files = fs.readdirSync(dirPath);
const contracts = files.filter((filePath) => {
const { ext } = parse(filePath);
return ext === ".sol";
});
return contracts.length > 0;
}).length > 0
);
}
+11
View File
@@ -0,0 +1,11 @@
import { ProjectType } from "../types/ProjectType";
import { Detector } from "./detector";
import { existsSync } from "fs";
export default class NPMDetector implements Detector {
public projectType: ProjectType = "npm";
public matches(path: string): boolean {
return existsSync(path + "/package-lock.json");
}
}
+14
View File
@@ -0,0 +1,14 @@
import { ProjectType } from "../types/ProjectType";
import { Detector } from "./detector";
import { existsSync } from "fs";
export default class ViteDetector implements Detector {
public projectType: ProjectType = "vite";
public matches(path: string): boolean {
return (
existsSync(path + "/vite.config.js") ||
existsSync(path + "/vite.config.ts")
);
}
}
+11
View File
@@ -0,0 +1,11 @@
import { ProjectType } from "../types/ProjectType";
import { Detector } from "./detector";
import { existsSync } from "fs";
export default class YarnDetector implements Detector {
public projectType: ProjectType = "yarn";
public matches(path: string): boolean {
return existsSync(path + "/yarn.lock");
}
}
-66
View File
@@ -1,66 +0,0 @@
import { decodeFirstSync } from "cbor";
import { UnixFS } from "ipfs-unixfs";
import { DAGNode } from "ipld-dag-pb";
import { toB58String } from "multihashes";
/**
* Derives IPFS hash of string
* @param {String} str
* @return {String} IPFS hash (ex: "Qm")
*/
export async function getIPFSHash(str: string) {
const file = new UnixFS({
type: "file",
data: Buffer.from(str),
});
const node = new DAGNode(file.marshal());
const metadataLink = await node.toDAGLink();
return toB58String(metadataLink.Hash.multihash);
}
/**
* Extract the IPFS hash from the given bytecode
* @param bytecode
* @returns
*/
export function extractIPFSHashFromBytecode(
bytecode: string,
): string | undefined {
const numericBytecode = hexToBytes(bytecode);
const cborLength: number =
numericBytecode[numericBytecode.length - 2] * 0x100 +
numericBytecode[numericBytecode.length - 1];
const bytecodeBuffer = Buffer.from(
numericBytecode.slice(numericBytecode.length - 2 - cborLength, -2),
);
const cborData = decodeFirstSync(bytecodeBuffer);
if (cborData["ipfs"]) {
const uri = toB58String(cborData["ipfs"]);
return uri;
}
return undefined;
}
function hexToBytes(hex: string | number) {
hex = hex.toString(16);
if (!hex.startsWith("0x")) {
hex = `0x${hex}`;
}
if (!isHexStrict(hex)) {
throw new Error('Given value "' + hex + '" is not a valid hex string.');
}
hex = hex.replace(/^0x/i, "");
for (var bytes = [], c = 0; c < hex.length; c += 2) {
bytes.push(parseInt(hex.slice(c, c + 2), 16));
}
return bytes;
}
function isHexStrict(hex: string | number) {
return (
(typeof hex === "string" || typeof hex === "number") &&
/^(-)?0x[0-9a-f]*$/i.test(hex.toString())
);
}
+8 -1
View File
@@ -3,4 +3,11 @@ export type ProjectType =
| "foundry"
| "hardhat"
| "truffle"
| "unknown";
| "solc"
| "vite"
| "next"
| "cra"
| "spa-webapp"
| "yarn"
| "npm"
| "none";
+136 -63
View File
@@ -10,52 +10,67 @@ import chalk from "chalk";
import path from "path";
import prompts from "prompts";
let projectType: string = "";
let projectPath: string = "";
let projectType: string = "";
let framework: string = "";
let language: string = "";
let baseContract: string = "";
let chain: string = "";
/* let createType: string = "app"; */
export async function twCreate(options: any) {
if (typeof projectPath === "string") {
projectPath = projectPath.trim();
export async function twCreate(
pType: string,
pPath: string = "",
options: any,
) {
if (typeof pPath === "string") {
projectPath = pPath;
}
if (options.app) {
if (pType === "app" || options.app) {
projectType = "app";
}
if (options.contract) {
} else if (pType === "contract" || options.contract) {
projectType = "contract";
}
if (options.typescript) {
language = "typescript";
if (projectType === "app") {
if (options.typescript) {
language = "typescript";
}
if (options.javascript) {
language = "javascript";
}
if (options.next) {
framework = "next";
}
if (options.cra) {
framework = "cra";
}
if (options.vite) {
framework = "vite";
}
if (options.solana) {
chain = "solana";
}
if (options.evm) {
chain = "evm";
}
}
if (options.javascript) {
language = "javascript";
}
if (projectType === "contract") {
if (options.forge) {
framework = "forge";
}
if (options.next) {
framework = "next";
}
if (options.cra) {
framework = "cra";
}
if (options.vite) {
framework = "vite";
}
if (options.forge) {
framework = "forge";
}
if (options.hardhat) {
framework = "hardhat";
if (options.hardhat) {
framework = "hardhat";
}
}
if (options.framework) {
@@ -76,7 +91,7 @@ export async function twCreate(options: any) {
if (typeof res.projectType === "string") {
projectType = res.projectType.trim();
}
} else if (!projectType && options.template) {
} else if (!projectType || options.template) {
// If no project type is specified, but a template is, we assume the user wants to create an app.
// We do this so old users can still use the --template flag to create an app.
projectType = "app";
@@ -90,8 +105,11 @@ export async function twCreate(options: any) {
name: "path",
message: CREATE_MESSAGES.projectName,
initial: options.template || defaultName,
validate: (name) => {
const validation = validateNpmName(path.basename(path.resolve(name)));
format: (name: string) => name.toLowerCase(),
validate: (name: string) => {
const validation = validateNpmName(
path.basename(path.resolve(name.toLowerCase())),
);
if (validation.valid) {
return true;
}
@@ -120,16 +138,42 @@ export async function twCreate(options: any) {
}
if (!options.template) {
if (projectType === "app" && !chain) {
const res = await prompts({
type: "select",
name: "chain",
message: CREATE_MESSAGES.chain,
choices: [
{ title: "EVM", value: "evm" },
{ title: "Solana", value: "solana" },
],
});
if (res.chain === "solana") {
chain = "solana";
} else {
chain = "evm";
}
}
if (projectType === "app" && !framework) {
const res = await prompts({
type: "select",
name: "framework",
message: CREATE_MESSAGES.framework,
choices: [
{ title: "Next.js", value: "next" },
{ title: "Create React App", value: "cra" },
{ title: "Vite", value: "vite" },
],
choices:
// Solana doesn't support Vite just yet:
chain === "solana"
? [
{ title: "Next.js", value: "next" },
{ title: "Create React App", value: "cra" },
// { title: "Vite", value: "vite" },
]
: [
{ title: "Next.js", value: "next" },
{ title: "Create React App", value: "cra" },
{ title: "Vite", value: "vite" },
],
});
if (typeof res.framework === "string") {
@@ -175,36 +219,64 @@ export async function twCreate(options: any) {
// Select base contract
if (projectType === "contract" && !baseContract) {
const res = await prompts({
let standard = "none";
const standardPrompt = await prompts({
type: "select",
name: "baseContract",
name: "standard",
message: CREATE_MESSAGES.contract,
choices: [
{ title: "Empty Contract", value: "" },
{ title: "ERC721 Base", value: "ERC721Base" },
{ title: "ERC721 + Signature Mint", value: "ERC721Signature" },
{ title: "ERC721 + Lazy Mint", value: "ERC721LazyMint" },
{ title: "ERC721 + Delayed Reveal", value: "ERC721DelayedReveal" },
{ title: "ERC721 + Drop", value: "ERC721Drop" },
{ title: "ERC1155 Base", value: "ERC1155Base" },
{ title: "ERC1155 + Signature Mint", value: "ERC1155Signature" },
{ title: "ERC1155 + Lazy Mint", value: "ERC1155LazyMint" },
{ title: "ERC1155 + Delayed Reveal", value: "ERC1155DelayedReveal" },
{ title: "ERC1155 + Drop", value: "ERC1155Drop" },
{ title: "ERC20 Base", value: "ERC20Base" },
{ title: "ERC20 + Vote", value: "ERC20Vote" },
{ title: "ERC20 + Signature Mint", value: "ERC20SignatureMint" },
{
title: "ERC20 + Vote + Signature Mint",
value: "ERC20SignatureMintVote",
},
{ title: "ERC20 + Drop", value: "ERC20Drop" },
{ title: "ERC20 + Vote + Drop", value: "ERC20DropVote" },
{ title: "Empty Contract", value: "none" },
{ title: "ERC721", value: "erc721" },
{ title: "ERC20", value: "erc20" },
{ title: "ERC1155", value: "erc1155" },
],
});
if (typeof res.baseContract === "string") {
baseContract = res.baseContract.trim();
if (typeof standardPrompt.standard === "string") {
standard = standardPrompt.standard.trim();
}
if (standard === "none") {
baseContract = "";
} else {
let choices: prompts.Choice[] = [];
if (standard === "erc721") {
choices = [
{ title: "None", value: "ERC721Base" },
{ title: "Signature Mint", value: "ERC721SignatureMint" },
{ title: "Lazy Mint", value: "ERC721LazyMint" },
{ title: "Delayed Reveal", value: "ERC721DelayedReveal" },
{ title: "Drop", value: "ERC721Drop" },
];
} else if (standard === "erc20") {
choices = [
{ title: "None", value: "ERC20Base" },
{ title: "Vote", value: "ERC20Vote" },
{ title: "Signature Mint", value: "ERC20SignatureMint" },
{ title: "Vote + Signature Mint", value: "ERC20SignatureMintVote" },
{ title: "Drop", value: "ERC20Drop" },
{ title: "Vote + Drop", value: "ERC20DropVote" },
];
} else if (standard === "erc1155") {
choices = [
{ title: "None", value: "ERC1155Base" },
{ title: "Signature Mint", value: "ERC1155SignatureMint" },
{ title: "Lazy Mint", value: "ERC1155LazyMint" },
{ title: "Delayed Reveal", value: "ERC1155DelayedReveal" },
{ title: "Drop", value: "ERC1155Drop" },
];
}
const res = await prompts({
type: "select",
name: "baseContract",
message: CREATE_MESSAGES.extensions,
choices: choices,
});
if (typeof res.baseContract === "string") {
baseContract = res.baseContract.trim();
}
}
}
@@ -257,6 +329,7 @@ export async function twCreate(options: any) {
framework,
language,
template,
chain,
});
} else {
await createContract({
+36 -1
View File
@@ -10,6 +10,8 @@ import { makeDir } from "./make-dir";
import { downloadAndExtractRepo, hasTemplate } from "./templates";
import retry from "async-retry";
import chalk from "chalk";
import fs from "fs";
import os from "os";
import path from "path";
export class DownloadError extends Error {}
@@ -20,12 +22,14 @@ export async function createApp({
framework,
language,
template,
chain,
}: {
appPath: string;
packageManager: PackageManager;
framework?: string;
language?: string;
template?: string;
chain?: string;
}): Promise<void> {
let frameworkPath = "";
@@ -41,7 +45,9 @@ export async function createApp({
process.exit(1);
}
} else if (framework) {
frameworkPath = `${framework}-${language || "javascript"}-starter`;
frameworkPath = `${framework}-${language || "javascript"}-${
chain === "solana" ? "solana-" : ""
}starter`;
const found = await hasTemplate(frameworkPath);
if (!found) {
@@ -113,6 +119,20 @@ export async function createApp({
);
}
const jsonFile = path.join(root, "package.json");
const packageString = fs.readFileSync(jsonFile);
try {
const packageJson = JSON.parse(packageString.toString());
if (packageJson) {
packageJson.name = appName;
}
fs.writeFileSync(jsonFile, JSON.stringify(packageJson, null, 2) + os.EOL);
} catch (e) {
console.log("Failed to re-name package.json, continuing...");
console.log();
}
console.log("Installing packages. This might take a couple of minutes.");
console.log();
@@ -141,6 +161,21 @@ export async function createApp({
);
}
const jsonFile = path.join(root, "package.json");
const packageString = fs.readFileSync(jsonFile);
try {
const packageJson = JSON.parse(packageString.toString());
if (packageJson) {
packageJson.name = appName;
}
fs.writeFileSync(jsonFile, JSON.stringify(packageJson, null, 2) + os.EOL);
} catch (e) {
console.log("Failed to re-name package.json, continuing...");
console.log();
}
console.log("Installing packages. This might take a couple of minutes.");
console.log();
@@ -145,15 +145,21 @@ export async function createContract({
console.log(
`${chalk.green("Success!")} Created ${projectName} at ${contractPath}`,
);
console.log();
console.log("Inside that directory, you can run several commands:");
console.log();
console.log(chalk.cyan(` ${packageManager} ${useYarn ? "" : "run"} deploy`));
console.log(chalk.cyan(` ${packageManager}${useYarn ? "" : " run"} build`));
console.log(
" Compiles your contracts and detects thirdweb extensions implemented on them.",
);
console.log();
console.log(chalk.cyan(` ${packageManager}${useYarn ? "" : " run"} deploy`));
console.log(" Deploys your contracts with the thirdweb deploy flow.");
console.log();
console.log(
chalk.cyan(` ${packageManager} ${useYarn ? "" : "run"} release`),
chalk.cyan(` ${packageManager}${useYarn ? "" : " run"} release`),
);
console.log(" Releases your contracts with the thirdweb release flow..");
console.log(" Releases your contracts with the thirdweb release flow.");
console.log();
console.log("We suggest that you begin by typing:");
console.log();
+1 -1
View File
@@ -33,7 +33,7 @@ export function tryGitInit(root: string): boolean {
execSync("git checkout -b main", { stdio: "ignore" });
execSync("git add -A", { stdio: "ignore" });
execSync('git commit -m "Initial commit from Create thirdweb app"', {
execSync('git commit -m "Initial commit from npx thirdweb create"', {
stdio: "ignore",
});
return true;
+16 -1
View File
@@ -1,11 +1,26 @@
import spawn from "cross-spawn";
export async function runCommand(command: string, args: string[]) {
export async function runCommand(
command: string,
args: string[],
logging: boolean = false,
) {
return new Promise<void>((resolve, reject) => {
/**
* Spawn the installation process.
*/
const child = spawn(command, args);
child.stdout?.on("data", (data) => {
if (logging) {
console.log(data.toString());
}
});
child.stderr?.on("error", (err) => {
if (logging) {
console.error(err);
}
});
child.on("close", (code) => {
if (code !== 0) {
reject({ command: `${command}` });
+43
View File
@@ -0,0 +1,43 @@
import NPMDetector from "../core/detection/npm";
import ViteDetector from "../core/detection/vite";
import YarnDetector from "../core/detection/yarn";
import { runCommand } from "../create/helpers/run-command";
import { upload } from "../storage/command";
import { DEFAULT_IPFS_GATEWAY } from "@thirdweb-dev/sdk";
import { ThirdwebStorage } from "@thirdweb-dev/storage";
export async function deployApp(distPath = "dist", projectPath = ".") {
const storage = new ThirdwebStorage();
const supportedFrameworks = [new ViteDetector()];
const possibleProjects = supportedFrameworks
.filter((detector) => detector.matches(projectPath))
.map((detector) => detector.projectType);
const hasYarn = new YarnDetector().matches(".");
const hasNPM = new NPMDetector().matches(".");
if (possibleProjects.length === 0) {
throw new Error("No supported project detected");
}
try {
if (hasYarn) {
await runCommand("yarn", ["build"]);
} else if (hasNPM) {
await runCommand("npm", ["build"]);
}
} catch (err) {
console.error("Can't build project");
return Promise.reject("Can't build project");
}
try {
let url = await upload(storage, distPath);
url = url.replace("ipfs://", DEFAULT_IPFS_GATEWAY);
return `${url}/index.html`;
} catch (err) {
console.error("Can't upload project");
return Promise.reject("Can't upload project");
}
}
+54
View File
@@ -0,0 +1,54 @@
import { processProject } from "../common/processor";
import { info, logger } from "../core/helpers/logger";
import generateDashboardUrl from "../helpers/generate-dashboard-url";
import { deployApp } from "./app";
import chalk from "chalk";
type DeployOptions = {
name: string;
contractVersion: string;
app: boolean;
path?: string;
distPath?: string;
};
export async function deploy(options: DeployOptions) {
if (options.name) {
const url = generateDashboardUrl(options.name, options.contractVersion);
if (!url) {
logger.error(
chalk.red(
`Could not find a contract named ${options.name} ${
options.contractVersion || ""
}`,
),
);
return;
}
info(`Open this link to deploy your contract: ${chalk.blueBright(url)}`);
return url.toString();
}
if (options.app) {
try {
let url = await deployApp(options.distPath, options.path);
info(`Here is the link to your app: ${chalk.blueBright(url.toString())}`);
return url.toString();
} catch (err) {
logger.error("Failed to deploy app, No compatible project found", err);
return Promise.reject(
"failed to deploy app, no compatible project found",
);
}
}
const url = await processProject(options, "deploy");
info(
`Open this link to deploy your contracts: ${chalk.blueBright(
url.toString(),
)}`,
);
return url.toString();
}
+72
View File
@@ -0,0 +1,72 @@
import { spinner } from "../core/helpers/logger";
import { BufferOrStringWithName, ThirdwebStorage } from "@thirdweb-dev/storage";
import fs from "fs";
import path from "path";
function recurseFiles(
uploadPath: string,
basePath: string,
): BufferOrStringWithName[] {
const files = [];
const fileType = fs.lstatSync(uploadPath);
if (fileType.isFile()) {
const fileName = path.relative(basePath, uploadPath);
const fileData = fs.readFileSync(uploadPath);
files.push({ name: fileName, data: fileData });
} else if (fileType.isDirectory()) {
const paths = fs.readdirSync(uploadPath);
paths.forEach((subPath) => {
const fullSubPath = path.join(uploadPath, subPath);
const subFiles = recurseFiles(fullSubPath, basePath);
subFiles.forEach((file) => files.push(file));
});
}
return files;
}
export async function upload(
storage: ThirdwebStorage,
uploadPath: string,
): Promise<string> {
if (!uploadPath) {
return Promise.reject("No path provided");
}
const pathExists = fs.existsSync(uploadPath);
if (!pathExists) {
return Promise.reject("Invalid path provided");
}
let uri = "";
const fileType = fs.lstatSync(uploadPath);
if (fileType.isDirectory()) {
const files = recurseFiles(uploadPath, uploadPath);
if (files.length === 0) {
return Promise.reject("No files detected in specified directory");
}
const spin = spinner(
"Uploading directory to IPFS. This may take a while depending on file sizes.",
);
const uris = await storage.uploadBatch(files);
spin.succeed("Successfully uploaded directory to IPFS");
uri = uris[0].substring(0, uris[0].lastIndexOf("/"));
} else if (fileType.isFile()) {
const fileName = path.parse(uploadPath).base;
const fileData = fs.readFileSync(uploadPath);
const file = { name: fileName, data: fileData };
const spin = spinner(
"Uploading file to IPFS. This may take a while depending on file sizes.",
);
uri = await storage.upload(file, { uploadWithoutDirectory: true });
spin.succeed("Succesfully uploaded file to IPFS.");
} else {
return Promise.reject("Invalid path provided");
}
return uri;
}
+1
View File
@@ -0,0 +1 @@
src/
+20
View File
@@ -1,5 +1,25 @@
# @thirdweb-dev/contracts-js
## 1.2.1
### Patch Changes
- [#376](https://github.com/thirdweb-dev/js/pull/376) [`4af785c`](https://github.com/thirdweb-dev/js/commit/4af785c37c831ecd7087c1c9eb9095922cac0855) Thanks [@adam-maj](https://github.com/adam-maj)! - Update tiered-drop with tokens claimed
- [#373](https://github.com/thirdweb-dev/js/pull/373) [`6f818f3`](https://github.com/thirdweb-dev/js/commit/6f818f393eb9023b53a3358d62d60ec23a9246bd) Thanks [@adam-maj](https://github.com/adam-maj)! - Update tiered-drop contract version
## 1.2.0
### Minor Changes
- [#333](https://github.com/thirdweb-dev/js/pull/333) [`aa6d9ed`](https://github.com/thirdweb-dev/js/commit/aa6d9ed75d126d7a0cca9fb8fc389ff94e9d1e14) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Update to contracts package v3.2.0
## 1.1.9
### Patch Changes
- [#226](https://github.com/thirdweb-dev/js/pull/226) [`f2a6211`](https://github.com/thirdweb-dev/js/commit/f2a62110c43e7b8f35c86a197730e732f8fcc786) Thanks [@jnsdls](https://github.com/jnsdls)! - expose some factories as separate exports
## 1.1.8
### Patch Changes
@@ -0,0 +1,4 @@
{
"main": "dist/thirdweb-dev-contracts-js-factories-TWFactory__factory.cjs.js",
"module": "dist/thirdweb-dev-contracts-js-factories-TWFactory__factory.esm.js"
}
@@ -0,0 +1,4 @@
{
"main": "dist/thirdweb-dev-contracts-js-factories-TWFee__factory.cjs.js",
"module": "dist/thirdweb-dev-contracts-js-factories-TWFee__factory.esm.js"
}
@@ -0,0 +1,4 @@
{
"main": "dist/thirdweb-dev-contracts-js-factories-TWMultichainRegistry__factory.cjs.js",
"module": "dist/thirdweb-dev-contracts-js-factories-TWMultichainRegistry__factory.esm.js"
}
@@ -0,0 +1,4 @@
{
"main": "dist/thirdweb-dev-contracts-js-factories-TWProxy__factory.cjs.js",
"module": "dist/thirdweb-dev-contracts-js-factories-TWProxy__factory.esm.js"
}
@@ -0,0 +1,4 @@
{
"main": "dist/thirdweb-dev-contracts-js-factories-TWRegistry__factory.cjs.js",
"module": "dist/thirdweb-dev-contracts-js-factories-TWRegistry__factory.esm.js"
}
+12 -7
View File
@@ -1,18 +1,19 @@
{
"name": "@thirdweb-dev/contracts-js",
"version": "1.1.8",
"version": "1.2.1",
"main": "dist/thirdweb-dev-contracts-js.cjs.js",
"module": "dist/thirdweb-dev-contracts-js.esm.js",
"license": "Apache-2.0",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/contracts-js",
"dependencies": {
"@thirdweb-dev/contracts": "3.1.8-0"
"@thirdweb-dev/contracts": "^3.2.2"
},
"devDependencies": {
"@babel/preset-env": "^7.18.10",
"@babel/preset-typescript": "^7.18.6",
"@preconstruct/cli": "^2.2.1",
"ethers": "^5.7.0",
"@typechain/ethers-v5": "10.0.0",
"ethers": "^5.7.2",
"typechain": "^8.1.0",
"typescript": "^4.7.4"
},
@@ -20,12 +21,16 @@
"ethers": "^5.7.0"
},
"files": [
"dist/"
"dist/",
"factories/"
],
"preconstruct": {
"entrypoints": [
"index.ts",
"./factories/TW*.ts"
]
},
"scripts": {
"format": "prettier --write 'src/**/*'",
"lint": "eslint src/",
"fix": "eslint src/ --fix",
"clean": "rm -rf dist/",
"typechain": "rm -rf ./src && typechain --target ethers-v5 --out-dir src '../../node_modules/@thirdweb-dev/contracts/abi/*.json'",
"extract-abi": "node ./scripts/extract-abis.mjs",
-135
View File
@@ -1,135 +0,0 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";
import type {
FunctionFragment,
Result,
EventFragment,
} from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
BaseContract,
BigNumber,
BytesLike,
CallOverrides,
ContractTransaction,
Overrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
export interface AppURIInterface extends utils.Interface {
functions: {
"appURI()": FunctionFragment;
"setAppURI(string)": FunctionFragment;
};
getFunction(nameOrSignatureOrTopic: "appURI" | "setAppURI"): FunctionFragment;
encodeFunctionData(functionFragment: "appURI", values?: undefined): string;
encodeFunctionData(functionFragment: "setAppURI", values: [string]): string;
decodeFunctionResult(functionFragment: "appURI", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setAppURI", data: BytesLike): Result;
events: {
"AppURIUpdated(string,string)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "AppURIUpdated"): EventFragment;
}
export interface AppURIUpdatedEventObject {
prevURI: string;
newURI: string;
}
export type AppURIUpdatedEvent = TypedEvent<
[string, string],
AppURIUpdatedEventObject
>;
export type AppURIUpdatedEventFilter = TypedEventFilter<AppURIUpdatedEvent>;
export interface AppURI extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: AppURIInterface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
appURI(overrides?: CallOverrides): Promise<[string]>;
setAppURI(
_uri: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
};
appURI(overrides?: CallOverrides): Promise<string>;
setAppURI(
_uri: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
callStatic: {
appURI(overrides?: CallOverrides): Promise<string>;
setAppURI(_uri: string, overrides?: CallOverrides): Promise<void>;
};
filters: {
"AppURIUpdated(string,string)"(
prevURI?: null,
newURI?: null
): AppURIUpdatedEventFilter;
AppURIUpdated(prevURI?: null, newURI?: null): AppURIUpdatedEventFilter;
};
estimateGas: {
appURI(overrides?: CallOverrides): Promise<BigNumber>;
setAppURI(
_uri: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
};
populateTransaction: {
appURI(overrides?: CallOverrides): Promise<PopulatedTransaction>;
setAppURI(
_uri: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
};
}
@@ -1,126 +0,0 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";
import type { FunctionFragment, Result } from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
BaseContract,
BigNumber,
BigNumberish,
BytesLike,
CallOverrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
export interface BatchMintMetadataInterface extends utils.Interface {
functions: {
"getBaseURICount()": FunctionFragment;
"getBatchIdAtIndex(uint256)": FunctionFragment;
};
getFunction(
nameOrSignatureOrTopic: "getBaseURICount" | "getBatchIdAtIndex"
): FunctionFragment;
encodeFunctionData(
functionFragment: "getBaseURICount",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "getBatchIdAtIndex",
values: [BigNumberish]
): string;
decodeFunctionResult(
functionFragment: "getBaseURICount",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getBatchIdAtIndex",
data: BytesLike
): Result;
events: {};
}
export interface BatchMintMetadata extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: BatchMintMetadataInterface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
getBaseURICount(overrides?: CallOverrides): Promise<[BigNumber]>;
getBatchIdAtIndex(
_index: BigNumberish,
overrides?: CallOverrides
): Promise<[BigNumber]>;
};
getBaseURICount(overrides?: CallOverrides): Promise<BigNumber>;
getBatchIdAtIndex(
_index: BigNumberish,
overrides?: CallOverrides
): Promise<BigNumber>;
callStatic: {
getBaseURICount(overrides?: CallOverrides): Promise<BigNumber>;
getBatchIdAtIndex(
_index: BigNumberish,
overrides?: CallOverrides
): Promise<BigNumber>;
};
filters: {};
estimateGas: {
getBaseURICount(overrides?: CallOverrides): Promise<BigNumber>;
getBatchIdAtIndex(
_index: BigNumberish,
overrides?: CallOverrides
): Promise<BigNumber>;
};
populateTransaction: {
getBaseURICount(overrides?: CallOverrides): Promise<PopulatedTransaction>;
getBatchIdAtIndex(
_index: BigNumberish,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
};
}
@@ -1,153 +0,0 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";
import type {
FunctionFragment,
Result,
EventFragment,
} from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
BaseContract,
BigNumber,
BytesLike,
CallOverrides,
ContractTransaction,
Overrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
export interface ContractMetadataInterface extends utils.Interface {
functions: {
"contractURI()": FunctionFragment;
"setContractURI(string)": FunctionFragment;
};
getFunction(
nameOrSignatureOrTopic: "contractURI" | "setContractURI"
): FunctionFragment;
encodeFunctionData(
functionFragment: "contractURI",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "setContractURI",
values: [string]
): string;
decodeFunctionResult(
functionFragment: "contractURI",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "setContractURI",
data: BytesLike
): Result;
events: {
"ContractURIUpdated(string,string)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "ContractURIUpdated"): EventFragment;
}
export interface ContractURIUpdatedEventObject {
prevURI: string;
newURI: string;
}
export type ContractURIUpdatedEvent = TypedEvent<
[string, string],
ContractURIUpdatedEventObject
>;
export type ContractURIUpdatedEventFilter =
TypedEventFilter<ContractURIUpdatedEvent>;
export interface ContractMetadata extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: ContractMetadataInterface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
contractURI(overrides?: CallOverrides): Promise<[string]>;
setContractURI(
_uri: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
};
contractURI(overrides?: CallOverrides): Promise<string>;
setContractURI(
_uri: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
callStatic: {
contractURI(overrides?: CallOverrides): Promise<string>;
setContractURI(_uri: string, overrides?: CallOverrides): Promise<void>;
};
filters: {
"ContractURIUpdated(string,string)"(
prevURI?: null,
newURI?: null
): ContractURIUpdatedEventFilter;
ContractURIUpdated(
prevURI?: null,
newURI?: null
): ContractURIUpdatedEventFilter;
};
estimateGas: {
contractURI(overrides?: CallOverrides): Promise<BigNumber>;
setContractURI(
_uri: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
};
populateTransaction: {
contractURI(overrides?: CallOverrides): Promise<PopulatedTransaction>;
setContractURI(
_uri: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
};
}
File diff suppressed because it is too large Load Diff
@@ -1,89 +0,0 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";
import type { FunctionFragment, Result } from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
BaseContract,
BigNumber,
BytesLike,
CallOverrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
export interface CurrencyTransferLibInterface extends utils.Interface {
functions: {
"NATIVE_TOKEN()": FunctionFragment;
};
getFunction(nameOrSignatureOrTopic: "NATIVE_TOKEN"): FunctionFragment;
encodeFunctionData(
functionFragment: "NATIVE_TOKEN",
values?: undefined
): string;
decodeFunctionResult(
functionFragment: "NATIVE_TOKEN",
data: BytesLike
): Result;
events: {};
}
export interface CurrencyTransferLib extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: CurrencyTransferLibInterface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
NATIVE_TOKEN(overrides?: CallOverrides): Promise<[string]>;
};
NATIVE_TOKEN(overrides?: CallOverrides): Promise<string>;
callStatic: {
NATIVE_TOKEN(overrides?: CallOverrides): Promise<string>;
};
filters: {};
estimateGas: {
NATIVE_TOKEN(overrides?: CallOverrides): Promise<BigNumber>;
};
populateTransaction: {
NATIVE_TOKEN(overrides?: CallOverrides): Promise<PopulatedTransaction>;
};
}
-288
View File
@@ -1,288 +0,0 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";
import type {
FunctionFragment,
Result,
EventFragment,
} from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
BaseContract,
BigNumber,
BigNumberish,
BytesLike,
CallOverrides,
ContractTransaction,
Overrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
export interface DelayedRevealInterface extends utils.Interface {
functions: {
"encryptDecrypt(bytes,bytes)": FunctionFragment;
"encryptedData(uint256)": FunctionFragment;
"getRevealURI(uint256,bytes)": FunctionFragment;
"isEncryptedBatch(uint256)": FunctionFragment;
"reveal(uint256,bytes)": FunctionFragment;
};
getFunction(
nameOrSignatureOrTopic:
| "encryptDecrypt"
| "encryptedData"
| "getRevealURI"
| "isEncryptedBatch"
| "reveal"
): FunctionFragment;
encodeFunctionData(
functionFragment: "encryptDecrypt",
values: [BytesLike, BytesLike]
): string;
encodeFunctionData(
functionFragment: "encryptedData",
values: [BigNumberish]
): string;
encodeFunctionData(
functionFragment: "getRevealURI",
values: [BigNumberish, BytesLike]
): string;
encodeFunctionData(
functionFragment: "isEncryptedBatch",
values: [BigNumberish]
): string;
encodeFunctionData(
functionFragment: "reveal",
values: [BigNumberish, BytesLike]
): string;
decodeFunctionResult(
functionFragment: "encryptDecrypt",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "encryptedData",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getRevealURI",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "isEncryptedBatch",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "reveal", data: BytesLike): Result;
events: {
"TokenURIRevealed(uint256,string)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "TokenURIRevealed"): EventFragment;
}
export interface TokenURIRevealedEventObject {
index: BigNumber;
revealedURI: string;
}
export type TokenURIRevealedEvent = TypedEvent<
[BigNumber, string],
TokenURIRevealedEventObject
>;
export type TokenURIRevealedEventFilter =
TypedEventFilter<TokenURIRevealedEvent>;
export interface DelayedReveal extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: DelayedRevealInterface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
encryptDecrypt(
data: BytesLike,
key: BytesLike,
overrides?: CallOverrides
): Promise<[string] & { result: string }>;
encryptedData(
arg0: BigNumberish,
overrides?: CallOverrides
): Promise<[string]>;
getRevealURI(
_batchId: BigNumberish,
_key: BytesLike,
overrides?: CallOverrides
): Promise<[string] & { revealedURI: string }>;
isEncryptedBatch(
_batchId: BigNumberish,
overrides?: CallOverrides
): Promise<[boolean]>;
reveal(
identifier: BigNumberish,
key: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
};
encryptDecrypt(
data: BytesLike,
key: BytesLike,
overrides?: CallOverrides
): Promise<string>;
encryptedData(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
getRevealURI(
_batchId: BigNumberish,
_key: BytesLike,
overrides?: CallOverrides
): Promise<string>;
isEncryptedBatch(
_batchId: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
reveal(
identifier: BigNumberish,
key: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
callStatic: {
encryptDecrypt(
data: BytesLike,
key: BytesLike,
overrides?: CallOverrides
): Promise<string>;
encryptedData(
arg0: BigNumberish,
overrides?: CallOverrides
): Promise<string>;
getRevealURI(
_batchId: BigNumberish,
_key: BytesLike,
overrides?: CallOverrides
): Promise<string>;
isEncryptedBatch(
_batchId: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
reveal(
identifier: BigNumberish,
key: BytesLike,
overrides?: CallOverrides
): Promise<string>;
};
filters: {
"TokenURIRevealed(uint256,string)"(
index?: BigNumberish | null,
revealedURI?: null
): TokenURIRevealedEventFilter;
TokenURIRevealed(
index?: BigNumberish | null,
revealedURI?: null
): TokenURIRevealedEventFilter;
};
estimateGas: {
encryptDecrypt(
data: BytesLike,
key: BytesLike,
overrides?: CallOverrides
): Promise<BigNumber>;
encryptedData(
arg0: BigNumberish,
overrides?: CallOverrides
): Promise<BigNumber>;
getRevealURI(
_batchId: BigNumberish,
_key: BytesLike,
overrides?: CallOverrides
): Promise<BigNumber>;
isEncryptedBatch(
_batchId: BigNumberish,
overrides?: CallOverrides
): Promise<BigNumber>;
reveal(
identifier: BigNumberish,
key: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
};
populateTransaction: {
encryptDecrypt(
data: BytesLike,
key: BytesLike,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
encryptedData(
arg0: BigNumberish,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
getRevealURI(
_batchId: BigNumberish,
_key: BytesLike,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
isEncryptedBatch(
_batchId: BigNumberish,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
reveal(
identifier: BigNumberish,
key: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
};
}
-558
View File
@@ -1,558 +0,0 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";
import type {
FunctionFragment,
Result,
EventFragment,
} from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
BaseContract,
BigNumber,
BigNumberish,
BytesLike,
CallOverrides,
ContractTransaction,
Overrides,
PayableOverrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
export declare namespace IClaimCondition {
export type ClaimConditionStruct = {
startTimestamp: BigNumberish;
maxClaimableSupply: BigNumberish;
supplyClaimed: BigNumberish;
quantityLimitPerTransaction: BigNumberish;
waitTimeInSecondsBetweenClaims: BigNumberish;
merkleRoot: BytesLike;
pricePerToken: BigNumberish;
currency: string;
};
export type ClaimConditionStructOutput = [
BigNumber,
BigNumber,
BigNumber,
BigNumber,
BigNumber,
string,
BigNumber,
string
] & {
startTimestamp: BigNumber;
maxClaimableSupply: BigNumber;
supplyClaimed: BigNumber;
quantityLimitPerTransaction: BigNumber;
waitTimeInSecondsBetweenClaims: BigNumber;
merkleRoot: string;
pricePerToken: BigNumber;
currency: string;
};
}
export declare namespace IDrop {
export type AllowlistProofStruct = {
proof: BytesLike[];
maxQuantityInAllowlist: BigNumberish;
};
export type AllowlistProofStructOutput = [string[], BigNumber] & {
proof: string[];
maxQuantityInAllowlist: BigNumber;
};
}
export interface DropInterface extends utils.Interface {
functions: {
"claim(address,uint256,address,uint256,(bytes32[],uint256),bytes)": FunctionFragment;
"claimCondition()": FunctionFragment;
"getActiveClaimConditionId()": FunctionFragment;
"getClaimConditionById(uint256)": FunctionFragment;
"getClaimTimestamp(uint256,address)": FunctionFragment;
"setClaimConditions((uint256,uint256,uint256,uint256,uint256,bytes32,uint256,address)[],bool)": FunctionFragment;
"verifyClaim(uint256,address,uint256,address,uint256,bool)": FunctionFragment;
"verifyClaimMerkleProof(uint256,address,uint256,(bytes32[],uint256))": FunctionFragment;
};
getFunction(
nameOrSignatureOrTopic:
| "claim"
| "claimCondition"
| "getActiveClaimConditionId"
| "getClaimConditionById"
| "getClaimTimestamp"
| "setClaimConditions"
| "verifyClaim"
| "verifyClaimMerkleProof"
): FunctionFragment;
encodeFunctionData(
functionFragment: "claim",
values: [
string,
BigNumberish,
string,
BigNumberish,
IDrop.AllowlistProofStruct,
BytesLike
]
): string;
encodeFunctionData(
functionFragment: "claimCondition",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "getActiveClaimConditionId",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "getClaimConditionById",
values: [BigNumberish]
): string;
encodeFunctionData(
functionFragment: "getClaimTimestamp",
values: [BigNumberish, string]
): string;
encodeFunctionData(
functionFragment: "setClaimConditions",
values: [IClaimCondition.ClaimConditionStruct[], boolean]
): string;
encodeFunctionData(
functionFragment: "verifyClaim",
values: [BigNumberish, string, BigNumberish, string, BigNumberish, boolean]
): string;
encodeFunctionData(
functionFragment: "verifyClaimMerkleProof",
values: [BigNumberish, string, BigNumberish, IDrop.AllowlistProofStruct]
): string;
decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "claimCondition",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getActiveClaimConditionId",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getClaimConditionById",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getClaimTimestamp",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "setClaimConditions",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "verifyClaim",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "verifyClaimMerkleProof",
data: BytesLike
): Result;
events: {
"ClaimConditionsUpdated(tuple[],bool)": EventFragment;
"TokensClaimed(uint256,address,address,uint256,uint256)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "ClaimConditionsUpdated"): EventFragment;
getEvent(nameOrSignatureOrTopic: "TokensClaimed"): EventFragment;
}
export interface ClaimConditionsUpdatedEventObject {
claimConditions: IClaimCondition.ClaimConditionStructOutput[];
resetEligibility: boolean;
}
export type ClaimConditionsUpdatedEvent = TypedEvent<
[IClaimCondition.ClaimConditionStructOutput[], boolean],
ClaimConditionsUpdatedEventObject
>;
export type ClaimConditionsUpdatedEventFilter =
TypedEventFilter<ClaimConditionsUpdatedEvent>;
export interface TokensClaimedEventObject {
claimConditionIndex: BigNumber;
claimer: string;
receiver: string;
startTokenId: BigNumber;
quantityClaimed: BigNumber;
}
export type TokensClaimedEvent = TypedEvent<
[BigNumber, string, string, BigNumber, BigNumber],
TokensClaimedEventObject
>;
export type TokensClaimedEventFilter = TypedEventFilter<TokensClaimedEvent>;
export interface Drop extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: DropInterface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
claim(
_receiver: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
_allowlistProof: IDrop.AllowlistProofStruct,
_data: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
claimCondition(
overrides?: CallOverrides
): Promise<
[BigNumber, BigNumber] & { currentStartId: BigNumber; count: BigNumber }
>;
getActiveClaimConditionId(overrides?: CallOverrides): Promise<[BigNumber]>;
getClaimConditionById(
_conditionId: BigNumberish,
overrides?: CallOverrides
): Promise<
[IClaimCondition.ClaimConditionStructOutput] & {
condition: IClaimCondition.ClaimConditionStructOutput;
}
>;
getClaimTimestamp(
_conditionId: BigNumberish,
_claimer: string,
overrides?: CallOverrides
): Promise<
[BigNumber, BigNumber] & {
lastClaimTimestamp: BigNumber;
nextValidClaimTimestamp: BigNumber;
}
>;
setClaimConditions(
_conditions: IClaimCondition.ClaimConditionStruct[],
_resetClaimEligibility: boolean,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
verifyClaim(
_conditionId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
verifyMaxQuantityPerTransaction: boolean,
overrides?: CallOverrides
): Promise<[void]>;
verifyClaimMerkleProof(
_conditionId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_allowlistProof: IDrop.AllowlistProofStruct,
overrides?: CallOverrides
): Promise<
[boolean, BigNumber] & {
validMerkleProof: boolean;
merkleProofIndex: BigNumber;
}
>;
};
claim(
_receiver: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
_allowlistProof: IDrop.AllowlistProofStruct,
_data: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
claimCondition(
overrides?: CallOverrides
): Promise<
[BigNumber, BigNumber] & { currentStartId: BigNumber; count: BigNumber }
>;
getActiveClaimConditionId(overrides?: CallOverrides): Promise<BigNumber>;
getClaimConditionById(
_conditionId: BigNumberish,
overrides?: CallOverrides
): Promise<IClaimCondition.ClaimConditionStructOutput>;
getClaimTimestamp(
_conditionId: BigNumberish,
_claimer: string,
overrides?: CallOverrides
): Promise<
[BigNumber, BigNumber] & {
lastClaimTimestamp: BigNumber;
nextValidClaimTimestamp: BigNumber;
}
>;
setClaimConditions(
_conditions: IClaimCondition.ClaimConditionStruct[],
_resetClaimEligibility: boolean,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
verifyClaim(
_conditionId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
verifyMaxQuantityPerTransaction: boolean,
overrides?: CallOverrides
): Promise<void>;
verifyClaimMerkleProof(
_conditionId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_allowlistProof: IDrop.AllowlistProofStruct,
overrides?: CallOverrides
): Promise<
[boolean, BigNumber] & {
validMerkleProof: boolean;
merkleProofIndex: BigNumber;
}
>;
callStatic: {
claim(
_receiver: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
_allowlistProof: IDrop.AllowlistProofStruct,
_data: BytesLike,
overrides?: CallOverrides
): Promise<void>;
claimCondition(
overrides?: CallOverrides
): Promise<
[BigNumber, BigNumber] & { currentStartId: BigNumber; count: BigNumber }
>;
getActiveClaimConditionId(overrides?: CallOverrides): Promise<BigNumber>;
getClaimConditionById(
_conditionId: BigNumberish,
overrides?: CallOverrides
): Promise<IClaimCondition.ClaimConditionStructOutput>;
getClaimTimestamp(
_conditionId: BigNumberish,
_claimer: string,
overrides?: CallOverrides
): Promise<
[BigNumber, BigNumber] & {
lastClaimTimestamp: BigNumber;
nextValidClaimTimestamp: BigNumber;
}
>;
setClaimConditions(
_conditions: IClaimCondition.ClaimConditionStruct[],
_resetClaimEligibility: boolean,
overrides?: CallOverrides
): Promise<void>;
verifyClaim(
_conditionId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
verifyMaxQuantityPerTransaction: boolean,
overrides?: CallOverrides
): Promise<void>;
verifyClaimMerkleProof(
_conditionId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_allowlistProof: IDrop.AllowlistProofStruct,
overrides?: CallOverrides
): Promise<
[boolean, BigNumber] & {
validMerkleProof: boolean;
merkleProofIndex: BigNumber;
}
>;
};
filters: {
"ClaimConditionsUpdated(tuple[],bool)"(
claimConditions?: null,
resetEligibility?: null
): ClaimConditionsUpdatedEventFilter;
ClaimConditionsUpdated(
claimConditions?: null,
resetEligibility?: null
): ClaimConditionsUpdatedEventFilter;
"TokensClaimed(uint256,address,address,uint256,uint256)"(
claimConditionIndex?: BigNumberish | null,
claimer?: string | null,
receiver?: string | null,
startTokenId?: null,
quantityClaimed?: null
): TokensClaimedEventFilter;
TokensClaimed(
claimConditionIndex?: BigNumberish | null,
claimer?: string | null,
receiver?: string | null,
startTokenId?: null,
quantityClaimed?: null
): TokensClaimedEventFilter;
};
estimateGas: {
claim(
_receiver: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
_allowlistProof: IDrop.AllowlistProofStruct,
_data: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
claimCondition(overrides?: CallOverrides): Promise<BigNumber>;
getActiveClaimConditionId(overrides?: CallOverrides): Promise<BigNumber>;
getClaimConditionById(
_conditionId: BigNumberish,
overrides?: CallOverrides
): Promise<BigNumber>;
getClaimTimestamp(
_conditionId: BigNumberish,
_claimer: string,
overrides?: CallOverrides
): Promise<BigNumber>;
setClaimConditions(
_conditions: IClaimCondition.ClaimConditionStruct[],
_resetClaimEligibility: boolean,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
verifyClaim(
_conditionId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
verifyMaxQuantityPerTransaction: boolean,
overrides?: CallOverrides
): Promise<BigNumber>;
verifyClaimMerkleProof(
_conditionId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_allowlistProof: IDrop.AllowlistProofStruct,
overrides?: CallOverrides
): Promise<BigNumber>;
};
populateTransaction: {
claim(
_receiver: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
_allowlistProof: IDrop.AllowlistProofStruct,
_data: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
claimCondition(overrides?: CallOverrides): Promise<PopulatedTransaction>;
getActiveClaimConditionId(
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
getClaimConditionById(
_conditionId: BigNumberish,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
getClaimTimestamp(
_conditionId: BigNumberish,
_claimer: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
setClaimConditions(
_conditions: IClaimCondition.ClaimConditionStruct[],
_resetClaimEligibility: boolean,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
verifyClaim(
_conditionId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
verifyMaxQuantityPerTransaction: boolean,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
verifyClaimMerkleProof(
_conditionId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_allowlistProof: IDrop.AllowlistProofStruct,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
};
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,533 +0,0 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";
import type {
FunctionFragment,
Result,
EventFragment,
} from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
BaseContract,
BigNumber,
BigNumberish,
BytesLike,
CallOverrides,
ContractTransaction,
Overrides,
PayableOverrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
export declare namespace IClaimCondition {
export type ClaimConditionStruct = {
startTimestamp: BigNumberish;
maxClaimableSupply: BigNumberish;
supplyClaimed: BigNumberish;
quantityLimitPerTransaction: BigNumberish;
waitTimeInSecondsBetweenClaims: BigNumberish;
merkleRoot: BytesLike;
pricePerToken: BigNumberish;
currency: string;
};
export type ClaimConditionStructOutput = [
BigNumber,
BigNumber,
BigNumber,
BigNumber,
BigNumber,
string,
BigNumber,
string
] & {
startTimestamp: BigNumber;
maxClaimableSupply: BigNumber;
supplyClaimed: BigNumber;
quantityLimitPerTransaction: BigNumber;
waitTimeInSecondsBetweenClaims: BigNumber;
merkleRoot: string;
pricePerToken: BigNumber;
currency: string;
};
}
export declare namespace IDropSinglePhase {
export type AllowlistProofStruct = {
proof: BytesLike[];
maxQuantityInAllowlist: BigNumberish;
};
export type AllowlistProofStructOutput = [string[], BigNumber] & {
proof: string[];
maxQuantityInAllowlist: BigNumber;
};
}
export interface DropSinglePhaseInterface extends utils.Interface {
functions: {
"claim(address,uint256,address,uint256,(bytes32[],uint256),bytes)": FunctionFragment;
"claimCondition()": FunctionFragment;
"getClaimTimestamp(address)": FunctionFragment;
"setClaimConditions((uint256,uint256,uint256,uint256,uint256,bytes32,uint256,address),bool)": FunctionFragment;
"verifyClaim(address,uint256,address,uint256,bool)": FunctionFragment;
"verifyClaimMerkleProof(address,uint256,(bytes32[],uint256))": FunctionFragment;
};
getFunction(
nameOrSignatureOrTopic:
| "claim"
| "claimCondition"
| "getClaimTimestamp"
| "setClaimConditions"
| "verifyClaim"
| "verifyClaimMerkleProof"
): FunctionFragment;
encodeFunctionData(
functionFragment: "claim",
values: [
string,
BigNumberish,
string,
BigNumberish,
IDropSinglePhase.AllowlistProofStruct,
BytesLike
]
): string;
encodeFunctionData(
functionFragment: "claimCondition",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "getClaimTimestamp",
values: [string]
): string;
encodeFunctionData(
functionFragment: "setClaimConditions",
values: [IClaimCondition.ClaimConditionStruct, boolean]
): string;
encodeFunctionData(
functionFragment: "verifyClaim",
values: [string, BigNumberish, string, BigNumberish, boolean]
): string;
encodeFunctionData(
functionFragment: "verifyClaimMerkleProof",
values: [string, BigNumberish, IDropSinglePhase.AllowlistProofStruct]
): string;
decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "claimCondition",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getClaimTimestamp",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "setClaimConditions",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "verifyClaim",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "verifyClaimMerkleProof",
data: BytesLike
): Result;
events: {
"ClaimConditionUpdated(tuple,bool)": EventFragment;
"TokensClaimed(address,address,uint256,uint256)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "ClaimConditionUpdated"): EventFragment;
getEvent(nameOrSignatureOrTopic: "TokensClaimed"): EventFragment;
}
export interface ClaimConditionUpdatedEventObject {
condition: IClaimCondition.ClaimConditionStructOutput;
resetEligibility: boolean;
}
export type ClaimConditionUpdatedEvent = TypedEvent<
[IClaimCondition.ClaimConditionStructOutput, boolean],
ClaimConditionUpdatedEventObject
>;
export type ClaimConditionUpdatedEventFilter =
TypedEventFilter<ClaimConditionUpdatedEvent>;
export interface TokensClaimedEventObject {
claimer: string;
receiver: string;
startTokenId: BigNumber;
quantityClaimed: BigNumber;
}
export type TokensClaimedEvent = TypedEvent<
[string, string, BigNumber, BigNumber],
TokensClaimedEventObject
>;
export type TokensClaimedEventFilter = TypedEventFilter<TokensClaimedEvent>;
export interface DropSinglePhase extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: DropSinglePhaseInterface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
claim(
_receiver: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
_allowlistProof: IDropSinglePhase.AllowlistProofStruct,
_data: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
claimCondition(
overrides?: CallOverrides
): Promise<
[
BigNumber,
BigNumber,
BigNumber,
BigNumber,
BigNumber,
string,
BigNumber,
string
] & {
startTimestamp: BigNumber;
maxClaimableSupply: BigNumber;
supplyClaimed: BigNumber;
quantityLimitPerTransaction: BigNumber;
waitTimeInSecondsBetweenClaims: BigNumber;
merkleRoot: string;
pricePerToken: BigNumber;
currency: string;
}
>;
getClaimTimestamp(
_claimer: string,
overrides?: CallOverrides
): Promise<
[BigNumber, BigNumber] & {
lastClaimedAt: BigNumber;
nextValidClaimTimestamp: BigNumber;
}
>;
setClaimConditions(
_condition: IClaimCondition.ClaimConditionStruct,
_resetClaimEligibility: boolean,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
verifyClaim(
_claimer: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
verifyMaxQuantityPerTransaction: boolean,
overrides?: CallOverrides
): Promise<[void]>;
verifyClaimMerkleProof(
_claimer: string,
_quantity: BigNumberish,
_allowlistProof: IDropSinglePhase.AllowlistProofStruct,
overrides?: CallOverrides
): Promise<
[boolean, BigNumber] & {
validMerkleProof: boolean;
merkleProofIndex: BigNumber;
}
>;
};
claim(
_receiver: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
_allowlistProof: IDropSinglePhase.AllowlistProofStruct,
_data: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
claimCondition(
overrides?: CallOverrides
): Promise<
[
BigNumber,
BigNumber,
BigNumber,
BigNumber,
BigNumber,
string,
BigNumber,
string
] & {
startTimestamp: BigNumber;
maxClaimableSupply: BigNumber;
supplyClaimed: BigNumber;
quantityLimitPerTransaction: BigNumber;
waitTimeInSecondsBetweenClaims: BigNumber;
merkleRoot: string;
pricePerToken: BigNumber;
currency: string;
}
>;
getClaimTimestamp(
_claimer: string,
overrides?: CallOverrides
): Promise<
[BigNumber, BigNumber] & {
lastClaimedAt: BigNumber;
nextValidClaimTimestamp: BigNumber;
}
>;
setClaimConditions(
_condition: IClaimCondition.ClaimConditionStruct,
_resetClaimEligibility: boolean,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
verifyClaim(
_claimer: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
verifyMaxQuantityPerTransaction: boolean,
overrides?: CallOverrides
): Promise<void>;
verifyClaimMerkleProof(
_claimer: string,
_quantity: BigNumberish,
_allowlistProof: IDropSinglePhase.AllowlistProofStruct,
overrides?: CallOverrides
): Promise<
[boolean, BigNumber] & {
validMerkleProof: boolean;
merkleProofIndex: BigNumber;
}
>;
callStatic: {
claim(
_receiver: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
_allowlistProof: IDropSinglePhase.AllowlistProofStruct,
_data: BytesLike,
overrides?: CallOverrides
): Promise<void>;
claimCondition(
overrides?: CallOverrides
): Promise<
[
BigNumber,
BigNumber,
BigNumber,
BigNumber,
BigNumber,
string,
BigNumber,
string
] & {
startTimestamp: BigNumber;
maxClaimableSupply: BigNumber;
supplyClaimed: BigNumber;
quantityLimitPerTransaction: BigNumber;
waitTimeInSecondsBetweenClaims: BigNumber;
merkleRoot: string;
pricePerToken: BigNumber;
currency: string;
}
>;
getClaimTimestamp(
_claimer: string,
overrides?: CallOverrides
): Promise<
[BigNumber, BigNumber] & {
lastClaimedAt: BigNumber;
nextValidClaimTimestamp: BigNumber;
}
>;
setClaimConditions(
_condition: IClaimCondition.ClaimConditionStruct,
_resetClaimEligibility: boolean,
overrides?: CallOverrides
): Promise<void>;
verifyClaim(
_claimer: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
verifyMaxQuantityPerTransaction: boolean,
overrides?: CallOverrides
): Promise<void>;
verifyClaimMerkleProof(
_claimer: string,
_quantity: BigNumberish,
_allowlistProof: IDropSinglePhase.AllowlistProofStruct,
overrides?: CallOverrides
): Promise<
[boolean, BigNumber] & {
validMerkleProof: boolean;
merkleProofIndex: BigNumber;
}
>;
};
filters: {
"ClaimConditionUpdated(tuple,bool)"(
condition?: null,
resetEligibility?: null
): ClaimConditionUpdatedEventFilter;
ClaimConditionUpdated(
condition?: null,
resetEligibility?: null
): ClaimConditionUpdatedEventFilter;
"TokensClaimed(address,address,uint256,uint256)"(
claimer?: string | null,
receiver?: string | null,
startTokenId?: BigNumberish | null,
quantityClaimed?: null
): TokensClaimedEventFilter;
TokensClaimed(
claimer?: string | null,
receiver?: string | null,
startTokenId?: BigNumberish | null,
quantityClaimed?: null
): TokensClaimedEventFilter;
};
estimateGas: {
claim(
_receiver: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
_allowlistProof: IDropSinglePhase.AllowlistProofStruct,
_data: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
claimCondition(overrides?: CallOverrides): Promise<BigNumber>;
getClaimTimestamp(
_claimer: string,
overrides?: CallOverrides
): Promise<BigNumber>;
setClaimConditions(
_condition: IClaimCondition.ClaimConditionStruct,
_resetClaimEligibility: boolean,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
verifyClaim(
_claimer: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
verifyMaxQuantityPerTransaction: boolean,
overrides?: CallOverrides
): Promise<BigNumber>;
verifyClaimMerkleProof(
_claimer: string,
_quantity: BigNumberish,
_allowlistProof: IDropSinglePhase.AllowlistProofStruct,
overrides?: CallOverrides
): Promise<BigNumber>;
};
populateTransaction: {
claim(
_receiver: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
_allowlistProof: IDropSinglePhase.AllowlistProofStruct,
_data: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
claimCondition(overrides?: CallOverrides): Promise<PopulatedTransaction>;
getClaimTimestamp(
_claimer: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
setClaimConditions(
_condition: IClaimCondition.ClaimConditionStruct,
_resetClaimEligibility: boolean,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
verifyClaim(
_claimer: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
verifyMaxQuantityPerTransaction: boolean,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
verifyClaimMerkleProof(
_claimer: string,
_quantity: BigNumberish,
_allowlistProof: IDropSinglePhase.AllowlistProofStruct,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
};
}
@@ -1,576 +0,0 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";
import type {
FunctionFragment,
Result,
EventFragment,
} from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
BaseContract,
BigNumber,
BigNumberish,
BytesLike,
CallOverrides,
ContractTransaction,
Overrides,
PayableOverrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
export declare namespace IClaimCondition {
export type ClaimConditionStruct = {
startTimestamp: BigNumberish;
maxClaimableSupply: BigNumberish;
supplyClaimed: BigNumberish;
quantityLimitPerTransaction: BigNumberish;
waitTimeInSecondsBetweenClaims: BigNumberish;
merkleRoot: BytesLike;
pricePerToken: BigNumberish;
currency: string;
};
export type ClaimConditionStructOutput = [
BigNumber,
BigNumber,
BigNumber,
BigNumber,
BigNumber,
string,
BigNumber,
string
] & {
startTimestamp: BigNumber;
maxClaimableSupply: BigNumber;
supplyClaimed: BigNumber;
quantityLimitPerTransaction: BigNumber;
waitTimeInSecondsBetweenClaims: BigNumber;
merkleRoot: string;
pricePerToken: BigNumber;
currency: string;
};
}
export declare namespace IDropSinglePhase1155 {
export type AllowlistProofStruct = {
proof: BytesLike[];
maxQuantityInAllowlist: BigNumberish;
};
export type AllowlistProofStructOutput = [string[], BigNumber] & {
proof: string[];
maxQuantityInAllowlist: BigNumber;
};
}
export interface DropSinglePhase1155Interface extends utils.Interface {
functions: {
"claim(address,uint256,uint256,address,uint256,(bytes32[],uint256),bytes)": FunctionFragment;
"claimCondition(uint256)": FunctionFragment;
"getClaimTimestamp(uint256,address)": FunctionFragment;
"setClaimConditions(uint256,(uint256,uint256,uint256,uint256,uint256,bytes32,uint256,address),bool)": FunctionFragment;
"verifyClaim(uint256,address,uint256,address,uint256,bool)": FunctionFragment;
"verifyClaimMerkleProof(uint256,address,uint256,(bytes32[],uint256))": FunctionFragment;
};
getFunction(
nameOrSignatureOrTopic:
| "claim"
| "claimCondition"
| "getClaimTimestamp"
| "setClaimConditions"
| "verifyClaim"
| "verifyClaimMerkleProof"
): FunctionFragment;
encodeFunctionData(
functionFragment: "claim",
values: [
string,
BigNumberish,
BigNumberish,
string,
BigNumberish,
IDropSinglePhase1155.AllowlistProofStruct,
BytesLike
]
): string;
encodeFunctionData(
functionFragment: "claimCondition",
values: [BigNumberish]
): string;
encodeFunctionData(
functionFragment: "getClaimTimestamp",
values: [BigNumberish, string]
): string;
encodeFunctionData(
functionFragment: "setClaimConditions",
values: [BigNumberish, IClaimCondition.ClaimConditionStruct, boolean]
): string;
encodeFunctionData(
functionFragment: "verifyClaim",
values: [BigNumberish, string, BigNumberish, string, BigNumberish, boolean]
): string;
encodeFunctionData(
functionFragment: "verifyClaimMerkleProof",
values: [
BigNumberish,
string,
BigNumberish,
IDropSinglePhase1155.AllowlistProofStruct
]
): string;
decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "claimCondition",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getClaimTimestamp",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "setClaimConditions",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "verifyClaim",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "verifyClaimMerkleProof",
data: BytesLike
): Result;
events: {
"ClaimConditionUpdated(uint256,tuple,bool)": EventFragment;
"TokensClaimed(address,address,uint256,uint256)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "ClaimConditionUpdated"): EventFragment;
getEvent(nameOrSignatureOrTopic: "TokensClaimed"): EventFragment;
}
export interface ClaimConditionUpdatedEventObject {
tokenId: BigNumber;
condition: IClaimCondition.ClaimConditionStructOutput;
resetEligibility: boolean;
}
export type ClaimConditionUpdatedEvent = TypedEvent<
[BigNumber, IClaimCondition.ClaimConditionStructOutput, boolean],
ClaimConditionUpdatedEventObject
>;
export type ClaimConditionUpdatedEventFilter =
TypedEventFilter<ClaimConditionUpdatedEvent>;
export interface TokensClaimedEventObject {
claimer: string;
receiver: string;
tokenId: BigNumber;
quantityClaimed: BigNumber;
}
export type TokensClaimedEvent = TypedEvent<
[string, string, BigNumber, BigNumber],
TokensClaimedEventObject
>;
export type TokensClaimedEventFilter = TypedEventFilter<TokensClaimedEvent>;
export interface DropSinglePhase1155 extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: DropSinglePhase1155Interface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
claim(
_receiver: string,
_tokenId: BigNumberish,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
_allowlistProof: IDropSinglePhase1155.AllowlistProofStruct,
_data: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
claimCondition(
arg0: BigNumberish,
overrides?: CallOverrides
): Promise<
[
BigNumber,
BigNumber,
BigNumber,
BigNumber,
BigNumber,
string,
BigNumber,
string
] & {
startTimestamp: BigNumber;
maxClaimableSupply: BigNumber;
supplyClaimed: BigNumber;
quantityLimitPerTransaction: BigNumber;
waitTimeInSecondsBetweenClaims: BigNumber;
merkleRoot: string;
pricePerToken: BigNumber;
currency: string;
}
>;
getClaimTimestamp(
_tokenId: BigNumberish,
_claimer: string,
overrides?: CallOverrides
): Promise<
[BigNumber, BigNumber] & {
lastClaimedAt: BigNumber;
nextValidClaimTimestamp: BigNumber;
}
>;
setClaimConditions(
_tokenId: BigNumberish,
_condition: IClaimCondition.ClaimConditionStruct,
_resetClaimEligibility: boolean,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
verifyClaim(
_tokenId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
verifyMaxQuantityPerTransaction: boolean,
overrides?: CallOverrides
): Promise<[void]>;
verifyClaimMerkleProof(
_tokenId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_allowlistProof: IDropSinglePhase1155.AllowlistProofStruct,
overrides?: CallOverrides
): Promise<
[boolean, BigNumber] & {
validMerkleProof: boolean;
merkleProofIndex: BigNumber;
}
>;
};
claim(
_receiver: string,
_tokenId: BigNumberish,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
_allowlistProof: IDropSinglePhase1155.AllowlistProofStruct,
_data: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
claimCondition(
arg0: BigNumberish,
overrides?: CallOverrides
): Promise<
[
BigNumber,
BigNumber,
BigNumber,
BigNumber,
BigNumber,
string,
BigNumber,
string
] & {
startTimestamp: BigNumber;
maxClaimableSupply: BigNumber;
supplyClaimed: BigNumber;
quantityLimitPerTransaction: BigNumber;
waitTimeInSecondsBetweenClaims: BigNumber;
merkleRoot: string;
pricePerToken: BigNumber;
currency: string;
}
>;
getClaimTimestamp(
_tokenId: BigNumberish,
_claimer: string,
overrides?: CallOverrides
): Promise<
[BigNumber, BigNumber] & {
lastClaimedAt: BigNumber;
nextValidClaimTimestamp: BigNumber;
}
>;
setClaimConditions(
_tokenId: BigNumberish,
_condition: IClaimCondition.ClaimConditionStruct,
_resetClaimEligibility: boolean,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
verifyClaim(
_tokenId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
verifyMaxQuantityPerTransaction: boolean,
overrides?: CallOverrides
): Promise<void>;
verifyClaimMerkleProof(
_tokenId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_allowlistProof: IDropSinglePhase1155.AllowlistProofStruct,
overrides?: CallOverrides
): Promise<
[boolean, BigNumber] & {
validMerkleProof: boolean;
merkleProofIndex: BigNumber;
}
>;
callStatic: {
claim(
_receiver: string,
_tokenId: BigNumberish,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
_allowlistProof: IDropSinglePhase1155.AllowlistProofStruct,
_data: BytesLike,
overrides?: CallOverrides
): Promise<void>;
claimCondition(
arg0: BigNumberish,
overrides?: CallOverrides
): Promise<
[
BigNumber,
BigNumber,
BigNumber,
BigNumber,
BigNumber,
string,
BigNumber,
string
] & {
startTimestamp: BigNumber;
maxClaimableSupply: BigNumber;
supplyClaimed: BigNumber;
quantityLimitPerTransaction: BigNumber;
waitTimeInSecondsBetweenClaims: BigNumber;
merkleRoot: string;
pricePerToken: BigNumber;
currency: string;
}
>;
getClaimTimestamp(
_tokenId: BigNumberish,
_claimer: string,
overrides?: CallOverrides
): Promise<
[BigNumber, BigNumber] & {
lastClaimedAt: BigNumber;
nextValidClaimTimestamp: BigNumber;
}
>;
setClaimConditions(
_tokenId: BigNumberish,
_condition: IClaimCondition.ClaimConditionStruct,
_resetClaimEligibility: boolean,
overrides?: CallOverrides
): Promise<void>;
verifyClaim(
_tokenId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
verifyMaxQuantityPerTransaction: boolean,
overrides?: CallOverrides
): Promise<void>;
verifyClaimMerkleProof(
_tokenId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_allowlistProof: IDropSinglePhase1155.AllowlistProofStruct,
overrides?: CallOverrides
): Promise<
[boolean, BigNumber] & {
validMerkleProof: boolean;
merkleProofIndex: BigNumber;
}
>;
};
filters: {
"ClaimConditionUpdated(uint256,tuple,bool)"(
tokenId?: BigNumberish | null,
condition?: null,
resetEligibility?: null
): ClaimConditionUpdatedEventFilter;
ClaimConditionUpdated(
tokenId?: BigNumberish | null,
condition?: null,
resetEligibility?: null
): ClaimConditionUpdatedEventFilter;
"TokensClaimed(address,address,uint256,uint256)"(
claimer?: string | null,
receiver?: string | null,
tokenId?: BigNumberish | null,
quantityClaimed?: null
): TokensClaimedEventFilter;
TokensClaimed(
claimer?: string | null,
receiver?: string | null,
tokenId?: BigNumberish | null,
quantityClaimed?: null
): TokensClaimedEventFilter;
};
estimateGas: {
claim(
_receiver: string,
_tokenId: BigNumberish,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
_allowlistProof: IDropSinglePhase1155.AllowlistProofStruct,
_data: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
claimCondition(
arg0: BigNumberish,
overrides?: CallOverrides
): Promise<BigNumber>;
getClaimTimestamp(
_tokenId: BigNumberish,
_claimer: string,
overrides?: CallOverrides
): Promise<BigNumber>;
setClaimConditions(
_tokenId: BigNumberish,
_condition: IClaimCondition.ClaimConditionStruct,
_resetClaimEligibility: boolean,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
verifyClaim(
_tokenId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
verifyMaxQuantityPerTransaction: boolean,
overrides?: CallOverrides
): Promise<BigNumber>;
verifyClaimMerkleProof(
_tokenId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_allowlistProof: IDropSinglePhase1155.AllowlistProofStruct,
overrides?: CallOverrides
): Promise<BigNumber>;
};
populateTransaction: {
claim(
_receiver: string,
_tokenId: BigNumberish,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
_allowlistProof: IDropSinglePhase1155.AllowlistProofStruct,
_data: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
claimCondition(
arg0: BigNumberish,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
getClaimTimestamp(
_tokenId: BigNumberish,
_claimer: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
setClaimConditions(
_tokenId: BigNumberish,
_condition: IClaimCondition.ClaimConditionStruct,
_resetClaimEligibility: boolean,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
verifyClaim(
_tokenId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_currency: string,
_pricePerToken: BigNumberish,
verifyMaxQuantityPerTransaction: boolean,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
verifyClaimMerkleProof(
_tokenId: BigNumberish,
_claimer: string,
_quantity: BigNumberish,
_allowlistProof: IDropSinglePhase1155.AllowlistProofStruct,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
};
}
-531
View File
@@ -1,531 +0,0 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";
import type {
FunctionFragment,
Result,
EventFragment,
} from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
BaseContract,
BigNumber,
BigNumberish,
BytesLike,
CallOverrides,
ContractTransaction,
Overrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
export interface ERC1155Interface extends utils.Interface {
functions: {
"balanceOf(address,uint256)": FunctionFragment;
"balanceOfBatch(address[],uint256[])": FunctionFragment;
"isApprovedForAll(address,address)": FunctionFragment;
"name()": FunctionFragment;
"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": FunctionFragment;
"safeTransferFrom(address,address,uint256,uint256,bytes)": FunctionFragment;
"setApprovalForAll(address,bool)": FunctionFragment;
"supportsInterface(bytes4)": FunctionFragment;
"symbol()": FunctionFragment;
"uri(uint256)": FunctionFragment;
};
getFunction(
nameOrSignatureOrTopic:
| "balanceOf"
| "balanceOfBatch"
| "isApprovedForAll"
| "name"
| "safeBatchTransferFrom"
| "safeTransferFrom"
| "setApprovalForAll"
| "supportsInterface"
| "symbol"
| "uri"
): FunctionFragment;
encodeFunctionData(
functionFragment: "balanceOf",
values: [string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "balanceOfBatch",
values: [string[], BigNumberish[]]
): string;
encodeFunctionData(
functionFragment: "isApprovedForAll",
values: [string, string]
): string;
encodeFunctionData(functionFragment: "name", values?: undefined): string;
encodeFunctionData(
functionFragment: "safeBatchTransferFrom",
values: [string, string, BigNumberish[], BigNumberish[], BytesLike]
): string;
encodeFunctionData(
functionFragment: "safeTransferFrom",
values: [string, string, BigNumberish, BigNumberish, BytesLike]
): string;
encodeFunctionData(
functionFragment: "setApprovalForAll",
values: [string, boolean]
): string;
encodeFunctionData(
functionFragment: "supportsInterface",
values: [BytesLike]
): string;
encodeFunctionData(functionFragment: "symbol", values?: undefined): string;
encodeFunctionData(functionFragment: "uri", values: [BigNumberish]): string;
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "balanceOfBatch",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "isApprovedForAll",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "safeBatchTransferFrom",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "safeTransferFrom",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "setApprovalForAll",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "supportsInterface",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "uri", data: BytesLike): Result;
events: {
"ApprovalForAll(address,address,bool)": EventFragment;
"TransferBatch(address,address,address,uint256[],uint256[])": EventFragment;
"TransferSingle(address,address,address,uint256,uint256)": EventFragment;
"URI(string,uint256)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "ApprovalForAll"): EventFragment;
getEvent(nameOrSignatureOrTopic: "TransferBatch"): EventFragment;
getEvent(nameOrSignatureOrTopic: "TransferSingle"): EventFragment;
getEvent(nameOrSignatureOrTopic: "URI"): EventFragment;
}
export interface ApprovalForAllEventObject {
_owner: string;
_operator: string;
_approved: boolean;
}
export type ApprovalForAllEvent = TypedEvent<
[string, string, boolean],
ApprovalForAllEventObject
>;
export type ApprovalForAllEventFilter = TypedEventFilter<ApprovalForAllEvent>;
export interface TransferBatchEventObject {
_operator: string;
_from: string;
_to: string;
_ids: BigNumber[];
_values: BigNumber[];
}
export type TransferBatchEvent = TypedEvent<
[string, string, string, BigNumber[], BigNumber[]],
TransferBatchEventObject
>;
export type TransferBatchEventFilter = TypedEventFilter<TransferBatchEvent>;
export interface TransferSingleEventObject {
_operator: string;
_from: string;
_to: string;
_id: BigNumber;
_value: BigNumber;
}
export type TransferSingleEvent = TypedEvent<
[string, string, string, BigNumber, BigNumber],
TransferSingleEventObject
>;
export type TransferSingleEventFilter = TypedEventFilter<TransferSingleEvent>;
export interface URIEventObject {
_value: string;
_id: BigNumber;
}
export type URIEvent = TypedEvent<[string, BigNumber], URIEventObject>;
export type URIEventFilter = TypedEventFilter<URIEvent>;
export interface ERC1155 extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: ERC1155Interface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
balanceOf(
arg0: string,
arg1: BigNumberish,
overrides?: CallOverrides
): Promise<[BigNumber]>;
balanceOfBatch(
accounts: string[],
ids: BigNumberish[],
overrides?: CallOverrides
): Promise<[BigNumber[]]>;
isApprovedForAll(
arg0: string,
arg1: string,
overrides?: CallOverrides
): Promise<[boolean]>;
name(overrides?: CallOverrides): Promise<[string]>;
safeBatchTransferFrom(
from: string,
to: string,
ids: BigNumberish[],
amounts: BigNumberish[],
data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
safeTransferFrom(
from: string,
to: string,
id: BigNumberish,
amount: BigNumberish,
data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
setApprovalForAll(
operator: string,
approved: boolean,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<[boolean]>;
symbol(overrides?: CallOverrides): Promise<[string]>;
uri(tokenId: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
};
balanceOf(
arg0: string,
arg1: BigNumberish,
overrides?: CallOverrides
): Promise<BigNumber>;
balanceOfBatch(
accounts: string[],
ids: BigNumberish[],
overrides?: CallOverrides
): Promise<BigNumber[]>;
isApprovedForAll(
arg0: string,
arg1: string,
overrides?: CallOverrides
): Promise<boolean>;
name(overrides?: CallOverrides): Promise<string>;
safeBatchTransferFrom(
from: string,
to: string,
ids: BigNumberish[],
amounts: BigNumberish[],
data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
safeTransferFrom(
from: string,
to: string,
id: BigNumberish,
amount: BigNumberish,
data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
setApprovalForAll(
operator: string,
approved: boolean,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<boolean>;
symbol(overrides?: CallOverrides): Promise<string>;
uri(tokenId: BigNumberish, overrides?: CallOverrides): Promise<string>;
callStatic: {
balanceOf(
arg0: string,
arg1: BigNumberish,
overrides?: CallOverrides
): Promise<BigNumber>;
balanceOfBatch(
accounts: string[],
ids: BigNumberish[],
overrides?: CallOverrides
): Promise<BigNumber[]>;
isApprovedForAll(
arg0: string,
arg1: string,
overrides?: CallOverrides
): Promise<boolean>;
name(overrides?: CallOverrides): Promise<string>;
safeBatchTransferFrom(
from: string,
to: string,
ids: BigNumberish[],
amounts: BigNumberish[],
data: BytesLike,
overrides?: CallOverrides
): Promise<void>;
safeTransferFrom(
from: string,
to: string,
id: BigNumberish,
amount: BigNumberish,
data: BytesLike,
overrides?: CallOverrides
): Promise<void>;
setApprovalForAll(
operator: string,
approved: boolean,
overrides?: CallOverrides
): Promise<void>;
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<boolean>;
symbol(overrides?: CallOverrides): Promise<string>;
uri(tokenId: BigNumberish, overrides?: CallOverrides): Promise<string>;
};
filters: {
"ApprovalForAll(address,address,bool)"(
_owner?: string | null,
_operator?: string | null,
_approved?: null
): ApprovalForAllEventFilter;
ApprovalForAll(
_owner?: string | null,
_operator?: string | null,
_approved?: null
): ApprovalForAllEventFilter;
"TransferBatch(address,address,address,uint256[],uint256[])"(
_operator?: string | null,
_from?: string | null,
_to?: string | null,
_ids?: null,
_values?: null
): TransferBatchEventFilter;
TransferBatch(
_operator?: string | null,
_from?: string | null,
_to?: string | null,
_ids?: null,
_values?: null
): TransferBatchEventFilter;
"TransferSingle(address,address,address,uint256,uint256)"(
_operator?: string | null,
_from?: string | null,
_to?: string | null,
_id?: null,
_value?: null
): TransferSingleEventFilter;
TransferSingle(
_operator?: string | null,
_from?: string | null,
_to?: string | null,
_id?: null,
_value?: null
): TransferSingleEventFilter;
"URI(string,uint256)"(
_value?: null,
_id?: BigNumberish | null
): URIEventFilter;
URI(_value?: null, _id?: BigNumberish | null): URIEventFilter;
};
estimateGas: {
balanceOf(
arg0: string,
arg1: BigNumberish,
overrides?: CallOverrides
): Promise<BigNumber>;
balanceOfBatch(
accounts: string[],
ids: BigNumberish[],
overrides?: CallOverrides
): Promise<BigNumber>;
isApprovedForAll(
arg0: string,
arg1: string,
overrides?: CallOverrides
): Promise<BigNumber>;
name(overrides?: CallOverrides): Promise<BigNumber>;
safeBatchTransferFrom(
from: string,
to: string,
ids: BigNumberish[],
amounts: BigNumberish[],
data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
safeTransferFrom(
from: string,
to: string,
id: BigNumberish,
amount: BigNumberish,
data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
setApprovalForAll(
operator: string,
approved: boolean,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<BigNumber>;
symbol(overrides?: CallOverrides): Promise<BigNumber>;
uri(tokenId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
};
populateTransaction: {
balanceOf(
arg0: string,
arg1: BigNumberish,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
balanceOfBatch(
accounts: string[],
ids: BigNumberish[],
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
isApprovedForAll(
arg0: string,
arg1: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
name(overrides?: CallOverrides): Promise<PopulatedTransaction>;
safeBatchTransferFrom(
from: string,
to: string,
ids: BigNumberish[],
amounts: BigNumberish[],
data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
safeTransferFrom(
from: string,
to: string,
id: BigNumberish,
amount: BigNumberish,
data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
setApprovalForAll(
operator: string,
approved: boolean,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
symbol(overrides?: CallOverrides): Promise<PopulatedTransaction>;
uri(
tokenId: BigNumberish,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
};
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-220
View File
@@ -1,220 +0,0 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";
import type { FunctionFragment, Result } from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
BaseContract,
BigNumber,
BigNumberish,
BytesLike,
CallOverrides,
ContractTransaction,
Overrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
export interface ERC1155HolderInterface extends utils.Interface {
functions: {
"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": FunctionFragment;
"onERC1155Received(address,address,uint256,uint256,bytes)": FunctionFragment;
"supportsInterface(bytes4)": FunctionFragment;
};
getFunction(
nameOrSignatureOrTopic:
| "onERC1155BatchReceived"
| "onERC1155Received"
| "supportsInterface"
): FunctionFragment;
encodeFunctionData(
functionFragment: "onERC1155BatchReceived",
values: [string, string, BigNumberish[], BigNumberish[], BytesLike]
): string;
encodeFunctionData(
functionFragment: "onERC1155Received",
values: [string, string, BigNumberish, BigNumberish, BytesLike]
): string;
encodeFunctionData(
functionFragment: "supportsInterface",
values: [BytesLike]
): string;
decodeFunctionResult(
functionFragment: "onERC1155BatchReceived",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "onERC1155Received",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "supportsInterface",
data: BytesLike
): Result;
events: {};
}
export interface ERC1155Holder extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: ERC1155HolderInterface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
onERC1155BatchReceived(
arg0: string,
arg1: string,
arg2: BigNumberish[],
arg3: BigNumberish[],
arg4: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
onERC1155Received(
arg0: string,
arg1: string,
arg2: BigNumberish,
arg3: BigNumberish,
arg4: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<[boolean]>;
};
onERC1155BatchReceived(
arg0: string,
arg1: string,
arg2: BigNumberish[],
arg3: BigNumberish[],
arg4: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
onERC1155Received(
arg0: string,
arg1: string,
arg2: BigNumberish,
arg3: BigNumberish,
arg4: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<boolean>;
callStatic: {
onERC1155BatchReceived(
arg0: string,
arg1: string,
arg2: BigNumberish[],
arg3: BigNumberish[],
arg4: BytesLike,
overrides?: CallOverrides
): Promise<string>;
onERC1155Received(
arg0: string,
arg1: string,
arg2: BigNumberish,
arg3: BigNumberish,
arg4: BytesLike,
overrides?: CallOverrides
): Promise<string>;
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<boolean>;
};
filters: {};
estimateGas: {
onERC1155BatchReceived(
arg0: string,
arg1: string,
arg2: BigNumberish[],
arg3: BigNumberish[],
arg4: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
onERC1155Received(
arg0: string,
arg1: string,
arg2: BigNumberish,
arg3: BigNumberish,
arg4: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<BigNumber>;
};
populateTransaction: {
onERC1155BatchReceived(
arg0: string,
arg1: string,
arg2: BigNumberish[],
arg3: BigNumberish[],
arg4: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
onERC1155Received(
arg0: string,
arg1: string,
arg2: BigNumberish,
arg3: BigNumberish,
arg4: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
};
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,220 +0,0 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";
import type { FunctionFragment, Result } from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
BaseContract,
BigNumber,
BigNumberish,
BytesLike,
CallOverrides,
ContractTransaction,
Overrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
export interface ERC1155ReceiverInterface extends utils.Interface {
functions: {
"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": FunctionFragment;
"onERC1155Received(address,address,uint256,uint256,bytes)": FunctionFragment;
"supportsInterface(bytes4)": FunctionFragment;
};
getFunction(
nameOrSignatureOrTopic:
| "onERC1155BatchReceived"
| "onERC1155Received"
| "supportsInterface"
): FunctionFragment;
encodeFunctionData(
functionFragment: "onERC1155BatchReceived",
values: [string, string, BigNumberish[], BigNumberish[], BytesLike]
): string;
encodeFunctionData(
functionFragment: "onERC1155Received",
values: [string, string, BigNumberish, BigNumberish, BytesLike]
): string;
encodeFunctionData(
functionFragment: "supportsInterface",
values: [BytesLike]
): string;
decodeFunctionResult(
functionFragment: "onERC1155BatchReceived",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "onERC1155Received",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "supportsInterface",
data: BytesLike
): Result;
events: {};
}
export interface ERC1155Receiver extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: ERC1155ReceiverInterface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
onERC1155BatchReceived(
operator: string,
from: string,
ids: BigNumberish[],
values: BigNumberish[],
data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
onERC1155Received(
operator: string,
from: string,
id: BigNumberish,
value: BigNumberish,
data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<[boolean]>;
};
onERC1155BatchReceived(
operator: string,
from: string,
ids: BigNumberish[],
values: BigNumberish[],
data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
onERC1155Received(
operator: string,
from: string,
id: BigNumberish,
value: BigNumberish,
data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<boolean>;
callStatic: {
onERC1155BatchReceived(
operator: string,
from: string,
ids: BigNumberish[],
values: BigNumberish[],
data: BytesLike,
overrides?: CallOverrides
): Promise<string>;
onERC1155Received(
operator: string,
from: string,
id: BigNumberish,
value: BigNumberish,
data: BytesLike,
overrides?: CallOverrides
): Promise<string>;
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<boolean>;
};
filters: {};
estimateGas: {
onERC1155BatchReceived(
operator: string,
from: string,
ids: BigNumberish[],
values: BigNumberish[],
data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
onERC1155Received(
operator: string,
from: string,
id: BigNumberish,
value: BigNumberish,
data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<BigNumber>;
};
populateTransaction: {
onERC1155BatchReceived(
operator: string,
from: string,
ids: BigNumberish[],
values: BigNumberish[],
data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
onERC1155Received(
operator: string,
from: string,
id: BigNumberish,
value: BigNumberish,
data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
};
}
File diff suppressed because it is too large Load Diff
-104
View File
@@ -1,104 +0,0 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";
import type { FunctionFragment, Result } from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
BaseContract,
BigNumber,
BytesLike,
CallOverrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
export interface ERC165Interface extends utils.Interface {
functions: {
"supportsInterface(bytes4)": FunctionFragment;
};
getFunction(nameOrSignatureOrTopic: "supportsInterface"): FunctionFragment;
encodeFunctionData(
functionFragment: "supportsInterface",
values: [BytesLike]
): string;
decodeFunctionResult(
functionFragment: "supportsInterface",
data: BytesLike
): Result;
events: {};
}
export interface ERC165 extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: ERC165Interface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<[boolean]>;
};
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<boolean>;
callStatic: {
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<boolean>;
};
filters: {};
estimateGas: {
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<BigNumber>;
};
populateTransaction: {
supportsInterface(
interfaceId: BytesLike,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
};
}
-446
View File
@@ -1,446 +0,0 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";
import type {
FunctionFragment,
Result,
EventFragment,
} from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
BaseContract,
BigNumber,
BigNumberish,
BytesLike,
CallOverrides,
ContractTransaction,
Overrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
export interface ERC20Interface extends utils.Interface {
functions: {
"allowance(address,address)": FunctionFragment;
"approve(address,uint256)": FunctionFragment;
"balanceOf(address)": FunctionFragment;
"decimals()": FunctionFragment;
"decreaseAllowance(address,uint256)": FunctionFragment;
"increaseAllowance(address,uint256)": FunctionFragment;
"name()": FunctionFragment;
"symbol()": FunctionFragment;
"totalSupply()": FunctionFragment;
"transfer(address,uint256)": FunctionFragment;
"transferFrom(address,address,uint256)": FunctionFragment;
};
getFunction(
nameOrSignatureOrTopic:
| "allowance"
| "approve"
| "balanceOf"
| "decimals"
| "decreaseAllowance"
| "increaseAllowance"
| "name"
| "symbol"
| "totalSupply"
| "transfer"
| "transferFrom"
): FunctionFragment;
encodeFunctionData(
functionFragment: "allowance",
values: [string, string]
): string;
encodeFunctionData(
functionFragment: "approve",
values: [string, BigNumberish]
): string;
encodeFunctionData(functionFragment: "balanceOf", values: [string]): string;
encodeFunctionData(functionFragment: "decimals", values?: undefined): string;
encodeFunctionData(
functionFragment: "decreaseAllowance",
values: [string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "increaseAllowance",
values: [string, BigNumberish]
): string;
encodeFunctionData(functionFragment: "name", values?: undefined): string;
encodeFunctionData(functionFragment: "symbol", values?: undefined): string;
encodeFunctionData(
functionFragment: "totalSupply",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "transfer",
values: [string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "transferFrom",
values: [string, string, BigNumberish]
): string;
decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "decreaseAllowance",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "increaseAllowance",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "totalSupply",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "transferFrom",
data: BytesLike
): Result;
events: {
"Approval(address,address,uint256)": EventFragment;
"Transfer(address,address,uint256)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment;
getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment;
}
export interface ApprovalEventObject {
owner: string;
spender: string;
value: BigNumber;
}
export type ApprovalEvent = TypedEvent<
[string, string, BigNumber],
ApprovalEventObject
>;
export type ApprovalEventFilter = TypedEventFilter<ApprovalEvent>;
export interface TransferEventObject {
from: string;
to: string;
value: BigNumber;
}
export type TransferEvent = TypedEvent<
[string, string, BigNumber],
TransferEventObject
>;
export type TransferEventFilter = TypedEventFilter<TransferEvent>;
export interface ERC20 extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: ERC20Interface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<[BigNumber]>;
approve(
spender: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>;
decimals(overrides?: CallOverrides): Promise<[number]>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
name(overrides?: CallOverrides): Promise<[string]>;
symbol(overrides?: CallOverrides): Promise<[string]>;
totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>;
transfer(
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
};
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<BigNumber>;
approve(
spender: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
balanceOf(account: string, overrides?: CallOverrides): Promise<BigNumber>;
decimals(overrides?: CallOverrides): Promise<number>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
name(overrides?: CallOverrides): Promise<string>;
symbol(overrides?: CallOverrides): Promise<string>;
totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
transfer(
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
callStatic: {
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<BigNumber>;
approve(
spender: string,
amount: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
balanceOf(account: string, overrides?: CallOverrides): Promise<BigNumber>;
decimals(overrides?: CallOverrides): Promise<number>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
name(overrides?: CallOverrides): Promise<string>;
symbol(overrides?: CallOverrides): Promise<string>;
totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
transfer(
to: string,
amount: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
};
filters: {
"Approval(address,address,uint256)"(
owner?: string | null,
spender?: string | null,
value?: null
): ApprovalEventFilter;
Approval(
owner?: string | null,
spender?: string | null,
value?: null
): ApprovalEventFilter;
"Transfer(address,address,uint256)"(
from?: string | null,
to?: string | null,
value?: null
): TransferEventFilter;
Transfer(
from?: string | null,
to?: string | null,
value?: null
): TransferEventFilter;
};
estimateGas: {
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<BigNumber>;
approve(
spender: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
balanceOf(account: string, overrides?: CallOverrides): Promise<BigNumber>;
decimals(overrides?: CallOverrides): Promise<BigNumber>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
name(overrides?: CallOverrides): Promise<BigNumber>;
symbol(overrides?: CallOverrides): Promise<BigNumber>;
totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
transfer(
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
};
populateTransaction: {
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
approve(
spender: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
balanceOf(
account: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
decimals(overrides?: CallOverrides): Promise<PopulatedTransaction>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
name(overrides?: CallOverrides): Promise<PopulatedTransaction>;
symbol(overrides?: CallOverrides): Promise<PopulatedTransaction>;
totalSupply(overrides?: CallOverrides): Promise<PopulatedTransaction>;
transfer(
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
};
}
-782
View File
@@ -1,782 +0,0 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";
import type {
FunctionFragment,
Result,
EventFragment,
} from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
BaseContract,
BigNumber,
BigNumberish,
BytesLike,
CallOverrides,
ContractTransaction,
Overrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
export interface ERC20BaseInterface extends utils.Interface {
functions: {
"DOMAIN_SEPARATOR()": FunctionFragment;
"allowance(address,address)": FunctionFragment;
"approve(address,uint256)": FunctionFragment;
"balanceOf(address)": FunctionFragment;
"burn(uint256)": FunctionFragment;
"contractURI()": FunctionFragment;
"decimals()": FunctionFragment;
"decreaseAllowance(address,uint256)": FunctionFragment;
"increaseAllowance(address,uint256)": FunctionFragment;
"mintTo(address,uint256)": FunctionFragment;
"multicall(bytes[])": FunctionFragment;
"name()": FunctionFragment;
"nonces(address)": FunctionFragment;
"owner()": FunctionFragment;
"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment;
"setContractURI(string)": FunctionFragment;
"setOwner(address)": FunctionFragment;
"symbol()": FunctionFragment;
"totalSupply()": FunctionFragment;
"transfer(address,uint256)": FunctionFragment;
"transferFrom(address,address,uint256)": FunctionFragment;
};
getFunction(
nameOrSignatureOrTopic:
| "DOMAIN_SEPARATOR"
| "allowance"
| "approve"
| "balanceOf"
| "burn"
| "contractURI"
| "decimals"
| "decreaseAllowance"
| "increaseAllowance"
| "mintTo"
| "multicall"
| "name"
| "nonces"
| "owner"
| "permit"
| "setContractURI"
| "setOwner"
| "symbol"
| "totalSupply"
| "transfer"
| "transferFrom"
): FunctionFragment;
encodeFunctionData(
functionFragment: "DOMAIN_SEPARATOR",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "allowance",
values: [string, string]
): string;
encodeFunctionData(
functionFragment: "approve",
values: [string, BigNumberish]
): string;
encodeFunctionData(functionFragment: "balanceOf", values: [string]): string;
encodeFunctionData(functionFragment: "burn", values: [BigNumberish]): string;
encodeFunctionData(
functionFragment: "contractURI",
values?: undefined
): string;
encodeFunctionData(functionFragment: "decimals", values?: undefined): string;
encodeFunctionData(
functionFragment: "decreaseAllowance",
values: [string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "increaseAllowance",
values: [string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "mintTo",
values: [string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "multicall",
values: [BytesLike[]]
): string;
encodeFunctionData(functionFragment: "name", values?: undefined): string;
encodeFunctionData(functionFragment: "nonces", values: [string]): string;
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
encodeFunctionData(
functionFragment: "permit",
values: [
string,
string,
BigNumberish,
BigNumberish,
BigNumberish,
BytesLike,
BytesLike
]
): string;
encodeFunctionData(
functionFragment: "setContractURI",
values: [string]
): string;
encodeFunctionData(functionFragment: "setOwner", values: [string]): string;
encodeFunctionData(functionFragment: "symbol", values?: undefined): string;
encodeFunctionData(
functionFragment: "totalSupply",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "transfer",
values: [string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "transferFrom",
values: [string, string, BigNumberish]
): string;
decodeFunctionResult(
functionFragment: "DOMAIN_SEPARATOR",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "contractURI",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "decreaseAllowance",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "increaseAllowance",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "mintTo", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "setContractURI",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "setOwner", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "totalSupply",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "transferFrom",
data: BytesLike
): Result;
events: {
"Approval(address,address,uint256)": EventFragment;
"ContractURIUpdated(string,string)": EventFragment;
"OwnerUpdated(address,address)": EventFragment;
"Transfer(address,address,uint256)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment;
getEvent(nameOrSignatureOrTopic: "ContractURIUpdated"): EventFragment;
getEvent(nameOrSignatureOrTopic: "OwnerUpdated"): EventFragment;
getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment;
}
export interface ApprovalEventObject {
owner: string;
spender: string;
value: BigNumber;
}
export type ApprovalEvent = TypedEvent<
[string, string, BigNumber],
ApprovalEventObject
>;
export type ApprovalEventFilter = TypedEventFilter<ApprovalEvent>;
export interface ContractURIUpdatedEventObject {
prevURI: string;
newURI: string;
}
export type ContractURIUpdatedEvent = TypedEvent<
[string, string],
ContractURIUpdatedEventObject
>;
export type ContractURIUpdatedEventFilter =
TypedEventFilter<ContractURIUpdatedEvent>;
export interface OwnerUpdatedEventObject {
prevOwner: string;
newOwner: string;
}
export type OwnerUpdatedEvent = TypedEvent<
[string, string],
OwnerUpdatedEventObject
>;
export type OwnerUpdatedEventFilter = TypedEventFilter<OwnerUpdatedEvent>;
export interface TransferEventObject {
from: string;
to: string;
value: BigNumber;
}
export type TransferEvent = TypedEvent<
[string, string, BigNumber],
TransferEventObject
>;
export type TransferEventFilter = TypedEventFilter<TransferEvent>;
export interface ERC20Base extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: ERC20BaseInterface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<[BigNumber]>;
approve(
spender: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>;
burn(
_amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
contractURI(overrides?: CallOverrides): Promise<[string]>;
decimals(overrides?: CallOverrides): Promise<[number]>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
mintTo(
_to: string,
_amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
multicall(
data: BytesLike[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
name(overrides?: CallOverrides): Promise<[string]>;
nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>;
owner(overrides?: CallOverrides): Promise<[string]>;
permit(
owner: string,
spender: string,
value: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
setContractURI(
_uri: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
setOwner(
_newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
symbol(overrides?: CallOverrides): Promise<[string]>;
totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>;
transfer(
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
};
DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<string>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<BigNumber>;
approve(
spender: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
balanceOf(account: string, overrides?: CallOverrides): Promise<BigNumber>;
burn(
_amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
contractURI(overrides?: CallOverrides): Promise<string>;
decimals(overrides?: CallOverrides): Promise<number>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
mintTo(
_to: string,
_amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
multicall(
data: BytesLike[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
name(overrides?: CallOverrides): Promise<string>;
nonces(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
owner(overrides?: CallOverrides): Promise<string>;
permit(
owner: string,
spender: string,
value: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
setContractURI(
_uri: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
setOwner(
_newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
symbol(overrides?: CallOverrides): Promise<string>;
totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
transfer(
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
callStatic: {
DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<string>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<BigNumber>;
approve(
spender: string,
amount: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
balanceOf(account: string, overrides?: CallOverrides): Promise<BigNumber>;
burn(_amount: BigNumberish, overrides?: CallOverrides): Promise<void>;
contractURI(overrides?: CallOverrides): Promise<string>;
decimals(overrides?: CallOverrides): Promise<number>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
mintTo(
_to: string,
_amount: BigNumberish,
overrides?: CallOverrides
): Promise<void>;
multicall(data: BytesLike[], overrides?: CallOverrides): Promise<string[]>;
name(overrides?: CallOverrides): Promise<string>;
nonces(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
owner(overrides?: CallOverrides): Promise<string>;
permit(
owner: string,
spender: string,
value: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: CallOverrides
): Promise<void>;
setContractURI(_uri: string, overrides?: CallOverrides): Promise<void>;
setOwner(_newOwner: string, overrides?: CallOverrides): Promise<void>;
symbol(overrides?: CallOverrides): Promise<string>;
totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
transfer(
to: string,
amount: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
};
filters: {
"Approval(address,address,uint256)"(
owner?: string | null,
spender?: string | null,
value?: null
): ApprovalEventFilter;
Approval(
owner?: string | null,
spender?: string | null,
value?: null
): ApprovalEventFilter;
"ContractURIUpdated(string,string)"(
prevURI?: null,
newURI?: null
): ContractURIUpdatedEventFilter;
ContractURIUpdated(
prevURI?: null,
newURI?: null
): ContractURIUpdatedEventFilter;
"OwnerUpdated(address,address)"(
prevOwner?: string | null,
newOwner?: string | null
): OwnerUpdatedEventFilter;
OwnerUpdated(
prevOwner?: string | null,
newOwner?: string | null
): OwnerUpdatedEventFilter;
"Transfer(address,address,uint256)"(
from?: string | null,
to?: string | null,
value?: null
): TransferEventFilter;
Transfer(
from?: string | null,
to?: string | null,
value?: null
): TransferEventFilter;
};
estimateGas: {
DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<BigNumber>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<BigNumber>;
approve(
spender: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
balanceOf(account: string, overrides?: CallOverrides): Promise<BigNumber>;
burn(
_amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
contractURI(overrides?: CallOverrides): Promise<BigNumber>;
decimals(overrides?: CallOverrides): Promise<BigNumber>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
mintTo(
_to: string,
_amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
multicall(
data: BytesLike[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
name(overrides?: CallOverrides): Promise<BigNumber>;
nonces(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
owner(overrides?: CallOverrides): Promise<BigNumber>;
permit(
owner: string,
spender: string,
value: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
setContractURI(
_uri: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
setOwner(
_newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
symbol(overrides?: CallOverrides): Promise<BigNumber>;
totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
transfer(
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
};
populateTransaction: {
DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<PopulatedTransaction>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
approve(
spender: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
balanceOf(
account: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
burn(
_amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
contractURI(overrides?: CallOverrides): Promise<PopulatedTransaction>;
decimals(overrides?: CallOverrides): Promise<PopulatedTransaction>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
mintTo(
_to: string,
_amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
multicall(
data: BytesLike[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
name(overrides?: CallOverrides): Promise<PopulatedTransaction>;
nonces(
owner: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
owner(overrides?: CallOverrides): Promise<PopulatedTransaction>;
permit(
owner: string,
spender: string,
value: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
setContractURI(
_uri: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
setOwner(
_newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
symbol(overrides?: CallOverrides): Promise<PopulatedTransaction>;
totalSupply(overrides?: CallOverrides): Promise<PopulatedTransaction>;
transfer(
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
};
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-553
View File
@@ -1,553 +0,0 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";
import type {
FunctionFragment,
Result,
EventFragment,
} from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
BaseContract,
BigNumber,
BigNumberish,
BytesLike,
CallOverrides,
ContractTransaction,
Overrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
export interface ERC20PermitInterface extends utils.Interface {
functions: {
"DOMAIN_SEPARATOR()": FunctionFragment;
"allowance(address,address)": FunctionFragment;
"approve(address,uint256)": FunctionFragment;
"balanceOf(address)": FunctionFragment;
"decimals()": FunctionFragment;
"decreaseAllowance(address,uint256)": FunctionFragment;
"increaseAllowance(address,uint256)": FunctionFragment;
"name()": FunctionFragment;
"nonces(address)": FunctionFragment;
"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment;
"symbol()": FunctionFragment;
"totalSupply()": FunctionFragment;
"transfer(address,uint256)": FunctionFragment;
"transferFrom(address,address,uint256)": FunctionFragment;
};
getFunction(
nameOrSignatureOrTopic:
| "DOMAIN_SEPARATOR"
| "allowance"
| "approve"
| "balanceOf"
| "decimals"
| "decreaseAllowance"
| "increaseAllowance"
| "name"
| "nonces"
| "permit"
| "symbol"
| "totalSupply"
| "transfer"
| "transferFrom"
): FunctionFragment;
encodeFunctionData(
functionFragment: "DOMAIN_SEPARATOR",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "allowance",
values: [string, string]
): string;
encodeFunctionData(
functionFragment: "approve",
values: [string, BigNumberish]
): string;
encodeFunctionData(functionFragment: "balanceOf", values: [string]): string;
encodeFunctionData(functionFragment: "decimals", values?: undefined): string;
encodeFunctionData(
functionFragment: "decreaseAllowance",
values: [string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "increaseAllowance",
values: [string, BigNumberish]
): string;
encodeFunctionData(functionFragment: "name", values?: undefined): string;
encodeFunctionData(functionFragment: "nonces", values: [string]): string;
encodeFunctionData(
functionFragment: "permit",
values: [
string,
string,
BigNumberish,
BigNumberish,
BigNumberish,
BytesLike,
BytesLike
]
): string;
encodeFunctionData(functionFragment: "symbol", values?: undefined): string;
encodeFunctionData(
functionFragment: "totalSupply",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "transfer",
values: [string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "transferFrom",
values: [string, string, BigNumberish]
): string;
decodeFunctionResult(
functionFragment: "DOMAIN_SEPARATOR",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "decreaseAllowance",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "increaseAllowance",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "totalSupply",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "transferFrom",
data: BytesLike
): Result;
events: {
"Approval(address,address,uint256)": EventFragment;
"Transfer(address,address,uint256)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment;
getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment;
}
export interface ApprovalEventObject {
owner: string;
spender: string;
value: BigNumber;
}
export type ApprovalEvent = TypedEvent<
[string, string, BigNumber],
ApprovalEventObject
>;
export type ApprovalEventFilter = TypedEventFilter<ApprovalEvent>;
export interface TransferEventObject {
from: string;
to: string;
value: BigNumber;
}
export type TransferEvent = TypedEvent<
[string, string, BigNumber],
TransferEventObject
>;
export type TransferEventFilter = TypedEventFilter<TransferEvent>;
export interface ERC20Permit extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: ERC20PermitInterface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<[BigNumber]>;
approve(
spender: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>;
decimals(overrides?: CallOverrides): Promise<[number]>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
name(overrides?: CallOverrides): Promise<[string]>;
nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>;
permit(
owner: string,
spender: string,
value: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
symbol(overrides?: CallOverrides): Promise<[string]>;
totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>;
transfer(
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
};
DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<string>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<BigNumber>;
approve(
spender: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
balanceOf(account: string, overrides?: CallOverrides): Promise<BigNumber>;
decimals(overrides?: CallOverrides): Promise<number>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
name(overrides?: CallOverrides): Promise<string>;
nonces(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
permit(
owner: string,
spender: string,
value: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
symbol(overrides?: CallOverrides): Promise<string>;
totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
transfer(
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
callStatic: {
DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<string>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<BigNumber>;
approve(
spender: string,
amount: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
balanceOf(account: string, overrides?: CallOverrides): Promise<BigNumber>;
decimals(overrides?: CallOverrides): Promise<number>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
name(overrides?: CallOverrides): Promise<string>;
nonces(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
permit(
owner: string,
spender: string,
value: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: CallOverrides
): Promise<void>;
symbol(overrides?: CallOverrides): Promise<string>;
totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
transfer(
to: string,
amount: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
};
filters: {
"Approval(address,address,uint256)"(
owner?: string | null,
spender?: string | null,
value?: null
): ApprovalEventFilter;
Approval(
owner?: string | null,
spender?: string | null,
value?: null
): ApprovalEventFilter;
"Transfer(address,address,uint256)"(
from?: string | null,
to?: string | null,
value?: null
): TransferEventFilter;
Transfer(
from?: string | null,
to?: string | null,
value?: null
): TransferEventFilter;
};
estimateGas: {
DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<BigNumber>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<BigNumber>;
approve(
spender: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
balanceOf(account: string, overrides?: CallOverrides): Promise<BigNumber>;
decimals(overrides?: CallOverrides): Promise<BigNumber>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
name(overrides?: CallOverrides): Promise<BigNumber>;
nonces(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
permit(
owner: string,
spender: string,
value: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
symbol(overrides?: CallOverrides): Promise<BigNumber>;
totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
transfer(
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
};
populateTransaction: {
DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<PopulatedTransaction>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
approve(
spender: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
balanceOf(
account: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
decimals(overrides?: CallOverrides): Promise<PopulatedTransaction>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
name(overrides?: CallOverrides): Promise<PopulatedTransaction>;
nonces(
owner: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
permit(
owner: string,
spender: string,
value: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
symbol(overrides?: CallOverrides): Promise<PopulatedTransaction>;
totalSupply(overrides?: CallOverrides): Promise<PopulatedTransaction>;
transfer(
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
};
}
@@ -1,998 +0,0 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";
import type {
FunctionFragment,
Result,
EventFragment,
} from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
BaseContract,
BigNumber,
BigNumberish,
BytesLike,
CallOverrides,
ContractTransaction,
Overrides,
PayableOverrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
export declare namespace ISignatureMintERC20 {
export type MintRequestStruct = {
to: string;
primarySaleRecipient: string;
quantity: BigNumberish;
pricePerToken: BigNumberish;
currency: string;
validityStartTimestamp: BigNumberish;
validityEndTimestamp: BigNumberish;
uid: BytesLike;
};
export type MintRequestStructOutput = [
string,
string,
BigNumber,
BigNumber,
string,
BigNumber,
BigNumber,
string
] & {
to: string;
primarySaleRecipient: string;
quantity: BigNumber;
pricePerToken: BigNumber;
currency: string;
validityStartTimestamp: BigNumber;
validityEndTimestamp: BigNumber;
uid: string;
};
}
export interface ERC20SignatureMintInterface extends utils.Interface {
functions: {
"DOMAIN_SEPARATOR()": FunctionFragment;
"allowance(address,address)": FunctionFragment;
"approve(address,uint256)": FunctionFragment;
"balanceOf(address)": FunctionFragment;
"burn(uint256)": FunctionFragment;
"contractURI()": FunctionFragment;
"decimals()": FunctionFragment;
"decreaseAllowance(address,uint256)": FunctionFragment;
"increaseAllowance(address,uint256)": FunctionFragment;
"mintTo(address,uint256)": FunctionFragment;
"mintWithSignature((address,address,uint256,uint256,address,uint128,uint128,bytes32),bytes)": FunctionFragment;
"multicall(bytes[])": FunctionFragment;
"name()": FunctionFragment;
"nonces(address)": FunctionFragment;
"owner()": FunctionFragment;
"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment;
"primarySaleRecipient()": FunctionFragment;
"setContractURI(string)": FunctionFragment;
"setOwner(address)": FunctionFragment;
"setPrimarySaleRecipient(address)": FunctionFragment;
"symbol()": FunctionFragment;
"totalSupply()": FunctionFragment;
"transfer(address,uint256)": FunctionFragment;
"transferFrom(address,address,uint256)": FunctionFragment;
"verify((address,address,uint256,uint256,address,uint128,uint128,bytes32),bytes)": FunctionFragment;
};
getFunction(
nameOrSignatureOrTopic:
| "DOMAIN_SEPARATOR"
| "allowance"
| "approve"
| "balanceOf"
| "burn"
| "contractURI"
| "decimals"
| "decreaseAllowance"
| "increaseAllowance"
| "mintTo"
| "mintWithSignature"
| "multicall"
| "name"
| "nonces"
| "owner"
| "permit"
| "primarySaleRecipient"
| "setContractURI"
| "setOwner"
| "setPrimarySaleRecipient"
| "symbol"
| "totalSupply"
| "transfer"
| "transferFrom"
| "verify"
): FunctionFragment;
encodeFunctionData(
functionFragment: "DOMAIN_SEPARATOR",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "allowance",
values: [string, string]
): string;
encodeFunctionData(
functionFragment: "approve",
values: [string, BigNumberish]
): string;
encodeFunctionData(functionFragment: "balanceOf", values: [string]): string;
encodeFunctionData(functionFragment: "burn", values: [BigNumberish]): string;
encodeFunctionData(
functionFragment: "contractURI",
values?: undefined
): string;
encodeFunctionData(functionFragment: "decimals", values?: undefined): string;
encodeFunctionData(
functionFragment: "decreaseAllowance",
values: [string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "increaseAllowance",
values: [string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "mintTo",
values: [string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "mintWithSignature",
values: [ISignatureMintERC20.MintRequestStruct, BytesLike]
): string;
encodeFunctionData(
functionFragment: "multicall",
values: [BytesLike[]]
): string;
encodeFunctionData(functionFragment: "name", values?: undefined): string;
encodeFunctionData(functionFragment: "nonces", values: [string]): string;
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
encodeFunctionData(
functionFragment: "permit",
values: [
string,
string,
BigNumberish,
BigNumberish,
BigNumberish,
BytesLike,
BytesLike
]
): string;
encodeFunctionData(
functionFragment: "primarySaleRecipient",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "setContractURI",
values: [string]
): string;
encodeFunctionData(functionFragment: "setOwner", values: [string]): string;
encodeFunctionData(
functionFragment: "setPrimarySaleRecipient",
values: [string]
): string;
encodeFunctionData(functionFragment: "symbol", values?: undefined): string;
encodeFunctionData(
functionFragment: "totalSupply",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "transfer",
values: [string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "transferFrom",
values: [string, string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "verify",
values: [ISignatureMintERC20.MintRequestStruct, BytesLike]
): string;
decodeFunctionResult(
functionFragment: "DOMAIN_SEPARATOR",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "contractURI",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "decreaseAllowance",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "increaseAllowance",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "mintTo", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "mintWithSignature",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "primarySaleRecipient",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "setContractURI",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "setOwner", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "setPrimarySaleRecipient",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "totalSupply",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "transferFrom",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "verify", data: BytesLike): Result;
events: {
"Approval(address,address,uint256)": EventFragment;
"ContractURIUpdated(string,string)": EventFragment;
"OwnerUpdated(address,address)": EventFragment;
"PrimarySaleRecipientUpdated(address)": EventFragment;
"TokensMintedWithSignature(address,address,tuple)": EventFragment;
"Transfer(address,address,uint256)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment;
getEvent(nameOrSignatureOrTopic: "ContractURIUpdated"): EventFragment;
getEvent(nameOrSignatureOrTopic: "OwnerUpdated"): EventFragment;
getEvent(
nameOrSignatureOrTopic: "PrimarySaleRecipientUpdated"
): EventFragment;
getEvent(nameOrSignatureOrTopic: "TokensMintedWithSignature"): EventFragment;
getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment;
}
export interface ApprovalEventObject {
owner: string;
spender: string;
value: BigNumber;
}
export type ApprovalEvent = TypedEvent<
[string, string, BigNumber],
ApprovalEventObject
>;
export type ApprovalEventFilter = TypedEventFilter<ApprovalEvent>;
export interface ContractURIUpdatedEventObject {
prevURI: string;
newURI: string;
}
export type ContractURIUpdatedEvent = TypedEvent<
[string, string],
ContractURIUpdatedEventObject
>;
export type ContractURIUpdatedEventFilter =
TypedEventFilter<ContractURIUpdatedEvent>;
export interface OwnerUpdatedEventObject {
prevOwner: string;
newOwner: string;
}
export type OwnerUpdatedEvent = TypedEvent<
[string, string],
OwnerUpdatedEventObject
>;
export type OwnerUpdatedEventFilter = TypedEventFilter<OwnerUpdatedEvent>;
export interface PrimarySaleRecipientUpdatedEventObject {
recipient: string;
}
export type PrimarySaleRecipientUpdatedEvent = TypedEvent<
[string],
PrimarySaleRecipientUpdatedEventObject
>;
export type PrimarySaleRecipientUpdatedEventFilter =
TypedEventFilter<PrimarySaleRecipientUpdatedEvent>;
export interface TokensMintedWithSignatureEventObject {
signer: string;
mintedTo: string;
mintRequest: ISignatureMintERC20.MintRequestStructOutput;
}
export type TokensMintedWithSignatureEvent = TypedEvent<
[string, string, ISignatureMintERC20.MintRequestStructOutput],
TokensMintedWithSignatureEventObject
>;
export type TokensMintedWithSignatureEventFilter =
TypedEventFilter<TokensMintedWithSignatureEvent>;
export interface TransferEventObject {
from: string;
to: string;
value: BigNumber;
}
export type TransferEvent = TypedEvent<
[string, string, BigNumber],
TransferEventObject
>;
export type TransferEventFilter = TypedEventFilter<TransferEvent>;
export interface ERC20SignatureMint extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
interface: ERC20SignatureMintInterface;
queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;
listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;
functions: {
DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<[BigNumber]>;
approve(
spender: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>;
burn(
_amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
contractURI(overrides?: CallOverrides): Promise<[string]>;
decimals(overrides?: CallOverrides): Promise<[number]>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
mintTo(
_to: string,
_amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
mintWithSignature(
_req: ISignatureMintERC20.MintRequestStruct,
_signature: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
multicall(
data: BytesLike[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
name(overrides?: CallOverrides): Promise<[string]>;
nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>;
owner(overrides?: CallOverrides): Promise<[string]>;
permit(
owner: string,
spender: string,
value: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
primarySaleRecipient(overrides?: CallOverrides): Promise<[string]>;
setContractURI(
_uri: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
setOwner(
_newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
setPrimarySaleRecipient(
_saleRecipient: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
symbol(overrides?: CallOverrides): Promise<[string]>;
totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>;
transfer(
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
verify(
_req: ISignatureMintERC20.MintRequestStruct,
_signature: BytesLike,
overrides?: CallOverrides
): Promise<[boolean, string] & { success: boolean; signer: string }>;
};
DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<string>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<BigNumber>;
approve(
spender: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
balanceOf(account: string, overrides?: CallOverrides): Promise<BigNumber>;
burn(
_amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
contractURI(overrides?: CallOverrides): Promise<string>;
decimals(overrides?: CallOverrides): Promise<number>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
mintTo(
_to: string,
_amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
mintWithSignature(
_req: ISignatureMintERC20.MintRequestStruct,
_signature: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
multicall(
data: BytesLike[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
name(overrides?: CallOverrides): Promise<string>;
nonces(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
owner(overrides?: CallOverrides): Promise<string>;
permit(
owner: string,
spender: string,
value: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
primarySaleRecipient(overrides?: CallOverrides): Promise<string>;
setContractURI(
_uri: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
setOwner(
_newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
setPrimarySaleRecipient(
_saleRecipient: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
symbol(overrides?: CallOverrides): Promise<string>;
totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
transfer(
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
verify(
_req: ISignatureMintERC20.MintRequestStruct,
_signature: BytesLike,
overrides?: CallOverrides
): Promise<[boolean, string] & { success: boolean; signer: string }>;
callStatic: {
DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<string>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<BigNumber>;
approve(
spender: string,
amount: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
balanceOf(account: string, overrides?: CallOverrides): Promise<BigNumber>;
burn(_amount: BigNumberish, overrides?: CallOverrides): Promise<void>;
contractURI(overrides?: CallOverrides): Promise<string>;
decimals(overrides?: CallOverrides): Promise<number>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
mintTo(
_to: string,
_amount: BigNumberish,
overrides?: CallOverrides
): Promise<void>;
mintWithSignature(
_req: ISignatureMintERC20.MintRequestStruct,
_signature: BytesLike,
overrides?: CallOverrides
): Promise<string>;
multicall(data: BytesLike[], overrides?: CallOverrides): Promise<string[]>;
name(overrides?: CallOverrides): Promise<string>;
nonces(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
owner(overrides?: CallOverrides): Promise<string>;
permit(
owner: string,
spender: string,
value: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: CallOverrides
): Promise<void>;
primarySaleRecipient(overrides?: CallOverrides): Promise<string>;
setContractURI(_uri: string, overrides?: CallOverrides): Promise<void>;
setOwner(_newOwner: string, overrides?: CallOverrides): Promise<void>;
setPrimarySaleRecipient(
_saleRecipient: string,
overrides?: CallOverrides
): Promise<void>;
symbol(overrides?: CallOverrides): Promise<string>;
totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
transfer(
to: string,
amount: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: CallOverrides
): Promise<boolean>;
verify(
_req: ISignatureMintERC20.MintRequestStruct,
_signature: BytesLike,
overrides?: CallOverrides
): Promise<[boolean, string] & { success: boolean; signer: string }>;
};
filters: {
"Approval(address,address,uint256)"(
owner?: string | null,
spender?: string | null,
value?: null
): ApprovalEventFilter;
Approval(
owner?: string | null,
spender?: string | null,
value?: null
): ApprovalEventFilter;
"ContractURIUpdated(string,string)"(
prevURI?: null,
newURI?: null
): ContractURIUpdatedEventFilter;
ContractURIUpdated(
prevURI?: null,
newURI?: null
): ContractURIUpdatedEventFilter;
"OwnerUpdated(address,address)"(
prevOwner?: string | null,
newOwner?: string | null
): OwnerUpdatedEventFilter;
OwnerUpdated(
prevOwner?: string | null,
newOwner?: string | null
): OwnerUpdatedEventFilter;
"PrimarySaleRecipientUpdated(address)"(
recipient?: string | null
): PrimarySaleRecipientUpdatedEventFilter;
PrimarySaleRecipientUpdated(
recipient?: string | null
): PrimarySaleRecipientUpdatedEventFilter;
"TokensMintedWithSignature(address,address,tuple)"(
signer?: string | null,
mintedTo?: string | null,
mintRequest?: null
): TokensMintedWithSignatureEventFilter;
TokensMintedWithSignature(
signer?: string | null,
mintedTo?: string | null,
mintRequest?: null
): TokensMintedWithSignatureEventFilter;
"Transfer(address,address,uint256)"(
from?: string | null,
to?: string | null,
value?: null
): TransferEventFilter;
Transfer(
from?: string | null,
to?: string | null,
value?: null
): TransferEventFilter;
};
estimateGas: {
DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<BigNumber>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<BigNumber>;
approve(
spender: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
balanceOf(account: string, overrides?: CallOverrides): Promise<BigNumber>;
burn(
_amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
contractURI(overrides?: CallOverrides): Promise<BigNumber>;
decimals(overrides?: CallOverrides): Promise<BigNumber>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
mintTo(
_to: string,
_amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
mintWithSignature(
_req: ISignatureMintERC20.MintRequestStruct,
_signature: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
multicall(
data: BytesLike[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
name(overrides?: CallOverrides): Promise<BigNumber>;
nonces(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
owner(overrides?: CallOverrides): Promise<BigNumber>;
permit(
owner: string,
spender: string,
value: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
primarySaleRecipient(overrides?: CallOverrides): Promise<BigNumber>;
setContractURI(
_uri: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
setOwner(
_newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
setPrimarySaleRecipient(
_saleRecipient: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
symbol(overrides?: CallOverrides): Promise<BigNumber>;
totalSupply(overrides?: CallOverrides): Promise<BigNumber>;
transfer(
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
verify(
_req: ISignatureMintERC20.MintRequestStruct,
_signature: BytesLike,
overrides?: CallOverrides
): Promise<BigNumber>;
};
populateTransaction: {
DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<PopulatedTransaction>;
allowance(
owner: string,
spender: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
approve(
spender: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
balanceOf(
account: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
burn(
_amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
contractURI(overrides?: CallOverrides): Promise<PopulatedTransaction>;
decimals(overrides?: CallOverrides): Promise<PopulatedTransaction>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
mintTo(
_to: string,
_amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
mintWithSignature(
_req: ISignatureMintERC20.MintRequestStruct,
_signature: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
multicall(
data: BytesLike[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
name(overrides?: CallOverrides): Promise<PopulatedTransaction>;
nonces(
owner: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
owner(overrides?: CallOverrides): Promise<PopulatedTransaction>;
permit(
owner: string,
spender: string,
value: BigNumberish,
deadline: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
primarySaleRecipient(
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
setContractURI(
_uri: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
setOwner(
_newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
setPrimarySaleRecipient(
_saleRecipient: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
symbol(overrides?: CallOverrides): Promise<PopulatedTransaction>;
totalSupply(overrides?: CallOverrides): Promise<PopulatedTransaction>;
transfer(
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
transferFrom(
from: string,
to: string,
amount: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
verify(
_req: ISignatureMintERC20.MintRequestStruct,
_signature: BytesLike,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
};
}

Some files were not shown because too many files have changed in this diff Show More