viem 2.42.1 → 2.43.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +76 -0
- package/_cjs/account-abstraction/accounts/implementations/toCoinbaseSmartAccount.js +2 -2
- package/_cjs/account-abstraction/accounts/implementations/toCoinbaseSmartAccount.js.map +1 -1
- package/_cjs/account-abstraction/accounts/implementations/toSimple7702SmartAccount.js +23 -6
- package/_cjs/account-abstraction/accounts/implementations/toSimple7702SmartAccount.js.map +1 -1
- package/_cjs/actions/public/verifyHash.js +5 -3
- package/_cjs/actions/public/verifyHash.js.map +1 -1
- package/_cjs/actions/wallet/prepareTransactionRequest.js +6 -1
- package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -1
- package/_cjs/chains/definitions/birdlayer.js.map +1 -1
- package/_cjs/chains/definitions/bob.js.map +1 -1
- package/_cjs/chains/definitions/bobSepolia.js.map +1 -1
- package/_cjs/chains/definitions/crab.js.map +1 -1
- package/_cjs/chains/definitions/creatorTestnet.js.map +1 -1
- package/_cjs/chains/definitions/datahavenTestnet.js +29 -0
- package/_cjs/chains/definitions/datahavenTestnet.js.map +1 -0
- package/_cjs/chains/definitions/dodochainTestnet.js.map +1 -1
- package/_cjs/chains/definitions/funkiSepolia.js.map +1 -1
- package/_cjs/chains/definitions/garnet.js.map +1 -1
- package/_cjs/chains/definitions/koi.js.map +1 -1
- package/_cjs/chains/definitions/omni.js.map +1 -1
- package/_cjs/chains/definitions/pyrope.js.map +1 -1
- package/_cjs/chains/definitions/redstone.js.map +1 -1
- package/_cjs/chains/definitions/skale/skaleBase.js +23 -0
- package/_cjs/chains/definitions/skale/skaleBase.js.map +1 -0
- package/_cjs/chains/definitions/skale/skaleBaseSepoliaTestnet.js +25 -0
- package/_cjs/chains/definitions/skale/skaleBaseSepoliaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/somnia.js +23 -0
- package/_cjs/chains/definitions/somnia.js.map +1 -0
- package/_cjs/chains/definitions/tempoDevnet.js +22 -0
- package/_cjs/chains/definitions/tempoDevnet.js.map +1 -0
- package/_cjs/chains/definitions/tempoLocalnet.js +19 -0
- package/_cjs/chains/definitions/tempoLocalnet.js.map +1 -0
- package/_cjs/chains/definitions/tempoTestnet.js +28 -0
- package/_cjs/chains/definitions/tempoTestnet.js.map +1 -0
- package/_cjs/chains/index.js +26 -12
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/errors/node.js +1 -1
- package/_cjs/errors/node.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/index.js +4 -3
- package/_cjs/index.js.map +1 -1
- package/_cjs/op-stack/index.js.map +1 -1
- package/_cjs/tempo/Abis.js +1707 -0
- package/_cjs/tempo/Abis.js.map +1 -0
- package/_cjs/tempo/Account.js +252 -0
- package/_cjs/tempo/Account.js.map +1 -0
- package/_cjs/tempo/Addresses.js +12 -0
- package/_cjs/tempo/Addresses.js.map +1 -0
- package/_cjs/tempo/Decorator.js +135 -0
- package/_cjs/tempo/Decorator.js.map +1 -0
- package/_cjs/tempo/Formatters.js +99 -0
- package/_cjs/tempo/Formatters.js.map +1 -0
- package/_cjs/tempo/P256.js +6 -0
- package/_cjs/tempo/P256.js.map +1 -0
- package/_cjs/tempo/Secp256k1.js +6 -0
- package/_cjs/tempo/Secp256k1.js.map +1 -0
- package/_cjs/tempo/TokenIds.js +5 -0
- package/_cjs/tempo/TokenIds.js.map +1 -0
- package/_cjs/tempo/Transaction.js +174 -0
- package/_cjs/tempo/Transaction.js.map +1 -0
- package/_cjs/tempo/Transport.js +118 -0
- package/_cjs/tempo/Transport.js.map +1 -0
- package/_cjs/tempo/WebAuthnP256.js +58 -0
- package/_cjs/tempo/WebAuthnP256.js.map +1 -0
- package/_cjs/tempo/WebCryptoP256.js +6 -0
- package/_cjs/tempo/WebCryptoP256.js.map +1 -0
- package/_cjs/tempo/actions/amm.js +358 -0
- package/_cjs/tempo/actions/amm.js.map +1 -0
- package/_cjs/tempo/actions/dex.js +521 -0
- package/_cjs/tempo/actions/dex.js.map +1 -0
- package/_cjs/tempo/actions/faucet.js +28 -0
- package/_cjs/tempo/actions/faucet.js.map +1 -0
- package/_cjs/tempo/actions/fee.js +108 -0
- package/_cjs/tempo/actions/fee.js.map +1 -0
- package/_cjs/tempo/actions/index.js +12 -0
- package/_cjs/tempo/actions/index.js.map +1 -0
- package/_cjs/tempo/actions/nonce.js +78 -0
- package/_cjs/tempo/actions/nonce.js.map +1 -0
- package/_cjs/tempo/actions/policy.js +346 -0
- package/_cjs/tempo/actions/policy.js.map +1 -0
- package/_cjs/tempo/actions/reward.js +214 -0
- package/_cjs/tempo/actions/reward.js.map +1 -0
- package/_cjs/tempo/actions/token.js +1176 -0
- package/_cjs/tempo/actions/token.js.map +1 -0
- package/_cjs/tempo/chainConfig.js +84 -0
- package/_cjs/tempo/chainConfig.js.map +1 -0
- package/_cjs/tempo/index.js +22 -0
- package/_cjs/tempo/index.js.map +1 -0
- package/_cjs/tempo/internal/nonceKeyStore.js +43 -0
- package/_cjs/tempo/internal/nonceKeyStore.js.map +1 -0
- package/_cjs/tempo/internal/types.js +3 -0
- package/_cjs/tempo/internal/types.js.map +1 -0
- package/_cjs/tempo/internal/utils.js +32 -0
- package/_cjs/tempo/internal/utils.js.map +1 -0
- package/_cjs/utils/abi/decodeAbiParameters.js.map +1 -1
- package/_cjs/utils/abi/decodeEventLog.js.map +1 -1
- package/_cjs/utils/abi/encodeAbiParameters.js.map +1 -1
- package/_cjs/utils/chain/defineChain.js +15 -1
- package/_cjs/utils/chain/defineChain.js.map +1 -1
- package/_cjs/utils/formatters/transaction.js +1 -2
- package/_cjs/utils/formatters/transaction.js.map +1 -1
- package/_esm/account-abstraction/accounts/implementations/toCoinbaseSmartAccount.js +2 -2
- package/_esm/account-abstraction/accounts/implementations/toCoinbaseSmartAccount.js.map +1 -1
- package/_esm/account-abstraction/accounts/implementations/toSimple7702SmartAccount.js +25 -8
- package/_esm/account-abstraction/accounts/implementations/toSimple7702SmartAccount.js.map +1 -1
- package/_esm/actions/public/verifyHash.js +5 -3
- package/_esm/actions/public/verifyHash.js.map +1 -1
- package/_esm/actions/wallet/prepareTransactionRequest.js +6 -1
- package/_esm/actions/wallet/prepareTransactionRequest.js.map +1 -1
- package/_esm/chains/definitions/birdlayer.js +1 -1
- package/_esm/chains/definitions/birdlayer.js.map +1 -1
- package/_esm/chains/definitions/bob.js +1 -1
- package/_esm/chains/definitions/bob.js.map +1 -1
- package/_esm/chains/definitions/bobSepolia.js +1 -1
- package/_esm/chains/definitions/bobSepolia.js.map +1 -1
- package/_esm/chains/definitions/crab.js +1 -1
- package/_esm/chains/definitions/crab.js.map +1 -1
- package/_esm/chains/definitions/creatorTestnet.js +1 -1
- package/_esm/chains/definitions/creatorTestnet.js.map +1 -1
- package/_esm/chains/definitions/datahavenTestnet.js +26 -0
- package/_esm/chains/definitions/datahavenTestnet.js.map +1 -0
- package/_esm/chains/definitions/dodochainTestnet.js +1 -1
- package/_esm/chains/definitions/dodochainTestnet.js.map +1 -1
- package/_esm/chains/definitions/funkiSepolia.js +1 -1
- package/_esm/chains/definitions/funkiSepolia.js.map +1 -1
- package/_esm/chains/definitions/garnet.js +1 -1
- package/_esm/chains/definitions/garnet.js.map +1 -1
- package/_esm/chains/definitions/koi.js +1 -1
- package/_esm/chains/definitions/koi.js.map +1 -1
- package/_esm/chains/definitions/omni.js +1 -1
- package/_esm/chains/definitions/omni.js.map +1 -1
- package/_esm/chains/definitions/pyrope.js +1 -1
- package/_esm/chains/definitions/pyrope.js.map +1 -1
- package/_esm/chains/definitions/redstone.js +1 -1
- package/_esm/chains/definitions/redstone.js.map +1 -1
- package/_esm/chains/definitions/skale/skaleBase.js +20 -0
- package/_esm/chains/definitions/skale/skaleBase.js.map +1 -0
- package/_esm/chains/definitions/skale/skaleBaseSepoliaTestnet.js +22 -0
- package/_esm/chains/definitions/skale/skaleBaseSepoliaTestnet.js.map +1 -0
- package/_esm/chains/definitions/somnia.js +20 -0
- package/_esm/chains/definitions/somnia.js.map +1 -0
- package/_esm/chains/definitions/tempoDevnet.js +19 -0
- package/_esm/chains/definitions/tempoDevnet.js.map +1 -0
- package/_esm/chains/definitions/tempoLocalnet.js +16 -0
- package/_esm/chains/definitions/tempoLocalnet.js.map +1 -0
- package/_esm/chains/definitions/tempoTestnet.js +25 -0
- package/_esm/chains/definitions/tempoTestnet.js.map +1 -0
- package/_esm/chains/index.js +7 -0
- package/_esm/chains/index.js.map +1 -1
- package/_esm/errors/node.js +1 -1
- package/_esm/errors/node.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/index.js +1 -1
- package/_esm/index.js.map +1 -1
- package/_esm/op-stack/index.js +0 -1
- package/_esm/op-stack/index.js.map +1 -1
- package/_esm/tempo/Abis.js +1705 -0
- package/_esm/tempo/Abis.js.map +1 -0
- package/_esm/tempo/Account.js +368 -0
- package/_esm/tempo/Account.js.map +1 -0
- package/_esm/tempo/Addresses.js +9 -0
- package/_esm/tempo/Addresses.js.map +1 -0
- package/_esm/tempo/Decorator.js +135 -0
- package/_esm/tempo/Decorator.js.map +1 -0
- package/_esm/tempo/Formatters.js +110 -0
- package/_esm/tempo/Formatters.js.map +1 -0
- package/_esm/tempo/P256.js +3 -0
- package/_esm/tempo/P256.js.map +1 -0
- package/_esm/tempo/Secp256k1.js +3 -0
- package/_esm/tempo/Secp256k1.js.map +1 -0
- package/_esm/tempo/TokenIds.js +2 -0
- package/_esm/tempo/TokenIds.js.map +1 -0
- package/_esm/tempo/Transaction.js +187 -0
- package/_esm/tempo/Transaction.js.map +1 -0
- package/_esm/tempo/Transport.js +139 -0
- package/_esm/tempo/Transport.js.map +1 -0
- package/_esm/tempo/WebAuthnP256.js +97 -0
- package/_esm/tempo/WebAuthnP256.js.map +1 -0
- package/_esm/tempo/WebCryptoP256.js +3 -0
- package/_esm/tempo/WebCryptoP256.js.map +1 -0
- package/_esm/tempo/actions/amm.js +818 -0
- package/_esm/tempo/actions/amm.js.map +1 -0
- package/_esm/tempo/actions/dex.js +1417 -0
- package/_esm/tempo/actions/dex.js.map +1 -0
- package/_esm/tempo/actions/faucet.js +73 -0
- package/_esm/tempo/actions/faucet.js.map +1 -0
- package/_esm/tempo/actions/fee.js +241 -0
- package/_esm/tempo/actions/fee.js.map +1 -0
- package/_esm/tempo/actions/index.js +10 -0
- package/_esm/tempo/actions/index.js.map +1 -0
- package/_esm/tempo/actions/nonce.js +229 -0
- package/_esm/tempo/actions/nonce.js.map +1 -0
- package/_esm/tempo/actions/policy.js +878 -0
- package/_esm/tempo/actions/policy.js.map +1 -0
- package/_esm/tempo/actions/reward.js +654 -0
- package/_esm/tempo/actions/reward.js.map +1 -0
- package/_esm/tempo/actions/token.js +2943 -0
- package/_esm/tempo/actions/token.js.map +1 -0
- package/_esm/tempo/chainConfig.js +91 -0
- package/_esm/tempo/chainConfig.js.map +1 -0
- package/_esm/tempo/index.js +17 -0
- package/_esm/tempo/index.js.map +1 -0
- package/_esm/tempo/internal/nonceKeyStore.js +41 -0
- package/_esm/tempo/internal/nonceKeyStore.js.map +1 -0
- package/_esm/tempo/internal/types.js +2 -0
- package/_esm/tempo/internal/types.js.map +1 -0
- package/_esm/tempo/internal/utils.js +34 -0
- package/_esm/tempo/internal/utils.js.map +1 -0
- package/_esm/utils/abi/decodeAbiParameters.js.map +1 -1
- package/_esm/utils/abi/decodeEventLog.js.map +1 -1
- package/_esm/utils/abi/encodeAbiParameters.js.map +1 -1
- package/_esm/utils/chain/defineChain.js +14 -1
- package/_esm/utils/chain/defineChain.js.map +1 -1
- package/_esm/utils/formatters/transaction.js +1 -2
- package/_esm/utils/formatters/transaction.js.map +1 -1
- package/_types/account-abstraction/accounts/implementations/toSimple7702SmartAccount.d.ts +20 -284
- package/_types/account-abstraction/accounts/implementations/toSimple7702SmartAccount.d.ts.map +1 -1
- package/_types/actions/getContract.d.ts +4 -4
- package/_types/actions/getContract.d.ts.map +1 -1
- package/_types/actions/public/simulateContract.d.ts +2 -2
- package/_types/actions/public/simulateContract.d.ts.map +1 -1
- package/_types/actions/public/verifyHash.d.ts +2 -0
- package/_types/actions/public/verifyHash.d.ts.map +1 -1
- package/_types/actions/wallet/prepareTransactionRequest.d.ts.map +1 -1
- package/_types/chains/definitions/0g.d.ts +2 -0
- package/_types/chains/definitions/0g.d.ts.map +1 -1
- package/_types/chains/definitions/0gGalileoTestnet.d.ts +2 -0
- package/_types/chains/definitions/0gGalileoTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/0gMainnet.d.ts +2 -0
- package/_types/chains/definitions/0gMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/0gTestnet.d.ts +2 -0
- package/_types/chains/definitions/0gTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/5ireChain.d.ts +2 -0
- package/_types/chains/definitions/5ireChain.d.ts.map +1 -1
- package/_types/chains/definitions/abey.d.ts +2 -0
- package/_types/chains/definitions/abey.d.ts.map +1 -1
- package/_types/chains/definitions/abstract.d.ts +2 -0
- package/_types/chains/definitions/abstract.d.ts.map +1 -1
- package/_types/chains/definitions/abstractTestnet.d.ts +2 -0
- package/_types/chains/definitions/abstractTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/acala.d.ts +2 -0
- package/_types/chains/definitions/acala.d.ts.map +1 -1
- package/_types/chains/definitions/acria.d.ts +2 -0
- package/_types/chains/definitions/acria.d.ts.map +1 -1
- package/_types/chains/definitions/adf.d.ts +2 -0
- package/_types/chains/definitions/adf.d.ts.map +1 -1
- package/_types/chains/definitions/agungTestnet.d.ts +2 -0
- package/_types/chains/definitions/agungTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/aioz.d.ts +2 -0
- package/_types/chains/definitions/aioz.d.ts.map +1 -1
- package/_types/chains/definitions/alephZero.d.ts +2 -0
- package/_types/chains/definitions/alephZero.d.ts.map +1 -1
- package/_types/chains/definitions/alephZeroTestnet.d.ts +2 -0
- package/_types/chains/definitions/alephZeroTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/alienX.d.ts +2 -0
- package/_types/chains/definitions/alienX.d.ts.map +1 -1
- package/_types/chains/definitions/alienXHalTestnet.d.ts +2 -0
- package/_types/chains/definitions/alienXHalTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/ancient8.d.ts +2 -0
- package/_types/chains/definitions/ancient8.d.ts.map +1 -1
- package/_types/chains/definitions/ancient8Sepolia.d.ts +2 -0
- package/_types/chains/definitions/ancient8Sepolia.d.ts.map +1 -1
- package/_types/chains/definitions/anvil.d.ts +2 -0
- package/_types/chains/definitions/anvil.d.ts.map +1 -1
- package/_types/chains/definitions/apeChain.d.ts +2 -0
- package/_types/chains/definitions/apeChain.d.ts.map +1 -1
- package/_types/chains/definitions/apexTestnet.d.ts +2 -0
- package/_types/chains/definitions/apexTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/arbitrum.d.ts +2 -0
- package/_types/chains/definitions/arbitrum.d.ts.map +1 -1
- package/_types/chains/definitions/arbitrumGoerli.d.ts +2 -0
- package/_types/chains/definitions/arbitrumGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/arbitrumNova.d.ts +2 -0
- package/_types/chains/definitions/arbitrumNova.d.ts.map +1 -1
- package/_types/chains/definitions/arbitrumSepolia.d.ts +2 -0
- package/_types/chains/definitions/arbitrumSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/arcTestnet.d.ts +2 -0
- package/_types/chains/definitions/arcTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/arenaz.d.ts +2 -0
- package/_types/chains/definitions/arenaz.d.ts.map +1 -1
- package/_types/chains/definitions/areonNetwork.d.ts +2 -0
- package/_types/chains/definitions/areonNetwork.d.ts.map +1 -1
- package/_types/chains/definitions/areonNetworkTestnet.d.ts +2 -0
- package/_types/chains/definitions/areonNetworkTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/areum.d.ts +2 -0
- package/_types/chains/definitions/areum.d.ts.map +1 -1
- package/_types/chains/definitions/artelaTestnet.d.ts +2 -0
- package/_types/chains/definitions/artelaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/arthera.d.ts +2 -0
- package/_types/chains/definitions/arthera.d.ts.map +1 -1
- package/_types/chains/definitions/artheraTestnet.d.ts +2 -0
- package/_types/chains/definitions/artheraTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/assetChain.d.ts +2 -0
- package/_types/chains/definitions/assetChain.d.ts.map +1 -1
- package/_types/chains/definitions/assetChainTestnet.d.ts +2 -0
- package/_types/chains/definitions/assetChainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/astar.d.ts +2 -0
- package/_types/chains/definitions/astar.d.ts.map +1 -1
- package/_types/chains/definitions/astarZkEVM.d.ts +2 -0
- package/_types/chains/definitions/astarZkEVM.d.ts.map +1 -1
- package/_types/chains/definitions/astarZkyoto.d.ts +2 -0
- package/_types/chains/definitions/astarZkyoto.d.ts.map +1 -1
- package/_types/chains/definitions/atletaOlympia.d.ts +2 -0
- package/_types/chains/definitions/atletaOlympia.d.ts.map +1 -1
- package/_types/chains/definitions/aurora.d.ts +2 -0
- package/_types/chains/definitions/aurora.d.ts.map +1 -1
- package/_types/chains/definitions/auroraTestnet.d.ts +2 -0
- package/_types/chains/definitions/auroraTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/auroria.d.ts +2 -0
- package/_types/chains/definitions/auroria.d.ts.map +1 -1
- package/_types/chains/definitions/autheoTestnet.d.ts +2 -0
- package/_types/chains/definitions/autheoTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/avalanche.d.ts +2 -0
- package/_types/chains/definitions/avalanche.d.ts.map +1 -1
- package/_types/chains/definitions/avalancheFuji.d.ts +2 -0
- package/_types/chains/definitions/avalancheFuji.d.ts.map +1 -1
- package/_types/chains/definitions/b3.d.ts +2 -0
- package/_types/chains/definitions/b3.d.ts.map +1 -1
- package/_types/chains/definitions/b3Sepolia.d.ts +2 -0
- package/_types/chains/definitions/b3Sepolia.d.ts.map +1 -1
- package/_types/chains/definitions/bahamut.d.ts +2 -0
- package/_types/chains/definitions/bahamut.d.ts.map +1 -1
- package/_types/chains/definitions/base.d.ts +4 -0
- package/_types/chains/definitions/base.d.ts.map +1 -1
- package/_types/chains/definitions/baseGoerli.d.ts +2 -0
- package/_types/chains/definitions/baseGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/baseSepolia.d.ts +4 -0
- package/_types/chains/definitions/baseSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/basecampTestnet.d.ts +2 -0
- package/_types/chains/definitions/basecampTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/beam.d.ts +2 -0
- package/_types/chains/definitions/beam.d.ts.map +1 -1
- package/_types/chains/definitions/beamTestnet.d.ts +2 -0
- package/_types/chains/definitions/beamTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/bearNetworkChainMainnet.d.ts +2 -0
- package/_types/chains/definitions/bearNetworkChainMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/bearNetworkChainTestnet.d.ts +2 -0
- package/_types/chains/definitions/bearNetworkChainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/berachain.d.ts +2 -0
- package/_types/chains/definitions/berachain.d.ts.map +1 -1
- package/_types/chains/definitions/berachainBepolia.d.ts +2 -0
- package/_types/chains/definitions/berachainBepolia.d.ts.map +1 -1
- package/_types/chains/definitions/berachainTestnet.d.ts +2 -0
- package/_types/chains/definitions/berachainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/berachainTestnetbArtio.d.ts +2 -0
- package/_types/chains/definitions/berachainTestnetbArtio.d.ts.map +1 -1
- package/_types/chains/definitions/bevmMainnet.d.ts +2 -0
- package/_types/chains/definitions/bevmMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/bifrost.d.ts +2 -0
- package/_types/chains/definitions/bifrost.d.ts.map +1 -1
- package/_types/chains/definitions/birdlayer.d.ts +2 -0
- package/_types/chains/definitions/birdlayer.d.ts.map +1 -1
- package/_types/chains/definitions/bitTorrent.d.ts +2 -0
- package/_types/chains/definitions/bitTorrent.d.ts.map +1 -1
- package/_types/chains/definitions/bitTorrentTestnet.d.ts +2 -0
- package/_types/chains/definitions/bitTorrentTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/bitgert.d.ts +2 -0
- package/_types/chains/definitions/bitgert.d.ts.map +1 -1
- package/_types/chains/definitions/bitkub.d.ts +2 -0
- package/_types/chains/definitions/bitkub.d.ts.map +1 -1
- package/_types/chains/definitions/bitkubTestnet.d.ts +2 -0
- package/_types/chains/definitions/bitkubTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/bitlayer.d.ts +2 -0
- package/_types/chains/definitions/bitlayer.d.ts.map +1 -1
- package/_types/chains/definitions/bitlayerTestnet.d.ts +2 -0
- package/_types/chains/definitions/bitlayerTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/bitrock.d.ts +2 -0
- package/_types/chains/definitions/bitrock.d.ts.map +1 -1
- package/_types/chains/definitions/blast.d.ts +2 -0
- package/_types/chains/definitions/blast.d.ts.map +1 -1
- package/_types/chains/definitions/blastSepolia.d.ts +2 -0
- package/_types/chains/definitions/blastSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/bob.d.ts +2 -0
- package/_types/chains/definitions/bob.d.ts.map +1 -1
- package/_types/chains/definitions/bobSepolia.d.ts +2 -0
- package/_types/chains/definitions/bobSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/boba.d.ts +2 -0
- package/_types/chains/definitions/boba.d.ts.map +1 -1
- package/_types/chains/definitions/bobaSepolia.d.ts +2 -0
- package/_types/chains/definitions/bobaSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/boolBetaMainnet.d.ts +2 -0
- package/_types/chains/definitions/boolBetaMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/botanix.d.ts +2 -0
- package/_types/chains/definitions/botanix.d.ts.map +1 -1
- package/_types/chains/definitions/botanixTestnet.d.ts +2 -0
- package/_types/chains/definitions/botanixTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/bounceBit.d.ts +2 -0
- package/_types/chains/definitions/bounceBit.d.ts.map +1 -1
- package/_types/chains/definitions/bounceBitTestnet.d.ts +2 -0
- package/_types/chains/definitions/bounceBitTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/bronos.d.ts +2 -0
- package/_types/chains/definitions/bronos.d.ts.map +1 -1
- package/_types/chains/definitions/bronosTestnet.d.ts +2 -0
- package/_types/chains/definitions/bronosTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/bsc.d.ts +2 -0
- package/_types/chains/definitions/bsc.d.ts.map +1 -1
- package/_types/chains/definitions/bscGreenfield.d.ts +2 -0
- package/_types/chains/definitions/bscGreenfield.d.ts.map +1 -1
- package/_types/chains/definitions/bscTestnet.d.ts +2 -0
- package/_types/chains/definitions/bscTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/bsquared.d.ts +2 -0
- package/_types/chains/definitions/bsquared.d.ts.map +1 -1
- package/_types/chains/definitions/bsquaredTestnet.d.ts +2 -0
- package/_types/chains/definitions/bsquaredTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/btr.d.ts +2 -0
- package/_types/chains/definitions/btr.d.ts.map +1 -1
- package/_types/chains/definitions/btrTestnet.d.ts +2 -0
- package/_types/chains/definitions/btrTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/bxn.d.ts +2 -0
- package/_types/chains/definitions/bxn.d.ts.map +1 -1
- package/_types/chains/definitions/bxnTestnet.d.ts +2 -0
- package/_types/chains/definitions/bxnTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/cannon.d.ts +2 -0
- package/_types/chains/definitions/cannon.d.ts.map +1 -1
- package/_types/chains/definitions/canto.d.ts +2 -0
- package/_types/chains/definitions/canto.d.ts.map +1 -1
- package/_types/chains/definitions/celo.d.ts +2 -0
- package/_types/chains/definitions/celo.d.ts.map +1 -1
- package/_types/chains/definitions/celoAlfajores.d.ts +2 -0
- package/_types/chains/definitions/celoAlfajores.d.ts.map +1 -1
- package/_types/chains/definitions/celoSepolia.d.ts +2 -0
- package/_types/chains/definitions/celoSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/chang.d.ts +2 -0
- package/_types/chains/definitions/chang.d.ts.map +1 -1
- package/_types/chains/definitions/chiliz.d.ts +2 -0
- package/_types/chains/definitions/chiliz.d.ts.map +1 -1
- package/_types/chains/definitions/chips.d.ts +2 -0
- package/_types/chains/definitions/chips.d.ts.map +1 -1
- package/_types/chains/definitions/citreaTestnet.d.ts +2 -0
- package/_types/chains/definitions/citreaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/classic.d.ts +2 -0
- package/_types/chains/definitions/classic.d.ts.map +1 -1
- package/_types/chains/definitions/coinbit.d.ts +2 -0
- package/_types/chains/definitions/coinbit.d.ts.map +1 -1
- package/_types/chains/definitions/coinex.d.ts +2 -0
- package/_types/chains/definitions/coinex.d.ts.map +1 -1
- package/_types/chains/definitions/confluxESpace.d.ts +2 -0
- package/_types/chains/definitions/confluxESpace.d.ts.map +1 -1
- package/_types/chains/definitions/confluxESpaceTestnet.d.ts +2 -0
- package/_types/chains/definitions/confluxESpaceTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/coreDao.d.ts +2 -0
- package/_types/chains/definitions/coreDao.d.ts.map +1 -1
- package/_types/chains/definitions/coreTestnet1.d.ts +2 -0
- package/_types/chains/definitions/coreTestnet1.d.ts.map +1 -1
- package/_types/chains/definitions/coreTestnet2.d.ts +2 -0
- package/_types/chains/definitions/coreTestnet2.d.ts.map +1 -1
- package/_types/chains/definitions/corn.d.ts +2 -0
- package/_types/chains/definitions/corn.d.ts.map +1 -1
- package/_types/chains/definitions/cornTestnet.d.ts +2 -0
- package/_types/chains/definitions/cornTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/crab.d.ts +2 -0
- package/_types/chains/definitions/crab.d.ts.map +1 -1
- package/_types/chains/definitions/creatorTestnet.d.ts +2 -0
- package/_types/chains/definitions/creatorTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/creditCoin3Devnet.d.ts +2 -0
- package/_types/chains/definitions/creditCoin3Devnet.d.ts.map +1 -1
- package/_types/chains/definitions/creditCoin3Mainnet.d.ts +2 -0
- package/_types/chains/definitions/creditCoin3Mainnet.d.ts.map +1 -1
- package/_types/chains/definitions/creditCoin3Testnet.d.ts +2 -0
- package/_types/chains/definitions/creditCoin3Testnet.d.ts.map +1 -1
- package/_types/chains/definitions/cronos.d.ts +2 -0
- package/_types/chains/definitions/cronos.d.ts.map +1 -1
- package/_types/chains/definitions/cronosTestnet.d.ts +2 -0
- package/_types/chains/definitions/cronosTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/cronoszkEVM.d.ts +2 -0
- package/_types/chains/definitions/cronoszkEVM.d.ts.map +1 -1
- package/_types/chains/definitions/cronoszkEVMTestnet.d.ts +2 -0
- package/_types/chains/definitions/cronoszkEVMTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/crossbell.d.ts +2 -0
- package/_types/chains/definitions/crossbell.d.ts.map +1 -1
- package/_types/chains/definitions/crossfi.d.ts +2 -0
- package/_types/chains/definitions/crossfi.d.ts.map +1 -1
- package/_types/chains/definitions/curtis.d.ts +2 -0
- package/_types/chains/definitions/curtis.d.ts.map +1 -1
- package/_types/chains/definitions/cyber.d.ts +2 -0
- package/_types/chains/definitions/cyber.d.ts.map +1 -1
- package/_types/chains/definitions/cyberTestnet.d.ts +2 -0
- package/_types/chains/definitions/cyberTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/dailyNetwork.d.ts +2 -0
- package/_types/chains/definitions/dailyNetwork.d.ts.map +1 -1
- package/_types/chains/definitions/dailyNetworkTestnet.d.ts +2 -0
- package/_types/chains/definitions/dailyNetworkTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/darwinia.d.ts +2 -0
- package/_types/chains/definitions/darwinia.d.ts.map +1 -1
- package/_types/chains/definitions/datahavenTestnet.d.ts +42 -0
- package/_types/chains/definitions/datahavenTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/dbkchain.d.ts +2 -0
- package/_types/chains/definitions/dbkchain.d.ts.map +1 -1
- package/_types/chains/definitions/dchain.d.ts +2 -0
- package/_types/chains/definitions/dchain.d.ts.map +1 -1
- package/_types/chains/definitions/dchainTestnet.d.ts +2 -0
- package/_types/chains/definitions/dchainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/defichainEvm.d.ts +2 -0
- package/_types/chains/definitions/defichainEvm.d.ts.map +1 -1
- package/_types/chains/definitions/defichainEvmTestnet.d.ts +2 -0
- package/_types/chains/definitions/defichainEvmTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/degen.d.ts +2 -0
- package/_types/chains/definitions/degen.d.ts.map +1 -1
- package/_types/chains/definitions/dfk.d.ts +2 -0
- package/_types/chains/definitions/dfk.d.ts.map +1 -1
- package/_types/chains/definitions/diode.d.ts +2 -0
- package/_types/chains/definitions/diode.d.ts.map +1 -1
- package/_types/chains/definitions/disChain.d.ts +2 -0
- package/_types/chains/definitions/disChain.d.ts.map +1 -1
- package/_types/chains/definitions/dodochainTestnet.d.ts +2 -0
- package/_types/chains/definitions/dodochainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/dogechain.d.ts +2 -0
- package/_types/chains/definitions/dogechain.d.ts.map +1 -1
- package/_types/chains/definitions/domaTestnet.d.ts +2 -0
- package/_types/chains/definitions/domaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/donatuz.d.ts +2 -0
- package/_types/chains/definitions/donatuz.d.ts.map +1 -1
- package/_types/chains/definitions/dosChain.d.ts +2 -0
- package/_types/chains/definitions/dosChain.d.ts.map +1 -1
- package/_types/chains/definitions/dosChainTestnet.d.ts +2 -0
- package/_types/chains/definitions/dosChainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/dreyerxMainnet.d.ts +2 -0
- package/_types/chains/definitions/dreyerxMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/dreyerxTestnet.d.ts +2 -0
- package/_types/chains/definitions/dreyerxTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/dustboyIoT.d.ts +2 -0
- package/_types/chains/definitions/dustboyIoT.d.ts.map +1 -1
- package/_types/chains/definitions/dymension.d.ts +2 -0
- package/_types/chains/definitions/dymension.d.ts.map +1 -1
- package/_types/chains/definitions/edexa.d.ts +2 -0
- package/_types/chains/definitions/edexa.d.ts.map +1 -1
- package/_types/chains/definitions/edexaTestnet.d.ts +2 -0
- package/_types/chains/definitions/edexaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/edgeless.d.ts +2 -0
- package/_types/chains/definitions/edgeless.d.ts.map +1 -1
- package/_types/chains/definitions/edgelessTestnet.d.ts +2 -0
- package/_types/chains/definitions/edgelessTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/edgeware.d.ts +2 -0
- package/_types/chains/definitions/edgeware.d.ts.map +1 -1
- package/_types/chains/definitions/edgewareTestnet.d.ts +2 -0
- package/_types/chains/definitions/edgewareTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/eduChain.d.ts +2 -0
- package/_types/chains/definitions/eduChain.d.ts.map +1 -1
- package/_types/chains/definitions/eduChainTestnet.d.ts +2 -0
- package/_types/chains/definitions/eduChainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/ekta.d.ts +2 -0
- package/_types/chains/definitions/ekta.d.ts.map +1 -1
- package/_types/chains/definitions/ektaTestnet.d.ts +2 -0
- package/_types/chains/definitions/ektaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/elastos.d.ts +2 -0
- package/_types/chains/definitions/elastos.d.ts.map +1 -1
- package/_types/chains/definitions/elastosTestnet.d.ts +2 -0
- package/_types/chains/definitions/elastosTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/electroneum.d.ts +2 -0
- package/_types/chains/definitions/electroneum.d.ts.map +1 -1
- package/_types/chains/definitions/electroneumTestnet.d.ts +2 -0
- package/_types/chains/definitions/electroneumTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/elysiumTestnet.d.ts +2 -0
- package/_types/chains/definitions/elysiumTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/energy.d.ts +2 -0
- package/_types/chains/definitions/energy.d.ts.map +1 -1
- package/_types/chains/definitions/eni.d.ts +2 -0
- package/_types/chains/definitions/eni.d.ts.map +1 -1
- package/_types/chains/definitions/eniTestnet.d.ts +2 -0
- package/_types/chains/definitions/eniTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/enuls.d.ts +2 -0
- package/_types/chains/definitions/enuls.d.ts.map +1 -1
- package/_types/chains/definitions/eon.d.ts +2 -0
- package/_types/chains/definitions/eon.d.ts.map +1 -1
- package/_types/chains/definitions/eos.d.ts +2 -0
- package/_types/chains/definitions/eos.d.ts.map +1 -1
- package/_types/chains/definitions/eosTestnet.d.ts +2 -0
- package/_types/chains/definitions/eosTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/eteria.d.ts +2 -0
- package/_types/chains/definitions/eteria.d.ts.map +1 -1
- package/_types/chains/definitions/etherlink.d.ts +2 -0
- package/_types/chains/definitions/etherlink.d.ts.map +1 -1
- package/_types/chains/definitions/etherlinkShadownetTestnet.d.ts +2 -0
- package/_types/chains/definitions/etherlinkShadownetTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/etherlinkTestnet.d.ts +2 -0
- package/_types/chains/definitions/etherlinkTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/ethernity.d.ts +2 -0
- package/_types/chains/definitions/ethernity.d.ts.map +1 -1
- package/_types/chains/definitions/etp.d.ts +2 -0
- package/_types/chains/definitions/etp.d.ts.map +1 -1
- package/_types/chains/definitions/evmos.d.ts +2 -0
- package/_types/chains/definitions/evmos.d.ts.map +1 -1
- package/_types/chains/definitions/evmosTestnet.d.ts +2 -0
- package/_types/chains/definitions/evmosTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/exSat.d.ts +2 -0
- package/_types/chains/definitions/exSat.d.ts.map +1 -1
- package/_types/chains/definitions/exSatTestnet.d.ts +2 -0
- package/_types/chains/definitions/exSatTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/excelonMainnet.d.ts +2 -0
- package/_types/chains/definitions/excelonMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/expanse.d.ts +2 -0
- package/_types/chains/definitions/expanse.d.ts.map +1 -1
- package/_types/chains/definitions/fantom.d.ts +2 -0
- package/_types/chains/definitions/fantom.d.ts.map +1 -1
- package/_types/chains/definitions/fantomSonicTestnet.d.ts +2 -0
- package/_types/chains/definitions/fantomSonicTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/fantomTestnet.d.ts +2 -0
- package/_types/chains/definitions/fantomTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/fibo.d.ts +2 -0
- package/_types/chains/definitions/fibo.d.ts.map +1 -1
- package/_types/chains/definitions/filecoin.d.ts +2 -0
- package/_types/chains/definitions/filecoin.d.ts.map +1 -1
- package/_types/chains/definitions/filecoinCalibration.d.ts +2 -0
- package/_types/chains/definitions/filecoinCalibration.d.ts.map +1 -1
- package/_types/chains/definitions/filecoinHyperspace.d.ts +2 -0
- package/_types/chains/definitions/filecoinHyperspace.d.ts.map +1 -1
- package/_types/chains/definitions/flame.d.ts +2 -0
- package/_types/chains/definitions/flame.d.ts.map +1 -1
- package/_types/chains/definitions/flare.d.ts +2 -0
- package/_types/chains/definitions/flare.d.ts.map +1 -1
- package/_types/chains/definitions/flareTestnet.d.ts +2 -0
- package/_types/chains/definitions/flareTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/flowMainnet.d.ts +2 -0
- package/_types/chains/definitions/flowMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/flowPreviewnet.d.ts +2 -0
- package/_types/chains/definitions/flowPreviewnet.d.ts.map +1 -1
- package/_types/chains/definitions/flowTestnet.d.ts +2 -0
- package/_types/chains/definitions/flowTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/fluence.d.ts +2 -0
- package/_types/chains/definitions/fluence.d.ts.map +1 -1
- package/_types/chains/definitions/fluenceStage.d.ts +2 -0
- package/_types/chains/definitions/fluenceStage.d.ts.map +1 -1
- package/_types/chains/definitions/fluenceTestnet.d.ts +2 -0
- package/_types/chains/definitions/fluenceTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/fluentTestnet.d.ts +2 -0
- package/_types/chains/definitions/fluentTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/form.d.ts +2 -0
- package/_types/chains/definitions/form.d.ts.map +1 -1
- package/_types/chains/definitions/formTestnet.d.ts +2 -0
- package/_types/chains/definitions/formTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/forma.d.ts +2 -0
- package/_types/chains/definitions/forma.d.ts.map +1 -1
- package/_types/chains/definitions/forta.d.ts +2 -0
- package/_types/chains/definitions/forta.d.ts.map +1 -1
- package/_types/chains/definitions/foundry.d.ts +2 -0
- package/_types/chains/definitions/foundry.d.ts.map +1 -1
- package/_types/chains/definitions/fraxtal.d.ts +2 -0
- package/_types/chains/definitions/fraxtal.d.ts.map +1 -1
- package/_types/chains/definitions/fraxtalTestnet.d.ts +2 -0
- package/_types/chains/definitions/fraxtalTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/funkiMainnet.d.ts +2 -0
- package/_types/chains/definitions/funkiMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/funkiSepolia.d.ts +2 -0
- package/_types/chains/definitions/funkiSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/fuse.d.ts +2 -0
- package/_types/chains/definitions/fuse.d.ts.map +1 -1
- package/_types/chains/definitions/fuseSparknet.d.ts +2 -0
- package/_types/chains/definitions/fuseSparknet.d.ts.map +1 -1
- package/_types/chains/definitions/fusion.d.ts +2 -0
- package/_types/chains/definitions/fusion.d.ts.map +1 -1
- package/_types/chains/definitions/fusionTestnet.d.ts +2 -0
- package/_types/chains/definitions/fusionTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/garnet.d.ts +2 -0
- package/_types/chains/definitions/garnet.d.ts.map +1 -1
- package/_types/chains/definitions/gatechain.d.ts +2 -0
- package/_types/chains/definitions/gatechain.d.ts.map +1 -1
- package/_types/chains/definitions/geist.d.ts +2 -0
- package/_types/chains/definitions/geist.d.ts.map +1 -1
- package/_types/chains/definitions/genesys.d.ts +2 -0
- package/_types/chains/definitions/genesys.d.ts.map +1 -1
- package/_types/chains/definitions/giwaSepolia.d.ts +4 -0
- package/_types/chains/definitions/giwaSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/glideL1Protocol.d.ts +2 -0
- package/_types/chains/definitions/glideL1Protocol.d.ts.map +1 -1
- package/_types/chains/definitions/glideL2Protocol.d.ts +2 -0
- package/_types/chains/definitions/glideL2Protocol.d.ts.map +1 -1
- package/_types/chains/definitions/gnosis.d.ts +2 -0
- package/_types/chains/definitions/gnosis.d.ts.map +1 -1
- package/_types/chains/definitions/gnosisChiado.d.ts +2 -0
- package/_types/chains/definitions/gnosisChiado.d.ts.map +1 -1
- package/_types/chains/definitions/goChain.d.ts +2 -0
- package/_types/chains/definitions/goChain.d.ts.map +1 -1
- package/_types/chains/definitions/goat.d.ts +2 -0
- package/_types/chains/definitions/goat.d.ts.map +1 -1
- package/_types/chains/definitions/gobi.d.ts +2 -0
- package/_types/chains/definitions/gobi.d.ts.map +1 -1
- package/_types/chains/definitions/godwoken.d.ts +2 -0
- package/_types/chains/definitions/godwoken.d.ts.map +1 -1
- package/_types/chains/definitions/goerli.d.ts +2 -0
- package/_types/chains/definitions/goerli.d.ts.map +1 -1
- package/_types/chains/definitions/graphite.d.ts +2 -0
- package/_types/chains/definitions/graphite.d.ts.map +1 -1
- package/_types/chains/definitions/graphiteTestnet.d.ts +2 -0
- package/_types/chains/definitions/graphiteTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/gravity.d.ts +2 -0
- package/_types/chains/definitions/gravity.d.ts.map +1 -1
- package/_types/chains/definitions/gunz.d.ts +2 -0
- package/_types/chains/definitions/gunz.d.ts.map +1 -1
- package/_types/chains/definitions/guruNetwork.d.ts +2 -0
- package/_types/chains/definitions/guruNetwork.d.ts.map +1 -1
- package/_types/chains/definitions/guruTestnet.d.ts +2 -0
- package/_types/chains/definitions/guruTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/ham.d.ts +2 -0
- package/_types/chains/definitions/ham.d.ts.map +1 -1
- package/_types/chains/definitions/happychainTestnet.d.ts +2 -0
- package/_types/chains/definitions/happychainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/haqqMainnet.d.ts +2 -0
- package/_types/chains/definitions/haqqMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/haqqTestedge2.d.ts +2 -0
- package/_types/chains/definitions/haqqTestedge2.d.ts.map +1 -1
- package/_types/chains/definitions/hardhat.d.ts +2 -0
- package/_types/chains/definitions/hardhat.d.ts.map +1 -1
- package/_types/chains/definitions/harmonyOne.d.ts +2 -0
- package/_types/chains/definitions/harmonyOne.d.ts.map +1 -1
- package/_types/chains/definitions/hashKeyChain.d.ts +2 -0
- package/_types/chains/definitions/hashKeyChain.d.ts.map +1 -1
- package/_types/chains/definitions/hashkeyChainTestnet.d.ts +2 -0
- package/_types/chains/definitions/hashkeyChainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/haustTestnet.d.ts +2 -0
- package/_types/chains/definitions/haustTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/hedera.d.ts +2 -0
- package/_types/chains/definitions/hedera.d.ts.map +1 -1
- package/_types/chains/definitions/hederaPreviewnet.d.ts +2 -0
- package/_types/chains/definitions/hederaPreviewnet.d.ts.map +1 -1
- package/_types/chains/definitions/hederaTestnet.d.ts +2 -0
- package/_types/chains/definitions/hederaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/hela.d.ts +2 -0
- package/_types/chains/definitions/hela.d.ts.map +1 -1
- package/_types/chains/definitions/heliosTestnet.d.ts +2 -0
- package/_types/chains/definitions/heliosTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/hemi.d.ts +2 -0
- package/_types/chains/definitions/hemi.d.ts.map +1 -1
- package/_types/chains/definitions/hemiSepolia.d.ts +2 -0
- package/_types/chains/definitions/hemiSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/henesys.d.ts +2 -0
- package/_types/chains/definitions/henesys.d.ts.map +1 -1
- package/_types/chains/definitions/holesky.d.ts +2 -0
- package/_types/chains/definitions/holesky.d.ts.map +1 -1
- package/_types/chains/definitions/hoodi.d.ts +2 -0
- package/_types/chains/definitions/hoodi.d.ts.map +1 -1
- package/_types/chains/definitions/hpb.d.ts +2 -0
- package/_types/chains/definitions/hpb.d.ts.map +1 -1
- package/_types/chains/definitions/huddle01Mainnet.d.ts +2 -0
- package/_types/chains/definitions/huddle01Mainnet.d.ts.map +1 -1
- package/_types/chains/definitions/huddle01Testnet.d.ts +2 -0
- package/_types/chains/definitions/huddle01Testnet.d.ts.map +1 -1
- package/_types/chains/definitions/humanity.d.ts +2 -0
- package/_types/chains/definitions/humanity.d.ts.map +1 -1
- package/_types/chains/definitions/humanityTestnet.d.ts +2 -0
- package/_types/chains/definitions/humanityTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/humanode.d.ts +2 -0
- package/_types/chains/definitions/humanode.d.ts.map +1 -1
- package/_types/chains/definitions/humanodeTestnet5.d.ts +2 -0
- package/_types/chains/definitions/humanodeTestnet5.d.ts.map +1 -1
- package/_types/chains/definitions/hychain.d.ts +2 -0
- package/_types/chains/definitions/hychain.d.ts.map +1 -1
- package/_types/chains/definitions/hychainTestnet.d.ts +2 -0
- package/_types/chains/definitions/hychainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/hyperEvm.d.ts +2 -0
- package/_types/chains/definitions/hyperEvm.d.ts.map +1 -1
- package/_types/chains/definitions/hyperliquidEvmTestnet.d.ts +2 -0
- package/_types/chains/definitions/hyperliquidEvmTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/iSunCoin.d.ts +2 -0
- package/_types/chains/definitions/iSunCoin.d.ts.map +1 -1
- package/_types/chains/definitions/icbNetwork.d.ts +2 -0
- package/_types/chains/definitions/icbNetwork.d.ts.map +1 -1
- package/_types/chains/definitions/idchain.d.ts +2 -0
- package/_types/chains/definitions/idchain.d.ts.map +1 -1
- package/_types/chains/definitions/immutableZkEvm.d.ts +2 -0
- package/_types/chains/definitions/immutableZkEvm.d.ts.map +1 -1
- package/_types/chains/definitions/immutableZkEvmTestnet.d.ts +2 -0
- package/_types/chains/definitions/immutableZkEvmTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/inEVM.d.ts +2 -0
- package/_types/chains/definitions/inEVM.d.ts.map +1 -1
- package/_types/chains/definitions/initVerse.d.ts +2 -0
- package/_types/chains/definitions/initVerse.d.ts.map +1 -1
- package/_types/chains/definitions/initVerseGenesis.d.ts +2 -0
- package/_types/chains/definitions/initVerseGenesis.d.ts.map +1 -1
- package/_types/chains/definitions/injective.d.ts +2 -0
- package/_types/chains/definitions/injective.d.ts.map +1 -1
- package/_types/chains/definitions/injectiveTestnet.d.ts +2 -0
- package/_types/chains/definitions/injectiveTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/ink.d.ts +2 -0
- package/_types/chains/definitions/ink.d.ts.map +1 -1
- package/_types/chains/definitions/inkSepolia.d.ts +2 -0
- package/_types/chains/definitions/inkSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/iota.d.ts +2 -0
- package/_types/chains/definitions/iota.d.ts.map +1 -1
- package/_types/chains/definitions/iotaTestnet.d.ts +2 -0
- package/_types/chains/definitions/iotaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/iotex.d.ts +2 -0
- package/_types/chains/definitions/iotex.d.ts.map +1 -1
- package/_types/chains/definitions/iotexTestnet.d.ts +2 -0
- package/_types/chains/definitions/iotexTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/jasmyChain.d.ts +2 -0
- package/_types/chains/definitions/jasmyChain.d.ts.map +1 -1
- package/_types/chains/definitions/jasmyChainTestnet.d.ts +2 -0
- package/_types/chains/definitions/jasmyChainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/jbc.d.ts +2 -0
- package/_types/chains/definitions/jbc.d.ts.map +1 -1
- package/_types/chains/definitions/jbcTestnet.d.ts +2 -0
- package/_types/chains/definitions/jbcTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/jocMainnet.d.ts +2 -0
- package/_types/chains/definitions/jocMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/jocTestnet.d.ts +2 -0
- package/_types/chains/definitions/jocTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/jovay.d.ts +2 -0
- package/_types/chains/definitions/jovay.d.ts.map +1 -1
- package/_types/chains/definitions/jovaySepolia.d.ts +2 -0
- package/_types/chains/definitions/jovaySepolia.d.ts.map +1 -1
- package/_types/chains/definitions/juneo.d.ts +2 -0
- package/_types/chains/definitions/juneo.d.ts.map +1 -1
- package/_types/chains/definitions/juneoBCH1Chain.d.ts +2 -0
- package/_types/chains/definitions/juneoBCH1Chain.d.ts.map +1 -1
- package/_types/chains/definitions/juneoDAI1Chain.d.ts +2 -0
- package/_types/chains/definitions/juneoDAI1Chain.d.ts.map +1 -1
- package/_types/chains/definitions/juneoDOGE1Chain.d.ts +2 -0
- package/_types/chains/definitions/juneoDOGE1Chain.d.ts.map +1 -1
- package/_types/chains/definitions/juneoEUR1Chain.d.ts +2 -0
- package/_types/chains/definitions/juneoEUR1Chain.d.ts.map +1 -1
- package/_types/chains/definitions/juneoGLD1Chain.d.ts +2 -0
- package/_types/chains/definitions/juneoGLD1Chain.d.ts.map +1 -1
- package/_types/chains/definitions/juneoLINK1Chain.d.ts +2 -0
- package/_types/chains/definitions/juneoLINK1Chain.d.ts.map +1 -1
- package/_types/chains/definitions/juneoLTC1Chain.d.ts +2 -0
- package/_types/chains/definitions/juneoLTC1Chain.d.ts.map +1 -1
- package/_types/chains/definitions/juneoSGD1Chain.d.ts +2 -0
- package/_types/chains/definitions/juneoSGD1Chain.d.ts.map +1 -1
- package/_types/chains/definitions/juneoSocotraTestnet.d.ts +2 -0
- package/_types/chains/definitions/juneoSocotraTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/juneoUSD1Chain.d.ts +2 -0
- package/_types/chains/definitions/juneoUSD1Chain.d.ts.map +1 -1
- package/_types/chains/definitions/juneoUSDT1Chain.d.ts +2 -0
- package/_types/chains/definitions/juneoUSDT1Chain.d.ts.map +1 -1
- package/_types/chains/definitions/juneomBTC1Chain.d.ts +2 -0
- package/_types/chains/definitions/juneomBTC1Chain.d.ts.map +1 -1
- package/_types/chains/definitions/kaia.d.ts +2 -0
- package/_types/chains/definitions/kaia.d.ts.map +1 -1
- package/_types/chains/definitions/kairos.d.ts +2 -0
- package/_types/chains/definitions/kairos.d.ts.map +1 -1
- package/_types/chains/definitions/kakarotSepolia.d.ts +2 -0
- package/_types/chains/definitions/kakarotSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/kakarotStarknetSepolia.d.ts +2 -0
- package/_types/chains/definitions/kakarotStarknetSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/kardiaChain.d.ts +2 -0
- package/_types/chains/definitions/kardiaChain.d.ts.map +1 -1
- package/_types/chains/definitions/karura.d.ts +2 -0
- package/_types/chains/definitions/karura.d.ts.map +1 -1
- package/_types/chains/definitions/katana.d.ts +2 -0
- package/_types/chains/definitions/katana.d.ts.map +1 -1
- package/_types/chains/definitions/kava.d.ts +2 -0
- package/_types/chains/definitions/kava.d.ts.map +1 -1
- package/_types/chains/definitions/kavaTestnet.d.ts +2 -0
- package/_types/chains/definitions/kavaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/kcc.d.ts +2 -0
- package/_types/chains/definitions/kcc.d.ts.map +1 -1
- package/_types/chains/definitions/kiiTestnet.d.ts +2 -0
- package/_types/chains/definitions/kiiTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/kinto.d.ts +2 -0
- package/_types/chains/definitions/kinto.d.ts.map +1 -1
- package/_types/chains/definitions/klaytn.d.ts +2 -0
- package/_types/chains/definitions/klaytn.d.ts.map +1 -1
- package/_types/chains/definitions/klaytnBaobab.d.ts +2 -0
- package/_types/chains/definitions/klaytnBaobab.d.ts.map +1 -1
- package/_types/chains/definitions/koi.d.ts +2 -0
- package/_types/chains/definitions/koi.d.ts.map +1 -1
- package/_types/chains/definitions/kroma.d.ts +2 -0
- package/_types/chains/definitions/kroma.d.ts.map +1 -1
- package/_types/chains/definitions/kromaSepolia.d.ts +2 -0
- package/_types/chains/definitions/kromaSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/l3x.d.ts +2 -0
- package/_types/chains/definitions/l3x.d.ts.map +1 -1
- package/_types/chains/definitions/l3xTestnet.d.ts +2 -0
- package/_types/chains/definitions/l3xTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/lavita.d.ts +2 -0
- package/_types/chains/definitions/lavita.d.ts.map +1 -1
- package/_types/chains/definitions/lens.d.ts +2 -0
- package/_types/chains/definitions/lens.d.ts.map +1 -1
- package/_types/chains/definitions/lensTestnet.d.ts +2 -0
- package/_types/chains/definitions/lensTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/lestnet.d.ts +2 -0
- package/_types/chains/definitions/lestnet.d.ts.map +1 -1
- package/_types/chains/definitions/lightlinkPegasus.d.ts +2 -0
- package/_types/chains/definitions/lightlinkPegasus.d.ts.map +1 -1
- package/_types/chains/definitions/lightlinkPhoenix.d.ts +2 -0
- package/_types/chains/definitions/lightlinkPhoenix.d.ts.map +1 -1
- package/_types/chains/definitions/linea.d.ts +2 -0
- package/_types/chains/definitions/linea.d.ts.map +1 -1
- package/_types/chains/definitions/lineaGoerli.d.ts +2 -0
- package/_types/chains/definitions/lineaGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/lineaSepolia.d.ts +2 -0
- package/_types/chains/definitions/lineaSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/lineaTestnet.d.ts +2 -0
- package/_types/chains/definitions/lineaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/lisk.d.ts +2 -0
- package/_types/chains/definitions/lisk.d.ts.map +1 -1
- package/_types/chains/definitions/liskSepolia.d.ts +2 -0
- package/_types/chains/definitions/liskSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/loadAlphanet.d.ts +2 -0
- package/_types/chains/definitions/loadAlphanet.d.ts.map +1 -1
- package/_types/chains/definitions/localhost.d.ts +2 -0
- package/_types/chains/definitions/localhost.d.ts.map +1 -1
- package/_types/chains/definitions/loop.d.ts +2 -0
- package/_types/chains/definitions/loop.d.ts.map +1 -1
- package/_types/chains/definitions/lukso.d.ts +2 -0
- package/_types/chains/definitions/lukso.d.ts.map +1 -1
- package/_types/chains/definitions/luksoTestnet.d.ts +2 -0
- package/_types/chains/definitions/luksoTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/lumiaMainnet.d.ts +2 -0
- package/_types/chains/definitions/lumiaMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/lumiaTestnet.d.ts +2 -0
- package/_types/chains/definitions/lumiaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/lumoz.d.ts +2 -0
- package/_types/chains/definitions/lumoz.d.ts.map +1 -1
- package/_types/chains/definitions/lumozTestnet.d.ts +2 -0
- package/_types/chains/definitions/lumozTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/lycan.d.ts +2 -0
- package/_types/chains/definitions/lycan.d.ts.map +1 -1
- package/_types/chains/definitions/lyra.d.ts +2 -0
- package/_types/chains/definitions/lyra.d.ts.map +1 -1
- package/_types/chains/definitions/mainnet.d.ts +2 -0
- package/_types/chains/definitions/mainnet.d.ts.map +1 -1
- package/_types/chains/definitions/mandala.d.ts +2 -0
- package/_types/chains/definitions/mandala.d.ts.map +1 -1
- package/_types/chains/definitions/manta.d.ts +2 -0
- package/_types/chains/definitions/manta.d.ts.map +1 -1
- package/_types/chains/definitions/mantaSepoliaTestnet.d.ts +2 -0
- package/_types/chains/definitions/mantaSepoliaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/mantaTestnet.d.ts +2 -0
- package/_types/chains/definitions/mantaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/mantle.d.ts +2 -0
- package/_types/chains/definitions/mantle.d.ts.map +1 -1
- package/_types/chains/definitions/mantleSepoliaTestnet.d.ts +2 -0
- package/_types/chains/definitions/mantleSepoliaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/mantleTestnet.d.ts +2 -0
- package/_types/chains/definitions/mantleTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/mantraDuKongEVMTestnet.d.ts +2 -0
- package/_types/chains/definitions/mantraDuKongEVMTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/mantraEVM.d.ts +2 -0
- package/_types/chains/definitions/mantraEVM.d.ts.map +1 -1
- package/_types/chains/definitions/mapProtocol.d.ts +2 -0
- package/_types/chains/definitions/mapProtocol.d.ts.map +1 -1
- package/_types/chains/definitions/matchain.d.ts +2 -0
- package/_types/chains/definitions/matchain.d.ts.map +1 -1
- package/_types/chains/definitions/matchainTestnet.d.ts +2 -0
- package/_types/chains/definitions/matchainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/mchVerse.d.ts +2 -0
- package/_types/chains/definitions/mchVerse.d.ts.map +1 -1
- package/_types/chains/definitions/megaethTestnet.d.ts +2 -0
- package/_types/chains/definitions/megaethTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/mekong.d.ts +2 -0
- package/_types/chains/definitions/mekong.d.ts.map +1 -1
- package/_types/chains/definitions/meld.d.ts +2 -0
- package/_types/chains/definitions/meld.d.ts.map +1 -1
- package/_types/chains/definitions/memecore.d.ts +2 -0
- package/_types/chains/definitions/memecore.d.ts.map +1 -1
- package/_types/chains/definitions/memecoreFormicariumTestnet.d.ts +2 -0
- package/_types/chains/definitions/memecoreFormicariumTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/merlin.d.ts +2 -0
- package/_types/chains/definitions/merlin.d.ts.map +1 -1
- package/_types/chains/definitions/merlinErigonTestnet.d.ts +2 -0
- package/_types/chains/definitions/merlinErigonTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/metachain.d.ts +2 -0
- package/_types/chains/definitions/metachain.d.ts.map +1 -1
- package/_types/chains/definitions/metachainIstanbul.d.ts +2 -0
- package/_types/chains/definitions/metachainIstanbul.d.ts.map +1 -1
- package/_types/chains/definitions/metadium.d.ts +2 -0
- package/_types/chains/definitions/metadium.d.ts.map +1 -1
- package/_types/chains/definitions/metalL2.d.ts +2 -0
- package/_types/chains/definitions/metalL2.d.ts.map +1 -1
- package/_types/chains/definitions/meter.d.ts +2 -0
- package/_types/chains/definitions/meter.d.ts.map +1 -1
- package/_types/chains/definitions/meterTestnet.d.ts +2 -0
- package/_types/chains/definitions/meterTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/metis.d.ts +2 -0
- package/_types/chains/definitions/metis.d.ts.map +1 -1
- package/_types/chains/definitions/metisGoerli.d.ts +2 -0
- package/_types/chains/definitions/metisGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/metisSepolia.d.ts +2 -0
- package/_types/chains/definitions/metisSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/mev.d.ts +2 -0
- package/_types/chains/definitions/mev.d.ts.map +1 -1
- package/_types/chains/definitions/mevTestnet.d.ts +2 -0
- package/_types/chains/definitions/mevTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/mint.d.ts +2 -0
- package/_types/chains/definitions/mint.d.ts.map +1 -1
- package/_types/chains/definitions/mintSepoliaTestnet.d.ts +2 -0
- package/_types/chains/definitions/mintSepoliaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/mitosisTestnet.d.ts +2 -0
- package/_types/chains/definitions/mitosisTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/mode.d.ts +2 -0
- package/_types/chains/definitions/mode.d.ts.map +1 -1
- package/_types/chains/definitions/modeTestnet.d.ts +2 -0
- package/_types/chains/definitions/modeTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/monad.d.ts +2 -0
- package/_types/chains/definitions/monad.d.ts.map +1 -1
- package/_types/chains/definitions/monadTestnet.d.ts +2 -0
- package/_types/chains/definitions/monadTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/moonbaseAlpha.d.ts +2 -0
- package/_types/chains/definitions/moonbaseAlpha.d.ts.map +1 -1
- package/_types/chains/definitions/moonbeam.d.ts +2 -0
- package/_types/chains/definitions/moonbeam.d.ts.map +1 -1
- package/_types/chains/definitions/moonbeamDev.d.ts +2 -0
- package/_types/chains/definitions/moonbeamDev.d.ts.map +1 -1
- package/_types/chains/definitions/moonriver.d.ts +2 -0
- package/_types/chains/definitions/moonriver.d.ts.map +1 -1
- package/_types/chains/definitions/morph.d.ts +2 -0
- package/_types/chains/definitions/morph.d.ts.map +1 -1
- package/_types/chains/definitions/morphHolesky.d.ts +2 -0
- package/_types/chains/definitions/morphHolesky.d.ts.map +1 -1
- package/_types/chains/definitions/morphSepolia.d.ts +2 -0
- package/_types/chains/definitions/morphSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/nahmii.d.ts +2 -0
- package/_types/chains/definitions/nahmii.d.ts.map +1 -1
- package/_types/chains/definitions/nautilus.d.ts +2 -0
- package/_types/chains/definitions/nautilus.d.ts.map +1 -1
- package/_types/chains/definitions/near.d.ts +2 -0
- package/_types/chains/definitions/near.d.ts.map +1 -1
- package/_types/chains/definitions/nearTestnet.d.ts +2 -0
- package/_types/chains/definitions/nearTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/neonDevnet.d.ts +2 -0
- package/_types/chains/definitions/neonDevnet.d.ts.map +1 -1
- package/_types/chains/definitions/neonMainnet.d.ts +2 -0
- package/_types/chains/definitions/neonMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/neoxMainnet.d.ts +2 -0
- package/_types/chains/definitions/neoxMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/neoxT4.d.ts +2 -0
- package/_types/chains/definitions/neoxT4.d.ts.map +1 -1
- package/_types/chains/definitions/newton.d.ts +2 -0
- package/_types/chains/definitions/newton.d.ts.map +1 -1
- package/_types/chains/definitions/nexi.d.ts +2 -0
- package/_types/chains/definitions/nexi.d.ts.map +1 -1
- package/_types/chains/definitions/nexilix.d.ts +2 -0
- package/_types/chains/definitions/nexilix.d.ts.map +1 -1
- package/_types/chains/definitions/nibiru.d.ts +2 -0
- package/_types/chains/definitions/nibiru.d.ts.map +1 -1
- package/_types/chains/definitions/nitrographTestnet.d.ts +2 -0
- package/_types/chains/definitions/nitrographTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/nomina.d.ts +2 -0
- package/_types/chains/definitions/nomina.d.ts.map +1 -1
- package/_types/chains/definitions/oasisTestnet.d.ts +2 -0
- package/_types/chains/definitions/oasisTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/oasys.d.ts +2 -0
- package/_types/chains/definitions/oasys.d.ts.map +1 -1
- package/_types/chains/definitions/odysseyTestnet.d.ts +2 -0
- package/_types/chains/definitions/odysseyTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/okc.d.ts +2 -0
- package/_types/chains/definitions/okc.d.ts.map +1 -1
- package/_types/chains/definitions/omax.d.ts +2 -0
- package/_types/chains/definitions/omax.d.ts.map +1 -1
- package/_types/chains/definitions/omni.d.ts +2 -0
- package/_types/chains/definitions/omni.d.ts.map +1 -1
- package/_types/chains/definitions/omniOmega.d.ts +2 -0
- package/_types/chains/definitions/omniOmega.d.ts.map +1 -1
- package/_types/chains/definitions/oneWorld.d.ts +2 -0
- package/_types/chains/definitions/oneWorld.d.ts.map +1 -1
- package/_types/chains/definitions/oortmainnetDev.d.ts +2 -0
- package/_types/chains/definitions/oortmainnetDev.d.ts.map +1 -1
- package/_types/chains/definitions/opBNB.d.ts +2 -0
- package/_types/chains/definitions/opBNB.d.ts.map +1 -1
- package/_types/chains/definitions/opBNBTestnet.d.ts +2 -0
- package/_types/chains/definitions/opBNBTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/openledger.d.ts +2 -0
- package/_types/chains/definitions/openledger.d.ts.map +1 -1
- package/_types/chains/definitions/optimism.d.ts +2 -0
- package/_types/chains/definitions/optimism.d.ts.map +1 -1
- package/_types/chains/definitions/optimismGoerli.d.ts +2 -0
- package/_types/chains/definitions/optimismGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/optimismSepolia.d.ts +2 -0
- package/_types/chains/definitions/optimismSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/optopia.d.ts +2 -0
- package/_types/chains/definitions/optopia.d.ts.map +1 -1
- package/_types/chains/definitions/optopiaTestnet.d.ts +2 -0
- package/_types/chains/definitions/optopiaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/orderly.d.ts +2 -0
- package/_types/chains/definitions/orderly.d.ts.map +1 -1
- package/_types/chains/definitions/orderlySepolia.d.ts +2 -0
- package/_types/chains/definitions/orderlySepolia.d.ts.map +1 -1
- package/_types/chains/definitions/otimDevnet.d.ts +2 -0
- package/_types/chains/definitions/otimDevnet.d.ts.map +1 -1
- package/_types/chains/definitions/palm.d.ts +2 -0
- package/_types/chains/definitions/palm.d.ts.map +1 -1
- package/_types/chains/definitions/palmTestnet.d.ts +2 -0
- package/_types/chains/definitions/palmTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/peaq.d.ts +2 -0
- package/_types/chains/definitions/peaq.d.ts.map +1 -1
- package/_types/chains/definitions/pgn.d.ts +2 -0
- package/_types/chains/definitions/pgn.d.ts.map +1 -1
- package/_types/chains/definitions/pgnTestnet.d.ts +2 -0
- package/_types/chains/definitions/pgnTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/phoenix.d.ts +2 -0
- package/_types/chains/definitions/phoenix.d.ts.map +1 -1
- package/_types/chains/definitions/planq.d.ts +2 -0
- package/_types/chains/definitions/planq.d.ts.map +1 -1
- package/_types/chains/definitions/plasma.d.ts +2 -0
- package/_types/chains/definitions/plasma.d.ts.map +1 -1
- package/_types/chains/definitions/plasmaDevnet.d.ts +2 -0
- package/_types/chains/definitions/plasmaDevnet.d.ts.map +1 -1
- package/_types/chains/definitions/plasmaTestnet.d.ts +2 -0
- package/_types/chains/definitions/plasmaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/playfiAlbireo.d.ts +2 -0
- package/_types/chains/definitions/playfiAlbireo.d.ts.map +1 -1
- package/_types/chains/definitions/plinga.d.ts +2 -0
- package/_types/chains/definitions/plinga.d.ts.map +1 -1
- package/_types/chains/definitions/plume.d.ts +2 -0
- package/_types/chains/definitions/plume.d.ts.map +1 -1
- package/_types/chains/definitions/plumeDevnet.d.ts +2 -0
- package/_types/chains/definitions/plumeDevnet.d.ts.map +1 -1
- package/_types/chains/definitions/plumeMainnet.d.ts +2 -0
- package/_types/chains/definitions/plumeMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/plumeSepolia.d.ts +2 -0
- package/_types/chains/definitions/plumeSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/plumeTestnet.d.ts +2 -0
- package/_types/chains/definitions/plumeTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/polterTestnet.d.ts +2 -0
- package/_types/chains/definitions/polterTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/polygon.d.ts +2 -0
- package/_types/chains/definitions/polygon.d.ts.map +1 -1
- package/_types/chains/definitions/polygonAmoy.d.ts +2 -0
- package/_types/chains/definitions/polygonAmoy.d.ts.map +1 -1
- package/_types/chains/definitions/polygonMumbai.d.ts +2 -0
- package/_types/chains/definitions/polygonMumbai.d.ts.map +1 -1
- package/_types/chains/definitions/polygonZkEvm.d.ts +2 -0
- package/_types/chains/definitions/polygonZkEvm.d.ts.map +1 -1
- package/_types/chains/definitions/polygonZkEvmCardona.d.ts +2 -0
- package/_types/chains/definitions/polygonZkEvmCardona.d.ts.map +1 -1
- package/_types/chains/definitions/polygonZkEvmTestnet.d.ts +2 -0
- package/_types/chains/definitions/polygonZkEvmTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/polynomial.d.ts +2 -0
- package/_types/chains/definitions/polynomial.d.ts.map +1 -1
- package/_types/chains/definitions/polynomialSepolia.d.ts +2 -0
- package/_types/chains/definitions/polynomialSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/potos.d.ts +2 -0
- package/_types/chains/definitions/potos.d.ts.map +1 -1
- package/_types/chains/definitions/potosTestnet.d.ts +2 -0
- package/_types/chains/definitions/potosTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/premiumBlock.d.ts +2 -0
- package/_types/chains/definitions/premiumBlock.d.ts.map +1 -1
- package/_types/chains/definitions/pulsechain.d.ts +2 -0
- package/_types/chains/definitions/pulsechain.d.ts.map +1 -1
- package/_types/chains/definitions/pulsechainV4.d.ts +2 -0
- package/_types/chains/definitions/pulsechainV4.d.ts.map +1 -1
- package/_types/chains/definitions/pumpfiTestnet.d.ts +2 -0
- package/_types/chains/definitions/pumpfiTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/pyrope.d.ts +2 -0
- package/_types/chains/definitions/pyrope.d.ts.map +1 -1
- package/_types/chains/definitions/qMainnet.d.ts +2 -0
- package/_types/chains/definitions/qMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/qTestnet.d.ts +2 -0
- package/_types/chains/definitions/qTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/ql1.d.ts +2 -0
- package/_types/chains/definitions/ql1.d.ts.map +1 -1
- package/_types/chains/definitions/quai.d.ts +2 -0
- package/_types/chains/definitions/quai.d.ts.map +1 -1
- package/_types/chains/definitions/quaiTestnet.d.ts +2 -0
- package/_types/chains/definitions/quaiTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/reactiveTestnet.d.ts +2 -0
- package/_types/chains/definitions/reactiveTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/real.d.ts +2 -0
- package/_types/chains/definitions/real.d.ts.map +1 -1
- package/_types/chains/definitions/redbellyMainnet.d.ts +2 -0
- package/_types/chains/definitions/redbellyMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/redbellyTestnet.d.ts +2 -0
- package/_types/chains/definitions/redbellyTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/reddio.d.ts +2 -0
- package/_types/chains/definitions/reddio.d.ts.map +1 -1
- package/_types/chains/definitions/reddioSepolia.d.ts +2 -0
- package/_types/chains/definitions/reddioSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/redstone.d.ts +2 -0
- package/_types/chains/definitions/redstone.d.ts.map +1 -1
- package/_types/chains/definitions/rei.d.ts +2 -0
- package/_types/chains/definitions/rei.d.ts.map +1 -1
- package/_types/chains/definitions/reyaNetwork.d.ts +2 -0
- package/_types/chains/definitions/reyaNetwork.d.ts.map +1 -1
- package/_types/chains/definitions/riseTestnet.d.ts +2 -0
- package/_types/chains/definitions/riseTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/rivalz.d.ts +2 -0
- package/_types/chains/definitions/rivalz.d.ts.map +1 -1
- package/_types/chains/definitions/rollux.d.ts +2 -0
- package/_types/chains/definitions/rollux.d.ts.map +1 -1
- package/_types/chains/definitions/rolluxTestnet.d.ts +2 -0
- package/_types/chains/definitions/rolluxTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/ronin.d.ts +2 -0
- package/_types/chains/definitions/ronin.d.ts.map +1 -1
- package/_types/chains/definitions/root.d.ts +2 -0
- package/_types/chains/definitions/root.d.ts.map +1 -1
- package/_types/chains/definitions/rootPorcini.d.ts +2 -0
- package/_types/chains/definitions/rootPorcini.d.ts.map +1 -1
- package/_types/chains/definitions/rootstock.d.ts +2 -0
- package/_types/chains/definitions/rootstock.d.ts.map +1 -1
- package/_types/chains/definitions/rootstockTestnet.d.ts +2 -0
- package/_types/chains/definitions/rootstockTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/rss3.d.ts +2 -0
- package/_types/chains/definitions/rss3.d.ts.map +1 -1
- package/_types/chains/definitions/rss3Sepolia.d.ts +2 -0
- package/_types/chains/definitions/rss3Sepolia.d.ts.map +1 -1
- package/_types/chains/definitions/saakuru.d.ts +2 -0
- package/_types/chains/definitions/saakuru.d.ts.map +1 -1
- package/_types/chains/definitions/saga.d.ts +2 -0
- package/_types/chains/definitions/saga.d.ts.map +1 -1
- package/_types/chains/definitions/saigon.d.ts +2 -0
- package/_types/chains/definitions/saigon.d.ts.map +1 -1
- package/_types/chains/definitions/sanko.d.ts +2 -0
- package/_types/chains/definitions/sanko.d.ts.map +1 -1
- package/_types/chains/definitions/sapphire.d.ts +2 -0
- package/_types/chains/definitions/sapphire.d.ts.map +1 -1
- package/_types/chains/definitions/sapphireTestnet.d.ts +2 -0
- package/_types/chains/definitions/sapphireTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/satoshivm.d.ts +2 -0
- package/_types/chains/definitions/satoshivm.d.ts.map +1 -1
- package/_types/chains/definitions/satoshivmTestnet.d.ts +2 -0
- package/_types/chains/definitions/satoshivmTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/scroll.d.ts +2 -0
- package/_types/chains/definitions/scroll.d.ts.map +1 -1
- package/_types/chains/definitions/scrollSepolia.d.ts +2 -0
- package/_types/chains/definitions/scrollSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/sei.d.ts +2 -0
- package/_types/chains/definitions/sei.d.ts.map +1 -1
- package/_types/chains/definitions/seiDevnet.d.ts +2 -0
- package/_types/chains/definitions/seiDevnet.d.ts.map +1 -1
- package/_types/chains/definitions/seiTestnet.d.ts +2 -0
- package/_types/chains/definitions/seiTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/seismicDevnet.d.ts +2 -0
- package/_types/chains/definitions/seismicDevnet.d.ts.map +1 -1
- package/_types/chains/definitions/sepolia.d.ts +2 -0
- package/_types/chains/definitions/sepolia.d.ts.map +1 -1
- package/_types/chains/definitions/shape.d.ts +2 -0
- package/_types/chains/definitions/shape.d.ts.map +1 -1
- package/_types/chains/definitions/shapeSepolia.d.ts +2 -0
- package/_types/chains/definitions/shapeSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/shardeum.d.ts +2 -0
- package/_types/chains/definitions/shardeum.d.ts.map +1 -1
- package/_types/chains/definitions/shardeumSphinx.d.ts +2 -0
- package/_types/chains/definitions/shardeumSphinx.d.ts.map +1 -1
- package/_types/chains/definitions/shibarium.d.ts +2 -0
- package/_types/chains/definitions/shibarium.d.ts.map +1 -1
- package/_types/chains/definitions/shibariumTestnet.d.ts +2 -0
- package/_types/chains/definitions/shibariumTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/shiden.d.ts +2 -0
- package/_types/chains/definitions/shiden.d.ts.map +1 -1
- package/_types/chains/definitions/shimmer.d.ts +2 -0
- package/_types/chains/definitions/shimmer.d.ts.map +1 -1
- package/_types/chains/definitions/shimmerTestnet.d.ts +2 -0
- package/_types/chains/definitions/shimmerTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/sidra.d.ts +2 -0
- package/_types/chains/definitions/sidra.d.ts.map +1 -1
- package/_types/chains/definitions/silentdata.d.ts +2 -0
- package/_types/chains/definitions/silentdata.d.ts.map +1 -1
- package/_types/chains/definitions/silicon.d.ts +2 -0
- package/_types/chains/definitions/silicon.d.ts.map +1 -1
- package/_types/chains/definitions/siliconSepolia.d.ts +2 -0
- package/_types/chains/definitions/siliconSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/sixProtocol.d.ts +2 -0
- package/_types/chains/definitions/sixProtocol.d.ts.map +1 -1
- package/_types/chains/definitions/skale/brawl.d.ts +2 -0
- package/_types/chains/definitions/skale/brawl.d.ts.map +1 -1
- package/_types/chains/definitions/skale/calypso.d.ts +2 -0
- package/_types/chains/definitions/skale/calypso.d.ts.map +1 -1
- package/_types/chains/definitions/skale/calypsoTestnet.d.ts +2 -0
- package/_types/chains/definitions/skale/calypsoTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/skale/cryptoBlades.d.ts +2 -0
- package/_types/chains/definitions/skale/cryptoBlades.d.ts.map +1 -1
- package/_types/chains/definitions/skale/cryptoColosseum.d.ts +2 -0
- package/_types/chains/definitions/skale/cryptoColosseum.d.ts.map +1 -1
- package/_types/chains/definitions/skale/europa.d.ts +2 -0
- package/_types/chains/definitions/skale/europa.d.ts.map +1 -1
- package/_types/chains/definitions/skale/europaTestnet.d.ts +2 -0
- package/_types/chains/definitions/skale/europaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/skale/exorde.d.ts +2 -0
- package/_types/chains/definitions/skale/exorde.d.ts.map +1 -1
- package/_types/chains/definitions/skale/humanProtocol.d.ts +2 -0
- package/_types/chains/definitions/skale/humanProtocol.d.ts.map +1 -1
- package/_types/chains/definitions/skale/nebula.d.ts +2 -0
- package/_types/chains/definitions/skale/nebula.d.ts.map +1 -1
- package/_types/chains/definitions/skale/nebulaTestnet.d.ts +2 -0
- package/_types/chains/definitions/skale/nebulaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/skale/razor.d.ts +2 -0
- package/_types/chains/definitions/skale/razor.d.ts.map +1 -1
- package/_types/chains/definitions/skale/skaleBase.d.ts +49 -0
- package/_types/chains/definitions/skale/skaleBase.d.ts.map +1 -0
- package/_types/chains/definitions/skale/skaleBaseSepoliaTestnet.d.ts +49 -0
- package/_types/chains/definitions/skale/skaleBaseSepoliaTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/skale/titan.d.ts +2 -0
- package/_types/chains/definitions/skale/titan.d.ts.map +1 -1
- package/_types/chains/definitions/skale/titanTestnet.d.ts +2 -0
- package/_types/chains/definitions/skale/titanTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/sketchpad.d.ts +2 -0
- package/_types/chains/definitions/sketchpad.d.ts.map +1 -1
- package/_types/chains/definitions/snax.d.ts +2 -0
- package/_types/chains/definitions/snax.d.ts.map +1 -1
- package/_types/chains/definitions/snaxTestnet.d.ts +2 -0
- package/_types/chains/definitions/snaxTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/somnia.d.ts +49 -0
- package/_types/chains/definitions/somnia.d.ts.map +1 -0
- package/_types/chains/definitions/somniaTestnet.d.ts +2 -0
- package/_types/chains/definitions/somniaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/soneium.d.ts +2 -0
- package/_types/chains/definitions/soneium.d.ts.map +1 -1
- package/_types/chains/definitions/soneiumMinato.d.ts +2 -0
- package/_types/chains/definitions/soneiumMinato.d.ts.map +1 -1
- package/_types/chains/definitions/songbird.d.ts +2 -0
- package/_types/chains/definitions/songbird.d.ts.map +1 -1
- package/_types/chains/definitions/songbirdTestnet.d.ts +2 -0
- package/_types/chains/definitions/songbirdTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/sonic.d.ts +2 -0
- package/_types/chains/definitions/sonic.d.ts.map +1 -1
- package/_types/chains/definitions/sonicBlazeTestnet.d.ts +2 -0
- package/_types/chains/definitions/sonicBlazeTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/sonicTestnet.d.ts +2 -0
- package/_types/chains/definitions/sonicTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/sophon.d.ts +2 -0
- package/_types/chains/definitions/sophon.d.ts.map +1 -1
- package/_types/chains/definitions/sophonTestnet.d.ts +2 -0
- package/_types/chains/definitions/sophonTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/sova.d.ts +2 -0
- package/_types/chains/definitions/sova.d.ts.map +1 -1
- package/_types/chains/definitions/sovaSepolia.d.ts +2 -0
- package/_types/chains/definitions/sovaSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/spicy.d.ts +2 -0
- package/_types/chains/definitions/spicy.d.ts.map +1 -1
- package/_types/chains/definitions/stableTestnet.d.ts +2 -0
- package/_types/chains/definitions/stableTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/statusNetworkSepolia.d.ts +2 -0
- package/_types/chains/definitions/statusNetworkSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/step.d.ts +2 -0
- package/_types/chains/definitions/step.d.ts.map +1 -1
- package/_types/chains/definitions/story.d.ts +2 -0
- package/_types/chains/definitions/story.d.ts.map +1 -1
- package/_types/chains/definitions/storyAeneid.d.ts +2 -0
- package/_types/chains/definitions/storyAeneid.d.ts.map +1 -1
- package/_types/chains/definitions/storyOdyssey.d.ts +2 -0
- package/_types/chains/definitions/storyOdyssey.d.ts.map +1 -1
- package/_types/chains/definitions/storyTestnet.d.ts +2 -0
- package/_types/chains/definitions/storyTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/stratis.d.ts +2 -0
- package/_types/chains/definitions/stratis.d.ts.map +1 -1
- package/_types/chains/definitions/superlumio.d.ts +2 -0
- package/_types/chains/definitions/superlumio.d.ts.map +1 -1
- package/_types/chains/definitions/superposition.d.ts +2 -0
- package/_types/chains/definitions/superposition.d.ts.map +1 -1
- package/_types/chains/definitions/superseed.d.ts +2 -0
- package/_types/chains/definitions/superseed.d.ts.map +1 -1
- package/_types/chains/definitions/superseedSepolia.d.ts +2 -0
- package/_types/chains/definitions/superseedSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/surgeTestnet.d.ts +2 -0
- package/_types/chains/definitions/surgeTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/swan.d.ts +2 -0
- package/_types/chains/definitions/swan.d.ts.map +1 -1
- package/_types/chains/definitions/swanProximaTestnet.d.ts +2 -0
- package/_types/chains/definitions/swanProximaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/swanSaturnTestnet.d.ts +2 -0
- package/_types/chains/definitions/swanSaturnTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/swellchain.d.ts +2 -0
- package/_types/chains/definitions/swellchain.d.ts.map +1 -1
- package/_types/chains/definitions/swellchainTestnet.d.ts +2 -0
- package/_types/chains/definitions/swellchainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/swissdlt.d.ts +2 -0
- package/_types/chains/definitions/swissdlt.d.ts.map +1 -1
- package/_types/chains/definitions/syscoin.d.ts +2 -0
- package/_types/chains/definitions/syscoin.d.ts.map +1 -1
- package/_types/chains/definitions/syscoinTestnet.d.ts +2 -0
- package/_types/chains/definitions/syscoinTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/tac.d.ts +2 -0
- package/_types/chains/definitions/tac.d.ts.map +1 -1
- package/_types/chains/definitions/tacSPB.d.ts +2 -0
- package/_types/chains/definitions/tacSPB.d.ts.map +1 -1
- package/_types/chains/definitions/taiko.d.ts +2 -0
- package/_types/chains/definitions/taiko.d.ts.map +1 -1
- package/_types/chains/definitions/taikoHekla.d.ts +2 -0
- package/_types/chains/definitions/taikoHekla.d.ts.map +1 -1
- package/_types/chains/definitions/taikoHoodi.d.ts +2 -0
- package/_types/chains/definitions/taikoHoodi.d.ts.map +1 -1
- package/_types/chains/definitions/taikoJolnir.d.ts +2 -0
- package/_types/chains/definitions/taikoJolnir.d.ts.map +1 -1
- package/_types/chains/definitions/taikoKatla.d.ts +2 -0
- package/_types/chains/definitions/taikoKatla.d.ts.map +1 -1
- package/_types/chains/definitions/taikoTestnetSepolia.d.ts +2 -0
- package/_types/chains/definitions/taikoTestnetSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/taraxa.d.ts +2 -0
- package/_types/chains/definitions/taraxa.d.ts.map +1 -1
- package/_types/chains/definitions/taraxaTestnet.d.ts +2 -0
- package/_types/chains/definitions/taraxaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/teaSepolia.d.ts +2 -0
- package/_types/chains/definitions/teaSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/telcoinTestnet.d.ts +2 -0
- package/_types/chains/definitions/telcoinTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/telos.d.ts +2 -0
- package/_types/chains/definitions/telos.d.ts.map +1 -1
- package/_types/chains/definitions/telosTestnet.d.ts +2 -0
- package/_types/chains/definitions/telosTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/tempoDevnet.d.ts +908 -0
- package/_types/chains/definitions/tempoDevnet.d.ts.map +1 -0
- package/_types/chains/definitions/tempoLocalnet.d.ts +906 -0
- package/_types/chains/definitions/tempoLocalnet.d.ts.map +1 -0
- package/_types/chains/definitions/tempoTestnet.d.ts +908 -0
- package/_types/chains/definitions/tempoTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/tenet.d.ts +2 -0
- package/_types/chains/definitions/tenet.d.ts.map +1 -1
- package/_types/chains/definitions/ternoa.d.ts +2 -0
- package/_types/chains/definitions/ternoa.d.ts.map +1 -1
- package/_types/chains/definitions/thaiChain.d.ts +2 -0
- package/_types/chains/definitions/thaiChain.d.ts.map +1 -1
- package/_types/chains/definitions/that.d.ts +2 -0
- package/_types/chains/definitions/that.d.ts.map +1 -1
- package/_types/chains/definitions/theta.d.ts +2 -0
- package/_types/chains/definitions/theta.d.ts.map +1 -1
- package/_types/chains/definitions/thetaTestnet.d.ts +2 -0
- package/_types/chains/definitions/thetaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/thunderCore.d.ts +2 -0
- package/_types/chains/definitions/thunderCore.d.ts.map +1 -1
- package/_types/chains/definitions/thunderTestnet.d.ts +2 -0
- package/_types/chains/definitions/thunderTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/tiktrixTestnet.d.ts +2 -0
- package/_types/chains/definitions/tiktrixTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/tomb.d.ts +2 -0
- package/_types/chains/definitions/tomb.d.ts.map +1 -1
- package/_types/chains/definitions/treasure.d.ts +2 -0
- package/_types/chains/definitions/treasure.d.ts.map +1 -1
- package/_types/chains/definitions/treasureTopaz.d.ts +2 -0
- package/_types/chains/definitions/treasureTopaz.d.ts.map +1 -1
- package/_types/chains/definitions/tron.d.ts +2 -0
- package/_types/chains/definitions/tron.d.ts.map +1 -1
- package/_types/chains/definitions/tronNile.d.ts +2 -0
- package/_types/chains/definitions/tronNile.d.ts.map +1 -1
- package/_types/chains/definitions/tronShasta.d.ts +2 -0
- package/_types/chains/definitions/tronShasta.d.ts.map +1 -1
- package/_types/chains/definitions/ubiq.d.ts +2 -0
- package/_types/chains/definitions/ubiq.d.ts.map +1 -1
- package/_types/chains/definitions/ultra.d.ts +2 -0
- package/_types/chains/definitions/ultra.d.ts.map +1 -1
- package/_types/chains/definitions/ultraTestnet.d.ts +2 -0
- package/_types/chains/definitions/ultraTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/ultron.d.ts +2 -0
- package/_types/chains/definitions/ultron.d.ts.map +1 -1
- package/_types/chains/definitions/ultronTestnet.d.ts +2 -0
- package/_types/chains/definitions/ultronTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/unichain.d.ts +2 -0
- package/_types/chains/definitions/unichain.d.ts.map +1 -1
- package/_types/chains/definitions/unichainSepolia.d.ts +2 -0
- package/_types/chains/definitions/unichainSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/unique.d.ts +2 -0
- package/_types/chains/definitions/unique.d.ts.map +1 -1
- package/_types/chains/definitions/uniqueOpal.d.ts +2 -0
- package/_types/chains/definitions/uniqueOpal.d.ts.map +1 -1
- package/_types/chains/definitions/uniqueQuartz.d.ts +2 -0
- package/_types/chains/definitions/uniqueQuartz.d.ts.map +1 -1
- package/_types/chains/definitions/unreal.d.ts +2 -0
- package/_types/chains/definitions/unreal.d.ts.map +1 -1
- package/_types/chains/definitions/vana.d.ts +2 -0
- package/_types/chains/definitions/vana.d.ts.map +1 -1
- package/_types/chains/definitions/vanaMoksha.d.ts +2 -0
- package/_types/chains/definitions/vanaMoksha.d.ts.map +1 -1
- package/_types/chains/definitions/vanar.d.ts +2 -0
- package/_types/chains/definitions/vanar.d.ts.map +1 -1
- package/_types/chains/definitions/vechain.d.ts +2 -0
- package/_types/chains/definitions/vechain.d.ts.map +1 -1
- package/_types/chains/definitions/velas.d.ts +2 -0
- package/_types/chains/definitions/velas.d.ts.map +1 -1
- package/_types/chains/definitions/viction.d.ts +2 -0
- package/_types/chains/definitions/viction.d.ts.map +1 -1
- package/_types/chains/definitions/victionTestnet.d.ts +2 -0
- package/_types/chains/definitions/victionTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/vision.d.ts +2 -0
- package/_types/chains/definitions/vision.d.ts.map +1 -1
- package/_types/chains/definitions/visionTestnet.d.ts +2 -0
- package/_types/chains/definitions/visionTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/wanchain.d.ts +2 -0
- package/_types/chains/definitions/wanchain.d.ts.map +1 -1
- package/_types/chains/definitions/wanchainTestnet.d.ts +2 -0
- package/_types/chains/definitions/wanchainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/weavevmAlphanet.d.ts +2 -0
- package/_types/chains/definitions/weavevmAlphanet.d.ts.map +1 -1
- package/_types/chains/definitions/wemix.d.ts +2 -0
- package/_types/chains/definitions/wemix.d.ts.map +1 -1
- package/_types/chains/definitions/wemixTestnet.d.ts +2 -0
- package/_types/chains/definitions/wemixTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/westendAssetHub.d.ts +2 -0
- package/_types/chains/definitions/westendAssetHub.d.ts.map +1 -1
- package/_types/chains/definitions/whitechain.d.ts +2 -0
- package/_types/chains/definitions/whitechain.d.ts.map +1 -1
- package/_types/chains/definitions/whitechainTestnet.d.ts +2 -0
- package/_types/chains/definitions/whitechainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/wmcTestnet.d.ts +2 -0
- package/_types/chains/definitions/wmcTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/worldLand.d.ts +2 -0
- package/_types/chains/definitions/worldLand.d.ts.map +1 -1
- package/_types/chains/definitions/worldchain.d.ts +2 -0
- package/_types/chains/definitions/worldchain.d.ts.map +1 -1
- package/_types/chains/definitions/worldchainSepolia.d.ts +2 -0
- package/_types/chains/definitions/worldchainSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/xLayer.d.ts +2 -0
- package/_types/chains/definitions/xLayer.d.ts.map +1 -1
- package/_types/chains/definitions/xLayerTestnet.d.ts +2 -0
- package/_types/chains/definitions/xLayerTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/xai.d.ts +2 -0
- package/_types/chains/definitions/xai.d.ts.map +1 -1
- package/_types/chains/definitions/xaiTestnet.d.ts +2 -0
- package/_types/chains/definitions/xaiTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/xdc.d.ts +2 -0
- package/_types/chains/definitions/xdc.d.ts.map +1 -1
- package/_types/chains/definitions/xdcTestnet.d.ts +2 -0
- package/_types/chains/definitions/xdcTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/xoneMainnet.d.ts +2 -0
- package/_types/chains/definitions/xoneMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/xoneTestnet.d.ts +2 -0
- package/_types/chains/definitions/xoneTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/xphereMainnet.d.ts +2 -0
- package/_types/chains/definitions/xphereMainnet.d.ts.map +1 -1
- package/_types/chains/definitions/xphereTestnet.d.ts +2 -0
- package/_types/chains/definitions/xphereTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/xrOne.d.ts +2 -0
- package/_types/chains/definitions/xrOne.d.ts.map +1 -1
- package/_types/chains/definitions/xrSepolia.d.ts +2 -0
- package/_types/chains/definitions/xrSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/xrplevm.d.ts +2 -0
- package/_types/chains/definitions/xrplevm.d.ts.map +1 -1
- package/_types/chains/definitions/xrplevmDevnet.d.ts +2 -0
- package/_types/chains/definitions/xrplevmDevnet.d.ts.map +1 -1
- package/_types/chains/definitions/xrplevmTestnet.d.ts +2 -0
- package/_types/chains/definitions/xrplevmTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/yooldoVerse.d.ts +2 -0
- package/_types/chains/definitions/yooldoVerse.d.ts.map +1 -1
- package/_types/chains/definitions/yooldoVerseTestnet.d.ts +2 -0
- package/_types/chains/definitions/yooldoVerseTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/zenchainTestnet.d.ts +2 -0
- package/_types/chains/definitions/zenchainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/zeniq.d.ts +2 -0
- package/_types/chains/definitions/zeniq.d.ts.map +1 -1
- package/_types/chains/definitions/zeroNetwork.d.ts +2 -0
- package/_types/chains/definitions/zeroNetwork.d.ts.map +1 -1
- package/_types/chains/definitions/zetachain.d.ts +2 -0
- package/_types/chains/definitions/zetachain.d.ts.map +1 -1
- package/_types/chains/definitions/zetachainAthensTestnet.d.ts +2 -0
- package/_types/chains/definitions/zetachainAthensTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/zhejiang.d.ts +2 -0
- package/_types/chains/definitions/zhejiang.d.ts.map +1 -1
- package/_types/chains/definitions/zilliqa.d.ts +2 -0
- package/_types/chains/definitions/zilliqa.d.ts.map +1 -1
- package/_types/chains/definitions/zilliqaTestnet.d.ts +2 -0
- package/_types/chains/definitions/zilliqaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/zircuit.d.ts +2 -0
- package/_types/chains/definitions/zircuit.d.ts.map +1 -1
- package/_types/chains/definitions/zircuitGarfieldTestnet.d.ts +2 -0
- package/_types/chains/definitions/zircuitGarfieldTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/zircuitTestnet.d.ts +2 -0
- package/_types/chains/definitions/zircuitTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/zkFair.d.ts +2 -0
- package/_types/chains/definitions/zkFair.d.ts.map +1 -1
- package/_types/chains/definitions/zkFairTestnet.d.ts +2 -0
- package/_types/chains/definitions/zkFairTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/zkLinkNova.d.ts +2 -0
- package/_types/chains/definitions/zkLinkNova.d.ts.map +1 -1
- package/_types/chains/definitions/zkLinkNovaSepoliaTestnet.d.ts +2 -0
- package/_types/chains/definitions/zkLinkNovaSepoliaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/zksync.d.ts +2 -0
- package/_types/chains/definitions/zksync.d.ts.map +1 -1
- package/_types/chains/definitions/zksyncInMemoryNode.d.ts +2 -0
- package/_types/chains/definitions/zksyncInMemoryNode.d.ts.map +1 -1
- package/_types/chains/definitions/zksyncLocalCustomHyperchain.d.ts +2 -0
- package/_types/chains/definitions/zksyncLocalCustomHyperchain.d.ts.map +1 -1
- package/_types/chains/definitions/zksyncLocalHyperchain.d.ts +2 -0
- package/_types/chains/definitions/zksyncLocalHyperchain.d.ts.map +1 -1
- package/_types/chains/definitions/zksyncLocalHyperchainL1.d.ts +2 -0
- package/_types/chains/definitions/zksyncLocalHyperchainL1.d.ts.map +1 -1
- package/_types/chains/definitions/zksyncLocalNode.d.ts +2 -0
- package/_types/chains/definitions/zksyncLocalNode.d.ts.map +1 -1
- package/_types/chains/definitions/zksyncSepoliaTestnet.d.ts +2 -0
- package/_types/chains/definitions/zksyncSepoliaTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/zora.d.ts +2 -0
- package/_types/chains/definitions/zora.d.ts.map +1 -1
- package/_types/chains/definitions/zoraSepolia.d.ts +2 -0
- package/_types/chains/definitions/zoraSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/zoraTestnet.d.ts +2 -0
- package/_types/chains/definitions/zoraTestnet.d.ts.map +1 -1
- package/_types/chains/index.d.ts +7 -0
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/errors/node.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/index.d.ts +1 -1
- package/_types/index.d.ts.map +1 -1
- package/_types/op-stack/index.d.ts.map +1 -1
- package/_types/tempo/Abis.d.ts +2698 -0
- package/_types/tempo/Abis.d.ts.map +1 -0
- package/_types/tempo/Account.d.ts +236 -0
- package/_types/tempo/Account.d.ts.map +1 -0
- package/_types/tempo/Addresses.d.ts +9 -0
- package/_types/tempo/Addresses.d.ts.map +1 -0
- package/_types/tempo/Decorator.d.ts +2758 -0
- package/_types/tempo/Decorator.d.ts.map +1 -0
- package/_types/tempo/Formatters.d.ts +5 -0
- package/_types/tempo/Formatters.d.ts.map +1 -0
- package/_types/tempo/P256.d.ts +2 -0
- package/_types/tempo/P256.d.ts.map +1 -0
- package/_types/tempo/Secp256k1.d.ts +2 -0
- package/_types/tempo/Secp256k1.d.ts.map +1 -0
- package/_types/tempo/TokenIds.d.ts +2 -0
- package/_types/tempo/TokenIds.d.ts.map +1 -0
- package/_types/tempo/Transaction.d.ts +82 -0
- package/_types/tempo/Transaction.d.ts.map +1 -0
- package/_types/tempo/Transport.d.ts +39 -0
- package/_types/tempo/Transport.d.ts.map +1 -0
- package/_types/tempo/WebAuthnP256.d.ts +82 -0
- package/_types/tempo/WebAuthnP256.d.ts.map +1 -0
- package/_types/tempo/WebCryptoP256.d.ts +2 -0
- package/_types/tempo/WebCryptoP256.d.ts.map +1 -0
- package/_types/tempo/actions/amm.d.ts +1998 -0
- package/_types/tempo/actions/amm.d.ts.map +1 -0
- package/_types/tempo/actions/dex.d.ts +3898 -0
- package/_types/tempo/actions/dex.d.ts.map +1 -0
- package/_types/tempo/actions/faucet.d.ts +75 -0
- package/_types/tempo/actions/faucet.d.ts.map +1 -0
- package/_types/tempo/actions/fee.d.ts +369 -0
- package/_types/tempo/actions/fee.d.ts.map +1 -0
- package/_types/tempo/actions/index.d.ts +9 -0
- package/_types/tempo/actions/index.d.ts.map +1 -0
- package/_types/tempo/actions/nonce.d.ts +263 -0
- package/_types/tempo/actions/nonce.d.ts.map +1 -0
- package/_types/tempo/actions/policy.d.ts +1670 -0
- package/_types/tempo/actions/policy.d.ts.map +1 -0
- package/_types/tempo/actions/reward.d.ts +2440 -0
- package/_types/tempo/actions/reward.d.ts.map +1 -0
- package/_types/tempo/actions/token.d.ts +16067 -0
- package/_types/tempo/actions/token.d.ts.map +1 -0
- package/_types/tempo/chainConfig.d.ts +432 -0
- package/_types/tempo/chainConfig.d.ts.map +1 -0
- package/_types/tempo/index.d.ts +52 -0
- package/_types/tempo/index.d.ts.map +1 -0
- package/_types/tempo/internal/nonceKeyStore.d.ts +26 -0
- package/_types/tempo/internal/nonceKeyStore.d.ts.map +1 -0
- package/_types/tempo/internal/types.d.ts +13 -0
- package/_types/tempo/internal/types.d.ts.map +1 -0
- package/_types/tempo/internal/utils.d.ts +17 -0
- package/_types/tempo/internal/utils.d.ts.map +1 -0
- package/_types/types/chain.d.ts +11 -5
- package/_types/types/chain.d.ts.map +1 -1
- package/_types/types/contract.d.ts +12 -11
- package/_types/types/contract.d.ts.map +1 -1
- package/_types/types/utils.d.ts +1 -0
- package/_types/types/utils.d.ts.map +1 -1
- package/_types/utils/abi/decodeAbiParameters.d.ts +2 -2
- package/_types/utils/abi/decodeAbiParameters.d.ts.map +1 -1
- package/_types/utils/abi/decodeEventLog.d.ts.map +1 -1
- package/_types/utils/abi/encodeAbiParameters.d.ts +2 -2
- package/_types/utils/abi/encodeAbiParameters.d.ts.map +1 -1
- package/_types/utils/chain/defineChain.d.ts +5 -1
- package/_types/utils/chain/defineChain.d.ts.map +1 -1
- package/_types/utils/formatters/transaction.d.ts.map +1 -1
- package/account-abstraction/accounts/implementations/toCoinbaseSmartAccount.ts +2 -2
- package/account-abstraction/accounts/implementations/toSimple7702SmartAccount.ts +72 -26
- package/actions/getContract.ts +4 -4
- package/actions/public/simulateContract.ts +4 -4
- package/actions/public/verifyHash.ts +9 -4
- package/actions/wallet/prepareTransactionRequest.ts +12 -7
- package/chains/definitions/birdlayer.ts +1 -1
- package/chains/definitions/bob.ts +1 -1
- package/chains/definitions/bobSepolia.ts +1 -1
- package/chains/definitions/crab.ts +1 -1
- package/chains/definitions/creatorTestnet.ts +1 -1
- package/chains/definitions/datahavenTestnet.ts +26 -0
- package/chains/definitions/dodochainTestnet.ts +1 -1
- package/chains/definitions/funkiSepolia.ts +1 -1
- package/chains/definitions/garnet.ts +1 -1
- package/chains/definitions/koi.ts +1 -1
- package/chains/definitions/omni.ts +1 -1
- package/chains/definitions/pyrope.ts +1 -1
- package/chains/definitions/redstone.ts +1 -1
- package/chains/definitions/skale/skaleBase.ts +20 -0
- package/chains/definitions/skale/skaleBaseSepoliaTestnet.ts +22 -0
- package/chains/definitions/somnia.ts +20 -0
- package/chains/definitions/tempoDevnet.ts +19 -0
- package/chains/definitions/tempoLocalnet.ts +16 -0
- package/chains/definitions/tempoTestnet.ts +25 -0
- package/chains/index.ts +7 -0
- package/errors/node.ts +1 -1
- package/errors/version.ts +1 -1
- package/index.ts +5 -1
- package/op-stack/index.ts +0 -1
- package/package.json +19 -3
- package/tempo/Abis.ts +1716 -0
- package/tempo/Account.ts +574 -0
- package/tempo/Addresses.ts +9 -0
- package/tempo/Decorator.ts +3150 -0
- package/tempo/Formatters.ts +159 -0
- package/tempo/P256.ts +2 -0
- package/tempo/Secp256k1.ts +2 -0
- package/tempo/TokenIds.ts +1 -0
- package/tempo/Transaction.ts +392 -0
- package/tempo/Transport.ts +202 -0
- package/tempo/WebAuthnP256.ts +146 -0
- package/tempo/WebCryptoP256.ts +2 -0
- package/tempo/actions/amm.ts +1221 -0
- package/tempo/actions/dex.ts +2150 -0
- package/tempo/actions/faucet.ts +119 -0
- package/tempo/actions/fee.ts +366 -0
- package/tempo/actions/index.ts +9 -0
- package/tempo/actions/nonce.ts +345 -0
- package/tempo/actions/package.json +6 -0
- package/tempo/actions/policy.ts +1329 -0
- package/tempo/actions/reward.ts +940 -0
- package/tempo/actions/token.ts +4456 -0
- package/tempo/chainConfig.ts +114 -0
- package/tempo/index.ts +59 -0
- package/tempo/internal/nonceKeyStore.ts +50 -0
- package/tempo/internal/types.ts +55 -0
- package/tempo/internal/utils.ts +57 -0
- package/tempo/package.json +6 -0
- package/types/chain.ts +18 -5
- package/types/contract.ts +42 -12
- package/types/utils.ts +2 -0
- package/utils/abi/decodeAbiParameters.ts +9 -3
- package/utils/abi/decodeEventLog.ts +4 -1
- package/utils/abi/encodeAbiParameters.ts +2 -1
- package/utils/chain/defineChain.ts +32 -2
- package/utils/formatters/transaction.ts +2 -3
|
@@ -0,0 +1,2943 @@
|
|
|
1
|
+
import * as Hex from 'ox/Hex';
|
|
2
|
+
import { TokenId, TokenRole } from 'ox/tempo';
|
|
3
|
+
import { parseAccount } from '../../accounts/utils/parseAccount.js';
|
|
4
|
+
import { multicall } from '../../actions/public/multicall.js';
|
|
5
|
+
import { readContract } from '../../actions/public/readContract.js';
|
|
6
|
+
import { watchContractEvent } from '../../actions/public/watchContractEvent.js';
|
|
7
|
+
import { sendTransaction } from '../../actions/wallet/sendTransaction.js';
|
|
8
|
+
import { sendTransactionSync, } from '../../actions/wallet/sendTransactionSync.js';
|
|
9
|
+
import { writeContract } from '../../actions/wallet/writeContract.js';
|
|
10
|
+
import { writeContractSync } from '../../actions/wallet/writeContractSync.js';
|
|
11
|
+
import { encodeFunctionData } from '../../utils/abi/encodeFunctionData.js';
|
|
12
|
+
import { parseEventLogs } from '../../utils/abi/parseEventLogs.js';
|
|
13
|
+
import * as Abis from '../Abis.js';
|
|
14
|
+
import * as Addresses from '../Addresses.js';
|
|
15
|
+
import { defineCall } from '../internal/utils.js';
|
|
16
|
+
/**
|
|
17
|
+
* Approves a spender to transfer TIP20 tokens on behalf of the caller.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* import { createClient, http } from 'viem'
|
|
22
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
23
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
24
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
25
|
+
*
|
|
26
|
+
* const client = createClient({
|
|
27
|
+
* account: privateKeyToAccount('0x...'),
|
|
28
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
29
|
+
* transport: http(),
|
|
30
|
+
* })
|
|
31
|
+
*
|
|
32
|
+
* const result = await Actions.token.approve(client, {
|
|
33
|
+
* spender: '0x...',
|
|
34
|
+
* amount: 100n,
|
|
35
|
+
* })
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @param client - Client.
|
|
39
|
+
* @param parameters - Parameters.
|
|
40
|
+
* @returns The transaction hash.
|
|
41
|
+
*/
|
|
42
|
+
export async function approve(client, parameters) {
|
|
43
|
+
const { token, ...rest } = parameters;
|
|
44
|
+
return approve.inner(writeContract, client, parameters, { ...rest, token });
|
|
45
|
+
}
|
|
46
|
+
(function (approve) {
|
|
47
|
+
/** @internal */
|
|
48
|
+
async function inner(action, client, parameters, args) {
|
|
49
|
+
const call = approve.call(args);
|
|
50
|
+
return (await action(client, {
|
|
51
|
+
...parameters,
|
|
52
|
+
...call,
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
approve.inner = inner;
|
|
56
|
+
/**
|
|
57
|
+
* Defines a call to the `approve` function.
|
|
58
|
+
*
|
|
59
|
+
* Can be passed as a parameter to:
|
|
60
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
61
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
62
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
67
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
68
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
69
|
+
*
|
|
70
|
+
* const client = createClient({
|
|
71
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
72
|
+
* transport: http(),
|
|
73
|
+
* }).extend(walletActions)
|
|
74
|
+
*
|
|
75
|
+
* const { result } = await client.sendCalls({
|
|
76
|
+
* calls: [
|
|
77
|
+
* actions.token.approve.call({
|
|
78
|
+
* spender: '0x20c0...beef',
|
|
79
|
+
* amount: 100n,
|
|
80
|
+
* token: '0x20c0...babe',
|
|
81
|
+
* }),
|
|
82
|
+
* ]
|
|
83
|
+
* })
|
|
84
|
+
* ```
|
|
85
|
+
*
|
|
86
|
+
* @param args - Arguments.
|
|
87
|
+
* @returns The call.
|
|
88
|
+
*/
|
|
89
|
+
function call(args) {
|
|
90
|
+
const { spender, amount, token } = args;
|
|
91
|
+
return defineCall({
|
|
92
|
+
address: TokenId.toAddress(token),
|
|
93
|
+
abi: Abis.tip20,
|
|
94
|
+
functionName: 'approve',
|
|
95
|
+
args: [spender, amount],
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
approve.call = call;
|
|
99
|
+
function extractEvent(logs) {
|
|
100
|
+
const [log] = parseEventLogs({
|
|
101
|
+
abi: Abis.tip20,
|
|
102
|
+
logs,
|
|
103
|
+
eventName: 'Approval',
|
|
104
|
+
});
|
|
105
|
+
if (!log)
|
|
106
|
+
throw new Error('`Approval` event not found.');
|
|
107
|
+
return log;
|
|
108
|
+
}
|
|
109
|
+
approve.extractEvent = extractEvent;
|
|
110
|
+
})(approve || (approve = {}));
|
|
111
|
+
/**
|
|
112
|
+
* Approves a spender to transfer TIP20 tokens on behalf of the caller.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```ts
|
|
116
|
+
* import { createClient, http } from 'viem'
|
|
117
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
118
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
119
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
120
|
+
*
|
|
121
|
+
* const client = createClient({
|
|
122
|
+
* account: privateKeyToAccount('0x...'),
|
|
123
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
124
|
+
* transport: http(),
|
|
125
|
+
* })
|
|
126
|
+
*
|
|
127
|
+
* const result = await Actions.token.approveSync(client, {
|
|
128
|
+
* spender: '0x...',
|
|
129
|
+
* amount: 100n,
|
|
130
|
+
* })
|
|
131
|
+
* ```
|
|
132
|
+
*
|
|
133
|
+
* @param client - Client.
|
|
134
|
+
* @param parameters - Parameters.
|
|
135
|
+
* @returns The transaction receipt and event data.
|
|
136
|
+
*/
|
|
137
|
+
export async function approveSync(client, parameters) {
|
|
138
|
+
const { throwOnReceiptRevert = true, ...rest } = parameters;
|
|
139
|
+
const receipt = await approve.inner(writeContractSync, client, { ...parameters, throwOnReceiptRevert }, rest);
|
|
140
|
+
const { args } = approve.extractEvent(receipt.logs);
|
|
141
|
+
return {
|
|
142
|
+
...args,
|
|
143
|
+
receipt,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Burns TIP20 tokens from a blocked address.
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* ```ts
|
|
151
|
+
* import { createClient, http } from 'viem'
|
|
152
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
153
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
154
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
155
|
+
*
|
|
156
|
+
* const client = createClient({
|
|
157
|
+
* account: privateKeyToAccount('0x...'),
|
|
158
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
159
|
+
* transport: http(),
|
|
160
|
+
* })
|
|
161
|
+
*
|
|
162
|
+
* const result = await Actions.token.burnBlocked(client, {
|
|
163
|
+
* from: '0x...',
|
|
164
|
+
* amount: 100n,
|
|
165
|
+
* token: '0x...',
|
|
166
|
+
* })
|
|
167
|
+
* ```
|
|
168
|
+
*
|
|
169
|
+
* @param client - Client.
|
|
170
|
+
* @param parameters - Parameters.
|
|
171
|
+
* @returns The transaction hash.
|
|
172
|
+
*/
|
|
173
|
+
export async function burnBlocked(client, parameters) {
|
|
174
|
+
return burnBlocked.inner(writeContract, client, parameters);
|
|
175
|
+
}
|
|
176
|
+
(function (burnBlocked) {
|
|
177
|
+
/** @internal */
|
|
178
|
+
async function inner(action, client, parameters) {
|
|
179
|
+
const { amount, from, token, ...rest } = parameters;
|
|
180
|
+
const call = burnBlocked.call({ amount, from, token });
|
|
181
|
+
return (await action(client, {
|
|
182
|
+
...rest,
|
|
183
|
+
...call,
|
|
184
|
+
}));
|
|
185
|
+
}
|
|
186
|
+
burnBlocked.inner = inner;
|
|
187
|
+
/**
|
|
188
|
+
* Defines a call to the `burnBlocked` function.
|
|
189
|
+
*
|
|
190
|
+
* Can be passed as a parameter to:
|
|
191
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
192
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
193
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* ```ts
|
|
197
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
198
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
199
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
200
|
+
*
|
|
201
|
+
* const client = createClient({
|
|
202
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
203
|
+
* transport: http(),
|
|
204
|
+
* }).extend(walletActions)
|
|
205
|
+
*
|
|
206
|
+
* const { result } = await client.sendCalls({
|
|
207
|
+
* calls: [
|
|
208
|
+
* actions.token.burnBlocked.call({
|
|
209
|
+
* from: '0x20c0...beef',
|
|
210
|
+
* amount: 100n,
|
|
211
|
+
* token: '0x20c0...babe',
|
|
212
|
+
* }),
|
|
213
|
+
* ]
|
|
214
|
+
* })
|
|
215
|
+
* ```
|
|
216
|
+
*
|
|
217
|
+
* @param args - Arguments.
|
|
218
|
+
* @returns The call.
|
|
219
|
+
*/
|
|
220
|
+
function call(args) {
|
|
221
|
+
const { from, amount, token } = args;
|
|
222
|
+
return defineCall({
|
|
223
|
+
address: TokenId.toAddress(token),
|
|
224
|
+
abi: Abis.tip20,
|
|
225
|
+
functionName: 'burnBlocked',
|
|
226
|
+
args: [from, amount],
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
burnBlocked.call = call;
|
|
230
|
+
/**
|
|
231
|
+
* Extracts the event from the logs.
|
|
232
|
+
*
|
|
233
|
+
* @param logs - Logs.
|
|
234
|
+
* @returns The event.
|
|
235
|
+
*/
|
|
236
|
+
function extractEvent(logs) {
|
|
237
|
+
const [log] = parseEventLogs({
|
|
238
|
+
abi: Abis.tip20,
|
|
239
|
+
logs,
|
|
240
|
+
eventName: 'BurnBlocked',
|
|
241
|
+
});
|
|
242
|
+
if (!log)
|
|
243
|
+
throw new Error('`BurnBlocked` event not found.');
|
|
244
|
+
return log;
|
|
245
|
+
}
|
|
246
|
+
burnBlocked.extractEvent = extractEvent;
|
|
247
|
+
})(burnBlocked || (burnBlocked = {}));
|
|
248
|
+
/**
|
|
249
|
+
* Burns TIP20 tokens from a blocked address.
|
|
250
|
+
*
|
|
251
|
+
* @example
|
|
252
|
+
* ```ts
|
|
253
|
+
* import { createClient, http } from 'viem'
|
|
254
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
255
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
256
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
257
|
+
*
|
|
258
|
+
* const client = createClient({
|
|
259
|
+
* account: privateKeyToAccount('0x...'),
|
|
260
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
261
|
+
* transport: http(),
|
|
262
|
+
* })
|
|
263
|
+
*
|
|
264
|
+
* const result = await Actions.token.burnBlockedSync(client, {
|
|
265
|
+
* from: '0x...',
|
|
266
|
+
* amount: 100n,
|
|
267
|
+
* token: '0x...',
|
|
268
|
+
* })
|
|
269
|
+
* ```
|
|
270
|
+
*
|
|
271
|
+
* @param client - Client.
|
|
272
|
+
* @param parameters - Parameters.
|
|
273
|
+
* @returns The transaction receipt and event data.
|
|
274
|
+
*/
|
|
275
|
+
export async function burnBlockedSync(client, parameters) {
|
|
276
|
+
const { throwOnReceiptRevert = true, ...rest } = parameters;
|
|
277
|
+
const receipt = await burnBlocked.inner(writeContractSync, client, {
|
|
278
|
+
...rest,
|
|
279
|
+
throwOnReceiptRevert,
|
|
280
|
+
});
|
|
281
|
+
const { args } = burnBlocked.extractEvent(receipt.logs);
|
|
282
|
+
return {
|
|
283
|
+
...args,
|
|
284
|
+
receipt,
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Burns TIP20 tokens from the caller's balance.
|
|
289
|
+
*
|
|
290
|
+
* @example
|
|
291
|
+
* ```ts
|
|
292
|
+
* import { createClient, http } from 'viem'
|
|
293
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
294
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
295
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
296
|
+
*
|
|
297
|
+
* const client = createClient({
|
|
298
|
+
* account: privateKeyToAccount('0x...'),
|
|
299
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
300
|
+
* transport: http(),
|
|
301
|
+
* })
|
|
302
|
+
*
|
|
303
|
+
* const result = await Actions.token.burn(client, {
|
|
304
|
+
* amount: 100n,
|
|
305
|
+
* token: '0x...',
|
|
306
|
+
* })
|
|
307
|
+
* ```
|
|
308
|
+
*
|
|
309
|
+
* @param client - Client.
|
|
310
|
+
* @param parameters - Parameters.
|
|
311
|
+
* @returns The transaction hash.
|
|
312
|
+
*/
|
|
313
|
+
export async function burn(client, parameters) {
|
|
314
|
+
return burn.inner(writeContract, client, parameters);
|
|
315
|
+
}
|
|
316
|
+
(function (burn) {
|
|
317
|
+
/** @internal */
|
|
318
|
+
async function inner(action, client, parameters) {
|
|
319
|
+
const { amount, memo, token, ...rest } = parameters;
|
|
320
|
+
const call = burn.call({ amount, memo, token });
|
|
321
|
+
return (await action(client, {
|
|
322
|
+
...rest,
|
|
323
|
+
...call,
|
|
324
|
+
}));
|
|
325
|
+
}
|
|
326
|
+
burn.inner = inner;
|
|
327
|
+
/**
|
|
328
|
+
* Defines a call to the `burn` or `burnWithMemo` function.
|
|
329
|
+
*
|
|
330
|
+
* Can be passed as a parameter to:
|
|
331
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
332
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
333
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* ```ts
|
|
337
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
338
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
339
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
340
|
+
*
|
|
341
|
+
* const client = createClient({
|
|
342
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
343
|
+
* transport: http(),
|
|
344
|
+
* }).extend(walletActions)
|
|
345
|
+
*
|
|
346
|
+
* const { result } = await client.sendCalls({
|
|
347
|
+
* calls: [
|
|
348
|
+
* actions.token.burn.call({
|
|
349
|
+
* amount: 100n,
|
|
350
|
+
* token: '0x20c0...babe',
|
|
351
|
+
* }),
|
|
352
|
+
* ]
|
|
353
|
+
* })
|
|
354
|
+
* ```
|
|
355
|
+
*
|
|
356
|
+
* @param args - Arguments.
|
|
357
|
+
* @returns The call.
|
|
358
|
+
*/
|
|
359
|
+
function call(args) {
|
|
360
|
+
const { amount, memo, token } = args;
|
|
361
|
+
const callArgs = memo
|
|
362
|
+
? {
|
|
363
|
+
functionName: 'burnWithMemo',
|
|
364
|
+
args: [amount, Hex.padLeft(memo, 32)],
|
|
365
|
+
}
|
|
366
|
+
: {
|
|
367
|
+
functionName: 'burn',
|
|
368
|
+
args: [amount],
|
|
369
|
+
};
|
|
370
|
+
return defineCall({
|
|
371
|
+
address: TokenId.toAddress(token),
|
|
372
|
+
abi: Abis.tip20,
|
|
373
|
+
...callArgs,
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
burn.call = call;
|
|
377
|
+
/**
|
|
378
|
+
* Extracts the event from the logs.
|
|
379
|
+
*
|
|
380
|
+
* @param logs - Logs.
|
|
381
|
+
* @returns The event.
|
|
382
|
+
*/
|
|
383
|
+
function extractEvent(logs) {
|
|
384
|
+
const [log] = parseEventLogs({
|
|
385
|
+
abi: Abis.tip20,
|
|
386
|
+
logs,
|
|
387
|
+
eventName: 'Burn',
|
|
388
|
+
});
|
|
389
|
+
if (!log)
|
|
390
|
+
throw new Error('`Burn` event not found.');
|
|
391
|
+
return log;
|
|
392
|
+
}
|
|
393
|
+
burn.extractEvent = extractEvent;
|
|
394
|
+
})(burn || (burn = {}));
|
|
395
|
+
/**
|
|
396
|
+
* Burns TIP20 tokens from the caller's balance.
|
|
397
|
+
*
|
|
398
|
+
* @example
|
|
399
|
+
* ```ts
|
|
400
|
+
* import { createClient, http } from 'viem'
|
|
401
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
402
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
403
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
404
|
+
*
|
|
405
|
+
* const client = createClient({
|
|
406
|
+
* account: privateKeyToAccount('0x...'),
|
|
407
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
408
|
+
* transport: http(),
|
|
409
|
+
* })
|
|
410
|
+
*
|
|
411
|
+
* const result = await Actions.token.burnSync(client, {
|
|
412
|
+
* amount: 100n,
|
|
413
|
+
* token: '0x...',
|
|
414
|
+
* })
|
|
415
|
+
* ```
|
|
416
|
+
*
|
|
417
|
+
* @param client - Client.
|
|
418
|
+
* @param parameters - Parameters.
|
|
419
|
+
* @returns The transaction receipt and event data.
|
|
420
|
+
*/
|
|
421
|
+
export async function burnSync(client, parameters) {
|
|
422
|
+
const { throwOnReceiptRevert = true, ...rest } = parameters;
|
|
423
|
+
const receipt = await burn.inner(writeContractSync, client, {
|
|
424
|
+
...rest,
|
|
425
|
+
throwOnReceiptRevert,
|
|
426
|
+
});
|
|
427
|
+
const { args } = burn.extractEvent(receipt.logs);
|
|
428
|
+
return {
|
|
429
|
+
...args,
|
|
430
|
+
receipt,
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Changes the transfer policy ID for a TIP20 token.
|
|
435
|
+
*
|
|
436
|
+
* @example
|
|
437
|
+
* ```ts
|
|
438
|
+
* import { createClient, http } from 'viem'
|
|
439
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
440
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
441
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
442
|
+
*
|
|
443
|
+
* const client = createClient({
|
|
444
|
+
* account: privateKeyToAccount('0x...'),
|
|
445
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
446
|
+
* transport: http(),
|
|
447
|
+
* })
|
|
448
|
+
*
|
|
449
|
+
* const result = await Actions.token.changeTransferPolicy(client, {
|
|
450
|
+
* token: '0x...',
|
|
451
|
+
* policyId: 1n,
|
|
452
|
+
* })
|
|
453
|
+
* ```
|
|
454
|
+
*
|
|
455
|
+
* @param client - Client.
|
|
456
|
+
* @param parameters - Parameters.
|
|
457
|
+
* @returns The transaction hash.
|
|
458
|
+
*/
|
|
459
|
+
export async function changeTransferPolicy(client, parameters) {
|
|
460
|
+
return changeTransferPolicy.inner(writeContract, client, parameters);
|
|
461
|
+
}
|
|
462
|
+
(function (changeTransferPolicy) {
|
|
463
|
+
/** @internal */
|
|
464
|
+
async function inner(action, client, parameters) {
|
|
465
|
+
const { policyId, token, ...rest } = parameters;
|
|
466
|
+
const call = changeTransferPolicy.call({ policyId, token });
|
|
467
|
+
return (await action(client, {
|
|
468
|
+
...rest,
|
|
469
|
+
...call,
|
|
470
|
+
}));
|
|
471
|
+
}
|
|
472
|
+
changeTransferPolicy.inner = inner;
|
|
473
|
+
/**
|
|
474
|
+
* Defines a call to the `changeTransferPolicyId` function.
|
|
475
|
+
*
|
|
476
|
+
* Can be passed as a parameter to:
|
|
477
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
478
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
479
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
480
|
+
*
|
|
481
|
+
* @example
|
|
482
|
+
* ```ts
|
|
483
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
484
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
485
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
486
|
+
*
|
|
487
|
+
* const client = createClient({
|
|
488
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
489
|
+
* transport: http(),
|
|
490
|
+
* }).extend(walletActions)
|
|
491
|
+
*
|
|
492
|
+
* const { result } = await client.sendCalls({
|
|
493
|
+
* calls: [
|
|
494
|
+
* actions.token.changeTransferPolicy.call({
|
|
495
|
+
* token: '0x20c0...babe',
|
|
496
|
+
* policyId: 1n,
|
|
497
|
+
* }),
|
|
498
|
+
* ]
|
|
499
|
+
* })
|
|
500
|
+
* ```
|
|
501
|
+
*
|
|
502
|
+
* @param args - Arguments.
|
|
503
|
+
* @returns The call.
|
|
504
|
+
*/
|
|
505
|
+
function call(args) {
|
|
506
|
+
const { token, policyId } = args;
|
|
507
|
+
return defineCall({
|
|
508
|
+
address: TokenId.toAddress(token),
|
|
509
|
+
abi: Abis.tip20,
|
|
510
|
+
functionName: 'changeTransferPolicyId',
|
|
511
|
+
args: [policyId],
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
changeTransferPolicy.call = call;
|
|
515
|
+
/**
|
|
516
|
+
* Extracts the event from the logs.
|
|
517
|
+
*
|
|
518
|
+
* @param logs - Logs.
|
|
519
|
+
* @returns The event.
|
|
520
|
+
*/
|
|
521
|
+
function extractEvent(logs) {
|
|
522
|
+
const [log] = parseEventLogs({
|
|
523
|
+
abi: Abis.tip20,
|
|
524
|
+
logs,
|
|
525
|
+
eventName: 'TransferPolicyUpdate',
|
|
526
|
+
});
|
|
527
|
+
if (!log)
|
|
528
|
+
throw new Error('`TransferPolicyUpdate` event not found.');
|
|
529
|
+
return log;
|
|
530
|
+
}
|
|
531
|
+
changeTransferPolicy.extractEvent = extractEvent;
|
|
532
|
+
})(changeTransferPolicy || (changeTransferPolicy = {}));
|
|
533
|
+
/**
|
|
534
|
+
* Changes the transfer policy ID for a TIP20 token.
|
|
535
|
+
*
|
|
536
|
+
* @example
|
|
537
|
+
* ```ts
|
|
538
|
+
* import { createClient, http } from 'viem'
|
|
539
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
540
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
541
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
542
|
+
*
|
|
543
|
+
* const client = createClient({
|
|
544
|
+
* account: privateKeyToAccount('0x...'),
|
|
545
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
546
|
+
* transport: http(),
|
|
547
|
+
* })
|
|
548
|
+
*
|
|
549
|
+
* const result = await Actions.token.changeTransferPolicySync(client, {
|
|
550
|
+
* token: '0x...',
|
|
551
|
+
* policyId: 1n,
|
|
552
|
+
* })
|
|
553
|
+
* ```
|
|
554
|
+
*
|
|
555
|
+
* @param client - Client.
|
|
556
|
+
* @param parameters - Parameters.
|
|
557
|
+
* @returns The transaction receipt and event data.
|
|
558
|
+
*/
|
|
559
|
+
export async function changeTransferPolicySync(client, parameters) {
|
|
560
|
+
const { throwOnReceiptRevert = true, ...rest } = parameters;
|
|
561
|
+
const receipt = await changeTransferPolicy.inner(writeContractSync, client, {
|
|
562
|
+
...rest,
|
|
563
|
+
throwOnReceiptRevert,
|
|
564
|
+
});
|
|
565
|
+
const { args } = changeTransferPolicy.extractEvent(receipt.logs);
|
|
566
|
+
return {
|
|
567
|
+
...args,
|
|
568
|
+
receipt,
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* Creates a new TIP20 token.
|
|
573
|
+
*
|
|
574
|
+
* @example
|
|
575
|
+
* ```ts
|
|
576
|
+
* import { createClient, http } from 'viem'
|
|
577
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
578
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
579
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
580
|
+
*
|
|
581
|
+
* const client = createClient({
|
|
582
|
+
* account: privateKeyToAccount('0x...'),
|
|
583
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
584
|
+
* transport: http(),
|
|
585
|
+
* })
|
|
586
|
+
*
|
|
587
|
+
* const result = await Actions.token.create(client, {
|
|
588
|
+
* name: 'My Token',
|
|
589
|
+
* symbol: 'MTK',
|
|
590
|
+
* currency: 'USD',
|
|
591
|
+
* })
|
|
592
|
+
* ```
|
|
593
|
+
*
|
|
594
|
+
* @param client - Client.
|
|
595
|
+
* @param parameters - Parameters.
|
|
596
|
+
* @returns The transaction hash.
|
|
597
|
+
*/
|
|
598
|
+
export async function create(client, parameters) {
|
|
599
|
+
return create.inner(writeContract, client, parameters);
|
|
600
|
+
}
|
|
601
|
+
(function (create) {
|
|
602
|
+
/** @internal */
|
|
603
|
+
async function inner(action, client, parameters) {
|
|
604
|
+
const { account = client.account, admin: admin_ = client.account, chain = client.chain, ...rest } = parameters;
|
|
605
|
+
const admin = admin_ ? parseAccount(admin_) : undefined;
|
|
606
|
+
if (!admin)
|
|
607
|
+
throw new Error('admin is required.');
|
|
608
|
+
const call = create.call({ ...rest, admin: admin.address });
|
|
609
|
+
return (await action(client, {
|
|
610
|
+
...parameters,
|
|
611
|
+
account,
|
|
612
|
+
chain,
|
|
613
|
+
...call,
|
|
614
|
+
}));
|
|
615
|
+
}
|
|
616
|
+
create.inner = inner;
|
|
617
|
+
/**
|
|
618
|
+
* Defines a call to the `createToken` function.
|
|
619
|
+
*
|
|
620
|
+
* Can be passed as a parameter to:
|
|
621
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
622
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
623
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
624
|
+
*
|
|
625
|
+
* @example
|
|
626
|
+
* ```ts
|
|
627
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
628
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
629
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
630
|
+
*
|
|
631
|
+
* const client = createClient({
|
|
632
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
633
|
+
* transport: http(),
|
|
634
|
+
* }).extend(walletActions)
|
|
635
|
+
*
|
|
636
|
+
* const { result } = await client.sendCalls({
|
|
637
|
+
* calls: [
|
|
638
|
+
* actions.token.create.call({
|
|
639
|
+
* name: 'My Token',
|
|
640
|
+
* symbol: 'MTK',
|
|
641
|
+
* currency: 'USD',
|
|
642
|
+
* admin: '0xfeed...fede',
|
|
643
|
+
* }),
|
|
644
|
+
* ]
|
|
645
|
+
* })
|
|
646
|
+
* ```
|
|
647
|
+
*
|
|
648
|
+
* @param args - Arguments.
|
|
649
|
+
* @returns The call.
|
|
650
|
+
*/
|
|
651
|
+
function call(args) {
|
|
652
|
+
const { name, symbol, currency, quoteToken = Addresses.pathUsd, admin, } = args;
|
|
653
|
+
return defineCall({
|
|
654
|
+
address: Addresses.tip20Factory,
|
|
655
|
+
abi: Abis.tip20Factory,
|
|
656
|
+
args: [name, symbol, currency, TokenId.toAddress(quoteToken), admin],
|
|
657
|
+
functionName: 'createToken',
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
create.call = call;
|
|
661
|
+
/**
|
|
662
|
+
* Extracts the `TokenCreated` event from logs.
|
|
663
|
+
*
|
|
664
|
+
* @param logs - The logs.
|
|
665
|
+
* @returns The `TokenCreated` event.
|
|
666
|
+
*/
|
|
667
|
+
function extractEvent(logs) {
|
|
668
|
+
const [log] = parseEventLogs({
|
|
669
|
+
abi: Abis.tip20Factory,
|
|
670
|
+
logs,
|
|
671
|
+
eventName: 'TokenCreated',
|
|
672
|
+
strict: true,
|
|
673
|
+
});
|
|
674
|
+
if (!log)
|
|
675
|
+
throw new Error('`TokenCreated` event not found.');
|
|
676
|
+
return log;
|
|
677
|
+
}
|
|
678
|
+
create.extractEvent = extractEvent;
|
|
679
|
+
})(create || (create = {}));
|
|
680
|
+
/**
|
|
681
|
+
* Creates a new TIP20 token.
|
|
682
|
+
*
|
|
683
|
+
* @example
|
|
684
|
+
* ```ts
|
|
685
|
+
* import { createClient, http } from 'viem'
|
|
686
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
687
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
688
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
689
|
+
*
|
|
690
|
+
* const client = createClient({
|
|
691
|
+
* account: privateKeyToAccount('0x...'),
|
|
692
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
693
|
+
* transport: http(),
|
|
694
|
+
* })
|
|
695
|
+
*
|
|
696
|
+
* const result = await Actions.token.createSync(client, {
|
|
697
|
+
* name: 'My Token',
|
|
698
|
+
* symbol: 'MTK',
|
|
699
|
+
* currency: 'USD',
|
|
700
|
+
* })
|
|
701
|
+
* ```
|
|
702
|
+
*
|
|
703
|
+
* @param client - Client.
|
|
704
|
+
* @param parameters - Parameters.
|
|
705
|
+
* @returns The transaction receipt and event data.
|
|
706
|
+
*/
|
|
707
|
+
export async function createSync(client, parameters) {
|
|
708
|
+
const { throwOnReceiptRevert = true, ...rest } = parameters;
|
|
709
|
+
const receipt = await create.inner(writeContractSync, client, {
|
|
710
|
+
...rest,
|
|
711
|
+
throwOnReceiptRevert,
|
|
712
|
+
});
|
|
713
|
+
const { args } = create.extractEvent(receipt.logs);
|
|
714
|
+
return {
|
|
715
|
+
...args,
|
|
716
|
+
receipt,
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* Gets TIP20 token allowance.
|
|
721
|
+
*
|
|
722
|
+
* @example
|
|
723
|
+
* ```ts
|
|
724
|
+
* import { createClient, http } from 'viem'
|
|
725
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
726
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
727
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
728
|
+
*
|
|
729
|
+
* const client = createClient({
|
|
730
|
+
* account: privateKeyToAccount('0x...'),
|
|
731
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
732
|
+
* transport: http(),
|
|
733
|
+
* })
|
|
734
|
+
*
|
|
735
|
+
* const allowance = await Actions.token.getAllowance(client, {
|
|
736
|
+
* spender: '0x...',
|
|
737
|
+
* })
|
|
738
|
+
* ```
|
|
739
|
+
*
|
|
740
|
+
* @param client - Client.
|
|
741
|
+
* @param parameters - Parameters.
|
|
742
|
+
* @returns The token allowance.
|
|
743
|
+
*/
|
|
744
|
+
export async function getAllowance(client, parameters) {
|
|
745
|
+
const { account = client.account } = parameters;
|
|
746
|
+
const address = account ? parseAccount(account).address : undefined;
|
|
747
|
+
if (!address)
|
|
748
|
+
throw new Error('account is required.');
|
|
749
|
+
return readContract(client, {
|
|
750
|
+
...parameters,
|
|
751
|
+
...getAllowance.call({ ...parameters, account: address }),
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
(function (getAllowance) {
|
|
755
|
+
/**
|
|
756
|
+
* Defines a call to the `allowance` function.
|
|
757
|
+
*
|
|
758
|
+
* @param args - Arguments.
|
|
759
|
+
* @returns The call.
|
|
760
|
+
*/
|
|
761
|
+
function call(args) {
|
|
762
|
+
const { account, spender, token } = args;
|
|
763
|
+
return defineCall({
|
|
764
|
+
address: TokenId.toAddress(token),
|
|
765
|
+
abi: Abis.tip20,
|
|
766
|
+
functionName: 'allowance',
|
|
767
|
+
args: [account, spender],
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
getAllowance.call = call;
|
|
771
|
+
})(getAllowance || (getAllowance = {}));
|
|
772
|
+
/**
|
|
773
|
+
* Gets TIP20 token balance for an address.
|
|
774
|
+
*
|
|
775
|
+
* @example
|
|
776
|
+
* ```ts
|
|
777
|
+
* import { createClient, http } from 'viem'
|
|
778
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
779
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
780
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
781
|
+
*
|
|
782
|
+
* const client = createClient({
|
|
783
|
+
* account: privateKeyToAccount('0x...'),
|
|
784
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
785
|
+
* transport: http(),
|
|
786
|
+
* })
|
|
787
|
+
*
|
|
788
|
+
* const balance = await Actions.token.getBalance(client, {
|
|
789
|
+
* token: '0x...',
|
|
790
|
+
* })
|
|
791
|
+
* ```
|
|
792
|
+
*
|
|
793
|
+
* @param client - Client.
|
|
794
|
+
* @param parameters - Parameters.
|
|
795
|
+
* @returns The token balance.
|
|
796
|
+
*/
|
|
797
|
+
export async function getBalance(client, parameters) {
|
|
798
|
+
const { account = client.account, ...rest } = parameters;
|
|
799
|
+
const address = account ? parseAccount(account).address : undefined;
|
|
800
|
+
if (!address)
|
|
801
|
+
throw new Error('account is required.');
|
|
802
|
+
return readContract(client, {
|
|
803
|
+
...rest,
|
|
804
|
+
...getBalance.call({ account: address, ...rest }),
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
(function (getBalance) {
|
|
808
|
+
/**
|
|
809
|
+
* Defines a call to the `balanceOf` function.
|
|
810
|
+
*
|
|
811
|
+
* @param args - Arguments.
|
|
812
|
+
* @returns The call.
|
|
813
|
+
*/
|
|
814
|
+
function call(args) {
|
|
815
|
+
const { account, token } = args;
|
|
816
|
+
return defineCall({
|
|
817
|
+
address: TokenId.toAddress(token),
|
|
818
|
+
abi: Abis.tip20,
|
|
819
|
+
functionName: 'balanceOf',
|
|
820
|
+
args: [account],
|
|
821
|
+
});
|
|
822
|
+
}
|
|
823
|
+
getBalance.call = call;
|
|
824
|
+
})(getBalance || (getBalance = {}));
|
|
825
|
+
/**
|
|
826
|
+
* Gets TIP20 token metadata including name, symbol, currency, decimals, and total supply.
|
|
827
|
+
*
|
|
828
|
+
* @example
|
|
829
|
+
* ```ts
|
|
830
|
+
* import { createClient, http } from 'viem'
|
|
831
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
832
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
833
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
834
|
+
*
|
|
835
|
+
* const client = createClient({
|
|
836
|
+
* account: privateKeyToAccount('0x...'),
|
|
837
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
838
|
+
* transport: http(),
|
|
839
|
+
* })
|
|
840
|
+
*
|
|
841
|
+
* const metadata = await Actions.token.getMetadata(client, {
|
|
842
|
+
* token: '0x...',
|
|
843
|
+
* })
|
|
844
|
+
* ```
|
|
845
|
+
*
|
|
846
|
+
* @param client - Client.
|
|
847
|
+
* @param parameters - Parameters.
|
|
848
|
+
* @returns The token metadata.
|
|
849
|
+
*/
|
|
850
|
+
export async function getMetadata(client, parameters) {
|
|
851
|
+
const { token, ...rest } = parameters;
|
|
852
|
+
const address = TokenId.toAddress(token);
|
|
853
|
+
const abi = Abis.tip20;
|
|
854
|
+
if (TokenId.from(token) === TokenId.fromAddress(Addresses.pathUsd))
|
|
855
|
+
return multicall(client, {
|
|
856
|
+
...rest,
|
|
857
|
+
contracts: [
|
|
858
|
+
{
|
|
859
|
+
address,
|
|
860
|
+
abi,
|
|
861
|
+
functionName: 'currency',
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
address,
|
|
865
|
+
abi,
|
|
866
|
+
functionName: 'decimals',
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
address,
|
|
870
|
+
abi,
|
|
871
|
+
functionName: 'name',
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
address,
|
|
875
|
+
abi,
|
|
876
|
+
functionName: 'symbol',
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
address,
|
|
880
|
+
abi,
|
|
881
|
+
functionName: 'totalSupply',
|
|
882
|
+
},
|
|
883
|
+
],
|
|
884
|
+
allowFailure: false,
|
|
885
|
+
deployless: true,
|
|
886
|
+
}).then(([currency, decimals, name, symbol, totalSupply]) => ({
|
|
887
|
+
name,
|
|
888
|
+
symbol,
|
|
889
|
+
currency,
|
|
890
|
+
decimals,
|
|
891
|
+
totalSupply,
|
|
892
|
+
}));
|
|
893
|
+
return multicall(client, {
|
|
894
|
+
...rest,
|
|
895
|
+
contracts: [
|
|
896
|
+
{
|
|
897
|
+
address,
|
|
898
|
+
abi,
|
|
899
|
+
functionName: 'currency',
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
address,
|
|
903
|
+
abi,
|
|
904
|
+
functionName: 'decimals',
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
address,
|
|
908
|
+
abi,
|
|
909
|
+
functionName: 'quoteToken',
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
address,
|
|
913
|
+
abi,
|
|
914
|
+
functionName: 'name',
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
address,
|
|
918
|
+
abi,
|
|
919
|
+
functionName: 'paused',
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
address,
|
|
923
|
+
abi,
|
|
924
|
+
functionName: 'supplyCap',
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
address,
|
|
928
|
+
abi,
|
|
929
|
+
functionName: 'symbol',
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
address,
|
|
933
|
+
abi,
|
|
934
|
+
functionName: 'totalSupply',
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
address,
|
|
938
|
+
abi,
|
|
939
|
+
functionName: 'transferPolicyId',
|
|
940
|
+
},
|
|
941
|
+
],
|
|
942
|
+
allowFailure: false,
|
|
943
|
+
deployless: true,
|
|
944
|
+
}).then(([currency, decimals, quoteToken, name, paused, supplyCap, symbol, totalSupply, transferPolicyId,]) => ({
|
|
945
|
+
name,
|
|
946
|
+
symbol,
|
|
947
|
+
currency,
|
|
948
|
+
decimals,
|
|
949
|
+
quoteToken,
|
|
950
|
+
totalSupply,
|
|
951
|
+
paused,
|
|
952
|
+
supplyCap,
|
|
953
|
+
transferPolicyId,
|
|
954
|
+
}));
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* Gets the admin role for a specific role in a TIP20 token.
|
|
958
|
+
*
|
|
959
|
+
* @example
|
|
960
|
+
* ```ts
|
|
961
|
+
* import { createClient, http } from 'viem'
|
|
962
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
963
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
964
|
+
*
|
|
965
|
+
* const client = createClient({
|
|
966
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
967
|
+
* transport: http(),
|
|
968
|
+
* })
|
|
969
|
+
*
|
|
970
|
+
* const adminRole = await Actions.token.getRoleAdmin(client, {
|
|
971
|
+
* role: 'issuer',
|
|
972
|
+
* token: '0x...',
|
|
973
|
+
* })
|
|
974
|
+
* ```
|
|
975
|
+
*
|
|
976
|
+
* @param client - Client.
|
|
977
|
+
* @param parameters - Parameters.
|
|
978
|
+
* @returns The admin role hash.
|
|
979
|
+
*/
|
|
980
|
+
export async function getRoleAdmin(client, parameters) {
|
|
981
|
+
return readContract(client, {
|
|
982
|
+
...parameters,
|
|
983
|
+
...getRoleAdmin.call(parameters),
|
|
984
|
+
});
|
|
985
|
+
}
|
|
986
|
+
(function (getRoleAdmin) {
|
|
987
|
+
/**
|
|
988
|
+
* Defines a call to the `getRoleAdmin` function.
|
|
989
|
+
*
|
|
990
|
+
* @param args - Arguments.
|
|
991
|
+
* @returns The call.
|
|
992
|
+
*/
|
|
993
|
+
function call(args) {
|
|
994
|
+
const { role, token } = args;
|
|
995
|
+
return defineCall({
|
|
996
|
+
address: TokenId.toAddress(token),
|
|
997
|
+
abi: Abis.tip20,
|
|
998
|
+
functionName: 'getRoleAdmin',
|
|
999
|
+
args: [TokenRole.serialize(role)],
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
getRoleAdmin.call = call;
|
|
1003
|
+
})(getRoleAdmin || (getRoleAdmin = {}));
|
|
1004
|
+
/**
|
|
1005
|
+
* Checks if an account has a specific role for a TIP20 token.
|
|
1006
|
+
*
|
|
1007
|
+
* @example
|
|
1008
|
+
* ```ts
|
|
1009
|
+
* import { createClient, http } from 'viem'
|
|
1010
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1011
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1012
|
+
*
|
|
1013
|
+
* const client = createClient({
|
|
1014
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1015
|
+
* transport: http(),
|
|
1016
|
+
* })
|
|
1017
|
+
*
|
|
1018
|
+
* const hasRole = await Actions.token.hasRole(client, {
|
|
1019
|
+
* account: '0x...',
|
|
1020
|
+
* role: 'issuer',
|
|
1021
|
+
* token: '0x...',
|
|
1022
|
+
* })
|
|
1023
|
+
* ```
|
|
1024
|
+
*
|
|
1025
|
+
* @param client - Client.
|
|
1026
|
+
* @param parameters - Parameters.
|
|
1027
|
+
* @returns Whether the account has the role.
|
|
1028
|
+
*/
|
|
1029
|
+
export async function hasRole(client, parameters) {
|
|
1030
|
+
const { account = client.account } = parameters;
|
|
1031
|
+
const address = account ? parseAccount(account).address : undefined;
|
|
1032
|
+
if (!address)
|
|
1033
|
+
throw new Error('account is required.');
|
|
1034
|
+
return readContract(client, {
|
|
1035
|
+
...parameters,
|
|
1036
|
+
...hasRole.call({ ...parameters, account: address }),
|
|
1037
|
+
});
|
|
1038
|
+
}
|
|
1039
|
+
(function (hasRole) {
|
|
1040
|
+
/**
|
|
1041
|
+
* Defines a call to the `hasRole` function.
|
|
1042
|
+
*
|
|
1043
|
+
* @param args - Arguments.
|
|
1044
|
+
* @returns The call.
|
|
1045
|
+
*/
|
|
1046
|
+
function call(args) {
|
|
1047
|
+
const { account, role, token } = args;
|
|
1048
|
+
return defineCall({
|
|
1049
|
+
address: TokenId.toAddress(token),
|
|
1050
|
+
abi: Abis.tip20,
|
|
1051
|
+
functionName: 'hasRole',
|
|
1052
|
+
args: [account, TokenRole.serialize(role)],
|
|
1053
|
+
});
|
|
1054
|
+
}
|
|
1055
|
+
hasRole.call = call;
|
|
1056
|
+
})(hasRole || (hasRole = {}));
|
|
1057
|
+
/**
|
|
1058
|
+
* Grants a role for a TIP20 token.
|
|
1059
|
+
*
|
|
1060
|
+
* @example
|
|
1061
|
+
* ```ts
|
|
1062
|
+
* import { createClient, http } from 'viem'
|
|
1063
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1064
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1065
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1066
|
+
*
|
|
1067
|
+
* const client = createClient({
|
|
1068
|
+
* account: privateKeyToAccount('0x...'),
|
|
1069
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1070
|
+
* transport: http(),
|
|
1071
|
+
* })
|
|
1072
|
+
*
|
|
1073
|
+
* const result = await Actions.token.grantRoles(client, {
|
|
1074
|
+
* token: '0x...',
|
|
1075
|
+
* to: '0x...',
|
|
1076
|
+
* roles: ['issuer'],
|
|
1077
|
+
* })
|
|
1078
|
+
* ```
|
|
1079
|
+
*
|
|
1080
|
+
* @param client - Client.
|
|
1081
|
+
* @param parameters - Parameters.
|
|
1082
|
+
* @returns The transaction hash.
|
|
1083
|
+
*/
|
|
1084
|
+
export async function grantRoles(client, parameters) {
|
|
1085
|
+
return grantRoles.inner(sendTransaction, client, parameters);
|
|
1086
|
+
}
|
|
1087
|
+
(function (grantRoles) {
|
|
1088
|
+
/** @internal */
|
|
1089
|
+
async function inner(action, client, parameters) {
|
|
1090
|
+
return (await action(client, {
|
|
1091
|
+
...parameters,
|
|
1092
|
+
calls: parameters.roles.map((role) => {
|
|
1093
|
+
const call = grantRoles.call({ ...parameters, role });
|
|
1094
|
+
return {
|
|
1095
|
+
...call,
|
|
1096
|
+
data: encodeFunctionData(call),
|
|
1097
|
+
};
|
|
1098
|
+
}),
|
|
1099
|
+
}));
|
|
1100
|
+
}
|
|
1101
|
+
grantRoles.inner = inner;
|
|
1102
|
+
/**
|
|
1103
|
+
* Defines a call to the `grantRole` function.
|
|
1104
|
+
*
|
|
1105
|
+
* Can be passed as a parameter to:
|
|
1106
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
1107
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
1108
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
1109
|
+
*
|
|
1110
|
+
* @example
|
|
1111
|
+
* ```ts
|
|
1112
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
1113
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1114
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1115
|
+
*
|
|
1116
|
+
* const client = createClient({
|
|
1117
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1118
|
+
* transport: http(),
|
|
1119
|
+
* }).extend(walletActions)
|
|
1120
|
+
*
|
|
1121
|
+
* const { result } = await client.sendCalls({
|
|
1122
|
+
* calls: [
|
|
1123
|
+
* actions.token.grantRoles.call({
|
|
1124
|
+
* token: '0x20c0...babe',
|
|
1125
|
+
* to: '0x20c0...beef',
|
|
1126
|
+
* role: 'issuer',
|
|
1127
|
+
* }),
|
|
1128
|
+
* ]
|
|
1129
|
+
* })
|
|
1130
|
+
* ```
|
|
1131
|
+
*
|
|
1132
|
+
* @param args - Arguments.
|
|
1133
|
+
* @returns The call.
|
|
1134
|
+
*/
|
|
1135
|
+
function call(args) {
|
|
1136
|
+
const { token, to, role } = args;
|
|
1137
|
+
const roleHash = TokenRole.serialize(role);
|
|
1138
|
+
return defineCall({
|
|
1139
|
+
address: TokenId.toAddress(token),
|
|
1140
|
+
abi: Abis.tip20,
|
|
1141
|
+
functionName: 'grantRole',
|
|
1142
|
+
args: [roleHash, to],
|
|
1143
|
+
});
|
|
1144
|
+
}
|
|
1145
|
+
grantRoles.call = call;
|
|
1146
|
+
/**
|
|
1147
|
+
* Extracts the events from the logs.
|
|
1148
|
+
*
|
|
1149
|
+
* @param logs - Logs.
|
|
1150
|
+
* @returns The events.
|
|
1151
|
+
*/
|
|
1152
|
+
function extractEvents(logs) {
|
|
1153
|
+
const events = parseEventLogs({
|
|
1154
|
+
abi: Abis.tip20,
|
|
1155
|
+
logs,
|
|
1156
|
+
eventName: 'RoleMembershipUpdated',
|
|
1157
|
+
});
|
|
1158
|
+
if (events.length === 0)
|
|
1159
|
+
throw new Error('`RoleMembershipUpdated` events not found.');
|
|
1160
|
+
return events;
|
|
1161
|
+
}
|
|
1162
|
+
grantRoles.extractEvents = extractEvents;
|
|
1163
|
+
})(grantRoles || (grantRoles = {}));
|
|
1164
|
+
/**
|
|
1165
|
+
* Grants a role for a TIP20 token.
|
|
1166
|
+
*
|
|
1167
|
+
* @example
|
|
1168
|
+
* ```ts
|
|
1169
|
+
* import { createClient, http } from 'viem'
|
|
1170
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1171
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1172
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1173
|
+
*
|
|
1174
|
+
* const client = createClient({
|
|
1175
|
+
* account: privateKeyToAccount('0x...'),
|
|
1176
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1177
|
+
* transport: http(),
|
|
1178
|
+
* })
|
|
1179
|
+
*
|
|
1180
|
+
* const result = await Actions.token.grantRolesSync(client, {
|
|
1181
|
+
* token: '0x...',
|
|
1182
|
+
* to: '0x...',
|
|
1183
|
+
* roles: ['issuer'],
|
|
1184
|
+
* })
|
|
1185
|
+
* ```
|
|
1186
|
+
*
|
|
1187
|
+
* @param client - Client.
|
|
1188
|
+
* @param parameters - Parameters.
|
|
1189
|
+
* @returns The transaction receipt and event data.
|
|
1190
|
+
*/
|
|
1191
|
+
export async function grantRolesSync(client, parameters) {
|
|
1192
|
+
const { throwOnReceiptRevert = true, ...rest } = parameters;
|
|
1193
|
+
const receipt = await grantRoles.inner(sendTransactionSync, client, {
|
|
1194
|
+
...rest,
|
|
1195
|
+
throwOnReceiptRevert,
|
|
1196
|
+
});
|
|
1197
|
+
const events = grantRoles.extractEvents(receipt.logs);
|
|
1198
|
+
const value = events.map((event) => event.args);
|
|
1199
|
+
return {
|
|
1200
|
+
receipt,
|
|
1201
|
+
value,
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1204
|
+
/**
|
|
1205
|
+
* Mints TIP20 tokens to an address.
|
|
1206
|
+
*
|
|
1207
|
+
* @example
|
|
1208
|
+
* ```ts
|
|
1209
|
+
* import { createClient, http } from 'viem'
|
|
1210
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1211
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1212
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1213
|
+
*
|
|
1214
|
+
* const client = createClient({
|
|
1215
|
+
* account: privateKeyToAccount('0x...'),
|
|
1216
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1217
|
+
* transport: http(),
|
|
1218
|
+
* })
|
|
1219
|
+
*
|
|
1220
|
+
* const result = await Actions.token.mint(client, {
|
|
1221
|
+
* to: '0x...',
|
|
1222
|
+
* amount: 100n,
|
|
1223
|
+
* token: '0x...',
|
|
1224
|
+
* })
|
|
1225
|
+
* ```
|
|
1226
|
+
*
|
|
1227
|
+
* @param client - Client.
|
|
1228
|
+
* @param parameters - Parameters.
|
|
1229
|
+
* @returns The transaction hash.
|
|
1230
|
+
*/
|
|
1231
|
+
export async function mint(client, parameters) {
|
|
1232
|
+
return mint.inner(writeContract, client, parameters);
|
|
1233
|
+
}
|
|
1234
|
+
(function (mint) {
|
|
1235
|
+
/** @internal */
|
|
1236
|
+
async function inner(action, client, parameters) {
|
|
1237
|
+
const call = mint.call(parameters);
|
|
1238
|
+
return (await action(client, {
|
|
1239
|
+
...parameters,
|
|
1240
|
+
...call,
|
|
1241
|
+
}));
|
|
1242
|
+
}
|
|
1243
|
+
mint.inner = inner;
|
|
1244
|
+
/**
|
|
1245
|
+
* Defines a call to the `mint` or `mintWithMemo` function.
|
|
1246
|
+
*
|
|
1247
|
+
* Can be passed as a parameter to:
|
|
1248
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
1249
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
1250
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
1251
|
+
*
|
|
1252
|
+
* @example
|
|
1253
|
+
* ```ts
|
|
1254
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
1255
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1256
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1257
|
+
*
|
|
1258
|
+
* const client = createClient({
|
|
1259
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1260
|
+
* transport: http(),
|
|
1261
|
+
* }).extend(walletActions)
|
|
1262
|
+
*
|
|
1263
|
+
* const { result } = await client.sendCalls({
|
|
1264
|
+
* calls: [
|
|
1265
|
+
* actions.token.mint.call({
|
|
1266
|
+
* to: '0x20c0...beef',
|
|
1267
|
+
* amount: 100n,
|
|
1268
|
+
* token: '0x20c0...babe',
|
|
1269
|
+
* }),
|
|
1270
|
+
* ]
|
|
1271
|
+
* })
|
|
1272
|
+
* ```
|
|
1273
|
+
*
|
|
1274
|
+
* @param args - Arguments.
|
|
1275
|
+
* @returns The call.
|
|
1276
|
+
*/
|
|
1277
|
+
function call(args) {
|
|
1278
|
+
const { to, amount, memo, token } = args;
|
|
1279
|
+
const callArgs = memo
|
|
1280
|
+
? {
|
|
1281
|
+
functionName: 'mintWithMemo',
|
|
1282
|
+
args: [to, amount, Hex.padLeft(memo, 32)],
|
|
1283
|
+
}
|
|
1284
|
+
: {
|
|
1285
|
+
functionName: 'mint',
|
|
1286
|
+
args: [to, amount],
|
|
1287
|
+
};
|
|
1288
|
+
return defineCall({
|
|
1289
|
+
address: TokenId.toAddress(token),
|
|
1290
|
+
abi: Abis.tip20,
|
|
1291
|
+
...callArgs,
|
|
1292
|
+
});
|
|
1293
|
+
}
|
|
1294
|
+
mint.call = call;
|
|
1295
|
+
/**
|
|
1296
|
+
* Extracts the event from the logs.
|
|
1297
|
+
*
|
|
1298
|
+
* @param logs - Logs.
|
|
1299
|
+
* @returns The event.
|
|
1300
|
+
*/
|
|
1301
|
+
function extractEvent(logs) {
|
|
1302
|
+
const [log] = parseEventLogs({
|
|
1303
|
+
abi: Abis.tip20,
|
|
1304
|
+
logs,
|
|
1305
|
+
eventName: 'Mint',
|
|
1306
|
+
});
|
|
1307
|
+
if (!log)
|
|
1308
|
+
throw new Error('`Mint` event not found.');
|
|
1309
|
+
return log;
|
|
1310
|
+
}
|
|
1311
|
+
mint.extractEvent = extractEvent;
|
|
1312
|
+
})(mint || (mint = {}));
|
|
1313
|
+
/**
|
|
1314
|
+
* Mints TIP20 tokens to an address.
|
|
1315
|
+
*
|
|
1316
|
+
* @example
|
|
1317
|
+
* ```ts
|
|
1318
|
+
* import { createClient, http } from 'viem'
|
|
1319
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1320
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1321
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1322
|
+
*
|
|
1323
|
+
* const client = createClient({
|
|
1324
|
+
* account: privateKeyToAccount('0x...'),
|
|
1325
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1326
|
+
* transport: http(),
|
|
1327
|
+
* })
|
|
1328
|
+
*
|
|
1329
|
+
* const result = await Actions.token.mintSync(client, {
|
|
1330
|
+
* to: '0x...',
|
|
1331
|
+
* amount: 100n,
|
|
1332
|
+
* token: '0x...',
|
|
1333
|
+
* })
|
|
1334
|
+
* ```
|
|
1335
|
+
*
|
|
1336
|
+
* @param client - Client.
|
|
1337
|
+
* @param parameters - Parameters.
|
|
1338
|
+
* @returns The transaction receipt and event data.
|
|
1339
|
+
*/
|
|
1340
|
+
export async function mintSync(client, parameters) {
|
|
1341
|
+
const { throwOnReceiptRevert = true, ...rest } = parameters;
|
|
1342
|
+
const receipt = await mint.inner(writeContractSync, client, {
|
|
1343
|
+
...rest,
|
|
1344
|
+
throwOnReceiptRevert,
|
|
1345
|
+
});
|
|
1346
|
+
const { args } = mint.extractEvent(receipt.logs);
|
|
1347
|
+
return {
|
|
1348
|
+
...args,
|
|
1349
|
+
receipt,
|
|
1350
|
+
};
|
|
1351
|
+
}
|
|
1352
|
+
/**
|
|
1353
|
+
* Pauses a TIP20 token.
|
|
1354
|
+
*
|
|
1355
|
+
* @example
|
|
1356
|
+
* ```ts
|
|
1357
|
+
* import { createClient, http } from 'viem'
|
|
1358
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1359
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1360
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1361
|
+
*
|
|
1362
|
+
* const client = createClient({
|
|
1363
|
+
* account: privateKeyToAccount('0x...'),
|
|
1364
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1365
|
+
* transport: http(),
|
|
1366
|
+
* })
|
|
1367
|
+
*
|
|
1368
|
+
* const result = await Actions.token.pause(client, {
|
|
1369
|
+
* token: '0x...',
|
|
1370
|
+
* })
|
|
1371
|
+
* ```
|
|
1372
|
+
*
|
|
1373
|
+
* @param client - Client.
|
|
1374
|
+
* @param parameters - Parameters.
|
|
1375
|
+
* @returns The transaction hash.
|
|
1376
|
+
*/
|
|
1377
|
+
export async function pause(client, parameters) {
|
|
1378
|
+
return pause.inner(writeContract, client, parameters);
|
|
1379
|
+
}
|
|
1380
|
+
(function (pause) {
|
|
1381
|
+
/** @internal */
|
|
1382
|
+
async function inner(action, client, parameters) {
|
|
1383
|
+
const { token, ...rest } = parameters;
|
|
1384
|
+
const call = pause.call({ token });
|
|
1385
|
+
return (await action(client, {
|
|
1386
|
+
...rest,
|
|
1387
|
+
...call,
|
|
1388
|
+
}));
|
|
1389
|
+
}
|
|
1390
|
+
pause.inner = inner;
|
|
1391
|
+
/**
|
|
1392
|
+
* Defines a call to the `pause` function.
|
|
1393
|
+
*
|
|
1394
|
+
* Can be passed as a parameter to:
|
|
1395
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
1396
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
1397
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
1398
|
+
*
|
|
1399
|
+
* @example
|
|
1400
|
+
* ```ts
|
|
1401
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
1402
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1403
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1404
|
+
*
|
|
1405
|
+
* const client = createClient({
|
|
1406
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1407
|
+
* transport: http(),
|
|
1408
|
+
* }).extend(walletActions)
|
|
1409
|
+
*
|
|
1410
|
+
* const { result } = await client.sendCalls({
|
|
1411
|
+
* calls: [
|
|
1412
|
+
* actions.token.pause.call({
|
|
1413
|
+
* token: '0x20c0...babe',
|
|
1414
|
+
* }),
|
|
1415
|
+
* ]
|
|
1416
|
+
* })
|
|
1417
|
+
* ```
|
|
1418
|
+
*
|
|
1419
|
+
* @param args - Arguments.
|
|
1420
|
+
* @returns The call.
|
|
1421
|
+
*/
|
|
1422
|
+
function call(args) {
|
|
1423
|
+
const { token } = args;
|
|
1424
|
+
return defineCall({
|
|
1425
|
+
address: TokenId.toAddress(token),
|
|
1426
|
+
abi: Abis.tip20,
|
|
1427
|
+
functionName: 'pause',
|
|
1428
|
+
args: [],
|
|
1429
|
+
});
|
|
1430
|
+
}
|
|
1431
|
+
pause.call = call;
|
|
1432
|
+
/**
|
|
1433
|
+
* Extracts the event from the logs.
|
|
1434
|
+
*
|
|
1435
|
+
* @param logs - Logs.
|
|
1436
|
+
* @returns The event.
|
|
1437
|
+
*/
|
|
1438
|
+
function extractEvent(logs) {
|
|
1439
|
+
const [log] = parseEventLogs({
|
|
1440
|
+
abi: Abis.tip20,
|
|
1441
|
+
logs,
|
|
1442
|
+
eventName: 'PauseStateUpdate',
|
|
1443
|
+
});
|
|
1444
|
+
if (!log)
|
|
1445
|
+
throw new Error('`PauseStateUpdate` event not found.');
|
|
1446
|
+
return log;
|
|
1447
|
+
}
|
|
1448
|
+
pause.extractEvent = extractEvent;
|
|
1449
|
+
})(pause || (pause = {}));
|
|
1450
|
+
/**
|
|
1451
|
+
* Pauses a TIP20 token.
|
|
1452
|
+
*
|
|
1453
|
+
* @example
|
|
1454
|
+
* ```ts
|
|
1455
|
+
* import { createClient, http } from 'viem'
|
|
1456
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1457
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1458
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1459
|
+
*
|
|
1460
|
+
* const client = createClient({
|
|
1461
|
+
* account: privateKeyToAccount('0x...'),
|
|
1462
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1463
|
+
* transport: http(),
|
|
1464
|
+
* })
|
|
1465
|
+
*
|
|
1466
|
+
* const result = await Actions.token.pauseSync(client, {
|
|
1467
|
+
* token: '0x...',
|
|
1468
|
+
* })
|
|
1469
|
+
* ```
|
|
1470
|
+
*
|
|
1471
|
+
* @param client - Client.
|
|
1472
|
+
* @param parameters - Parameters.
|
|
1473
|
+
* @returns The transaction receipt and event data.
|
|
1474
|
+
*/
|
|
1475
|
+
export async function pauseSync(client, parameters) {
|
|
1476
|
+
const { throwOnReceiptRevert = true, ...rest } = parameters;
|
|
1477
|
+
const receipt = await pause.inner(writeContractSync, client, {
|
|
1478
|
+
...rest,
|
|
1479
|
+
throwOnReceiptRevert,
|
|
1480
|
+
});
|
|
1481
|
+
const { args } = pause.extractEvent(receipt.logs);
|
|
1482
|
+
return {
|
|
1483
|
+
...args,
|
|
1484
|
+
receipt,
|
|
1485
|
+
};
|
|
1486
|
+
}
|
|
1487
|
+
/**
|
|
1488
|
+
* Renounces a role for a TIP20 token.
|
|
1489
|
+
*
|
|
1490
|
+
* @example
|
|
1491
|
+
* ```ts
|
|
1492
|
+
* import { createClient, http } from 'viem'
|
|
1493
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1494
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1495
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1496
|
+
*
|
|
1497
|
+
* const client = createClient({
|
|
1498
|
+
* account: privateKeyToAccount('0x...'),
|
|
1499
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1500
|
+
* transport: http(),
|
|
1501
|
+
* })
|
|
1502
|
+
*
|
|
1503
|
+
* const result = await Actions.token.renounceRoles(client, {
|
|
1504
|
+
* token: '0x...',
|
|
1505
|
+
* roles: ['issuer'],
|
|
1506
|
+
* })
|
|
1507
|
+
* ```
|
|
1508
|
+
*
|
|
1509
|
+
* @param client - Client.
|
|
1510
|
+
* @param parameters - Parameters.
|
|
1511
|
+
* @returns The transaction hash.
|
|
1512
|
+
*/
|
|
1513
|
+
export async function renounceRoles(client, parameters) {
|
|
1514
|
+
return renounceRoles.inner(sendTransaction, client, parameters);
|
|
1515
|
+
}
|
|
1516
|
+
(function (renounceRoles) {
|
|
1517
|
+
/** @internal */
|
|
1518
|
+
async function inner(action, client, parameters) {
|
|
1519
|
+
return (await action(client, {
|
|
1520
|
+
...parameters,
|
|
1521
|
+
calls: parameters.roles.map((role) => {
|
|
1522
|
+
const call = renounceRoles.call({ ...parameters, role });
|
|
1523
|
+
return {
|
|
1524
|
+
...call,
|
|
1525
|
+
data: encodeFunctionData(call),
|
|
1526
|
+
};
|
|
1527
|
+
}),
|
|
1528
|
+
}));
|
|
1529
|
+
}
|
|
1530
|
+
renounceRoles.inner = inner;
|
|
1531
|
+
/**
|
|
1532
|
+
* Defines a call to the `renounceRole` function.
|
|
1533
|
+
*
|
|
1534
|
+
* Can be passed as a parameter to:
|
|
1535
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
1536
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
1537
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
1538
|
+
*
|
|
1539
|
+
* @example
|
|
1540
|
+
* ```ts
|
|
1541
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
1542
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1543
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1544
|
+
*
|
|
1545
|
+
* const client = createClient({
|
|
1546
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1547
|
+
* transport: http(),
|
|
1548
|
+
* }).extend(walletActions)
|
|
1549
|
+
*
|
|
1550
|
+
* const { result } = await client.sendCalls({
|
|
1551
|
+
* calls: [
|
|
1552
|
+
* actions.token.renounceRoles.call({
|
|
1553
|
+
* token: '0x20c0...babe',
|
|
1554
|
+
* role: 'issuer',
|
|
1555
|
+
* }),
|
|
1556
|
+
* ]
|
|
1557
|
+
* })
|
|
1558
|
+
* ```
|
|
1559
|
+
*
|
|
1560
|
+
* @param args - Arguments.
|
|
1561
|
+
* @returns The call.
|
|
1562
|
+
*/
|
|
1563
|
+
function call(args) {
|
|
1564
|
+
const { token, role } = args;
|
|
1565
|
+
const roleHash = TokenRole.serialize(role);
|
|
1566
|
+
return defineCall({
|
|
1567
|
+
address: TokenId.toAddress(token),
|
|
1568
|
+
abi: Abis.tip20,
|
|
1569
|
+
functionName: 'renounceRole',
|
|
1570
|
+
args: [roleHash],
|
|
1571
|
+
});
|
|
1572
|
+
}
|
|
1573
|
+
renounceRoles.call = call;
|
|
1574
|
+
/**
|
|
1575
|
+
* Extracts the events from the logs.
|
|
1576
|
+
*
|
|
1577
|
+
* @param logs - Logs.
|
|
1578
|
+
* @returns The events.
|
|
1579
|
+
*/
|
|
1580
|
+
function extractEvents(logs) {
|
|
1581
|
+
const events = parseEventLogs({
|
|
1582
|
+
abi: Abis.tip20,
|
|
1583
|
+
logs,
|
|
1584
|
+
eventName: 'RoleMembershipUpdated',
|
|
1585
|
+
});
|
|
1586
|
+
if (events.length === 0)
|
|
1587
|
+
throw new Error('`RoleMembershipUpdated` events not found.');
|
|
1588
|
+
return events;
|
|
1589
|
+
}
|
|
1590
|
+
renounceRoles.extractEvents = extractEvents;
|
|
1591
|
+
})(renounceRoles || (renounceRoles = {}));
|
|
1592
|
+
/**
|
|
1593
|
+
* Renounces a role for a TIP20 token.
|
|
1594
|
+
*
|
|
1595
|
+
* @example
|
|
1596
|
+
* ```ts
|
|
1597
|
+
* import { createClient, http } from 'viem'
|
|
1598
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1599
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1600
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1601
|
+
*
|
|
1602
|
+
* const client = createClient({
|
|
1603
|
+
* account: privateKeyToAccount('0x...'),
|
|
1604
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1605
|
+
* transport: http(),
|
|
1606
|
+
* })
|
|
1607
|
+
*
|
|
1608
|
+
* const result = await Actions.token.renounceRolesSync(client, {
|
|
1609
|
+
* token: '0x...',
|
|
1610
|
+
* roles: ['issuer'],
|
|
1611
|
+
* })
|
|
1612
|
+
* ```
|
|
1613
|
+
*
|
|
1614
|
+
* @param client - Client.
|
|
1615
|
+
* @param parameters - Parameters.
|
|
1616
|
+
* @returns The transaction receipt and event data.
|
|
1617
|
+
*/
|
|
1618
|
+
export async function renounceRolesSync(client, parameters) {
|
|
1619
|
+
const { throwOnReceiptRevert = true, ...rest } = parameters;
|
|
1620
|
+
const receipt = await renounceRoles.inner(sendTransactionSync, client, {
|
|
1621
|
+
...rest,
|
|
1622
|
+
throwOnReceiptRevert,
|
|
1623
|
+
});
|
|
1624
|
+
const events = renounceRoles.extractEvents(receipt.logs);
|
|
1625
|
+
const value = events.map((event) => event.args);
|
|
1626
|
+
return {
|
|
1627
|
+
receipt,
|
|
1628
|
+
value,
|
|
1629
|
+
};
|
|
1630
|
+
}
|
|
1631
|
+
/**
|
|
1632
|
+
* Revokes a role for a TIP20 token.
|
|
1633
|
+
*
|
|
1634
|
+
* @example
|
|
1635
|
+
* ```ts
|
|
1636
|
+
* import { createClient, http } from 'viem'
|
|
1637
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1638
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1639
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1640
|
+
*
|
|
1641
|
+
* const client = createClient({
|
|
1642
|
+
* account: privateKeyToAccount('0x...'),
|
|
1643
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1644
|
+
* transport: http(),
|
|
1645
|
+
* })
|
|
1646
|
+
*
|
|
1647
|
+
* const result = await Actions.token.revokeRoles(client, {
|
|
1648
|
+
* token: '0x...',
|
|
1649
|
+
* from: '0x...',
|
|
1650
|
+
* roles: ['issuer'],
|
|
1651
|
+
* })
|
|
1652
|
+
* ```
|
|
1653
|
+
*
|
|
1654
|
+
* @param client - Client.
|
|
1655
|
+
* @param parameters - Parameters.
|
|
1656
|
+
* @returns The transaction hash.
|
|
1657
|
+
*/
|
|
1658
|
+
export async function revokeRoles(client, parameters) {
|
|
1659
|
+
return revokeRoles.inner(sendTransaction, client, parameters);
|
|
1660
|
+
}
|
|
1661
|
+
(function (revokeRoles) {
|
|
1662
|
+
/** @internal */
|
|
1663
|
+
async function inner(action, client, parameters) {
|
|
1664
|
+
return (await action(client, {
|
|
1665
|
+
...parameters,
|
|
1666
|
+
calls: parameters.roles.map((role) => {
|
|
1667
|
+
const call = revokeRoles.call({ ...parameters, role });
|
|
1668
|
+
return {
|
|
1669
|
+
...call,
|
|
1670
|
+
data: encodeFunctionData(call),
|
|
1671
|
+
};
|
|
1672
|
+
}),
|
|
1673
|
+
}));
|
|
1674
|
+
}
|
|
1675
|
+
revokeRoles.inner = inner;
|
|
1676
|
+
/**
|
|
1677
|
+
* Defines a call to the `revokeRole` function.
|
|
1678
|
+
*
|
|
1679
|
+
* Can be passed as a parameter to:
|
|
1680
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
1681
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
1682
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
1683
|
+
*
|
|
1684
|
+
* @example
|
|
1685
|
+
* ```ts
|
|
1686
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
1687
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1688
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1689
|
+
*
|
|
1690
|
+
* const client = createClient({
|
|
1691
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1692
|
+
* transport: http(),
|
|
1693
|
+
* }).extend(walletActions)
|
|
1694
|
+
*
|
|
1695
|
+
* const { result } = await client.sendCalls({
|
|
1696
|
+
* calls: [
|
|
1697
|
+
* actions.token.revokeRoles.call({
|
|
1698
|
+
* token: '0x20c0...babe',
|
|
1699
|
+
* from: '0x20c0...beef',
|
|
1700
|
+
* role: 'issuer',
|
|
1701
|
+
* }),
|
|
1702
|
+
* ]
|
|
1703
|
+
* })
|
|
1704
|
+
* ```
|
|
1705
|
+
*
|
|
1706
|
+
* @param args - Arguments.
|
|
1707
|
+
* @returns The call.
|
|
1708
|
+
*/
|
|
1709
|
+
function call(args) {
|
|
1710
|
+
const { token, from, role } = args;
|
|
1711
|
+
const roleHash = TokenRole.serialize(role);
|
|
1712
|
+
return defineCall({
|
|
1713
|
+
address: TokenId.toAddress(token),
|
|
1714
|
+
abi: Abis.tip20,
|
|
1715
|
+
functionName: 'revokeRole',
|
|
1716
|
+
args: [roleHash, from],
|
|
1717
|
+
});
|
|
1718
|
+
}
|
|
1719
|
+
revokeRoles.call = call;
|
|
1720
|
+
/**
|
|
1721
|
+
* Extracts the events from the logs.
|
|
1722
|
+
*
|
|
1723
|
+
* @param logs - Logs.
|
|
1724
|
+
* @returns The events.
|
|
1725
|
+
*/
|
|
1726
|
+
function extractEvents(logs) {
|
|
1727
|
+
const events = parseEventLogs({
|
|
1728
|
+
abi: Abis.tip20,
|
|
1729
|
+
logs,
|
|
1730
|
+
eventName: 'RoleMembershipUpdated',
|
|
1731
|
+
});
|
|
1732
|
+
if (events.length === 0)
|
|
1733
|
+
throw new Error('`RoleMembershipUpdated` events not found.');
|
|
1734
|
+
return events;
|
|
1735
|
+
}
|
|
1736
|
+
revokeRoles.extractEvents = extractEvents;
|
|
1737
|
+
})(revokeRoles || (revokeRoles = {}));
|
|
1738
|
+
/**
|
|
1739
|
+
* Revokes a role for a TIP20 token.
|
|
1740
|
+
*
|
|
1741
|
+
* @example
|
|
1742
|
+
* ```ts
|
|
1743
|
+
* import { createClient, http } from 'viem'
|
|
1744
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1745
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1746
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1747
|
+
*
|
|
1748
|
+
* const client = createClient({
|
|
1749
|
+
* account: privateKeyToAccount('0x...'),
|
|
1750
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1751
|
+
* transport: http(),
|
|
1752
|
+
* })
|
|
1753
|
+
*
|
|
1754
|
+
* const result = await Actions.token.revokeRolesSync(client, {
|
|
1755
|
+
* token: '0x...',
|
|
1756
|
+
* from: '0x...',
|
|
1757
|
+
* roles: ['issuer'],
|
|
1758
|
+
* })
|
|
1759
|
+
* ```
|
|
1760
|
+
*
|
|
1761
|
+
* @param client - Client.
|
|
1762
|
+
* @param parameters - Parameters.
|
|
1763
|
+
* @returns The transaction receipt and event data.
|
|
1764
|
+
*/
|
|
1765
|
+
export async function revokeRolesSync(client, parameters) {
|
|
1766
|
+
const { throwOnReceiptRevert = true, ...rest } = parameters;
|
|
1767
|
+
const receipt = await revokeRoles.inner(sendTransactionSync, client, {
|
|
1768
|
+
...rest,
|
|
1769
|
+
throwOnReceiptRevert,
|
|
1770
|
+
});
|
|
1771
|
+
const events = revokeRoles.extractEvents(receipt.logs);
|
|
1772
|
+
const value = events.map((event) => event.args);
|
|
1773
|
+
return {
|
|
1774
|
+
receipt,
|
|
1775
|
+
value,
|
|
1776
|
+
};
|
|
1777
|
+
}
|
|
1778
|
+
/**
|
|
1779
|
+
* Sets the supply cap for a TIP20 token.
|
|
1780
|
+
*
|
|
1781
|
+
* @example
|
|
1782
|
+
* ```ts
|
|
1783
|
+
* import { createClient, http } from 'viem'
|
|
1784
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1785
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1786
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1787
|
+
*
|
|
1788
|
+
* const client = createClient({
|
|
1789
|
+
* account: privateKeyToAccount('0x...'),
|
|
1790
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1791
|
+
* transport: http(),
|
|
1792
|
+
* })
|
|
1793
|
+
*
|
|
1794
|
+
* const result = await Actions.token.setSupplyCap(client, {
|
|
1795
|
+
* token: '0x...',
|
|
1796
|
+
* supplyCap: 1000000n,
|
|
1797
|
+
* })
|
|
1798
|
+
* ```
|
|
1799
|
+
*
|
|
1800
|
+
* @param client - Client.
|
|
1801
|
+
* @param parameters - Parameters.
|
|
1802
|
+
* @returns The transaction hash.
|
|
1803
|
+
*/
|
|
1804
|
+
export async function setSupplyCap(client, parameters) {
|
|
1805
|
+
return setSupplyCap.inner(writeContract, client, parameters);
|
|
1806
|
+
}
|
|
1807
|
+
(function (setSupplyCap) {
|
|
1808
|
+
/** @internal */
|
|
1809
|
+
async function inner(action, client, parameters) {
|
|
1810
|
+
const { supplyCap, token, ...rest } = parameters;
|
|
1811
|
+
const call = setSupplyCap.call({ supplyCap, token });
|
|
1812
|
+
return (await action(client, {
|
|
1813
|
+
...rest,
|
|
1814
|
+
...call,
|
|
1815
|
+
}));
|
|
1816
|
+
}
|
|
1817
|
+
setSupplyCap.inner = inner;
|
|
1818
|
+
/**
|
|
1819
|
+
* Defines a call to the `setSupplyCap` function.
|
|
1820
|
+
*
|
|
1821
|
+
* Can be passed as a parameter to:
|
|
1822
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
1823
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
1824
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
1825
|
+
*
|
|
1826
|
+
* @example
|
|
1827
|
+
* ```ts
|
|
1828
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
1829
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1830
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1831
|
+
*
|
|
1832
|
+
* const client = createClient({
|
|
1833
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1834
|
+
* transport: http(),
|
|
1835
|
+
* }).extend(walletActions)
|
|
1836
|
+
*
|
|
1837
|
+
* const { result } = await client.sendCalls({
|
|
1838
|
+
* calls: [
|
|
1839
|
+
* actions.token.setSupplyCap.call({
|
|
1840
|
+
* token: '0x20c0...babe',
|
|
1841
|
+
* supplyCap: 1000000n,
|
|
1842
|
+
* }),
|
|
1843
|
+
* ]
|
|
1844
|
+
* })
|
|
1845
|
+
* ```
|
|
1846
|
+
*
|
|
1847
|
+
* @param args - Arguments.
|
|
1848
|
+
* @returns The call.
|
|
1849
|
+
*/
|
|
1850
|
+
function call(args) {
|
|
1851
|
+
const { token, supplyCap } = args;
|
|
1852
|
+
return defineCall({
|
|
1853
|
+
address: TokenId.toAddress(token),
|
|
1854
|
+
abi: Abis.tip20,
|
|
1855
|
+
functionName: 'setSupplyCap',
|
|
1856
|
+
args: [supplyCap],
|
|
1857
|
+
});
|
|
1858
|
+
}
|
|
1859
|
+
setSupplyCap.call = call;
|
|
1860
|
+
/**
|
|
1861
|
+
* Extracts the event from the logs.
|
|
1862
|
+
*
|
|
1863
|
+
* @param logs - Logs.
|
|
1864
|
+
* @returns The event.
|
|
1865
|
+
*/
|
|
1866
|
+
function extractEvent(logs) {
|
|
1867
|
+
const [log] = parseEventLogs({
|
|
1868
|
+
abi: Abis.tip20,
|
|
1869
|
+
logs,
|
|
1870
|
+
eventName: 'SupplyCapUpdate',
|
|
1871
|
+
});
|
|
1872
|
+
if (!log)
|
|
1873
|
+
throw new Error('`SupplyCapUpdate` event not found.');
|
|
1874
|
+
return log;
|
|
1875
|
+
}
|
|
1876
|
+
setSupplyCap.extractEvent = extractEvent;
|
|
1877
|
+
})(setSupplyCap || (setSupplyCap = {}));
|
|
1878
|
+
/**
|
|
1879
|
+
* Sets the supply cap for a TIP20 token.
|
|
1880
|
+
*
|
|
1881
|
+
* @example
|
|
1882
|
+
* ```ts
|
|
1883
|
+
* import { createClient, http } from 'viem'
|
|
1884
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1885
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1886
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1887
|
+
*
|
|
1888
|
+
* const client = createClient({
|
|
1889
|
+
* account: privateKeyToAccount('0x...'),
|
|
1890
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1891
|
+
* transport: http(),
|
|
1892
|
+
* })
|
|
1893
|
+
*
|
|
1894
|
+
* const result = await Actions.token.setSupplyCapSync(client, {
|
|
1895
|
+
* token: '0x...',
|
|
1896
|
+
* supplyCap: 1000000n,
|
|
1897
|
+
* })
|
|
1898
|
+
* ```
|
|
1899
|
+
*
|
|
1900
|
+
* @param client - Client.
|
|
1901
|
+
* @param parameters - Parameters.
|
|
1902
|
+
* @returns The transaction receipt and event data.
|
|
1903
|
+
*/
|
|
1904
|
+
export async function setSupplyCapSync(client, parameters) {
|
|
1905
|
+
const { throwOnReceiptRevert = true, ...rest } = parameters;
|
|
1906
|
+
const receipt = await setSupplyCap.inner(writeContractSync, client, {
|
|
1907
|
+
...rest,
|
|
1908
|
+
throwOnReceiptRevert,
|
|
1909
|
+
});
|
|
1910
|
+
const { args } = setSupplyCap.extractEvent(receipt.logs);
|
|
1911
|
+
return {
|
|
1912
|
+
...args,
|
|
1913
|
+
receipt,
|
|
1914
|
+
};
|
|
1915
|
+
}
|
|
1916
|
+
/**
|
|
1917
|
+
* Sets the admin role for a specific role in a TIP20 token.
|
|
1918
|
+
*
|
|
1919
|
+
* @example
|
|
1920
|
+
* ```ts
|
|
1921
|
+
* import { createClient, http } from 'viem'
|
|
1922
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1923
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1924
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1925
|
+
*
|
|
1926
|
+
* const client = createClient({
|
|
1927
|
+
* account: privateKeyToAccount('0x...'),
|
|
1928
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1929
|
+
* transport: http(),
|
|
1930
|
+
* })
|
|
1931
|
+
*
|
|
1932
|
+
* const result = await Actions.token.setRoleAdmin(client, {
|
|
1933
|
+
* token: '0x...',
|
|
1934
|
+
* role: 'issuer',
|
|
1935
|
+
* adminRole: 'admin',
|
|
1936
|
+
* })
|
|
1937
|
+
* ```
|
|
1938
|
+
*
|
|
1939
|
+
* @param client - Client.
|
|
1940
|
+
* @param parameters - Parameters.
|
|
1941
|
+
* @returns The transaction hash.
|
|
1942
|
+
*/
|
|
1943
|
+
export async function setRoleAdmin(client, parameters) {
|
|
1944
|
+
return setRoleAdmin.inner(writeContract, client, parameters);
|
|
1945
|
+
}
|
|
1946
|
+
(function (setRoleAdmin) {
|
|
1947
|
+
/** @internal */
|
|
1948
|
+
async function inner(action, client, parameters) {
|
|
1949
|
+
const { adminRole, role, token, ...rest } = parameters;
|
|
1950
|
+
const call = setRoleAdmin.call({ adminRole, role, token });
|
|
1951
|
+
return (await action(client, {
|
|
1952
|
+
...rest,
|
|
1953
|
+
...call,
|
|
1954
|
+
}));
|
|
1955
|
+
}
|
|
1956
|
+
setRoleAdmin.inner = inner;
|
|
1957
|
+
/**
|
|
1958
|
+
* Defines a call to the `setRoleAdmin` function.
|
|
1959
|
+
*
|
|
1960
|
+
* Can be passed as a parameter to:
|
|
1961
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
1962
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
1963
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
1964
|
+
*
|
|
1965
|
+
* @example
|
|
1966
|
+
* ```ts
|
|
1967
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
1968
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1969
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1970
|
+
*
|
|
1971
|
+
* const client = createClient({
|
|
1972
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1973
|
+
* transport: http(),
|
|
1974
|
+
* }).extend(walletActions)
|
|
1975
|
+
*
|
|
1976
|
+
* const { result } = await client.sendCalls({
|
|
1977
|
+
* calls: [
|
|
1978
|
+
* actions.token.setRoleAdmin.call({
|
|
1979
|
+
* token: '0x20c0...babe',
|
|
1980
|
+
* role: 'issuer',
|
|
1981
|
+
* adminRole: 'admin',
|
|
1982
|
+
* }),
|
|
1983
|
+
* ]
|
|
1984
|
+
* })
|
|
1985
|
+
* ```
|
|
1986
|
+
*
|
|
1987
|
+
* @param args - Arguments.
|
|
1988
|
+
* @returns The call.
|
|
1989
|
+
*/
|
|
1990
|
+
function call(args) {
|
|
1991
|
+
const { token, role, adminRole } = args;
|
|
1992
|
+
const roleHash = TokenRole.serialize(role);
|
|
1993
|
+
const adminRoleHash = TokenRole.serialize(adminRole);
|
|
1994
|
+
return defineCall({
|
|
1995
|
+
address: TokenId.toAddress(token),
|
|
1996
|
+
abi: Abis.tip20,
|
|
1997
|
+
functionName: 'setRoleAdmin',
|
|
1998
|
+
args: [roleHash, adminRoleHash],
|
|
1999
|
+
});
|
|
2000
|
+
}
|
|
2001
|
+
setRoleAdmin.call = call;
|
|
2002
|
+
/**
|
|
2003
|
+
* Extracts the event from the logs.
|
|
2004
|
+
*
|
|
2005
|
+
* @param logs - Logs.
|
|
2006
|
+
* @returns The event.
|
|
2007
|
+
*/
|
|
2008
|
+
function extractEvent(logs) {
|
|
2009
|
+
const [log] = parseEventLogs({
|
|
2010
|
+
abi: Abis.tip20,
|
|
2011
|
+
logs,
|
|
2012
|
+
eventName: 'RoleAdminUpdated',
|
|
2013
|
+
});
|
|
2014
|
+
if (!log)
|
|
2015
|
+
throw new Error('`RoleAdminUpdated` event not found.');
|
|
2016
|
+
return log;
|
|
2017
|
+
}
|
|
2018
|
+
setRoleAdmin.extractEvent = extractEvent;
|
|
2019
|
+
})(setRoleAdmin || (setRoleAdmin = {}));
|
|
2020
|
+
/**
|
|
2021
|
+
* Sets the admin role for a specific role in a TIP20 token.
|
|
2022
|
+
*
|
|
2023
|
+
* @example
|
|
2024
|
+
* ```ts
|
|
2025
|
+
* import { createClient, http } from 'viem'
|
|
2026
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2027
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2028
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
2029
|
+
*
|
|
2030
|
+
* const client = createClient({
|
|
2031
|
+
* account: privateKeyToAccount('0x...'),
|
|
2032
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2033
|
+
* transport: http(),
|
|
2034
|
+
* })
|
|
2035
|
+
*
|
|
2036
|
+
* const result = await Actions.token.setRoleAdminSync(client, {
|
|
2037
|
+
* token: '0x...',
|
|
2038
|
+
* role: 'issuer',
|
|
2039
|
+
* adminRole: 'admin',
|
|
2040
|
+
* })
|
|
2041
|
+
* ```
|
|
2042
|
+
*
|
|
2043
|
+
* @param client - Client.
|
|
2044
|
+
* @param parameters - Parameters.
|
|
2045
|
+
* @returns The transaction receipt and event data.
|
|
2046
|
+
*/
|
|
2047
|
+
export async function setRoleAdminSync(client, parameters) {
|
|
2048
|
+
const { throwOnReceiptRevert = true, ...rest } = parameters;
|
|
2049
|
+
const receipt = await setRoleAdmin.inner(writeContractSync, client, {
|
|
2050
|
+
...rest,
|
|
2051
|
+
throwOnReceiptRevert,
|
|
2052
|
+
});
|
|
2053
|
+
const { args } = setRoleAdmin.extractEvent(receipt.logs);
|
|
2054
|
+
return {
|
|
2055
|
+
...args,
|
|
2056
|
+
receipt,
|
|
2057
|
+
};
|
|
2058
|
+
}
|
|
2059
|
+
/**
|
|
2060
|
+
* Transfers TIP20 tokens to another address.
|
|
2061
|
+
*
|
|
2062
|
+
* @example
|
|
2063
|
+
* ```ts
|
|
2064
|
+
* import { createClient, http } from 'viem'
|
|
2065
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2066
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2067
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
2068
|
+
*
|
|
2069
|
+
* const client = createClient({
|
|
2070
|
+
* account: privateKeyToAccount('0x...'),
|
|
2071
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2072
|
+
* transport: http(),
|
|
2073
|
+
* })
|
|
2074
|
+
*
|
|
2075
|
+
* const result = await Actions.token.transfer(client, {
|
|
2076
|
+
* to: '0x...',
|
|
2077
|
+
* amount: 100n,
|
|
2078
|
+
* })
|
|
2079
|
+
* ```
|
|
2080
|
+
*
|
|
2081
|
+
* @param client - Client.
|
|
2082
|
+
* @param parameters - Parameters.
|
|
2083
|
+
* @returns The transaction hash.
|
|
2084
|
+
*/
|
|
2085
|
+
export async function transfer(client, parameters) {
|
|
2086
|
+
return transfer.inner(writeContract, client, parameters);
|
|
2087
|
+
}
|
|
2088
|
+
(function (transfer) {
|
|
2089
|
+
/** @internal */
|
|
2090
|
+
async function inner(action, client, parameters) {
|
|
2091
|
+
const { amount, from, memo, token, to, ...rest } = parameters;
|
|
2092
|
+
const call = transfer.call({ amount, from, memo, token, to });
|
|
2093
|
+
return (await action(client, {
|
|
2094
|
+
...rest,
|
|
2095
|
+
...call,
|
|
2096
|
+
}));
|
|
2097
|
+
}
|
|
2098
|
+
transfer.inner = inner;
|
|
2099
|
+
/**
|
|
2100
|
+
* Defines a call to the `transfer`, `transferFrom`, `transferWithMemo`, or `transferFromWithMemo` function.
|
|
2101
|
+
*
|
|
2102
|
+
* Can be passed as a parameter to:
|
|
2103
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
2104
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
2105
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
2106
|
+
*
|
|
2107
|
+
* @example
|
|
2108
|
+
* ```ts
|
|
2109
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
2110
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2111
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2112
|
+
*
|
|
2113
|
+
* const client = createClient({
|
|
2114
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2115
|
+
* transport: http(),
|
|
2116
|
+
* }).extend(walletActions)
|
|
2117
|
+
*
|
|
2118
|
+
* const { result } = await client.sendCalls({
|
|
2119
|
+
* calls: [
|
|
2120
|
+
* actions.token.transfer.call({
|
|
2121
|
+
* to: '0x20c0...beef',
|
|
2122
|
+
* amount: 100n,
|
|
2123
|
+
* token: '0x20c0...babe',
|
|
2124
|
+
* }),
|
|
2125
|
+
* ]
|
|
2126
|
+
* })
|
|
2127
|
+
* ```
|
|
2128
|
+
*
|
|
2129
|
+
* @param args - Arguments.
|
|
2130
|
+
* @returns The call.
|
|
2131
|
+
*/
|
|
2132
|
+
function call(args) {
|
|
2133
|
+
const { amount, from, memo, token, to } = args;
|
|
2134
|
+
const callArgs = (() => {
|
|
2135
|
+
if (memo && from)
|
|
2136
|
+
return {
|
|
2137
|
+
functionName: 'transferFromWithMemo',
|
|
2138
|
+
args: [from, to, amount, Hex.padLeft(memo, 32)],
|
|
2139
|
+
};
|
|
2140
|
+
if (memo)
|
|
2141
|
+
return {
|
|
2142
|
+
functionName: 'transferWithMemo',
|
|
2143
|
+
args: [to, amount, Hex.padLeft(memo, 32)],
|
|
2144
|
+
};
|
|
2145
|
+
if (from)
|
|
2146
|
+
return {
|
|
2147
|
+
functionName: 'transferFrom',
|
|
2148
|
+
args: [from, to, amount],
|
|
2149
|
+
};
|
|
2150
|
+
return {
|
|
2151
|
+
functionName: 'transfer',
|
|
2152
|
+
args: [to, amount],
|
|
2153
|
+
};
|
|
2154
|
+
})();
|
|
2155
|
+
return defineCall({
|
|
2156
|
+
address: TokenId.toAddress(token),
|
|
2157
|
+
abi: Abis.tip20,
|
|
2158
|
+
...callArgs,
|
|
2159
|
+
});
|
|
2160
|
+
}
|
|
2161
|
+
transfer.call = call;
|
|
2162
|
+
/**
|
|
2163
|
+
* Extracts the event from the logs.
|
|
2164
|
+
*
|
|
2165
|
+
* @param logs - Logs.
|
|
2166
|
+
* @returns The event.
|
|
2167
|
+
*/
|
|
2168
|
+
function extractEvent(logs) {
|
|
2169
|
+
const [log] = parseEventLogs({
|
|
2170
|
+
abi: Abis.tip20,
|
|
2171
|
+
logs,
|
|
2172
|
+
eventName: 'Transfer',
|
|
2173
|
+
});
|
|
2174
|
+
if (!log)
|
|
2175
|
+
throw new Error('`Transfer` event not found.');
|
|
2176
|
+
return log;
|
|
2177
|
+
}
|
|
2178
|
+
transfer.extractEvent = extractEvent;
|
|
2179
|
+
})(transfer || (transfer = {}));
|
|
2180
|
+
/**
|
|
2181
|
+
* Transfers TIP20 tokens to another address.
|
|
2182
|
+
*
|
|
2183
|
+
* @example
|
|
2184
|
+
* ```ts
|
|
2185
|
+
* import { createClient, http } from 'viem'
|
|
2186
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2187
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2188
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
2189
|
+
*
|
|
2190
|
+
* const client = createClient({
|
|
2191
|
+
* account: privateKeyToAccount('0x...'),
|
|
2192
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2193
|
+
* transport: http(),
|
|
2194
|
+
* })
|
|
2195
|
+
*
|
|
2196
|
+
* const result = await Actions.token.transferSync(client, {
|
|
2197
|
+
* to: '0x...',
|
|
2198
|
+
* amount: 100n,
|
|
2199
|
+
* })
|
|
2200
|
+
* ```
|
|
2201
|
+
*
|
|
2202
|
+
* @param client - Client.
|
|
2203
|
+
* @param parameters - Parameters.
|
|
2204
|
+
* @returns The transaction receipt and event data.
|
|
2205
|
+
*/
|
|
2206
|
+
export async function transferSync(client, parameters) {
|
|
2207
|
+
const { throwOnReceiptRevert = true, ...rest } = parameters;
|
|
2208
|
+
const receipt = await transfer.inner(writeContractSync, client, {
|
|
2209
|
+
...rest,
|
|
2210
|
+
throwOnReceiptRevert,
|
|
2211
|
+
});
|
|
2212
|
+
const { args } = transfer.extractEvent(receipt.logs);
|
|
2213
|
+
return {
|
|
2214
|
+
...args,
|
|
2215
|
+
receipt,
|
|
2216
|
+
};
|
|
2217
|
+
}
|
|
2218
|
+
/**
|
|
2219
|
+
* Unpauses a TIP20 token.
|
|
2220
|
+
*
|
|
2221
|
+
* @example
|
|
2222
|
+
* ```ts
|
|
2223
|
+
* import { createClient, http } from 'viem'
|
|
2224
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2225
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2226
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
2227
|
+
*
|
|
2228
|
+
* const client = createClient({
|
|
2229
|
+
* account: privateKeyToAccount('0x...'),
|
|
2230
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2231
|
+
* transport: http(),
|
|
2232
|
+
* })
|
|
2233
|
+
*
|
|
2234
|
+
* const result = await Actions.token.unpause(client, {
|
|
2235
|
+
* token: '0x...',
|
|
2236
|
+
* })
|
|
2237
|
+
* ```
|
|
2238
|
+
*
|
|
2239
|
+
* @param client - Client.
|
|
2240
|
+
* @param parameters - Parameters.
|
|
2241
|
+
* @returns The transaction hash.
|
|
2242
|
+
*/
|
|
2243
|
+
export async function unpause(client, parameters) {
|
|
2244
|
+
return unpause.inner(writeContract, client, parameters);
|
|
2245
|
+
}
|
|
2246
|
+
(function (unpause) {
|
|
2247
|
+
/** @internal */
|
|
2248
|
+
async function inner(action, client, parameters) {
|
|
2249
|
+
const { token, ...rest } = parameters;
|
|
2250
|
+
const call = unpause.call({ token });
|
|
2251
|
+
return (await action(client, {
|
|
2252
|
+
...rest,
|
|
2253
|
+
...call,
|
|
2254
|
+
}));
|
|
2255
|
+
}
|
|
2256
|
+
unpause.inner = inner;
|
|
2257
|
+
/**
|
|
2258
|
+
* Defines a call to the `unpause` function.
|
|
2259
|
+
*
|
|
2260
|
+
* Can be passed as a parameter to:
|
|
2261
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
2262
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
2263
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
2264
|
+
*
|
|
2265
|
+
* @example
|
|
2266
|
+
* ```ts
|
|
2267
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
2268
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2269
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2270
|
+
*
|
|
2271
|
+
* const client = createClient({
|
|
2272
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2273
|
+
* transport: http(),
|
|
2274
|
+
* }).extend(walletActions)
|
|
2275
|
+
*
|
|
2276
|
+
* const { result } = await client.sendCalls({
|
|
2277
|
+
* calls: [
|
|
2278
|
+
* actions.token.unpause.call({
|
|
2279
|
+
* token: '0x20c0...babe',
|
|
2280
|
+
* }),
|
|
2281
|
+
* ]
|
|
2282
|
+
* })
|
|
2283
|
+
* ```
|
|
2284
|
+
*
|
|
2285
|
+
* @param args - Arguments.
|
|
2286
|
+
* @returns The call.
|
|
2287
|
+
*/
|
|
2288
|
+
function call(args) {
|
|
2289
|
+
const { token } = args;
|
|
2290
|
+
return defineCall({
|
|
2291
|
+
address: TokenId.toAddress(token),
|
|
2292
|
+
abi: Abis.tip20,
|
|
2293
|
+
functionName: 'unpause',
|
|
2294
|
+
args: [],
|
|
2295
|
+
});
|
|
2296
|
+
}
|
|
2297
|
+
unpause.call = call;
|
|
2298
|
+
/**
|
|
2299
|
+
* Extracts the event from the logs.
|
|
2300
|
+
*
|
|
2301
|
+
* @param logs - Logs.
|
|
2302
|
+
* @returns The event.
|
|
2303
|
+
*/
|
|
2304
|
+
function extractEvent(logs) {
|
|
2305
|
+
const [log] = parseEventLogs({
|
|
2306
|
+
abi: Abis.tip20,
|
|
2307
|
+
logs,
|
|
2308
|
+
eventName: 'PauseStateUpdate',
|
|
2309
|
+
});
|
|
2310
|
+
if (!log)
|
|
2311
|
+
throw new Error('`PauseStateUpdate` event not found.');
|
|
2312
|
+
return log;
|
|
2313
|
+
}
|
|
2314
|
+
unpause.extractEvent = extractEvent;
|
|
2315
|
+
})(unpause || (unpause = {}));
|
|
2316
|
+
/**
|
|
2317
|
+
* Unpauses a TIP20 token.
|
|
2318
|
+
*
|
|
2319
|
+
* @example
|
|
2320
|
+
* ```ts
|
|
2321
|
+
* import { createClient, http } from 'viem'
|
|
2322
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2323
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2324
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
2325
|
+
*
|
|
2326
|
+
* const client = createClient({
|
|
2327
|
+
* account: privateKeyToAccount('0x...'),
|
|
2328
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2329
|
+
* transport: http(),
|
|
2330
|
+
* })
|
|
2331
|
+
*
|
|
2332
|
+
* const result = await Actions.token.unpauseSync(client, {
|
|
2333
|
+
* token: '0x...',
|
|
2334
|
+
* })
|
|
2335
|
+
* ```
|
|
2336
|
+
*
|
|
2337
|
+
* @param client - Client.
|
|
2338
|
+
* @param parameters - Parameters.
|
|
2339
|
+
* @returns The transaction receipt and event data.
|
|
2340
|
+
*/
|
|
2341
|
+
export async function unpauseSync(client, parameters) {
|
|
2342
|
+
const { throwOnReceiptRevert = true, ...rest } = parameters;
|
|
2343
|
+
const receipt = await unpause.inner(writeContractSync, client, {
|
|
2344
|
+
...rest,
|
|
2345
|
+
throwOnReceiptRevert,
|
|
2346
|
+
});
|
|
2347
|
+
const { args } = unpause.extractEvent(receipt.logs);
|
|
2348
|
+
return {
|
|
2349
|
+
...args,
|
|
2350
|
+
receipt,
|
|
2351
|
+
};
|
|
2352
|
+
}
|
|
2353
|
+
/**
|
|
2354
|
+
* Updates the quote token for a TIP20 token.
|
|
2355
|
+
*
|
|
2356
|
+
* @example
|
|
2357
|
+
* ```ts
|
|
2358
|
+
* import { createClient, http } from 'viem'
|
|
2359
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2360
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2361
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
2362
|
+
*
|
|
2363
|
+
* const client = createClient({
|
|
2364
|
+
* account: privateKeyToAccount('0x...'),
|
|
2365
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2366
|
+
* transport: http(),
|
|
2367
|
+
* })
|
|
2368
|
+
*
|
|
2369
|
+
* const result = await Actions.token.prepareUpdateQuoteToken(client, {
|
|
2370
|
+
* token: '0x...',
|
|
2371
|
+
* quoteToken: '0x...',
|
|
2372
|
+
* })
|
|
2373
|
+
* ```
|
|
2374
|
+
*
|
|
2375
|
+
* @param client - Client.
|
|
2376
|
+
* @param parameters - Parameters.
|
|
2377
|
+
* @returns The transaction hash.
|
|
2378
|
+
*/
|
|
2379
|
+
export async function prepareUpdateQuoteToken(client, parameters) {
|
|
2380
|
+
return prepareUpdateQuoteToken.inner(writeContract, client, parameters);
|
|
2381
|
+
}
|
|
2382
|
+
(function (prepareUpdateQuoteToken) {
|
|
2383
|
+
/** @internal */
|
|
2384
|
+
async function inner(action, client, parameters) {
|
|
2385
|
+
const { quoteToken, token, ...rest } = parameters;
|
|
2386
|
+
const call = prepareUpdateQuoteToken.call({ quoteToken, token });
|
|
2387
|
+
return (await action(client, {
|
|
2388
|
+
...rest,
|
|
2389
|
+
...call,
|
|
2390
|
+
}));
|
|
2391
|
+
}
|
|
2392
|
+
prepareUpdateQuoteToken.inner = inner;
|
|
2393
|
+
/**
|
|
2394
|
+
* Defines a call to the `prepareUpdateQuoteToken` function.
|
|
2395
|
+
*
|
|
2396
|
+
* Can be passed as a parameter to:
|
|
2397
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
2398
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
2399
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
2400
|
+
*
|
|
2401
|
+
* @example
|
|
2402
|
+
* ```ts
|
|
2403
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
2404
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2405
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2406
|
+
*
|
|
2407
|
+
* const client = createClient({
|
|
2408
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2409
|
+
* transport: http(),
|
|
2410
|
+
* }).extend(walletActions)
|
|
2411
|
+
*
|
|
2412
|
+
* const { result } = await client.sendCalls({
|
|
2413
|
+
* calls: [
|
|
2414
|
+
* actions.token.prepareUpdateQuoteToken.call({
|
|
2415
|
+
* token: '0x20c0...babe',
|
|
2416
|
+
* quoteToken: '0x20c0...cafe',
|
|
2417
|
+
* }),
|
|
2418
|
+
* ]
|
|
2419
|
+
* })
|
|
2420
|
+
* ```
|
|
2421
|
+
*
|
|
2422
|
+
* @param args - Arguments.
|
|
2423
|
+
* @returns The call.
|
|
2424
|
+
*/
|
|
2425
|
+
function call(args) {
|
|
2426
|
+
const { token, quoteToken } = args;
|
|
2427
|
+
return defineCall({
|
|
2428
|
+
address: TokenId.toAddress(token),
|
|
2429
|
+
abi: Abis.tip20,
|
|
2430
|
+
functionName: 'setNextQuoteToken',
|
|
2431
|
+
args: [TokenId.toAddress(quoteToken)],
|
|
2432
|
+
});
|
|
2433
|
+
}
|
|
2434
|
+
prepareUpdateQuoteToken.call = call;
|
|
2435
|
+
/**
|
|
2436
|
+
* Extracts the event from the logs.
|
|
2437
|
+
*
|
|
2438
|
+
* @param logs - Logs.
|
|
2439
|
+
* @returns The event.
|
|
2440
|
+
*/
|
|
2441
|
+
function extractEvent(logs) {
|
|
2442
|
+
const [log] = parseEventLogs({
|
|
2443
|
+
abi: Abis.tip20,
|
|
2444
|
+
logs,
|
|
2445
|
+
eventName: 'NextQuoteTokenSet',
|
|
2446
|
+
});
|
|
2447
|
+
if (!log)
|
|
2448
|
+
throw new Error('`NextQuoteTokenSet` event not found.');
|
|
2449
|
+
return log;
|
|
2450
|
+
}
|
|
2451
|
+
prepareUpdateQuoteToken.extractEvent = extractEvent;
|
|
2452
|
+
})(prepareUpdateQuoteToken || (prepareUpdateQuoteToken = {}));
|
|
2453
|
+
/**
|
|
2454
|
+
* Updates the quote token for a TIP20 token.
|
|
2455
|
+
*
|
|
2456
|
+
* @example
|
|
2457
|
+
* ```ts
|
|
2458
|
+
* import { createClient, http } from 'viem'
|
|
2459
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2460
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2461
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
2462
|
+
*
|
|
2463
|
+
* const client = createClient({
|
|
2464
|
+
* account: privateKeyToAccount('0x...'),
|
|
2465
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2466
|
+
* transport: http(),
|
|
2467
|
+
* })
|
|
2468
|
+
*
|
|
2469
|
+
* const result = await Actions.token.prepareUpdateQuoteTokenSync(client, {
|
|
2470
|
+
* token: '0x...',
|
|
2471
|
+
* quoteToken: '0x...',
|
|
2472
|
+
* })
|
|
2473
|
+
* ```
|
|
2474
|
+
*
|
|
2475
|
+
* @param client - Client.
|
|
2476
|
+
* @param parameters - Parameters.
|
|
2477
|
+
* @returns The transaction receipt and event data.
|
|
2478
|
+
*/
|
|
2479
|
+
export async function prepareUpdateQuoteTokenSync(client, parameters) {
|
|
2480
|
+
const receipt = await prepareUpdateQuoteToken.inner(writeContractSync, client, parameters);
|
|
2481
|
+
const { args } = prepareUpdateQuoteToken.extractEvent(receipt.logs);
|
|
2482
|
+
return {
|
|
2483
|
+
...args,
|
|
2484
|
+
receipt,
|
|
2485
|
+
};
|
|
2486
|
+
}
|
|
2487
|
+
/**
|
|
2488
|
+
* Updates the quote token for a TIP20 token.
|
|
2489
|
+
*
|
|
2490
|
+
* @example
|
|
2491
|
+
* ```ts
|
|
2492
|
+
* import { createClient, http } from 'viem'
|
|
2493
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2494
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2495
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
2496
|
+
*
|
|
2497
|
+
* const client = createClient({
|
|
2498
|
+
* account: privateKeyToAccount('0x...'),
|
|
2499
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2500
|
+
* transport: http(),
|
|
2501
|
+
* })
|
|
2502
|
+
*
|
|
2503
|
+
* const result = await Actions.token.updateQuoteToken(client, {
|
|
2504
|
+
* token: '0x...',
|
|
2505
|
+
* })
|
|
2506
|
+
* ```
|
|
2507
|
+
*
|
|
2508
|
+
* @param client - Client.
|
|
2509
|
+
* @param parameters - Parameters.
|
|
2510
|
+
* @returns The transaction hash.
|
|
2511
|
+
*/
|
|
2512
|
+
export async function updateQuoteToken(client, parameters) {
|
|
2513
|
+
return updateQuoteToken.inner(writeContract, client, parameters);
|
|
2514
|
+
}
|
|
2515
|
+
(function (updateQuoteToken) {
|
|
2516
|
+
/** @internal */
|
|
2517
|
+
async function inner(action, client, parameters) {
|
|
2518
|
+
const { token, ...rest } = parameters;
|
|
2519
|
+
const call = updateQuoteToken.call({ token });
|
|
2520
|
+
return (await action(client, {
|
|
2521
|
+
...rest,
|
|
2522
|
+
...call,
|
|
2523
|
+
}));
|
|
2524
|
+
}
|
|
2525
|
+
updateQuoteToken.inner = inner;
|
|
2526
|
+
/**
|
|
2527
|
+
* Defines a call to the `updateQuoteToken` function.
|
|
2528
|
+
*
|
|
2529
|
+
* Can be passed as a parameter to:
|
|
2530
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
2531
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
2532
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
2533
|
+
*
|
|
2534
|
+
* @example
|
|
2535
|
+
* ```ts
|
|
2536
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
2537
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2538
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2539
|
+
*
|
|
2540
|
+
* const client = createClient({
|
|
2541
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2542
|
+
* transport: http(),
|
|
2543
|
+
* }).extend(walletActions)
|
|
2544
|
+
*
|
|
2545
|
+
* const { result } = await client.sendCalls({
|
|
2546
|
+
* calls: [
|
|
2547
|
+
* actions.token.updateQuoteToken.call({
|
|
2548
|
+
* token: '0x20c0...babe',
|
|
2549
|
+
* }),
|
|
2550
|
+
* ]
|
|
2551
|
+
* })
|
|
2552
|
+
* ```
|
|
2553
|
+
*
|
|
2554
|
+
* @param args - Arguments.
|
|
2555
|
+
* @returns The call.
|
|
2556
|
+
*/
|
|
2557
|
+
function call(args) {
|
|
2558
|
+
const { token } = args;
|
|
2559
|
+
return defineCall({
|
|
2560
|
+
address: TokenId.toAddress(token),
|
|
2561
|
+
abi: Abis.tip20,
|
|
2562
|
+
functionName: 'completeQuoteTokenUpdate',
|
|
2563
|
+
args: [],
|
|
2564
|
+
});
|
|
2565
|
+
}
|
|
2566
|
+
updateQuoteToken.call = call;
|
|
2567
|
+
/**
|
|
2568
|
+
* Extracts the event from the logs.
|
|
2569
|
+
*
|
|
2570
|
+
* @param logs - Logs.
|
|
2571
|
+
* @returns The event.
|
|
2572
|
+
*/
|
|
2573
|
+
function extractEvent(logs) {
|
|
2574
|
+
const [log] = parseEventLogs({
|
|
2575
|
+
abi: Abis.tip20,
|
|
2576
|
+
logs,
|
|
2577
|
+
eventName: 'QuoteTokenUpdate',
|
|
2578
|
+
});
|
|
2579
|
+
if (!log)
|
|
2580
|
+
throw new Error('`QuoteTokenUpdateCompleted` event not found.');
|
|
2581
|
+
return log;
|
|
2582
|
+
}
|
|
2583
|
+
updateQuoteToken.extractEvent = extractEvent;
|
|
2584
|
+
})(updateQuoteToken || (updateQuoteToken = {}));
|
|
2585
|
+
/**
|
|
2586
|
+
* Updates the quote token for a TIP20 token.
|
|
2587
|
+
*
|
|
2588
|
+
* @example
|
|
2589
|
+
* ```ts
|
|
2590
|
+
* import { createClient, http } from 'viem'
|
|
2591
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2592
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2593
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
2594
|
+
*
|
|
2595
|
+
* const client = createClient({
|
|
2596
|
+
* account: privateKeyToAccount('0x...'),
|
|
2597
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2598
|
+
* transport: http(),
|
|
2599
|
+
* })
|
|
2600
|
+
*
|
|
2601
|
+
* const result = await Actions.token.updateQuoteTokenSync(client, {
|
|
2602
|
+
* token: '0x...',
|
|
2603
|
+
* })
|
|
2604
|
+
* ```
|
|
2605
|
+
*
|
|
2606
|
+
* @param client - Client.
|
|
2607
|
+
* @param parameters - Parameters.
|
|
2608
|
+
* @returns The transaction receipt and event data.
|
|
2609
|
+
*/
|
|
2610
|
+
export async function updateQuoteTokenSync(client, parameters) {
|
|
2611
|
+
const receipt = await updateQuoteToken.inner(writeContractSync, client, parameters);
|
|
2612
|
+
const { args } = updateQuoteToken.extractEvent(receipt.logs);
|
|
2613
|
+
return {
|
|
2614
|
+
...args,
|
|
2615
|
+
receipt,
|
|
2616
|
+
};
|
|
2617
|
+
}
|
|
2618
|
+
/**
|
|
2619
|
+
* Watches for TIP20 token approval events.
|
|
2620
|
+
*
|
|
2621
|
+
* @example
|
|
2622
|
+
* ```ts
|
|
2623
|
+
* import { createClient, http } from 'viem'
|
|
2624
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2625
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2626
|
+
*
|
|
2627
|
+
* const client = createClient({
|
|
2628
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2629
|
+
* transport: http(),
|
|
2630
|
+
* })
|
|
2631
|
+
*
|
|
2632
|
+
* const unwatch = actions.token.watchApprove(client, {
|
|
2633
|
+
* onApproval: (args, log) => {
|
|
2634
|
+
* console.log('Approval:', args)
|
|
2635
|
+
* },
|
|
2636
|
+
* })
|
|
2637
|
+
* ```
|
|
2638
|
+
*
|
|
2639
|
+
* @param client - Client.
|
|
2640
|
+
* @param parameters - Parameters.
|
|
2641
|
+
* @returns A function to unsubscribe from the event.
|
|
2642
|
+
*/
|
|
2643
|
+
export function watchApprove(client, parameters) {
|
|
2644
|
+
const { onApproval, token, ...rest } = parameters;
|
|
2645
|
+
return watchContractEvent(client, {
|
|
2646
|
+
...rest,
|
|
2647
|
+
address: TokenId.toAddress(token),
|
|
2648
|
+
abi: Abis.tip20,
|
|
2649
|
+
eventName: 'Approval',
|
|
2650
|
+
onLogs: (logs) => {
|
|
2651
|
+
for (const log of logs)
|
|
2652
|
+
onApproval(log.args, log);
|
|
2653
|
+
},
|
|
2654
|
+
strict: true,
|
|
2655
|
+
});
|
|
2656
|
+
}
|
|
2657
|
+
/**
|
|
2658
|
+
* Watches for TIP20 token burn events.
|
|
2659
|
+
*
|
|
2660
|
+
* @example
|
|
2661
|
+
* ```ts
|
|
2662
|
+
* import { createClient, http } from 'viem'
|
|
2663
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2664
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2665
|
+
*
|
|
2666
|
+
* const client = createClient({
|
|
2667
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2668
|
+
* transport: http(),
|
|
2669
|
+
* })
|
|
2670
|
+
*
|
|
2671
|
+
* const unwatch = actions.token.watchBurn(client, {
|
|
2672
|
+
* onBurn: (args, log) => {
|
|
2673
|
+
* console.log('Burn:', args)
|
|
2674
|
+
* },
|
|
2675
|
+
* })
|
|
2676
|
+
* ```
|
|
2677
|
+
*
|
|
2678
|
+
* @param client - Client.
|
|
2679
|
+
* @param parameters - Parameters.
|
|
2680
|
+
* @returns A function to unsubscribe from the event.
|
|
2681
|
+
*/
|
|
2682
|
+
export function watchBurn(client, parameters) {
|
|
2683
|
+
const { onBurn, token, ...rest } = parameters;
|
|
2684
|
+
return watchContractEvent(client, {
|
|
2685
|
+
...rest,
|
|
2686
|
+
address: TokenId.toAddress(token),
|
|
2687
|
+
abi: Abis.tip20,
|
|
2688
|
+
eventName: 'Burn',
|
|
2689
|
+
onLogs: (logs) => {
|
|
2690
|
+
for (const log of logs)
|
|
2691
|
+
onBurn(log.args, log);
|
|
2692
|
+
},
|
|
2693
|
+
strict: true,
|
|
2694
|
+
});
|
|
2695
|
+
}
|
|
2696
|
+
/**
|
|
2697
|
+
* Watches for new TIP20 tokens created.
|
|
2698
|
+
*
|
|
2699
|
+
* @example
|
|
2700
|
+
* ```ts
|
|
2701
|
+
* import { createClient, http } from 'viem'
|
|
2702
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2703
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2704
|
+
*
|
|
2705
|
+
* const client = createClient({
|
|
2706
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2707
|
+
* transport: http(),
|
|
2708
|
+
* })
|
|
2709
|
+
*
|
|
2710
|
+
* const unwatch = actions.token.watchCreate(client, {
|
|
2711
|
+
* onTokenCreated: (args, log) => {
|
|
2712
|
+
* console.log('Token created:', args)
|
|
2713
|
+
* },
|
|
2714
|
+
* })
|
|
2715
|
+
* ```
|
|
2716
|
+
*
|
|
2717
|
+
* @param client - Client.
|
|
2718
|
+
* @param parameters - Parameters.
|
|
2719
|
+
* @returns A function to unsubscribe from the event.
|
|
2720
|
+
*/
|
|
2721
|
+
export function watchCreate(client, parameters) {
|
|
2722
|
+
const { onTokenCreated, ...rest } = parameters;
|
|
2723
|
+
return watchContractEvent(client, {
|
|
2724
|
+
...rest,
|
|
2725
|
+
address: Addresses.tip20Factory,
|
|
2726
|
+
abi: Abis.tip20Factory,
|
|
2727
|
+
eventName: 'TokenCreated',
|
|
2728
|
+
onLogs: (logs) => {
|
|
2729
|
+
for (const log of logs)
|
|
2730
|
+
onTokenCreated(log.args, log);
|
|
2731
|
+
},
|
|
2732
|
+
strict: true,
|
|
2733
|
+
});
|
|
2734
|
+
}
|
|
2735
|
+
/**
|
|
2736
|
+
* Watches for TIP20 token mint events.
|
|
2737
|
+
*
|
|
2738
|
+
* @example
|
|
2739
|
+
* ```ts
|
|
2740
|
+
* import { createClient, http } from 'viem'
|
|
2741
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2742
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2743
|
+
*
|
|
2744
|
+
* const client = createClient({
|
|
2745
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2746
|
+
* transport: http(),
|
|
2747
|
+
* })
|
|
2748
|
+
*
|
|
2749
|
+
* const unwatch = actions.token.watchMint(client, {
|
|
2750
|
+
* onMint: (args, log) => {
|
|
2751
|
+
* console.log('Mint:', args)
|
|
2752
|
+
* },
|
|
2753
|
+
* })
|
|
2754
|
+
* ```
|
|
2755
|
+
*
|
|
2756
|
+
* @param client - Client.
|
|
2757
|
+
* @param parameters - Parameters.
|
|
2758
|
+
* @returns A function to unsubscribe from the event.
|
|
2759
|
+
*/
|
|
2760
|
+
export function watchMint(client, parameters) {
|
|
2761
|
+
const { onMint, token, ...rest } = parameters;
|
|
2762
|
+
return watchContractEvent(client, {
|
|
2763
|
+
...rest,
|
|
2764
|
+
address: TokenId.toAddress(token),
|
|
2765
|
+
abi: Abis.tip20,
|
|
2766
|
+
eventName: 'Mint',
|
|
2767
|
+
onLogs: (logs) => {
|
|
2768
|
+
for (const log of logs)
|
|
2769
|
+
onMint(log.args, log);
|
|
2770
|
+
},
|
|
2771
|
+
strict: true,
|
|
2772
|
+
});
|
|
2773
|
+
}
|
|
2774
|
+
/**
|
|
2775
|
+
* Watches for TIP20 token role admin updates.
|
|
2776
|
+
*
|
|
2777
|
+
* @example
|
|
2778
|
+
* ```ts
|
|
2779
|
+
* import { createClient, http } from 'viem'
|
|
2780
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2781
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2782
|
+
*
|
|
2783
|
+
* const client = createClient({
|
|
2784
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2785
|
+
* transport: http(),
|
|
2786
|
+
* })
|
|
2787
|
+
*
|
|
2788
|
+
* const unwatch = actions.token.watchAdminRole(client, {
|
|
2789
|
+
* onRoleAdminUpdated: (args, log) => {
|
|
2790
|
+
* console.log('Role admin updated:', args)
|
|
2791
|
+
* },
|
|
2792
|
+
* })
|
|
2793
|
+
* ```
|
|
2794
|
+
*
|
|
2795
|
+
* @param client - Client.
|
|
2796
|
+
* @param parameters - Parameters.
|
|
2797
|
+
* @returns A function to unsubscribe from the event.
|
|
2798
|
+
*/
|
|
2799
|
+
export function watchAdminRole(client, parameters) {
|
|
2800
|
+
const { onRoleAdminUpdated, token, ...rest } = parameters;
|
|
2801
|
+
return watchContractEvent(client, {
|
|
2802
|
+
...rest,
|
|
2803
|
+
address: TokenId.toAddress(token),
|
|
2804
|
+
abi: Abis.tip20,
|
|
2805
|
+
eventName: 'RoleAdminUpdated',
|
|
2806
|
+
onLogs: (logs) => {
|
|
2807
|
+
for (const log of logs)
|
|
2808
|
+
onRoleAdminUpdated(log.args, log);
|
|
2809
|
+
},
|
|
2810
|
+
strict: true,
|
|
2811
|
+
});
|
|
2812
|
+
}
|
|
2813
|
+
/**
|
|
2814
|
+
* Watches for TIP20 token role membership updates.
|
|
2815
|
+
*
|
|
2816
|
+
* @example
|
|
2817
|
+
* ```ts
|
|
2818
|
+
* import { createClient, http } from 'viem'
|
|
2819
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2820
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2821
|
+
*
|
|
2822
|
+
* const client = createClient({
|
|
2823
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2824
|
+
* transport: http(),
|
|
2825
|
+
* })
|
|
2826
|
+
*
|
|
2827
|
+
* const unwatch = actions.token.watchRole(client, {
|
|
2828
|
+
* onRoleUpdated: (args, log) => {
|
|
2829
|
+
* console.log('Role updated:', args)
|
|
2830
|
+
* },
|
|
2831
|
+
* })
|
|
2832
|
+
* ```
|
|
2833
|
+
*
|
|
2834
|
+
* @param client - Client.
|
|
2835
|
+
* @param parameters - Parameters.
|
|
2836
|
+
* @returns A function to unsubscribe from the event.
|
|
2837
|
+
*/
|
|
2838
|
+
export function watchRole(client, parameters) {
|
|
2839
|
+
const { onRoleUpdated, token, ...rest } = parameters;
|
|
2840
|
+
return watchContractEvent(client, {
|
|
2841
|
+
...rest,
|
|
2842
|
+
address: TokenId.toAddress(token),
|
|
2843
|
+
abi: Abis.tip20,
|
|
2844
|
+
eventName: 'RoleMembershipUpdated',
|
|
2845
|
+
onLogs: (logs) => {
|
|
2846
|
+
for (const log of logs) {
|
|
2847
|
+
const type = log.args.hasRole ? 'granted' : 'revoked';
|
|
2848
|
+
onRoleUpdated({ ...log.args, type }, log);
|
|
2849
|
+
}
|
|
2850
|
+
},
|
|
2851
|
+
strict: true,
|
|
2852
|
+
});
|
|
2853
|
+
}
|
|
2854
|
+
/**
|
|
2855
|
+
* Watches for TIP20 token transfer events.
|
|
2856
|
+
*
|
|
2857
|
+
* @example
|
|
2858
|
+
* ```ts
|
|
2859
|
+
* import { createClient, http } from 'viem'
|
|
2860
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2861
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2862
|
+
*
|
|
2863
|
+
* const client = createClient({
|
|
2864
|
+
* account: privateKeyToAccount('0x...'),
|
|
2865
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2866
|
+
* transport: http(),
|
|
2867
|
+
* })
|
|
2868
|
+
*
|
|
2869
|
+
* const unwatch = actions.token.watchTransfer(client, {
|
|
2870
|
+
* onTransfer: (args, log) => {
|
|
2871
|
+
* console.log('Transfer:', args)
|
|
2872
|
+
* },
|
|
2873
|
+
* })
|
|
2874
|
+
* ```
|
|
2875
|
+
*
|
|
2876
|
+
* @param client - Client.
|
|
2877
|
+
* @param parameters - Parameters.
|
|
2878
|
+
* @returns A function to unsubscribe from the event.
|
|
2879
|
+
*/
|
|
2880
|
+
export function watchTransfer(client, parameters) {
|
|
2881
|
+
const { onTransfer, token, ...rest } = parameters;
|
|
2882
|
+
return watchContractEvent(client, {
|
|
2883
|
+
...rest,
|
|
2884
|
+
address: TokenId.toAddress(token),
|
|
2885
|
+
abi: Abis.tip20,
|
|
2886
|
+
eventName: 'Transfer',
|
|
2887
|
+
onLogs: (logs) => {
|
|
2888
|
+
for (const log of logs)
|
|
2889
|
+
onTransfer(log.args, log);
|
|
2890
|
+
},
|
|
2891
|
+
strict: true,
|
|
2892
|
+
});
|
|
2893
|
+
}
|
|
2894
|
+
/**
|
|
2895
|
+
* Watches for TIP20 token quote token update events.
|
|
2896
|
+
*
|
|
2897
|
+
* @example
|
|
2898
|
+
* ```ts
|
|
2899
|
+
* import { createClient, http } from 'viem'
|
|
2900
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2901
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2902
|
+
*
|
|
2903
|
+
* const client = createClient({
|
|
2904
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2905
|
+
* transport: http(),
|
|
2906
|
+
* })
|
|
2907
|
+
*
|
|
2908
|
+
* const unwatch = actions.token.watchUpdateQuoteToken(client, {
|
|
2909
|
+
* onUpdateQuoteToken: (args, log) => {
|
|
2910
|
+
* if (args.completed)
|
|
2911
|
+
* console.log('quote token update completed:', args.newQuoteToken)
|
|
2912
|
+
* else
|
|
2913
|
+
* console.log('quote token update proposed:', args.newQuoteToken)
|
|
2914
|
+
* },
|
|
2915
|
+
* })
|
|
2916
|
+
* ```
|
|
2917
|
+
*
|
|
2918
|
+
* @param client - Client.
|
|
2919
|
+
* @param parameters - Parameters.
|
|
2920
|
+
* @returns A function to unsubscribe from the event.
|
|
2921
|
+
*/
|
|
2922
|
+
export function watchUpdateQuoteToken(client, parameters) {
|
|
2923
|
+
const { onUpdateQuoteToken, token, ...rest } = parameters;
|
|
2924
|
+
const address = TokenId.toAddress(token);
|
|
2925
|
+
return watchContractEvent(client, {
|
|
2926
|
+
...rest,
|
|
2927
|
+
address,
|
|
2928
|
+
abi: Abis.tip20,
|
|
2929
|
+
onLogs: (logs) => {
|
|
2930
|
+
for (const log of logs) {
|
|
2931
|
+
if (log.eventName !== 'NextQuoteTokenSet' &&
|
|
2932
|
+
log.eventName !== 'QuoteTokenUpdate')
|
|
2933
|
+
continue;
|
|
2934
|
+
onUpdateQuoteToken({
|
|
2935
|
+
...log.args,
|
|
2936
|
+
completed: log.eventName === 'QuoteTokenUpdate',
|
|
2937
|
+
}, log);
|
|
2938
|
+
}
|
|
2939
|
+
},
|
|
2940
|
+
strict: true,
|
|
2941
|
+
});
|
|
2942
|
+
}
|
|
2943
|
+
//# sourceMappingURL=token.js.map
|