viem 2.53.1 → 2.54.0
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 +55 -0
- package/_cjs/actions/index.js +3 -2
- package/_cjs/actions/index.js.map +1 -1
- package/_cjs/actions/token/approve.js +62 -0
- package/_cjs/actions/token/approve.js.map +1 -0
- package/_cjs/actions/token/approveSync.js +25 -0
- package/_cjs/actions/token/approveSync.js.map +1 -0
- package/_cjs/actions/token/getAllowance.js +32 -0
- package/_cjs/actions/token/getAllowance.js.map +1 -0
- package/_cjs/actions/token/getBalance.js +41 -0
- package/_cjs/actions/token/getBalance.js.map +1 -0
- package/_cjs/actions/token/getMetadata.js +40 -0
- package/_cjs/actions/token/getMetadata.js.map +1 -0
- package/_cjs/actions/token/getTotalSupply.js +32 -0
- package/_cjs/actions/token/getTotalSupply.js.map +1 -0
- package/_cjs/actions/token/index.js +20 -0
- package/_cjs/actions/token/index.js.map +1 -0
- package/_cjs/actions/token/internal.js +125 -0
- package/_cjs/actions/token/internal.js.map +1 -0
- package/_cjs/actions/token/transfer.js +70 -0
- package/_cjs/actions/token/transfer.js.map +1 -0
- package/_cjs/actions/token/transferSync.js +25 -0
- package/_cjs/actions/token/transferSync.js.map +1 -0
- package/_cjs/chains/definitions/battlechain.js +31 -0
- package/_cjs/chains/definitions/battlechain.js.map +1 -0
- package/_cjs/chains/definitions/marooTestnet.js +30 -0
- package/_cjs/chains/definitions/marooTestnet.js.map +1 -0
- package/_cjs/chains/index.js +18 -14
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/clients/createClient.js +39 -1
- package/_cjs/clients/createClient.js.map +1 -1
- package/_cjs/clients/createPublicClient.js.map +1 -1
- package/_cjs/clients/createWalletClient.js.map +1 -1
- package/_cjs/clients/decorators/public.js +11 -0
- package/_cjs/clients/decorators/public.js.map +1 -1
- package/_cjs/clients/decorators/wallet.js +8 -0
- package/_cjs/clients/decorators/wallet.js.map +1 -1
- package/_cjs/clients/transports/http.js +2 -1
- package/_cjs/clients/transports/http.js.map +1 -1
- package/_cjs/errors/encoding.js +9 -1
- package/_cjs/errors/encoding.js.map +1 -1
- package/_cjs/errors/request.js +24 -1
- package/_cjs/errors/request.js.map +1 -1
- package/_cjs/errors/transaction.js +9 -1
- package/_cjs/errors/transaction.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/index.js +9 -6
- package/_cjs/index.js.map +1 -1
- package/_cjs/tempo/Client.js.map +1 -1
- package/_cjs/tempo/Decorator.js +234 -215
- package/_cjs/tempo/Decorator.js.map +1 -1
- package/_cjs/tempo/actions/token.js +210 -112
- package/_cjs/tempo/actions/token.js.map +1 -1
- package/_cjs/tempo/internal/utils.js +108 -0
- package/_cjs/tempo/internal/utils.js.map +1 -1
- package/_cjs/tokens/defineToken.js +21 -0
- package/_cjs/tokens/defineToken.js.map +1 -0
- package/_cjs/tokens/definitions/alphausd.js +14 -0
- package/_cjs/tokens/definitions/alphausd.js.map +1 -0
- package/_cjs/tokens/definitions/betausd.js +14 -0
- package/_cjs/tokens/definitions/betausd.js.map +1 -0
- package/_cjs/tokens/definitions/brla.js +14 -0
- package/_cjs/tokens/definitions/brla.js.map +1 -0
- package/_cjs/tokens/definitions/cbbtc.js +14 -0
- package/_cjs/tokens/definitions/cbbtc.js.map +1 -0
- package/_cjs/tokens/definitions/chfau.js +14 -0
- package/_cjs/tokens/definitions/chfau.js.map +1 -0
- package/_cjs/tokens/definitions/cusd.js +14 -0
- package/_cjs/tokens/definitions/cusd.js.map +1 -0
- package/_cjs/tokens/definitions/dlusd.js +14 -0
- package/_cjs/tokens/definitions/dlusd.js.map +1 -0
- package/_cjs/tokens/definitions/eurau.js +14 -0
- package/_cjs/tokens/definitions/eurau.js.map +1 -0
- package/_cjs/tokens/definitions/eurce.js +15 -0
- package/_cjs/tokens/definitions/eurce.js.map +1 -0
- package/_cjs/tokens/definitions/frxusd.js +14 -0
- package/_cjs/tokens/definitions/frxusd.js.map +1 -0
- package/_cjs/tokens/definitions/gbpa.js +14 -0
- package/_cjs/tokens/definitions/gbpa.js.map +1 -0
- package/_cjs/tokens/definitions/gusd.js +14 -0
- package/_cjs/tokens/definitions/gusd.js.map +1 -0
- package/_cjs/tokens/definitions/iusd.js +14 -0
- package/_cjs/tokens/definitions/iusd.js.map +1 -0
- package/_cjs/tokens/definitions/pathusd.js +15 -0
- package/_cjs/tokens/definitions/pathusd.js.map +1 -0
- package/_cjs/tokens/definitions/reusd.js +14 -0
- package/_cjs/tokens/definitions/reusd.js.map +1 -0
- package/_cjs/tokens/definitions/rusd.js +14 -0
- package/_cjs/tokens/definitions/rusd.js.map +1 -0
- package/_cjs/tokens/definitions/sbc.js +14 -0
- package/_cjs/tokens/definitions/sbc.js.map +1 -0
- package/_cjs/tokens/definitions/siusd.js +14 -0
- package/_cjs/tokens/definitions/siusd.js.map +1 -0
- package/_cjs/tokens/definitions/stcusd.js +14 -0
- package/_cjs/tokens/definitions/stcusd.js.map +1 -0
- package/_cjs/tokens/definitions/susde.js +14 -0
- package/_cjs/tokens/definitions/susde.js.map +1 -0
- package/_cjs/tokens/definitions/syrupusdc.js +14 -0
- package/_cjs/tokens/definitions/syrupusdc.js.map +1 -0
- package/_cjs/tokens/definitions/thetausd.js +14 -0
- package/_cjs/tokens/definitions/thetausd.js.map +1 -0
- package/_cjs/tokens/definitions/usd1.js +14 -0
- package/_cjs/tokens/definitions/usd1.js.map +1 -0
- package/_cjs/tokens/definitions/usdb.js +14 -0
- package/_cjs/tokens/definitions/usdb.js.map +1 -0
- package/_cjs/tokens/definitions/usdc.js +41 -0
- package/_cjs/tokens/definitions/usdc.js.map +1 -0
- package/_cjs/tokens/definitions/usdce.js +15 -0
- package/_cjs/tokens/definitions/usdce.js.map +1 -0
- package/_cjs/tokens/definitions/usde.js +14 -0
- package/_cjs/tokens/definitions/usde.js.map +1 -0
- package/_cjs/tokens/definitions/usdt0.js +14 -0
- package/_cjs/tokens/definitions/usdt0.js.map +1 -0
- package/_cjs/tokens/definitions/wsrusd.js +14 -0
- package/_cjs/tokens/definitions/wsrusd.js.map +1 -0
- package/_cjs/tokens/index.js +64 -0
- package/_cjs/tokens/index.js.map +1 -0
- package/_cjs/utils/encoding/fromRlp.js +7 -4
- package/_cjs/utils/encoding/fromRlp.js.map +1 -1
- package/_cjs/utils/rpc/http.js +58 -3
- package/_cjs/utils/rpc/http.js.map +1 -1
- package/_cjs/utils/transaction/parseTransaction.js +4 -1
- package/_cjs/utils/transaction/parseTransaction.js.map +1 -1
- package/_esm/actions/index.js +1 -0
- package/_esm/actions/index.js.map +1 -1
- package/_esm/actions/token/approve.js +123 -0
- package/_esm/actions/token/approve.js.map +1 -0
- package/_esm/actions/token/approveSync.js +50 -0
- package/_esm/actions/token/approveSync.js.map +1 -0
- package/_esm/actions/token/getAllowance.js +62 -0
- package/_esm/actions/token/getAllowance.js.map +1 -0
- package/_esm/actions/token/getBalance.js +70 -0
- package/_esm/actions/token/getBalance.js.map +1 -0
- package/_esm/actions/token/getMetadata.js +60 -0
- package/_esm/actions/token/getMetadata.js.map +1 -0
- package/_esm/actions/token/getTotalSupply.js +60 -0
- package/_esm/actions/token/getTotalSupply.js.map +1 -0
- package/_esm/actions/token/index.js +10 -0
- package/_esm/actions/token/index.js.map +1 -0
- package/_esm/actions/token/internal.js +188 -0
- package/_esm/actions/token/internal.js.map +1 -0
- package/_esm/actions/token/transfer.js +147 -0
- package/_esm/actions/token/transfer.js.map +1 -0
- package/_esm/actions/token/transferSync.js +54 -0
- package/_esm/actions/token/transferSync.js.map +1 -0
- package/_esm/chains/definitions/battlechain.js +28 -0
- package/_esm/chains/definitions/battlechain.js.map +1 -0
- package/_esm/chains/definitions/marooTestnet.js +27 -0
- package/_esm/chains/definitions/marooTestnet.js.map +1 -0
- package/_esm/chains/index.js +2 -0
- package/_esm/chains/index.js.map +1 -1
- package/_esm/clients/createClient.js +53 -1
- package/_esm/clients/createClient.js.map +1 -1
- package/_esm/clients/createPublicClient.js.map +1 -1
- package/_esm/clients/createWalletClient.js.map +1 -1
- package/_esm/clients/decorators/public.js +17 -0
- package/_esm/clients/decorators/public.js.map +1 -1
- package/_esm/clients/decorators/wallet.js +8 -0
- package/_esm/clients/decorators/wallet.js.map +1 -1
- package/_esm/clients/transports/http.js +2 -1
- package/_esm/clients/transports/http.js.map +1 -1
- package/_esm/errors/encoding.js +7 -0
- package/_esm/errors/encoding.js.map +1 -1
- package/_esm/errors/request.js +22 -0
- package/_esm/errors/request.js.map +1 -1
- package/_esm/errors/transaction.js +7 -0
- package/_esm/errors/transaction.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/index.js +3 -3
- package/_esm/index.js.map +1 -1
- package/_esm/tempo/Client.js.map +1 -1
- package/_esm/tempo/Decorator.js +234 -218
- package/_esm/tempo/Decorator.js.map +1 -1
- package/_esm/tempo/actions/token.js +335 -186
- package/_esm/tempo/actions/token.js.map +1 -1
- package/_esm/tempo/actions/wallet.js +1 -1
- package/_esm/tempo/internal/utils.js +154 -0
- package/_esm/tempo/internal/utils.js.map +1 -1
- package/_esm/tokens/defineToken.js +57 -0
- package/_esm/tokens/defineToken.js.map +1 -0
- package/_esm/tokens/definitions/alphausd.js +12 -0
- package/_esm/tokens/definitions/alphausd.js.map +1 -0
- package/_esm/tokens/definitions/betausd.js +12 -0
- package/_esm/tokens/definitions/betausd.js.map +1 -0
- package/_esm/tokens/definitions/brla.js +12 -0
- package/_esm/tokens/definitions/brla.js.map +1 -0
- package/_esm/tokens/definitions/cbbtc.js +12 -0
- package/_esm/tokens/definitions/cbbtc.js.map +1 -0
- package/_esm/tokens/definitions/chfau.js +12 -0
- package/_esm/tokens/definitions/chfau.js.map +1 -0
- package/_esm/tokens/definitions/cusd.js +12 -0
- package/_esm/tokens/definitions/cusd.js.map +1 -0
- package/_esm/tokens/definitions/dlusd.js +12 -0
- package/_esm/tokens/definitions/dlusd.js.map +1 -0
- package/_esm/tokens/definitions/eurau.js +12 -0
- package/_esm/tokens/definitions/eurau.js.map +1 -0
- package/_esm/tokens/definitions/eurce.js +13 -0
- package/_esm/tokens/definitions/eurce.js.map +1 -0
- package/_esm/tokens/definitions/frxusd.js +12 -0
- package/_esm/tokens/definitions/frxusd.js.map +1 -0
- package/_esm/tokens/definitions/gbpa.js +12 -0
- package/_esm/tokens/definitions/gbpa.js.map +1 -0
- package/_esm/tokens/definitions/gusd.js +12 -0
- package/_esm/tokens/definitions/gusd.js.map +1 -0
- package/_esm/tokens/definitions/iusd.js +12 -0
- package/_esm/tokens/definitions/iusd.js.map +1 -0
- package/_esm/tokens/definitions/pathusd.js +13 -0
- package/_esm/tokens/definitions/pathusd.js.map +1 -0
- package/_esm/tokens/definitions/reusd.js +12 -0
- package/_esm/tokens/definitions/reusd.js.map +1 -0
- package/_esm/tokens/definitions/rusd.js +12 -0
- package/_esm/tokens/definitions/rusd.js.map +1 -0
- package/_esm/tokens/definitions/sbc.js +12 -0
- package/_esm/tokens/definitions/sbc.js.map +1 -0
- package/_esm/tokens/definitions/siusd.js +12 -0
- package/_esm/tokens/definitions/siusd.js.map +1 -0
- package/_esm/tokens/definitions/stcusd.js +12 -0
- package/_esm/tokens/definitions/stcusd.js.map +1 -0
- package/_esm/tokens/definitions/susde.js +12 -0
- package/_esm/tokens/definitions/susde.js.map +1 -0
- package/_esm/tokens/definitions/syrupusdc.js +12 -0
- package/_esm/tokens/definitions/syrupusdc.js.map +1 -0
- package/_esm/tokens/definitions/thetausd.js +12 -0
- package/_esm/tokens/definitions/thetausd.js.map +1 -0
- package/_esm/tokens/definitions/usd1.js +12 -0
- package/_esm/tokens/definitions/usd1.js.map +1 -0
- package/_esm/tokens/definitions/usdb.js +12 -0
- package/_esm/tokens/definitions/usdb.js.map +1 -0
- package/_esm/tokens/definitions/usdc.js +67 -0
- package/_esm/tokens/definitions/usdc.js.map +1 -0
- package/_esm/tokens/definitions/usdce.js +13 -0
- package/_esm/tokens/definitions/usdce.js.map +1 -0
- package/_esm/tokens/definitions/usde.js +12 -0
- package/_esm/tokens/definitions/usde.js.map +1 -0
- package/_esm/tokens/definitions/usdt0.js +12 -0
- package/_esm/tokens/definitions/usdt0.js.map +1 -0
- package/_esm/tokens/definitions/wsrusd.js +12 -0
- package/_esm/tokens/definitions/wsrusd.js.map +1 -0
- package/_esm/tokens/index.js +32 -0
- package/_esm/tokens/index.js.map +1 -0
- package/_esm/utils/encoding/fromRlp.js +8 -5
- package/_esm/utils/encoding/fromRlp.js.map +1 -1
- package/_esm/utils/rpc/http.js +59 -4
- package/_esm/utils/rpc/http.js.map +1 -1
- package/_esm/utils/transaction/parseTransaction.js +5 -2
- package/_esm/utils/transaction/parseTransaction.js.map +1 -1
- package/_types/actions/index.d.ts +1 -0
- package/_types/actions/index.d.ts.map +1 -1
- package/_types/actions/token/approve.d.ts +253 -0
- package/_types/actions/token/approve.d.ts.map +1 -0
- package/_types/actions/token/approveSync.d.ts +57 -0
- package/_types/actions/token/approveSync.d.ts.map +1 -0
- package/_types/actions/token/getAllowance.d.ts +77 -0
- package/_types/actions/token/getAllowance.d.ts.map +1 -0
- package/_types/actions/token/getBalance.d.ts +69 -0
- package/_types/actions/token/getBalance.d.ts.map +1 -0
- package/_types/actions/token/getMetadata.d.ts +43 -0
- package/_types/actions/token/getMetadata.d.ts.map +1 -0
- package/_types/actions/token/getTotalSupply.d.ts +63 -0
- package/_types/actions/token/getTotalSupply.d.ts.map +1 -0
- package/_types/actions/token/index.d.ts +9 -0
- package/_types/actions/token/index.d.ts.map +1 -0
- package/_types/actions/token/internal.d.ts +168 -0
- package/_types/actions/token/internal.d.ts.map +1 -0
- package/_types/actions/token/transfer.d.ts +288 -0
- package/_types/actions/token/transfer.d.ts.map +1 -0
- package/_types/actions/token/transferSync.d.ts +61 -0
- package/_types/actions/token/transferSync.d.ts.map +1 -0
- package/_types/chains/definitions/battlechain.d.ts +447 -0
- package/_types/chains/definitions/battlechain.d.ts.map +1 -0
- package/_types/chains/definitions/marooTestnet.d.ts +49 -0
- package/_types/chains/definitions/marooTestnet.d.ts.map +1 -0
- package/_types/chains/index.d.ts +2 -0
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/clients/createClient.d.ts +24 -6
- package/_types/clients/createClient.d.ts.map +1 -1
- package/_types/clients/createPublicClient.d.ts +4 -3
- package/_types/clients/createPublicClient.d.ts.map +1 -1
- package/_types/clients/createWalletClient.d.ts +4 -3
- package/_types/clients/createWalletClient.d.ts.map +1 -1
- package/_types/clients/decorators/public.d.ts +128 -3
- package/_types/clients/decorators/public.d.ts.map +1 -1
- package/_types/clients/decorators/wallet.d.ts +208 -3
- package/_types/clients/decorators/wallet.d.ts.map +1 -1
- package/_types/clients/transports/http.d.ts +2 -0
- package/_types/clients/transports/http.d.ts.map +1 -1
- package/_types/errors/encoding.d.ts +8 -0
- package/_types/errors/encoding.d.ts.map +1 -1
- package/_types/errors/request.d.ts +11 -0
- package/_types/errors/request.d.ts.map +1 -1
- package/_types/errors/transaction.d.ts +8 -0
- package/_types/errors/transaction.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/index.d.ts +4 -3
- package/_types/index.d.ts.map +1 -1
- package/_types/tempo/Client.d.ts +1 -1
- package/_types/tempo/Client.d.ts.map +1 -1
- package/_types/tempo/Decorator.d.ts +88 -5
- package/_types/tempo/Decorator.d.ts.map +1 -1
- package/_types/tempo/actions/token.d.ts +223 -151
- package/_types/tempo/actions/token.d.ts.map +1 -1
- package/_types/tempo/actions/wallet.d.ts +3 -3
- package/_types/tempo/internal/types.d.ts +17 -0
- package/_types/tempo/internal/types.d.ts.map +1 -1
- package/_types/tempo/internal/utils.d.ts +73 -0
- package/_types/tempo/internal/utils.d.ts.map +1 -1
- package/_types/tokens/defineToken.d.ts +112 -0
- package/_types/tokens/defineToken.d.ts.map +1 -0
- package/_types/tokens/definitions/alphausd.d.ts +11 -0
- package/_types/tokens/definitions/alphausd.d.ts.map +1 -0
- package/_types/tokens/definitions/betausd.d.ts +11 -0
- package/_types/tokens/definitions/betausd.d.ts.map +1 -0
- package/_types/tokens/definitions/brla.d.ts +11 -0
- package/_types/tokens/definitions/brla.d.ts.map +1 -0
- package/_types/tokens/definitions/cbbtc.d.ts +11 -0
- package/_types/tokens/definitions/cbbtc.d.ts.map +1 -0
- package/_types/tokens/definitions/chfau.d.ts +11 -0
- package/_types/tokens/definitions/chfau.d.ts.map +1 -0
- package/_types/tokens/definitions/cusd.d.ts +11 -0
- package/_types/tokens/definitions/cusd.d.ts.map +1 -0
- package/_types/tokens/definitions/dlusd.d.ts +11 -0
- package/_types/tokens/definitions/dlusd.d.ts.map +1 -0
- package/_types/tokens/definitions/eurau.d.ts +11 -0
- package/_types/tokens/definitions/eurau.d.ts.map +1 -0
- package/_types/tokens/definitions/eurce.d.ts +12 -0
- package/_types/tokens/definitions/eurce.d.ts.map +1 -0
- package/_types/tokens/definitions/frxusd.d.ts +11 -0
- package/_types/tokens/definitions/frxusd.d.ts.map +1 -0
- package/_types/tokens/definitions/gbpa.d.ts +11 -0
- package/_types/tokens/definitions/gbpa.d.ts.map +1 -0
- package/_types/tokens/definitions/gusd.d.ts +11 -0
- package/_types/tokens/definitions/gusd.d.ts.map +1 -0
- package/_types/tokens/definitions/iusd.d.ts +11 -0
- package/_types/tokens/definitions/iusd.d.ts.map +1 -0
- package/_types/tokens/definitions/pathusd.d.ts +12 -0
- package/_types/tokens/definitions/pathusd.d.ts.map +1 -0
- package/_types/tokens/definitions/reusd.d.ts +11 -0
- package/_types/tokens/definitions/reusd.d.ts.map +1 -0
- package/_types/tokens/definitions/rusd.d.ts +11 -0
- package/_types/tokens/definitions/rusd.d.ts.map +1 -0
- package/_types/tokens/definitions/sbc.d.ts +11 -0
- package/_types/tokens/definitions/sbc.d.ts.map +1 -0
- package/_types/tokens/definitions/siusd.d.ts +11 -0
- package/_types/tokens/definitions/siusd.d.ts.map +1 -0
- package/_types/tokens/definitions/stcusd.d.ts +11 -0
- package/_types/tokens/definitions/stcusd.d.ts.map +1 -0
- package/_types/tokens/definitions/susde.d.ts +11 -0
- package/_types/tokens/definitions/susde.d.ts.map +1 -0
- package/_types/tokens/definitions/syrupusdc.d.ts +11 -0
- package/_types/tokens/definitions/syrupusdc.d.ts.map +1 -0
- package/_types/tokens/definitions/thetausd.d.ts +11 -0
- package/_types/tokens/definitions/thetausd.d.ts.map +1 -0
- package/_types/tokens/definitions/usd1.d.ts +11 -0
- package/_types/tokens/definitions/usd1.d.ts.map +1 -0
- package/_types/tokens/definitions/usdb.d.ts +11 -0
- package/_types/tokens/definitions/usdb.d.ts.map +1 -0
- package/_types/tokens/definitions/usdc.d.ts +67 -0
- package/_types/tokens/definitions/usdc.d.ts.map +1 -0
- package/_types/tokens/definitions/usdce.d.ts +12 -0
- package/_types/tokens/definitions/usdce.d.ts.map +1 -0
- package/_types/tokens/definitions/usde.d.ts +11 -0
- package/_types/tokens/definitions/usde.d.ts.map +1 -0
- package/_types/tokens/definitions/usdt0.d.ts +11 -0
- package/_types/tokens/definitions/usdt0.d.ts.map +1 -0
- package/_types/tokens/definitions/wsrusd.d.ts +11 -0
- package/_types/tokens/definitions/wsrusd.d.ts.map +1 -0
- package/_types/tokens/index.d.ts +31 -0
- package/_types/tokens/index.d.ts.map +1 -0
- package/_types/utils/encoding/fromRlp.d.ts +2 -2
- package/_types/utils/encoding/fromRlp.d.ts.map +1 -1
- package/_types/utils/rpc/http.d.ts +6 -2
- package/_types/utils/rpc/http.d.ts.map +1 -1
- package/_types/utils/transaction/parseTransaction.d.ts +2 -2
- package/_types/utils/transaction/parseTransaction.d.ts.map +1 -1
- package/actions/index.ts +1 -0
- package/actions/token/approve.ts +202 -0
- package/actions/token/approveSync.ts +95 -0
- package/actions/token/getAllowance.ts +105 -0
- package/actions/token/getBalance.ts +115 -0
- package/actions/token/getMetadata.ts +98 -0
- package/actions/token/getTotalSupply.ts +97 -0
- package/actions/token/index.ts +9 -0
- package/actions/token/internal.ts +367 -0
- package/actions/token/transfer.ts +230 -0
- package/actions/token/transferSync.ts +99 -0
- package/chains/definitions/battlechain.ts +28 -0
- package/chains/definitions/marooTestnet.ts +27 -0
- package/chains/index.ts +2 -0
- package/clients/createClient.ts +90 -8
- package/clients/createPublicClient.ts +22 -4
- package/clients/createWalletClient.ts +22 -4
- package/clients/decorators/public.ts +166 -4
- package/clients/decorators/wallet.ts +242 -3
- package/clients/transports/http.ts +4 -0
- package/errors/encoding.ts +11 -0
- package/errors/request.ts +17 -0
- package/errors/transaction.ts +11 -0
- package/errors/version.ts +1 -1
- package/index.ts +7 -0
- package/package.json +6 -1
- package/tempo/Client.ts +4 -2
- package/tempo/Decorator.ts +398 -337
- package/tempo/actions/token.ts +519 -296
- package/tempo/actions/wallet.ts +3 -3
- package/tempo/internal/types.ts +19 -0
- package/tempo/internal/utils.ts +204 -0
- package/tokens/defineToken.ts +142 -0
- package/tokens/definitions/alphausd.ts +13 -0
- package/tokens/definitions/betausd.ts +13 -0
- package/tokens/definitions/brla.ts +13 -0
- package/tokens/definitions/cbbtc.ts +13 -0
- package/tokens/definitions/chfau.ts +13 -0
- package/tokens/definitions/cusd.ts +13 -0
- package/tokens/definitions/dlusd.ts +13 -0
- package/tokens/definitions/eurau.ts +13 -0
- package/tokens/definitions/eurce.ts +14 -0
- package/tokens/definitions/frxusd.ts +13 -0
- package/tokens/definitions/gbpa.ts +13 -0
- package/tokens/definitions/gusd.ts +13 -0
- package/tokens/definitions/iusd.ts +13 -0
- package/tokens/definitions/pathusd.ts +14 -0
- package/tokens/definitions/reusd.ts +13 -0
- package/tokens/definitions/rusd.ts +13 -0
- package/tokens/definitions/sbc.ts +13 -0
- package/tokens/definitions/siusd.ts +13 -0
- package/tokens/definitions/stcusd.ts +13 -0
- package/tokens/definitions/susde.ts +13 -0
- package/tokens/definitions/syrupusdc.ts +13 -0
- package/tokens/definitions/thetausd.ts +13 -0
- package/tokens/definitions/usd1.ts +13 -0
- package/tokens/definitions/usdb.ts +13 -0
- package/tokens/definitions/usdc.ts +67 -0
- package/tokens/definitions/usdce.ts +14 -0
- package/tokens/definitions/usde.ts +13 -0
- package/tokens/definitions/usdt0.ts +13 -0
- package/tokens/definitions/wsrusd.ts +13 -0
- package/tokens/index.ts +31 -0
- package/tokens/package.json +6 -0
- package/utils/encoding/fromRlp.ts +22 -3
- package/utils/rpc/http.ts +70 -2
- package/utils/transaction/parseTransaction.ts +7 -2
package/tempo/actions/wallet.ts
CHANGED
|
@@ -88,7 +88,7 @@ export declare namespace transfer {
|
|
|
88
88
|
to: Address
|
|
89
89
|
/**
|
|
90
90
|
* Token to transfer, accepted as either a contract address or a curated
|
|
91
|
-
* tokenlist symbol (case-insensitive, for example `"
|
|
91
|
+
* tokenlist symbol (case-insensitive, for example `"pathusd"`). Symbols
|
|
92
92
|
* are resolved against the curated tokenlist on the active chain.
|
|
93
93
|
*/
|
|
94
94
|
token: Address | string
|
|
@@ -108,7 +108,7 @@ export declare namespace transfer {
|
|
|
108
108
|
to?: Address | undefined
|
|
109
109
|
/**
|
|
110
110
|
* Token to pre-fill, accepted as either a contract address or a curated
|
|
111
|
-
* tokenlist symbol (case-insensitive, for example `"
|
|
111
|
+
* tokenlist symbol (case-insensitive, for example `"pathusd"`). Symbols
|
|
112
112
|
* are resolved against the curated tokenlist on the active chain. Omit
|
|
113
113
|
* to let the user choose.
|
|
114
114
|
*/
|
|
@@ -214,7 +214,7 @@ export declare namespace swap {
|
|
|
214
214
|
*
|
|
215
215
|
* const result = await Actions.wallet.deposit(client, {
|
|
216
216
|
* amount: '1.5',
|
|
217
|
-
* token: '
|
|
217
|
+
* token: 'pathusd',
|
|
218
218
|
* })
|
|
219
219
|
* ```
|
|
220
220
|
*
|
package/tempo/internal/types.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Address } from 'abitype'
|
|
2
|
+
import type { TokenId } from 'ox/tempo'
|
|
2
3
|
import type { Account } from '../../accounts/types.js'
|
|
3
4
|
import type { ReadContractParameters as viem_ReadContractParameters } from '../../actions/public/readContract.js'
|
|
4
5
|
import type { WriteContractSyncParameters as viem_WriteContractSyncParameters } from '../../actions/wallet/writeContractSync.js'
|
|
@@ -10,6 +11,24 @@ import type {
|
|
|
10
11
|
} from '../../types/utils.js'
|
|
11
12
|
import type { TransactionRequestTempo } from '../Transaction.js'
|
|
12
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Selects a TIP20 token by `token`, which is either a TIP20 token id or a
|
|
16
|
+
* contract `address`.
|
|
17
|
+
*/
|
|
18
|
+
export type TokenParameter = {
|
|
19
|
+
/** Token to operate on: a TIP20 token id or a contract `address`. */
|
|
20
|
+
token: TokenId.TokenIdOrAddress
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type TokenParameters = TokenParameter & {
|
|
24
|
+
/**
|
|
25
|
+
* Decimals used to convert between base units and the human-readable amount.
|
|
26
|
+
* Inferred from the client's `tokens` array when `token` matches a declared
|
|
27
|
+
* token; otherwise fetched from the token contract when needed.
|
|
28
|
+
*/
|
|
29
|
+
decimals?: number | undefined
|
|
30
|
+
}
|
|
31
|
+
|
|
13
32
|
export type GetAccountParameter<
|
|
14
33
|
account extends Account | undefined = Account | undefined,
|
|
15
34
|
accountOverride extends Account | Address | undefined = Account | Address,
|
package/tempo/internal/utils.ts
CHANGED
|
@@ -1,11 +1,215 @@
|
|
|
1
1
|
import type { Abi, AbiStateMutability, Address } from 'abitype'
|
|
2
|
+
import { TokenId } from 'ox/tempo'
|
|
3
|
+
import { readContract } from '../../actions/public/readContract.js'
|
|
4
|
+
import type { Client } from '../../clients/createClient.js'
|
|
5
|
+
import type { Transport } from '../../clients/transports/createTransport.js'
|
|
6
|
+
import type { ResolvedToken, Token } from '../../tokens/defineToken.js'
|
|
7
|
+
import type { Chain } from '../../types/chain.js'
|
|
2
8
|
import type {
|
|
3
9
|
ContractFunctionName,
|
|
4
10
|
ContractFunctionParameters,
|
|
5
11
|
ExtractAbiItem,
|
|
6
12
|
} from '../../types/contract.js'
|
|
7
13
|
import type { Hex } from '../../types/misc.js'
|
|
14
|
+
import { isAddressEqual } from '../../utils/address/isAddressEqual.js'
|
|
8
15
|
import { encodeFunctionData } from '../../utils/index.js'
|
|
16
|
+
import * as Abis from '../Abis.js'
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Resolves the token contract `address` and `decimals` from a `token`, which is
|
|
20
|
+
* a token symbol declared on the client's `tokens` array, a TIP20 token id, or
|
|
21
|
+
* a contract `address`.
|
|
22
|
+
*
|
|
23
|
+
* When `token` is a declared symbol, the `address` and `decimals` are read from
|
|
24
|
+
* the client's declared `tokens` (`decimals` can be overridden via the explicit
|
|
25
|
+
* `decimals`). When `token` is a token id or address, its `decimals` is inferred
|
|
26
|
+
* from the client's declared `tokens` when the address matches a declared token,
|
|
27
|
+
* otherwise taken from the explicit `decimals`.
|
|
28
|
+
*
|
|
29
|
+
* @param client - Client.
|
|
30
|
+
* @param parameters - Parameters.
|
|
31
|
+
* @returns The resolved `address` and `decimals`.
|
|
32
|
+
*/
|
|
33
|
+
export function resolveToken(
|
|
34
|
+
client: Client<Transport, Chain | undefined>,
|
|
35
|
+
parameters: resolveToken.Parameters,
|
|
36
|
+
): { address: Address; decimals: number | undefined } {
|
|
37
|
+
const { decimals, token } = parameters
|
|
38
|
+
|
|
39
|
+
if (typeof token === 'string') {
|
|
40
|
+
const declared = findDeclaredTokenBySymbol(client, token)
|
|
41
|
+
if (declared)
|
|
42
|
+
return {
|
|
43
|
+
address: declared.address,
|
|
44
|
+
decimals: decimals ?? declared.decimals,
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const address = TokenId.toAddress(token as TokenId.TokenIdOrAddress)
|
|
49
|
+
return {
|
|
50
|
+
address,
|
|
51
|
+
decimals: decimals ?? inferDecimals(client, address),
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export namespace resolveToken {
|
|
56
|
+
export type Parameters = {
|
|
57
|
+
/** Decimals, if provided explicitly. */
|
|
58
|
+
decimals?: number | undefined
|
|
59
|
+
/** Token symbol (declared on the client's `tokens` array), TIP20 token id, or contract address. */
|
|
60
|
+
token: TokenId.TokenIdOrAddress | (string & {})
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Finds the declared {@link ResolvedToken} on the client's `tokens` array matching
|
|
66
|
+
* `token`, which is either a token symbol, a TIP20 token id, or a contract
|
|
67
|
+
* `address`, resolved for the client's `chain.id`. Returns `undefined` when no
|
|
68
|
+
* declared token matches, or the matching token has no address for the client's
|
|
69
|
+
* chain.
|
|
70
|
+
*
|
|
71
|
+
* @param client - Client.
|
|
72
|
+
* @param token - Token symbol (declared on the client's `tokens` array), TIP20 token id, or contract address.
|
|
73
|
+
* @returns The matching declared token config, or `undefined`.
|
|
74
|
+
*/
|
|
75
|
+
export function findDeclaredToken(
|
|
76
|
+
client: Client<Transport, Chain | undefined>,
|
|
77
|
+
token: TokenId.TokenIdOrAddress | (string & {}),
|
|
78
|
+
): ResolvedToken | undefined {
|
|
79
|
+
const tokens = client.tokens
|
|
80
|
+
const chainId = client.chain?.id
|
|
81
|
+
if (!tokens || chainId === undefined) return undefined
|
|
82
|
+
|
|
83
|
+
if (typeof token === 'string') {
|
|
84
|
+
const declared = findDeclaredTokenBySymbol(client, token)
|
|
85
|
+
if (declared) return declared
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const address = TokenId.toAddress(token as TokenId.TokenIdOrAddress)
|
|
89
|
+
for (const token_ of tokens) {
|
|
90
|
+
const resolved = resolveTokenForChain(token_, chainId)
|
|
91
|
+
if (resolved && isAddressEqual(resolved.address, address)) return resolved
|
|
92
|
+
}
|
|
93
|
+
return undefined
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Finds a declared token by `symbol` (case-insensitively) on the client's
|
|
98
|
+
* `tokens` array, resolved for the client's `chain.id`. @internal
|
|
99
|
+
*/
|
|
100
|
+
function findDeclaredTokenBySymbol(
|
|
101
|
+
client: Client<Transport, Chain | undefined>,
|
|
102
|
+
symbol: string,
|
|
103
|
+
): ResolvedToken | undefined {
|
|
104
|
+
const tokens = client.tokens
|
|
105
|
+
const chainId = client.chain?.id
|
|
106
|
+
if (!tokens || chainId === undefined) return undefined
|
|
107
|
+
|
|
108
|
+
const lowerSymbol = symbol.toLowerCase()
|
|
109
|
+
for (const token of tokens) {
|
|
110
|
+
if (token.symbol?.toLowerCase() === lowerSymbol)
|
|
111
|
+
return resolveTokenForChain(token, chainId)
|
|
112
|
+
}
|
|
113
|
+
return undefined
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Resolves a {@link Token} to a {@link ResolvedToken} for `chainId`, or
|
|
118
|
+
* `undefined` when the token has no address for `chainId`. @internal
|
|
119
|
+
*/
|
|
120
|
+
function resolveTokenForChain(
|
|
121
|
+
token: Token,
|
|
122
|
+
chainId: number,
|
|
123
|
+
): ResolvedToken | undefined {
|
|
124
|
+
const address = (token.addresses as Record<number, Address>)[chainId]
|
|
125
|
+
if (!address) return undefined
|
|
126
|
+
return {
|
|
127
|
+
address,
|
|
128
|
+
currency: token.currency,
|
|
129
|
+
decimals: token.decimals,
|
|
130
|
+
name: token.name,
|
|
131
|
+
popular: token.popular,
|
|
132
|
+
symbol: token.symbol,
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Infers a token's `decimals` from the client's `tokens` array by matching
|
|
138
|
+
* `address` against each token's address for the client's `chain.id`.
|
|
139
|
+
* @internal
|
|
140
|
+
*/
|
|
141
|
+
function inferDecimals(
|
|
142
|
+
client: Client<Transport, Chain | undefined>,
|
|
143
|
+
address: Address,
|
|
144
|
+
): number | undefined {
|
|
145
|
+
const tokens = client.tokens
|
|
146
|
+
const chainId = client.chain?.id
|
|
147
|
+
if (tokens && chainId !== undefined)
|
|
148
|
+
for (const token of tokens) {
|
|
149
|
+
const resolved = resolveTokenForChain(token, chainId)
|
|
150
|
+
if (resolved && isAddressEqual(resolved.address, address))
|
|
151
|
+
return resolved.decimals
|
|
152
|
+
}
|
|
153
|
+
return undefined
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Resolves token decimals, fetching from the token contract when they are not
|
|
158
|
+
* provided explicitly or declared on the chain.
|
|
159
|
+
* @internal
|
|
160
|
+
*/
|
|
161
|
+
export async function resolveTokenWithDecimals(
|
|
162
|
+
client: Client<Transport, Chain | undefined>,
|
|
163
|
+
parameters: resolveToken.Parameters,
|
|
164
|
+
): Promise<{ address: Address; decimals: number }> {
|
|
165
|
+
const { address, decimals } = resolveToken(client, parameters)
|
|
166
|
+
if (decimals !== undefined) return { address, decimals }
|
|
167
|
+
return {
|
|
168
|
+
address,
|
|
169
|
+
decimals: await readContract(client, {
|
|
170
|
+
abi: Abis.tip20,
|
|
171
|
+
address,
|
|
172
|
+
functionName: 'decimals',
|
|
173
|
+
}),
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Picks the transaction-override fields shared by Tempo write actions (including
|
|
179
|
+
* Tempo-specific fields), so the action-specific args (`token`, `amount`, `to`,
|
|
180
|
+
* etc.) don't leak into `estimateContractGas` / `simulateContract` requests.
|
|
181
|
+
* @internal
|
|
182
|
+
*/
|
|
183
|
+
export function pickWriteParameters(parameters: Record<string, unknown>) {
|
|
184
|
+
const {
|
|
185
|
+
account,
|
|
186
|
+
chain,
|
|
187
|
+
feePayer,
|
|
188
|
+
feeToken,
|
|
189
|
+
gas,
|
|
190
|
+
keyAuthorization,
|
|
191
|
+
maxFeePerGas,
|
|
192
|
+
maxPriorityFeePerGas,
|
|
193
|
+
nonce,
|
|
194
|
+
nonceKey,
|
|
195
|
+
validAfter,
|
|
196
|
+
validBefore,
|
|
197
|
+
} = parameters
|
|
198
|
+
return {
|
|
199
|
+
account,
|
|
200
|
+
chain,
|
|
201
|
+
feePayer,
|
|
202
|
+
feeToken,
|
|
203
|
+
gas,
|
|
204
|
+
keyAuthorization,
|
|
205
|
+
maxFeePerGas,
|
|
206
|
+
maxPriorityFeePerGas,
|
|
207
|
+
nonce,
|
|
208
|
+
nonceKey,
|
|
209
|
+
validAfter,
|
|
210
|
+
validBefore,
|
|
211
|
+
}
|
|
212
|
+
}
|
|
9
213
|
|
|
10
214
|
export function defineCall<
|
|
11
215
|
const abi extends Abi,
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { Address } from 'abitype'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A token created by {@link defineToken}: callable with a chain id to produce a
|
|
5
|
+
* chain-specific token config, and exposing the token metadata
|
|
6
|
+
* (`currency`, `decimals`, `name`, `popular`, `symbol`) and the full
|
|
7
|
+
* `addresses` map.
|
|
8
|
+
*/
|
|
9
|
+
export type Token<
|
|
10
|
+
token extends defineToken.Parameters = defineToken.Parameters,
|
|
11
|
+
> = defineToken.ReturnType<token>
|
|
12
|
+
|
|
13
|
+
/** Collection of tokens to declare on a Client. */
|
|
14
|
+
export type Tokens = readonly Token[]
|
|
15
|
+
|
|
16
|
+
/** A {@link Token} resolved to a specific chain id. */
|
|
17
|
+
export type ResolvedToken = {
|
|
18
|
+
/** Token contract address. */
|
|
19
|
+
address: Address
|
|
20
|
+
/** Token currency denomination. */
|
|
21
|
+
currency?: string | undefined
|
|
22
|
+
/** Token decimals, used to parse human-readable `amount` strings. */
|
|
23
|
+
decimals: number
|
|
24
|
+
/** Token name. */
|
|
25
|
+
name?: string | undefined
|
|
26
|
+
/** Whether the token should be treated as popular in token lists. */
|
|
27
|
+
popular?: boolean | undefined
|
|
28
|
+
/** Token symbol. */
|
|
29
|
+
symbol?: string | undefined
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Creates a token from shared metadata (`currency`, `decimals`, `name`,
|
|
34
|
+
* `popular`, `symbol`) and a map of per-chain contract `addresses`. The
|
|
35
|
+
* returned value is callable with a chain id to produce a chain-specific token
|
|
36
|
+
* config while also exposing the metadata and the full `addresses` map.
|
|
37
|
+
*
|
|
38
|
+
* @param token - {@link defineToken.Parameters}
|
|
39
|
+
* @returns The token. {@link defineToken.ReturnType}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* import { defineToken } from 'viem/tokens'
|
|
44
|
+
*
|
|
45
|
+
* const usdc = defineToken({
|
|
46
|
+
* addresses: {
|
|
47
|
+
* 1: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
|
48
|
+
* 8453: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
|
|
49
|
+
* },
|
|
50
|
+
* currency: 'USD',
|
|
51
|
+
* decimals: 6,
|
|
52
|
+
* name: 'USD Coin',
|
|
53
|
+
* popular: true,
|
|
54
|
+
* symbol: 'USDC',
|
|
55
|
+
* })
|
|
56
|
+
*
|
|
57
|
+
* usdc(1)
|
|
58
|
+
* // {
|
|
59
|
+
* // address: '0xA0b8…48',
|
|
60
|
+
* // currency: 'USD',
|
|
61
|
+
* // decimals: 6,
|
|
62
|
+
* // name: 'USD Coin',
|
|
63
|
+
* // popular: true,
|
|
64
|
+
* // symbol: 'USDC',
|
|
65
|
+
* // }
|
|
66
|
+
*
|
|
67
|
+
* usdc.addresses[8453]
|
|
68
|
+
* // '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export function defineToken<const token extends defineToken.Parameters>(
|
|
72
|
+
token: token,
|
|
73
|
+
): defineToken.ReturnType<token> {
|
|
74
|
+
const { addresses, currency, decimals, name, popular, symbol } = token
|
|
75
|
+
function fn(chainId: number): ResolvedToken {
|
|
76
|
+
const address = (addresses as Record<number, Address>)[chainId]
|
|
77
|
+
if (!address)
|
|
78
|
+
throw new Error(`Token has no address for chain id "${chainId}".`)
|
|
79
|
+
return { address, currency, decimals, name, popular, symbol }
|
|
80
|
+
}
|
|
81
|
+
return Object.defineProperties(fn, {
|
|
82
|
+
addresses: { enumerable: true, value: addresses },
|
|
83
|
+
currency: { enumerable: true, value: currency },
|
|
84
|
+
decimals: { enumerable: true, value: decimals },
|
|
85
|
+
name: { enumerable: true, value: name },
|
|
86
|
+
popular: { enumerable: true, value: popular },
|
|
87
|
+
symbol: { enumerable: true, value: symbol },
|
|
88
|
+
}) as never
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export namespace defineToken {
|
|
92
|
+
type ParameterValue<
|
|
93
|
+
token extends Parameters,
|
|
94
|
+
key extends keyof Parameters,
|
|
95
|
+
> = token extends { [_ in key]?: infer value } ? value : undefined
|
|
96
|
+
|
|
97
|
+
export type Parameters<
|
|
98
|
+
addresses extends Record<number, Address> = Record<number, Address>,
|
|
99
|
+
> = {
|
|
100
|
+
/** Token contract addresses, keyed by chain id. */
|
|
101
|
+
addresses: addresses
|
|
102
|
+
/** Currency denomination of the token (e.g. `'USD'`). */
|
|
103
|
+
currency?: string | undefined
|
|
104
|
+
/** Number of decimals the token uses. */
|
|
105
|
+
decimals: number
|
|
106
|
+
/** Human-readable name of the token. */
|
|
107
|
+
name?: string | undefined
|
|
108
|
+
/** Whether the token should be treated as popular in token lists. */
|
|
109
|
+
popular?: boolean | undefined
|
|
110
|
+
/** Ticker symbol of the token. */
|
|
111
|
+
symbol?: string | undefined
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export type ReturnType<token extends Parameters = Parameters> = {
|
|
115
|
+
/**
|
|
116
|
+
* Resolves the token config (`address`, `currency`, `decimals`, `name`,
|
|
117
|
+
* `popular`, `symbol`) for a chain id.
|
|
118
|
+
*/
|
|
119
|
+
<chainId extends keyof token['addresses']>(
|
|
120
|
+
chainId: chainId,
|
|
121
|
+
): {
|
|
122
|
+
address: token['addresses'][chainId]
|
|
123
|
+
currency: ParameterValue<token, 'currency'>
|
|
124
|
+
decimals: token['decimals']
|
|
125
|
+
name: ParameterValue<token, 'name'>
|
|
126
|
+
popular: ParameterValue<token, 'popular'>
|
|
127
|
+
symbol: ParameterValue<token, 'symbol'>
|
|
128
|
+
}
|
|
129
|
+
/** Token contract addresses, keyed by chain id. */
|
|
130
|
+
addresses: token['addresses']
|
|
131
|
+
/** Currency denomination of the token (e.g. `'USD'`). */
|
|
132
|
+
currency: ParameterValue<token, 'currency'>
|
|
133
|
+
/** Number of decimals the token uses. */
|
|
134
|
+
decimals: token['decimals']
|
|
135
|
+
/** Human-readable name of the token. */
|
|
136
|
+
name: ParameterValue<token, 'name'>
|
|
137
|
+
/** Whether the token should be treated as popular in token lists. */
|
|
138
|
+
popular: ParameterValue<token, 'popular'>
|
|
139
|
+
/** Ticker symbol of the token. */
|
|
140
|
+
symbol: ParameterValue<token, 'symbol'>
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Generated with `pnpm gen:tokenlist`. Do not modify manually.
|
|
2
|
+
|
|
3
|
+
import { defineToken } from '../defineToken.js'
|
|
4
|
+
|
|
5
|
+
export const alphausd = /*#__PURE__*/ defineToken({
|
|
6
|
+
addresses: {
|
|
7
|
+
42431: '0x20c0000000000000000000000000000000000001', // tempoModerato
|
|
8
|
+
},
|
|
9
|
+
currency: 'USD',
|
|
10
|
+
decimals: 6,
|
|
11
|
+
name: 'AlphaUSD',
|
|
12
|
+
symbol: 'alphaUSD',
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Generated with `pnpm gen:tokenlist`. Do not modify manually.
|
|
2
|
+
|
|
3
|
+
import { defineToken } from '../defineToken.js'
|
|
4
|
+
|
|
5
|
+
export const betausd = /*#__PURE__*/ defineToken({
|
|
6
|
+
addresses: {
|
|
7
|
+
42431: '0x20c0000000000000000000000000000000000002', // tempoModerato
|
|
8
|
+
},
|
|
9
|
+
currency: 'USD',
|
|
10
|
+
decimals: 6,
|
|
11
|
+
name: 'BetaUSD',
|
|
12
|
+
symbol: 'betaUSD',
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Generated with `pnpm gen:tokenlist`. Do not modify manually.
|
|
2
|
+
|
|
3
|
+
import { defineToken } from '../defineToken.js'
|
|
4
|
+
|
|
5
|
+
export const brla = /*#__PURE__*/ defineToken({
|
|
6
|
+
addresses: {
|
|
7
|
+
4217: '0x20c000000000000000000000f047dd7018e50367', // tempo
|
|
8
|
+
},
|
|
9
|
+
currency: 'BRL',
|
|
10
|
+
decimals: 6,
|
|
11
|
+
name: 'BRLA Token',
|
|
12
|
+
symbol: 'BRLA',
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Generated with `pnpm gen:tokenlist`. Do not modify manually.
|
|
2
|
+
|
|
3
|
+
import { defineToken } from '../defineToken.js'
|
|
4
|
+
|
|
5
|
+
export const cbbtc = /*#__PURE__*/ defineToken({
|
|
6
|
+
addresses: {
|
|
7
|
+
4217: '0x20c000000000000000000000c412ec89d0c08be5', // tempo
|
|
8
|
+
},
|
|
9
|
+
currency: 'BTC',
|
|
10
|
+
decimals: 6,
|
|
11
|
+
name: 'Coinbase Wrapped BTC',
|
|
12
|
+
symbol: 'cbBTC',
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Generated with `pnpm gen:tokenlist`. Do not modify manually.
|
|
2
|
+
|
|
3
|
+
import { defineToken } from '../defineToken.js'
|
|
4
|
+
|
|
5
|
+
export const chfau = /*#__PURE__*/ defineToken({
|
|
6
|
+
addresses: {
|
|
7
|
+
4217: '0x20c00000000000000000000042109aef2f8b28e1', // tempo
|
|
8
|
+
},
|
|
9
|
+
currency: 'CHF',
|
|
10
|
+
decimals: 6,
|
|
11
|
+
name: 'AllUnity CHF',
|
|
12
|
+
symbol: 'CHFAU',
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Generated with `pnpm gen:tokenlist`. Do not modify manually.
|
|
2
|
+
|
|
3
|
+
import { defineToken } from '../defineToken.js'
|
|
4
|
+
|
|
5
|
+
export const cusd = /*#__PURE__*/ defineToken({
|
|
6
|
+
addresses: {
|
|
7
|
+
4217: '0x20c0000000000000000000000520792dcccccccc', // tempo
|
|
8
|
+
},
|
|
9
|
+
currency: 'USD',
|
|
10
|
+
decimals: 6,
|
|
11
|
+
name: 'Cap USD',
|
|
12
|
+
symbol: 'cUSD',
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Generated with `pnpm gen:tokenlist`. Do not modify manually.
|
|
2
|
+
|
|
3
|
+
import { defineToken } from '../defineToken.js'
|
|
4
|
+
|
|
5
|
+
export const dlusd = /*#__PURE__*/ defineToken({
|
|
6
|
+
addresses: {
|
|
7
|
+
4217: '0x20c0000000000000000000006fd9a167923ba194', // tempo
|
|
8
|
+
},
|
|
9
|
+
currency: 'USD',
|
|
10
|
+
decimals: 6,
|
|
11
|
+
name: 'Deel USD',
|
|
12
|
+
symbol: 'DLUSD',
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Generated with `pnpm gen:tokenlist`. Do not modify manually.
|
|
2
|
+
|
|
3
|
+
import { defineToken } from '../defineToken.js'
|
|
4
|
+
|
|
5
|
+
export const eurau = /*#__PURE__*/ defineToken({
|
|
6
|
+
addresses: {
|
|
7
|
+
4217: '0x20c0000000000000000000009a4a4b17e0dc6651', // tempo
|
|
8
|
+
},
|
|
9
|
+
currency: 'EUR',
|
|
10
|
+
decimals: 6,
|
|
11
|
+
name: 'AllUnity EUR',
|
|
12
|
+
symbol: 'EURAU',
|
|
13
|
+
})
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Generated with `pnpm gen:tokenlist`. Do not modify manually.
|
|
2
|
+
|
|
3
|
+
import { defineToken } from '../defineToken.js'
|
|
4
|
+
|
|
5
|
+
export const eurce = /*#__PURE__*/ defineToken({
|
|
6
|
+
addresses: {
|
|
7
|
+
4217: '0x20c0000000000000000000001621e21f71cf12fb', // tempo
|
|
8
|
+
42431: '0x20c000000000000000000000d72572838bbee59c', // tempoModerato
|
|
9
|
+
},
|
|
10
|
+
currency: 'EUR',
|
|
11
|
+
decimals: 6,
|
|
12
|
+
name: 'Bridged EURC (Stargate)',
|
|
13
|
+
symbol: 'EURC.e',
|
|
14
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Generated with `pnpm gen:tokenlist`. Do not modify manually.
|
|
2
|
+
|
|
3
|
+
import { defineToken } from '../defineToken.js'
|
|
4
|
+
|
|
5
|
+
export const frxusd = /*#__PURE__*/ defineToken({
|
|
6
|
+
addresses: {
|
|
7
|
+
4217: '0x20c0000000000000000000003554d28269e0f3c2', // tempo
|
|
8
|
+
},
|
|
9
|
+
currency: 'USD',
|
|
10
|
+
decimals: 6,
|
|
11
|
+
name: 'Frax USD',
|
|
12
|
+
symbol: 'frxUSD',
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Generated with `pnpm gen:tokenlist`. Do not modify manually.
|
|
2
|
+
|
|
3
|
+
import { defineToken } from '../defineToken.js'
|
|
4
|
+
|
|
5
|
+
export const gbpa = /*#__PURE__*/ defineToken({
|
|
6
|
+
addresses: {
|
|
7
|
+
4217: '0x20c0000000000000000000000a6da882d075a4c3', // tempo
|
|
8
|
+
},
|
|
9
|
+
currency: 'GBP',
|
|
10
|
+
decimals: 6,
|
|
11
|
+
name: 'Agant GBP',
|
|
12
|
+
symbol: 'GBPA',
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Generated with `pnpm gen:tokenlist`. Do not modify manually.
|
|
2
|
+
|
|
3
|
+
import { defineToken } from '../defineToken.js'
|
|
4
|
+
|
|
5
|
+
export const gusd = /*#__PURE__*/ defineToken({
|
|
6
|
+
addresses: {
|
|
7
|
+
4217: '0x20c0000000000000000000005c0bac7cef389a11', // tempo
|
|
8
|
+
},
|
|
9
|
+
currency: 'USD',
|
|
10
|
+
decimals: 6,
|
|
11
|
+
name: 'Generic USD',
|
|
12
|
+
symbol: 'GUSD',
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Generated with `pnpm gen:tokenlist`. Do not modify manually.
|
|
2
|
+
|
|
3
|
+
import { defineToken } from '../defineToken.js'
|
|
4
|
+
|
|
5
|
+
export const iusd = /*#__PURE__*/ defineToken({
|
|
6
|
+
addresses: {
|
|
7
|
+
4217: '0x20c000000000000000000000ab02d39df30bd17e', // tempo
|
|
8
|
+
},
|
|
9
|
+
currency: 'USD',
|
|
10
|
+
decimals: 6,
|
|
11
|
+
name: 'InfiniFi USD',
|
|
12
|
+
symbol: 'iUSD',
|
|
13
|
+
})
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Generated with `pnpm gen:tokenlist`. Do not modify manually.
|
|
2
|
+
|
|
3
|
+
import { defineToken } from '../defineToken.js'
|
|
4
|
+
|
|
5
|
+
export const pathusd = /*#__PURE__*/ defineToken({
|
|
6
|
+
addresses: {
|
|
7
|
+
4217: '0x20c0000000000000000000000000000000000000', // tempo
|
|
8
|
+
42431: '0x20c0000000000000000000000000000000000000', // tempoModerato
|
|
9
|
+
},
|
|
10
|
+
currency: 'USD',
|
|
11
|
+
decimals: 6,
|
|
12
|
+
name: 'PathUSD',
|
|
13
|
+
symbol: 'pathUSD',
|
|
14
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Generated with `pnpm gen:tokenlist`. Do not modify manually.
|
|
2
|
+
|
|
3
|
+
import { defineToken } from '../defineToken.js'
|
|
4
|
+
|
|
5
|
+
export const reusd = /*#__PURE__*/ defineToken({
|
|
6
|
+
addresses: {
|
|
7
|
+
4217: '0x20c000000000000000000000383a23bacb546ab9', // tempo
|
|
8
|
+
},
|
|
9
|
+
currency: 'USD',
|
|
10
|
+
decimals: 6,
|
|
11
|
+
name: 'Re Protocol reUSD',
|
|
12
|
+
symbol: 'reUSD',
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Generated with `pnpm gen:tokenlist`. Do not modify manually.
|
|
2
|
+
|
|
3
|
+
import { defineToken } from '../defineToken.js'
|
|
4
|
+
|
|
5
|
+
export const rusd = /*#__PURE__*/ defineToken({
|
|
6
|
+
addresses: {
|
|
7
|
+
4217: '0x20c0000000000000000000007f7ba549dd0251b9', // tempo
|
|
8
|
+
},
|
|
9
|
+
currency: 'USD',
|
|
10
|
+
decimals: 6,
|
|
11
|
+
name: 'Reservoir Stablecoin',
|
|
12
|
+
symbol: 'rUSD',
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Generated with `pnpm gen:tokenlist`. Do not modify manually.
|
|
2
|
+
|
|
3
|
+
import { defineToken } from '../defineToken.js'
|
|
4
|
+
|
|
5
|
+
export const sbc = /*#__PURE__*/ defineToken({
|
|
6
|
+
addresses: {
|
|
7
|
+
4217: '0x20c000000000000000000000ae247a1130450f09', // tempo
|
|
8
|
+
},
|
|
9
|
+
currency: 'USD',
|
|
10
|
+
decimals: 6,
|
|
11
|
+
name: 'Stable Coin',
|
|
12
|
+
symbol: 'SBC',
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Generated with `pnpm gen:tokenlist`. Do not modify manually.
|
|
2
|
+
|
|
3
|
+
import { defineToken } from '../defineToken.js'
|
|
4
|
+
|
|
5
|
+
export const siusd = /*#__PURE__*/ defineToken({
|
|
6
|
+
addresses: {
|
|
7
|
+
4217: '0x20c000000000000000000000048c8f36df1c9a4a', // tempo
|
|
8
|
+
},
|
|
9
|
+
currency: 'siUSD',
|
|
10
|
+
decimals: 6,
|
|
11
|
+
name: 'InfiniFi Staked USD',
|
|
12
|
+
symbol: 'siUSD',
|
|
13
|
+
})
|