@sentio/sdk 2.0.0-rc.8 → 2.0.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/lib/aptos/api.d.ts +5 -0
- package/lib/aptos/api.js +21 -0
- package/lib/aptos/api.js.map +1 -0
- package/lib/aptos/aptos-plugin.d.ts +14 -0
- package/lib/aptos/aptos-plugin.js +146 -0
- package/lib/aptos/aptos-plugin.js.map +1 -0
- package/lib/aptos/aptos-processor.d.ts +72 -0
- package/lib/aptos/aptos-processor.js +201 -0
- package/lib/aptos/aptos-processor.js.map +1 -0
- package/lib/aptos/builtin/0x1.d.ts +1914 -0
- package/lib/aptos/builtin/0x1.js +2727 -0
- package/lib/aptos/builtin/0x1.js.map +1 -0
- package/lib/aptos/builtin/0x3.d.ts +491 -0
- package/lib/aptos/builtin/0x3.js +496 -0
- package/lib/aptos/builtin/0x3.js.map +1 -0
- package/lib/aptos/builtin/index.d.ts +2 -0
- package/lib/aptos/builtin/index.js +6 -0
- package/lib/aptos/builtin/index.js.map +1 -0
- package/lib/aptos/codegen/codegen.d.ts +21 -0
- package/lib/aptos/codegen/codegen.js +384 -0
- package/lib/aptos/codegen/codegen.js.map +1 -0
- package/lib/aptos/codegen/index.d.ts +1 -0
- package/lib/aptos/codegen/index.js +2 -0
- package/lib/aptos/codegen/index.js.map +1 -0
- package/lib/aptos/codegen/run.d.ts +1 -0
- package/lib/aptos/codegen/run.js +12 -0
- package/lib/aptos/codegen/run.js.map +1 -0
- package/lib/aptos/codegen/typegen.d.ts +18 -0
- package/lib/aptos/codegen/typegen.js +145 -0
- package/lib/aptos/codegen/typegen.js.map +1 -0
- package/lib/aptos/codegen/typegen.test.d.ts +1 -0
- package/lib/aptos/codegen/typegen.test.js.map +1 -0
- package/lib/aptos/context.d.ts +21 -0
- package/lib/aptos/context.js +59 -0
- package/lib/aptos/context.js.map +1 -0
- package/lib/aptos/index.d.ts +9 -0
- package/lib/aptos/index.js +8 -0
- package/lib/aptos/index.js.map +1 -0
- package/lib/aptos/models.d.ts +29 -0
- package/lib/aptos/models.js +2 -0
- package/lib/aptos/models.js.map +1 -0
- package/lib/aptos/move-coder.d.ts +22 -0
- package/lib/aptos/move-coder.js +162 -0
- package/lib/aptos/move-coder.js.map +1 -0
- package/lib/aptos/move-types.d.ts +10 -0
- package/lib/aptos/move-types.js +2 -0
- package/lib/aptos/move-types.js.map +1 -0
- package/lib/aptos/network.d.ts +11 -0
- package/lib/aptos/network.js +27 -0
- package/lib/aptos/network.js.map +1 -0
- package/lib/aptos/tests/aptos.test.d.ts +1 -0
- package/lib/aptos/tests/aptos.test.js.map +1 -0
- package/lib/aptos/tests/souffl3.d.ts +1 -0
- package/lib/aptos/tests/souffl3.js +44 -0
- package/lib/aptos/tests/souffl3.js.map +1 -0
- package/lib/aptos/tests/types/index.d.ts +3 -0
- package/lib/aptos/tests/types/index.js +7 -0
- package/lib/aptos/tests/types/index.js.map +1 -0
- package/lib/aptos/tests/types/reserved.d.ts +345 -0
- package/lib/aptos/tests/types/reserved.js +301 -0
- package/lib/aptos/tests/types/reserved.js.map +1 -0
- package/lib/aptos/tests/types/soffl3.d.ts +812 -0
- package/lib/aptos/tests/types/soffl3.js +548 -0
- package/lib/aptos/tests/types/soffl3.js.map +1 -0
- package/lib/aptos/tests/types/souffle.d.ts +340 -0
- package/lib/aptos/tests/types/souffle.js +295 -0
- package/lib/aptos/tests/types/souffle.js.map +1 -0
- package/lib/aptos/types.d.ts +9 -0
- package/lib/aptos/types.js +130 -0
- package/lib/aptos/types.js.map +1 -0
- package/lib/aptos/types.test.d.ts +1 -0
- package/lib/aptos/types.test.js.map +1 -0
- package/lib/aptos/utils.d.ts +7 -0
- package/lib/aptos/utils.js +20 -0
- package/lib/aptos/utils.js.map +1 -0
- package/lib/core/big-decimal.d.ts +2 -0
- package/lib/core/big-decimal.js +8 -0
- package/lib/core/big-decimal.js.map +1 -1
- package/lib/{utils → core}/chain.d.ts +0 -0
- package/lib/{utils → core}/chain.js +0 -0
- package/lib/core/chain.js.map +1 -0
- package/lib/core/index.d.ts +2 -4
- package/lib/core/index.js +2 -4
- package/lib/core/index.js.map +1 -1
- package/lib/core/numberish.d.ts +0 -2
- package/lib/core/numberish.js +0 -9
- package/lib/core/numberish.js.map +1 -1
- package/lib/core/sui-plugin.js +1 -1
- package/lib/core/sui-plugin.js.map +1 -1
- package/lib/core/sui-processor.d.ts +1 -1
- package/lib/core/sui-processor.js +1 -1
- package/lib/core/sui-processor.js.map +1 -1
- package/lib/eth/account-processor.d.ts +4 -4
- package/lib/eth/account-processor.js +4 -4
- package/lib/eth/account-processor.js.map +1 -1
- package/lib/eth/base-processor-template.d.ts +6 -5
- package/lib/eth/base-processor-template.js +1 -1
- package/lib/eth/base-processor-template.js.map +1 -1
- package/lib/eth/base-processor.d.ts +6 -5
- package/lib/eth/base-processor.js +3 -2
- package/lib/eth/base-processor.js.map +1 -1
- package/lib/{core → eth}/bind-options.d.ts +0 -0
- package/lib/{core → eth}/bind-options.js +0 -0
- package/lib/eth/bind-options.js.map +1 -0
- package/lib/eth/binds.d.ts +2 -2
- package/lib/eth/binds.js +1 -1
- package/lib/eth/binds.js.map +1 -1
- package/lib/{builtin → eth/builtin}/eacaggregatorproxy/index.d.ts +0 -0
- package/lib/{builtin → eth/builtin}/eacaggregatorproxy/index.js +0 -0
- package/lib/eth/builtin/eacaggregatorproxy/index.js.map +1 -0
- package/lib/{builtin → eth/builtin}/eacaggregatorproxy/test-utils.d.ts +0 -0
- package/lib/{builtin → eth/builtin}/eacaggregatorproxy/test-utils.js +0 -0
- package/lib/eth/builtin/eacaggregatorproxy/test-utils.js.map +1 -0
- package/lib/{builtin → eth/builtin}/erc1155/index.d.ts +0 -0
- package/lib/{builtin → eth/builtin}/erc1155/index.js +0 -0
- package/lib/eth/builtin/erc1155/index.js.map +1 -0
- package/lib/{builtin → eth/builtin}/erc1155/test-utils.d.ts +0 -0
- package/lib/{builtin → eth/builtin}/erc1155/test-utils.js +0 -0
- package/lib/eth/builtin/erc1155/test-utils.js.map +1 -0
- package/lib/{builtin → eth/builtin}/erc20/index.d.ts +0 -0
- package/lib/{builtin → eth/builtin}/erc20/index.js +0 -0
- package/lib/eth/builtin/erc20/index.js.map +1 -0
- package/lib/{builtin → eth/builtin}/erc20/test-utils.d.ts +0 -0
- package/lib/{builtin → eth/builtin}/erc20/test-utils.js +0 -0
- package/lib/eth/builtin/erc20/test-utils.js.map +1 -0
- package/lib/{builtin → eth/builtin}/erc20bytes/index.d.ts +0 -0
- package/lib/{builtin → eth/builtin}/erc20bytes/index.js +0 -0
- package/lib/eth/builtin/erc20bytes/index.js.map +1 -0
- package/lib/{builtin → eth/builtin}/erc20bytes/test-utils.d.ts +0 -0
- package/lib/{builtin → eth/builtin}/erc20bytes/test-utils.js +0 -0
- package/lib/eth/builtin/erc20bytes/test-utils.js.map +1 -0
- package/lib/{builtin → eth/builtin}/erc721/index.d.ts +0 -0
- package/lib/{builtin → eth/builtin}/erc721/index.js +0 -0
- package/lib/eth/builtin/erc721/index.js.map +1 -0
- package/lib/{builtin → eth/builtin}/erc721/test-utils.d.ts +0 -0
- package/lib/{builtin → eth/builtin}/erc721/test-utils.js +0 -0
- package/lib/eth/builtin/erc721/test-utils.js.map +1 -0
- package/lib/{builtin → eth/builtin}/index.d.ts +0 -0
- package/lib/{builtin → eth/builtin}/index.js +0 -0
- package/lib/eth/builtin/index.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/EACAggregatorProxy.d.ts +5 -5
- package/lib/{builtin → eth/builtin}/internal/EACAggregatorProxy.js +0 -0
- package/lib/eth/builtin/internal/EACAggregatorProxy.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/ERC1155.d.ts +5 -5
- package/lib/{builtin → eth/builtin}/internal/ERC1155.js +0 -0
- package/lib/eth/builtin/internal/ERC1155.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/ERC20.d.ts +4 -4
- package/lib/{builtin → eth/builtin}/internal/ERC20.js +0 -0
- package/lib/eth/builtin/internal/ERC20.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/ERC20Bytes.d.ts +3 -3
- package/lib/{builtin → eth/builtin}/internal/ERC20Bytes.js +0 -0
- package/lib/eth/builtin/internal/ERC20Bytes.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/ERC721.d.ts +4 -4
- package/lib/{builtin → eth/builtin}/internal/ERC721.js +0 -0
- package/lib/eth/builtin/internal/ERC721.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/WETH9.d.ts +5 -5
- package/lib/{builtin → eth/builtin}/internal/WETH9.js +0 -0
- package/lib/eth/builtin/internal/WETH9.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/common.d.ts +4 -2
- package/lib/{builtin → eth/builtin}/internal/common.js +0 -0
- package/lib/eth/builtin/internal/common.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/eacaggregatorproxy_processor.d.ts +5 -5
- package/lib/{builtin → eth/builtin}/internal/eacaggregatorproxy_processor.js +92 -182
- package/lib/eth/builtin/internal/eacaggregatorproxy_processor.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/erc1155_processor.d.ts +5 -5
- package/lib/{builtin → eth/builtin}/internal/erc1155_processor.js +27 -52
- package/lib/eth/builtin/internal/erc1155_processor.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/erc20_processor.d.ts +4 -4
- package/lib/{builtin → eth/builtin}/internal/erc20_processor.js +42 -82
- package/lib/eth/builtin/internal/erc20_processor.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/erc20bytes_processor.d.ts +3 -3
- package/lib/{builtin → eth/builtin}/internal/erc20bytes_processor.js +32 -62
- package/lib/eth/builtin/internal/erc20bytes_processor.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/erc721_processor.d.ts +4 -4
- package/lib/{builtin → eth/builtin}/internal/erc721_processor.js +47 -92
- package/lib/eth/builtin/internal/erc721_processor.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/factories/EACAggregatorProxy__factory.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/internal/factories/EACAggregatorProxy__factory.js +0 -0
- package/lib/eth/builtin/internal/factories/EACAggregatorProxy__factory.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/factories/ERC1155__factory.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/internal/factories/ERC1155__factory.js +0 -0
- package/lib/eth/builtin/internal/factories/ERC1155__factory.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/factories/ERC20Bytes__factory.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/internal/factories/ERC20Bytes__factory.js +0 -0
- package/lib/eth/builtin/internal/factories/ERC20Bytes__factory.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/factories/ERC20__factory.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/internal/factories/ERC20__factory.js +0 -0
- package/lib/eth/builtin/internal/factories/ERC20__factory.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/factories/ERC721__factory.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/internal/factories/ERC721__factory.js +0 -0
- package/lib/eth/builtin/internal/factories/ERC721__factory.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/factories/WETH9__factory.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/internal/factories/WETH9__factory.js +0 -0
- package/lib/eth/builtin/internal/factories/WETH9__factory.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/factories/index.d.ts +0 -0
- package/lib/{builtin → eth/builtin}/internal/factories/index.js +0 -0
- package/lib/eth/builtin/internal/factories/index.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/index.d.ts +0 -0
- package/lib/{builtin → eth/builtin}/internal/index.js +0 -0
- package/lib/eth/builtin/internal/index.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/weth9_processor.d.ts +5 -5
- package/lib/{builtin → eth/builtin}/internal/weth9_processor.js +32 -62
- package/lib/eth/builtin/internal/weth9_processor.js.map +1 -0
- package/lib/{builtin → eth/builtin}/weth9/index.d.ts +0 -0
- package/lib/{builtin → eth/builtin}/weth9/index.js +0 -0
- package/lib/eth/builtin/weth9/index.js.map +1 -0
- package/lib/{builtin → eth/builtin}/weth9/test-utils.d.ts +0 -0
- package/lib/{builtin → eth/builtin}/weth9/test-utils.js +0 -0
- package/lib/eth/builtin/weth9/test-utils.js.map +1 -0
- package/lib/eth/codegen/codegen.d.ts +1 -0
- package/lib/eth/codegen/codegen.js +53 -0
- package/lib/eth/codegen/codegen.js.map +1 -0
- package/lib/{target-ethers-sentio/index.d.cts → eth/codegen/ethers-sentio.d.ts} +1 -1
- package/lib/eth/codegen/ethers-sentio.js +57 -0
- package/lib/eth/codegen/ethers-sentio.js.map +1 -0
- package/lib/{target-ethers-sentio/event-handler.d.cts → eth/codegen/event-handler.d.ts} +0 -0
- package/lib/eth/codegen/event-handler.js +46 -0
- package/lib/eth/codegen/event-handler.js.map +1 -0
- package/lib/{target-ethers-sentio/file.d.cts → eth/codegen/file.d.ts} +0 -0
- package/lib/{target-ethers-sentio/file.cjs → eth/codegen/file.js} +28 -35
- package/lib/eth/codegen/file.js.map +1 -0
- package/lib/{target-ethers-sentio/functions-handler.d.cts → eth/codegen/functions-handler.d.ts} +0 -0
- package/lib/{target-ethers-sentio/functions-handler.cjs → eth/codegen/functions-handler.js} +13 -18
- package/lib/eth/codegen/functions-handler.js.map +1 -0
- package/lib/eth/codegen/index.d.ts +1 -0
- package/lib/eth/codegen/index.js +2 -0
- package/lib/eth/codegen/index.js.map +1 -0
- package/lib/eth/codegen/run.d.ts +2 -0
- package/lib/eth/codegen/run.js +12 -0
- package/lib/eth/codegen/run.js.map +1 -0
- package/lib/{target-ethers-sentio/types.d.cts → eth/codegen/types.d.ts} +0 -0
- package/lib/{target-ethers-sentio/types.cjs → eth/codegen/types.js} +4 -10
- package/lib/eth/codegen/types.js.map +1 -0
- package/lib/{target-ethers-sentio/view-function.d.cts → eth/codegen/view-function.d.ts} +0 -0
- package/lib/eth/codegen/view-function.js +62 -0
- package/lib/eth/codegen/view-function.js.map +1 -0
- package/lib/{core → eth}/context.d.ts +5 -4
- package/lib/{core → eth}/context.js +7 -8
- package/lib/eth/context.js.map +1 -0
- package/lib/eth/error.d.ts +1 -0
- package/lib/eth/error.js +3 -0
- package/lib/eth/error.js.map +1 -0
- package/lib/eth/eth.d.ts +13 -0
- package/lib/{error.js → eth/eth.js} +20 -14
- package/lib/eth/eth.js.map +1 -0
- package/lib/eth/generic-processor.d.ts +2 -2
- package/lib/eth/generic-processor.js +2 -2
- package/lib/eth/generic-processor.js.map +1 -1
- package/lib/eth/generic-processor.test.js.map +1 -1
- package/lib/eth/index.d.ts +5 -1
- package/lib/eth/index.js +5 -1
- package/lib/eth/index.js.map +1 -1
- package/lib/eth/provider.js +3 -2
- package/lib/eth/provider.js.map +1 -1
- package/lib/index.d.ts +1 -3
- package/lib/index.js +1 -5
- package/lib/index.js.map +1 -1
- package/lib/jest.config.d.ts +9 -0
- package/lib/jest.config.js +9 -0
- package/lib/jest.config.js.map +1 -0
- package/lib/solana/builtin/index.d.ts +1 -0
- package/lib/solana/builtin/index.js +2 -0
- package/lib/solana/builtin/index.js.map +1 -0
- package/lib/solana/builtin/spl-token-processor.d.ts +39 -0
- package/lib/solana/builtin/spl-token-processor.js +254 -0
- package/lib/solana/builtin/spl-token-processor.js.map +1 -0
- package/lib/solana/builtin/types.d.ts +427 -0
- package/lib/solana/builtin/types.js +200 -0
- package/lib/solana/builtin/types.js.map +1 -0
- package/lib/solana/codegen/codegen.d.ts +1 -0
- package/lib/solana/codegen/codegen.js +122 -0
- package/lib/solana/codegen/codegen.js.map +1 -0
- package/lib/solana/codegen/index.d.ts +1 -0
- package/lib/solana/codegen/index.js +2 -0
- package/lib/solana/codegen/index.js.map +1 -0
- package/lib/solana/codegen/run.d.ts +2 -0
- package/lib/solana/codegen/run.js +12 -0
- package/lib/solana/codegen/run.js.map +1 -0
- package/lib/solana/index.d.ts +4 -0
- package/lib/solana/index.js +5 -0
- package/lib/solana/index.js.map +1 -0
- package/lib/solana/solana-context.d.ts +9 -0
- package/lib/solana/solana-context.js +28 -0
- package/lib/solana/solana-context.js.map +1 -0
- package/lib/solana/solana-options.d.ts +10 -0
- package/lib/solana/solana-options.js +10 -0
- package/lib/solana/solana-options.js.map +1 -0
- package/lib/solana/solana-plugin.d.ts +9 -0
- package/lib/solana/solana-plugin.js +87 -0
- package/lib/solana/solana-plugin.js.map +1 -0
- package/lib/solana/solana-processor.d.ts +43 -0
- package/lib/solana/solana-processor.js +72 -0
- package/lib/solana/solana-processor.js.map +1 -0
- package/lib/solana/tests/solana.test.d.ts +1 -0
- package/lib/solana/tests/solana.test.js.map +1 -0
- package/lib/solana/tests/types/basic_1.d.ts +26 -0
- package/lib/solana/tests/types/basic_1.js +63 -0
- package/lib/solana/tests/types/basic_1.js.map +1 -0
- package/lib/solana/tests/types/basic_1_processor.d.ts +21 -0
- package/lib/solana/tests/types/basic_1_processor.js +35 -0
- package/lib/solana/tests/types/basic_1_processor.js.map +1 -0
- package/lib/solana/tests/types/token_bridge.d.ts +29 -0
- package/lib/solana/tests/types/token_bridge.js +938 -0
- package/lib/solana/tests/types/token_bridge.js.map +1 -0
- package/lib/solana/tests/types/token_bridge_processor.d.ts +212 -0
- package/lib/solana/tests/types/token_bridge_processor.js +134 -0
- package/lib/solana/tests/types/token_bridge_processor.js.map +1 -0
- package/lib/solana/tests/wormhole-token-bridge.d.ts +15 -0
- package/lib/solana/tests/wormhole-token-bridge.js +79 -0
- package/lib/solana/tests/wormhole-token-bridge.js.map +1 -0
- package/lib/testing/test-processor-server.js +1 -1
- package/lib/testing/test-processor-server.js.map +1 -1
- package/lib/testing/test-provider.js +1 -1
- package/lib/testing/test-provider.js.map +1 -1
- package/lib/tsup.config.ts +3 -0
- package/lib/utils/conversion.d.ts +0 -5
- package/lib/utils/conversion.js +21 -20
- package/lib/utils/conversion.js.map +1 -1
- package/lib/utils/dex-price.js +2 -2
- package/lib/utils/dex-price.js.map +1 -1
- package/lib/utils/index.d.ts +4 -4
- package/lib/utils/index.js +4 -4
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/token.d.ts +0 -1
- package/lib/utils/token.js +17 -28
- package/lib/utils/token.js.map +1 -1
- package/package.json +42 -20
- package/src/aptos/abis/0x1.json +9205 -0
- package/src/aptos/abis/0x3.json +1515 -0
- package/src/aptos/api.ts +23 -0
- package/src/aptos/aptos-plugin.ts +183 -0
- package/src/aptos/aptos-processor.ts +331 -0
- package/src/aptos/builtin/0x1.ts +4685 -0
- package/src/aptos/builtin/0x3.ts +1010 -0
- package/src/aptos/builtin/index.ts +5 -0
- package/src/aptos/codegen/codegen.ts +461 -0
- package/src/aptos/codegen/index.ts +1 -0
- package/src/aptos/codegen/run.ts +13 -0
- package/src/aptos/codegen/tsconfig.json +8 -0
- package/src/aptos/codegen/typegen.ts +165 -0
- package/src/aptos/context.ts +72 -0
- package/src/aptos/index.ts +10 -0
- package/src/aptos/models.ts +37 -0
- package/src/aptos/move-coder.ts +199 -0
- package/src/aptos/move-types.ts +11 -0
- package/src/aptos/network.ts +29 -0
- package/src/aptos/tests/abis/reserved.json +402 -0
- package/src/aptos/tests/abis/soffl3.json +1411 -0
- package/src/aptos/tests/abis/souffle.json +389 -0
- package/src/aptos/tests/souffl3.ts +57 -0
- package/src/aptos/tests/types/index.ts +6 -0
- package/src/aptos/tests/types/reserved.ts +781 -0
- package/src/aptos/tests/types/soffl3.ts +1567 -0
- package/src/aptos/tests/types/souffle.ts +780 -0
- package/src/aptos/types.ts +149 -0
- package/src/aptos/utils.ts +26 -0
- package/src/core/big-decimal.ts +11 -0
- package/src/{utils → core}/chain.ts +0 -0
- package/src/core/index.ts +2 -5
- package/src/core/numberish.ts +0 -11
- package/src/core/sui-plugin.ts +1 -1
- package/src/core/sui-processor.ts +1 -1
- package/src/{abis → eth/abis}/EACAggregatorProxy.json +0 -0
- package/src/{abis → eth/abis}/ERC1155.json +0 -0
- package/src/{abis → eth/abis}/ERC20.json +0 -0
- package/src/{abis → eth/abis}/ERC20Bytes.json +0 -0
- package/src/{abis → eth/abis}/ERC721.json +0 -0
- package/src/{abis → eth/abis}/WETH9.json +0 -0
- package/src/eth/account-processor.ts +7 -7
- package/src/eth/base-processor-template.ts +5 -4
- package/src/eth/base-processor.ts +10 -20
- package/src/{core → eth}/bind-options.ts +0 -0
- package/src/eth/binds.ts +2 -2
- package/src/{builtin → eth/builtin}/eacaggregatorproxy/index.ts +0 -0
- package/src/{builtin → eth/builtin}/eacaggregatorproxy/test-utils.ts +0 -0
- package/src/{builtin → eth/builtin}/erc1155/index.ts +0 -0
- package/src/{builtin → eth/builtin}/erc1155/test-utils.ts +0 -0
- package/src/{builtin → eth/builtin}/erc20/index.ts +0 -0
- package/src/{builtin → eth/builtin}/erc20/test-utils.ts +0 -0
- package/src/{builtin → eth/builtin}/erc20bytes/index.ts +0 -0
- package/src/{builtin → eth/builtin}/erc20bytes/test-utils.ts +0 -0
- package/src/{builtin → eth/builtin}/erc721/index.ts +0 -0
- package/src/{builtin → eth/builtin}/erc721/test-utils.ts +0 -0
- package/src/{builtin → eth/builtin}/index.ts +0 -0
- package/src/{builtin → eth/builtin}/internal/EACAggregatorProxy.ts +5 -9
- package/src/{builtin → eth/builtin}/internal/ERC1155.ts +5 -9
- package/src/{builtin → eth/builtin}/internal/ERC20.ts +4 -7
- package/src/{builtin → eth/builtin}/internal/ERC20Bytes.ts +3 -5
- package/src/{builtin → eth/builtin}/internal/ERC721.ts +4 -7
- package/src/{builtin → eth/builtin}/internal/WETH9.ts +5 -9
- package/src/eth/builtin/internal/common.ts +22 -0
- package/src/{builtin → eth/builtin}/internal/eacaggregatorproxy_processor.ts +92 -164
- package/src/{builtin → eth/builtin}/internal/erc1155_processor.ts +27 -51
- package/src/{builtin → eth/builtin}/internal/erc20_processor.ts +42 -74
- package/src/{builtin → eth/builtin}/internal/erc20bytes_processor.ts +32 -56
- package/src/{builtin → eth/builtin}/internal/erc721_processor.ts +47 -83
- package/src/{builtin → eth/builtin}/internal/factories/EACAggregatorProxy__factory.ts +1 -1
- package/src/{builtin → eth/builtin}/internal/factories/ERC1155__factory.ts +1 -1
- package/src/{builtin → eth/builtin}/internal/factories/ERC20Bytes__factory.ts +1 -1
- package/src/{builtin → eth/builtin}/internal/factories/ERC20__factory.ts +1 -1
- package/src/{builtin → eth/builtin}/internal/factories/ERC721__factory.ts +1 -1
- package/src/{builtin → eth/builtin}/internal/factories/WETH9__factory.ts +1 -1
- package/src/{builtin → eth/builtin}/internal/factories/index.ts +0 -0
- package/src/{builtin → eth/builtin}/internal/index.ts +0 -0
- package/src/{builtin → eth/builtin}/internal/weth9_processor.ts +32 -56
- package/src/{builtin → eth/builtin}/weth9/index.ts +0 -0
- package/src/{builtin → eth/builtin}/weth9/test-utils.ts +0 -0
- package/src/eth/codegen/codegen.ts +62 -0
- package/src/{target-ethers-sentio/index.cts → eth/codegen/ethers-sentio.ts} +2 -2
- package/src/{target-ethers-sentio/event-handler.cts → eth/codegen/event-handler.ts} +2 -2
- package/src/{target-ethers-sentio/file.cts → eth/codegen/file.ts} +7 -7
- package/src/{target-ethers-sentio/functions-handler.cts → eth/codegen/functions-handler.ts} +4 -4
- package/src/eth/codegen/index.ts +1 -0
- package/src/eth/codegen/run.ts +12 -0
- package/src/eth/codegen/tsconfig.json +8 -0
- package/src/{target-ethers-sentio/types.cts → eth/codegen/types.ts} +1 -1
- package/src/{target-ethers-sentio/view-function.cts → eth/codegen/view-function.ts} +7 -12
- package/src/{core → eth}/context.ts +8 -9
- package/src/eth/error.ts +4 -0
- package/src/eth/eth.ts +56 -0
- package/src/eth/generic-processor.ts +3 -3
- package/src/eth/index.ts +6 -2
- package/src/eth/provider.ts +4 -3
- package/src/index.ts +1 -6
- package/src/jest.config.ts +8 -0
- package/src/solana/builtin/index.ts +1 -0
- package/src/solana/builtin/spl-token-processor.ts +298 -0
- package/src/solana/builtin/types.ts +279 -0
- package/src/solana/codegen/codegen.ts +140 -0
- package/src/solana/codegen/index.ts +1 -0
- package/src/solana/codegen/run.ts +12 -0
- package/src/solana/codegen/tsconfig.json +8 -0
- package/src/solana/index.ts +4 -0
- package/src/solana/solana-context.ts +30 -0
- package/src/solana/solana-options.ts +11 -0
- package/src/solana/solana-plugin.ts +103 -0
- package/src/solana/solana-processor.ts +102 -0
- package/src/solana/tests/abis/basic_1.json +62 -0
- package/src/solana/tests/abis/token_bridge.json +937 -0
- package/src/solana/tests/types/basic_1.ts +62 -0
- package/src/solana/tests/types/basic_1_processor.ts +42 -0
- package/src/solana/tests/types/token_bridge.ts +937 -0
- package/src/solana/tests/types/token_bridge_processor.ts +150 -0
- package/src/solana/tests/wormhole-token-bridge.ts +96 -0
- package/src/testing/test-processor-server.ts +1 -1
- package/src/testing/test-provider.ts +1 -1
- package/src/tsup.config.ts +3 -0
- package/src/utils/conversion.ts +21 -25
- package/src/utils/dex-price.ts +2 -3
- package/src/utils/index.ts +4 -4
- package/src/utils/token.ts +19 -30
- package/lib/builtin/eacaggregatorproxy/index.js.map +0 -1
- package/lib/builtin/eacaggregatorproxy/test-utils.js.map +0 -1
- package/lib/builtin/erc1155/index.js.map +0 -1
- package/lib/builtin/erc1155/test-utils.js.map +0 -1
- package/lib/builtin/erc20/index.js.map +0 -1
- package/lib/builtin/erc20/test-utils.js.map +0 -1
- package/lib/builtin/erc20bytes/index.js.map +0 -1
- package/lib/builtin/erc20bytes/test-utils.js.map +0 -1
- package/lib/builtin/erc721/index.js.map +0 -1
- package/lib/builtin/erc721/test-utils.js.map +0 -1
- package/lib/builtin/index.js.map +0 -1
- package/lib/builtin/internal/EACAggregatorProxy.js.map +0 -1
- package/lib/builtin/internal/ERC1155.js.map +0 -1
- package/lib/builtin/internal/ERC20.js.map +0 -1
- package/lib/builtin/internal/ERC20Bytes.js.map +0 -1
- package/lib/builtin/internal/ERC721.js.map +0 -1
- package/lib/builtin/internal/WETH9.js.map +0 -1
- package/lib/builtin/internal/common.js.map +0 -1
- package/lib/builtin/internal/eacaggregatorproxy_processor.js.map +0 -1
- package/lib/builtin/internal/erc1155_processor.js.map +0 -1
- package/lib/builtin/internal/erc20_processor.js.map +0 -1
- package/lib/builtin/internal/erc20bytes_processor.js.map +0 -1
- package/lib/builtin/internal/erc721_processor.js.map +0 -1
- package/lib/builtin/internal/factories/EACAggregatorProxy__factory.js.map +0 -1
- package/lib/builtin/internal/factories/ERC1155__factory.js.map +0 -1
- package/lib/builtin/internal/factories/ERC20Bytes__factory.js.map +0 -1
- package/lib/builtin/internal/factories/ERC20__factory.js.map +0 -1
- package/lib/builtin/internal/factories/ERC721__factory.js.map +0 -1
- package/lib/builtin/internal/factories/WETH9__factory.js.map +0 -1
- package/lib/builtin/internal/factories/index.js.map +0 -1
- package/lib/builtin/internal/index.js.map +0 -1
- package/lib/builtin/internal/weth9_processor.js.map +0 -1
- package/lib/builtin/weth9/index.js.map +0 -1
- package/lib/builtin/weth9/test-utils.js.map +0 -1
- package/lib/core/bind-options.js.map +0 -1
- package/lib/core/context.js.map +0 -1
- package/lib/error.d.ts +0 -7
- package/lib/error.js.map +0 -1
- package/lib/target-ethers-sentio/event-handler.cjs +0 -52
- package/lib/target-ethers-sentio/event-handler.cjs.map +0 -1
- package/lib/target-ethers-sentio/file.cjs.map +0 -1
- package/lib/target-ethers-sentio/functions-handler.cjs.map +0 -1
- package/lib/target-ethers-sentio/index.cjs +0 -61
- package/lib/target-ethers-sentio/index.cjs.map +0 -1
- package/lib/target-ethers-sentio/types.cjs.map +0 -1
- package/lib/target-ethers-sentio/view-function.cjs +0 -74
- package/lib/target-ethers-sentio/view-function.cjs.map +0 -1
- package/lib/utils/chain.js.map +0 -1
- package/src/builtin/internal/common.ts +0 -46
- package/src/error.ts +0 -45
- package/src/target-ethers-sentio/.eslintrc.json +0 -14
- package/src/target-ethers-sentio/tsconfig.json +0 -9
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { BorshInstructionCoder, Instruction, Idl } from '@project-serum/anchor'
|
|
2
|
+
import { SolanaBaseProcessor, SolanaContext, SolanaBindOptions } from "@sentio/sdk/solana"
|
|
3
|
+
import { token_bridge_idl } from "./token_bridge.js"
|
|
4
|
+
import { PublicKey } from '@solana/web3.js'
|
|
5
|
+
|
|
6
|
+
export class TokenBridgeProcessor extends SolanaBaseProcessor {
|
|
7
|
+
static DEFAULT_OPTIONS = {
|
|
8
|
+
name: 'TokenBridge',
|
|
9
|
+
instructionCoder: new BorshInstructionCoder(token_bridge_idl as Idl)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
static bind(options: SolanaBindOptions): TokenBridgeProcessor {
|
|
13
|
+
return new TokenBridgeProcessor( { ...TokenBridgeProcessor.DEFAULT_OPTIONS, ...options })
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
onInitialize(handler: (args: { wormhole: PublicKey }, accounts: { payer: string, config: string, rent: string, systemProgram: string }, ctx: SolanaContext) => void): TokenBridgeProcessor {
|
|
18
|
+
this.onInstruction('initialize', (ins: Instruction, ctx, accounts: string[]) => {
|
|
19
|
+
const origin = ins.data as any
|
|
20
|
+
if (origin) {
|
|
21
|
+
const data = { wormhole: origin.wormhole as PublicKey }
|
|
22
|
+
const accountData = { payer: accounts[0], config: accounts[1], rent: accounts[2], systemProgram: accounts[3] }
|
|
23
|
+
handler(data, accountData, ctx)
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
return this
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
onAttestToken(handler: (args: { nonce: number }, accounts: { payer: string, config: string, mint: string, wrappedMeta: string, splMetadata: string, wormholeBridge: string, wormholeMessage: string, wormholeEmitter: string, wormholeSequence: string, wormholeFeeCollector: string, clock: string, rent: string, systemProgram: string, wormholeProgram: string }, ctx: SolanaContext) => void): TokenBridgeProcessor {
|
|
30
|
+
this.onInstruction('attestToken', (ins: Instruction, ctx, accounts: string[]) => {
|
|
31
|
+
const origin = ins.data as any
|
|
32
|
+
if (origin) {
|
|
33
|
+
const data = { nonce: origin.nonce as number }
|
|
34
|
+
const accountData = { payer: accounts[0], config: accounts[1], mint: accounts[2], wrappedMeta: accounts[3], splMetadata: accounts[4], wormholeBridge: accounts[5], wormholeMessage: accounts[6], wormholeEmitter: accounts[7], wormholeSequence: accounts[8], wormholeFeeCollector: accounts[9], clock: accounts[10], rent: accounts[11], systemProgram: accounts[12], wormholeProgram: accounts[13] }
|
|
35
|
+
handler(data, accountData, ctx)
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
return this
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
onCompleteNative(handler: (args: { }, accounts: { payer: string, config: string, vaa: string, claim: string, endpoint: string, to: string, toFees: string, custody: string, mint: string, custodySigner: string, rent: string, systemProgram: string, tokenProgram: string, wormholeProgram: string }, ctx: SolanaContext) => void): TokenBridgeProcessor {
|
|
42
|
+
this.onInstruction('completeNative', (ins: Instruction, ctx, accounts: string[]) => {
|
|
43
|
+
const origin = ins.data as any
|
|
44
|
+
if (origin) {
|
|
45
|
+
const data = { }
|
|
46
|
+
const accountData = { payer: accounts[0], config: accounts[1], vaa: accounts[2], claim: accounts[3], endpoint: accounts[4], to: accounts[5], toFees: accounts[6], custody: accounts[7], mint: accounts[8], custodySigner: accounts[9], rent: accounts[10], systemProgram: accounts[11], tokenProgram: accounts[12], wormholeProgram: accounts[13] }
|
|
47
|
+
handler(data, accountData, ctx)
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
return this
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
onCompleteWrapped(handler: (args: { }, accounts: { payer: string, config: string, vaa: string, claim: string, endpoint: string, to: string, toFees: string, mint: string, wrappedMeta: string, mintAuthority: string, rent: string, systemProgram: string, tokenProgram: string, wormholeProgram: string }, ctx: SolanaContext) => void): TokenBridgeProcessor {
|
|
54
|
+
this.onInstruction('completeWrapped', (ins: Instruction, ctx, accounts: string[]) => {
|
|
55
|
+
const origin = ins.data as any
|
|
56
|
+
if (origin) {
|
|
57
|
+
const data = { }
|
|
58
|
+
const accountData = { payer: accounts[0], config: accounts[1], vaa: accounts[2], claim: accounts[3], endpoint: accounts[4], to: accounts[5], toFees: accounts[6], mint: accounts[7], wrappedMeta: accounts[8], mintAuthority: accounts[9], rent: accounts[10], systemProgram: accounts[11], tokenProgram: accounts[12], wormholeProgram: accounts[13] }
|
|
59
|
+
handler(data, accountData, ctx)
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
return this
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
onTransferWrapped(handler: (args: { nonce: number, amount: bigint, fee: bigint, targetAddress: any, targetChain: number }, accounts: { payer: string, config: string, from: string, fromOwner: string, mint: string, wrappedMeta: string, authoritySigner: string, wormholeBridge: string, wormholeMessage: string, wormholeEmitter: string, wormholeSequence: string, wormholeFeeCollector: string, clock: string, rent: string, systemProgram: string, tokenProgram: string, wormholeProgram: string }, ctx: SolanaContext) => void): TokenBridgeProcessor {
|
|
66
|
+
this.onInstruction('transferWrapped', (ins: Instruction, ctx, accounts: string[]) => {
|
|
67
|
+
const origin = ins.data as any
|
|
68
|
+
if (origin) {
|
|
69
|
+
const data = { nonce: origin.nonce as number, amount: BigInt(origin.amount.toString()), fee: BigInt(origin.fee.toString()), targetAddress: origin.targetAddress as any, targetChain: origin.targetChain as number }
|
|
70
|
+
const accountData = { payer: accounts[0], config: accounts[1], from: accounts[2], fromOwner: accounts[3], mint: accounts[4], wrappedMeta: accounts[5], authoritySigner: accounts[6], wormholeBridge: accounts[7], wormholeMessage: accounts[8], wormholeEmitter: accounts[9], wormholeSequence: accounts[10], wormholeFeeCollector: accounts[11], clock: accounts[12], rent: accounts[13], systemProgram: accounts[14], tokenProgram: accounts[15], wormholeProgram: accounts[16] }
|
|
71
|
+
handler(data, accountData, ctx)
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
return this
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
onTransferNative(handler: (args: { nonce: number, amount: bigint, fee: bigint, targetAddress: any, targetChain: number }, accounts: { payer: string, config: string, from: string, mint: string, custody: string, authoritySigner: string, custodySigner: string, wormholeBridge: string, wormholeMessage: string, wormholeEmitter: string, wormholeSequence: string, wormholeFeeCollector: string, clock: string, rent: string, systemProgram: string, tokenProgram: string, wormholeProgram: string }, ctx: SolanaContext) => void): TokenBridgeProcessor {
|
|
78
|
+
this.onInstruction('transferNative', (ins: Instruction, ctx, accounts: string[]) => {
|
|
79
|
+
const origin = ins.data as any
|
|
80
|
+
if (origin) {
|
|
81
|
+
const data = { nonce: origin.nonce as number, amount: BigInt(origin.amount.toString()), fee: BigInt(origin.fee.toString()), targetAddress: origin.targetAddress as any, targetChain: origin.targetChain as number }
|
|
82
|
+
const accountData = { payer: accounts[0], config: accounts[1], from: accounts[2], mint: accounts[3], custody: accounts[4], authoritySigner: accounts[5], custodySigner: accounts[6], wormholeBridge: accounts[7], wormholeMessage: accounts[8], wormholeEmitter: accounts[9], wormholeSequence: accounts[10], wormholeFeeCollector: accounts[11], clock: accounts[12], rent: accounts[13], systemProgram: accounts[14], tokenProgram: accounts[15], wormholeProgram: accounts[16] }
|
|
83
|
+
handler(data, accountData, ctx)
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
return this
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
onRegisterChain(handler: (args: { }, accounts: { payer: string, config: string, endpoint: string, vaa: string, claim: string, rent: string, systemProgram: string, wormholeProgram: string }, ctx: SolanaContext) => void): TokenBridgeProcessor {
|
|
90
|
+
this.onInstruction('registerChain', (ins: Instruction, ctx, accounts: string[]) => {
|
|
91
|
+
const origin = ins.data as any
|
|
92
|
+
if (origin) {
|
|
93
|
+
const data = { }
|
|
94
|
+
const accountData = { payer: accounts[0], config: accounts[1], endpoint: accounts[2], vaa: accounts[3], claim: accounts[4], rent: accounts[5], systemProgram: accounts[6], wormholeProgram: accounts[7] }
|
|
95
|
+
handler(data, accountData, ctx)
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
return this
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
onCreateWrapped(handler: (args: { }, accounts: { payer: string, config: string, endpoint: string, vaa: string, claim: string, mint: string, wrappedMeta: string, splMetadata: string, mintAuthority: string, rent: string, systemProgram: string, tokenProgram: string, splMetadataProgram: string, wormholeProgram: string }, ctx: SolanaContext) => void): TokenBridgeProcessor {
|
|
102
|
+
this.onInstruction('createWrapped', (ins: Instruction, ctx, accounts: string[]) => {
|
|
103
|
+
const origin = ins.data as any
|
|
104
|
+
if (origin) {
|
|
105
|
+
const data = { }
|
|
106
|
+
const accountData = { payer: accounts[0], config: accounts[1], endpoint: accounts[2], vaa: accounts[3], claim: accounts[4], mint: accounts[5], wrappedMeta: accounts[6], splMetadata: accounts[7], mintAuthority: accounts[8], rent: accounts[9], systemProgram: accounts[10], tokenProgram: accounts[11], splMetadataProgram: accounts[12], wormholeProgram: accounts[13] }
|
|
107
|
+
handler(data, accountData, ctx)
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
return this
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
onUpgradeContract(handler: (args: { }, accounts: { payer: string, vaa: string, claim: string, upgradeAuthority: string, spill: string, implementation: string, programData: string, tokenBridgeProgram: string, rent: string, clock: string, bpfLoaderUpgradeable: string, systemProgram: string }, ctx: SolanaContext) => void): TokenBridgeProcessor {
|
|
114
|
+
this.onInstruction('upgradeContract', (ins: Instruction, ctx, accounts: string[]) => {
|
|
115
|
+
const origin = ins.data as any
|
|
116
|
+
if (origin) {
|
|
117
|
+
const data = { }
|
|
118
|
+
const accountData = { payer: accounts[0], vaa: accounts[1], claim: accounts[2], upgradeAuthority: accounts[3], spill: accounts[4], implementation: accounts[5], programData: accounts[6], tokenBridgeProgram: accounts[7], rent: accounts[8], clock: accounts[9], bpfLoaderUpgradeable: accounts[10], systemProgram: accounts[11] }
|
|
119
|
+
handler(data, accountData, ctx)
|
|
120
|
+
}
|
|
121
|
+
})
|
|
122
|
+
return this
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
onTransferWrappedWithPayload(handler: (args: { nonce: number, amount: bigint, targetAddress: any, targetChain: number, payload: any, cpiProgramId: any }, accounts: { payer: string, config: string, from: string, fromOwner: string, mint: string, wrappedMeta: string, authoritySigner: string, wormholeBridge: string, wormholeMessage: string, wormholeEmitter: string, wormholeSequence: string, wormholeFeeCollector: string, clock: string, sender: string, rent: string, systemProgram: string, tokenProgram: string, wormholeProgram: string }, ctx: SolanaContext) => void): TokenBridgeProcessor {
|
|
126
|
+
this.onInstruction('transferWrappedWithPayload', (ins: Instruction, ctx, accounts: string[]) => {
|
|
127
|
+
const origin = ins.data as any
|
|
128
|
+
if (origin) {
|
|
129
|
+
const data = { nonce: origin.nonce as number, amount: BigInt(origin.amount.toString()), targetAddress: origin.targetAddress as any, targetChain: origin.targetChain as number, payload: origin.payload as any, cpiProgramId: origin.cpiProgramId as any }
|
|
130
|
+
const accountData = { payer: accounts[0], config: accounts[1], from: accounts[2], fromOwner: accounts[3], mint: accounts[4], wrappedMeta: accounts[5], authoritySigner: accounts[6], wormholeBridge: accounts[7], wormholeMessage: accounts[8], wormholeEmitter: accounts[9], wormholeSequence: accounts[10], wormholeFeeCollector: accounts[11], clock: accounts[12], sender: accounts[13], rent: accounts[14], systemProgram: accounts[15], tokenProgram: accounts[16], wormholeProgram: accounts[17] }
|
|
131
|
+
handler(data, accountData, ctx)
|
|
132
|
+
}
|
|
133
|
+
})
|
|
134
|
+
return this
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
onTransferNativeWithPayload(handler: (args: { nonce: number, amount: bigint, targetAddress: any, targetChain: number, payload: any, cpiProgramId: any }, accounts: { payer: string, config: string, from: string, mint: string, custody: string, authoritySigner: string, custodySigner: string, wormholeBridge: string, wormholeMessage: string, wormholeEmitter: string, wormholeSequence: string, wormholeFeeCollector: string, clock: string, sender: string, rent: string, systemProgram: string, tokenProgram: string, wormholeProgram: string }, ctx: SolanaContext) => void): TokenBridgeProcessor {
|
|
138
|
+
this.onInstruction('transferNativeWithPayload', (ins: Instruction, ctx, accounts: string[]) => {
|
|
139
|
+
const origin = ins.data as any
|
|
140
|
+
if (origin) {
|
|
141
|
+
const data = { nonce: origin.nonce as number, amount: BigInt(origin.amount.toString()), targetAddress: origin.targetAddress as any, targetChain: origin.targetChain as number, payload: origin.payload as any, cpiProgramId: origin.cpiProgramId as any }
|
|
142
|
+
const accountData = { payer: accounts[0], config: accounts[1], from: accounts[2], mint: accounts[3], custody: accounts[4], authoritySigner: accounts[5], custodySigner: accounts[6], wormholeBridge: accounts[7], wormholeMessage: accounts[8], wormholeEmitter: accounts[9], wormholeSequence: accounts[10], wormholeFeeCollector: accounts[11], clock: accounts[12], sender: accounts[13], rent: accounts[14], systemProgram: accounts[15], tokenProgram: accounts[16], wormholeProgram: accounts[17] }
|
|
143
|
+
handler(data, accountData, ctx)
|
|
144
|
+
}
|
|
145
|
+
})
|
|
146
|
+
return this
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
}
|
|
150
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { SPLTokenProcessor } from '@sentio/sdk/solana/builtin'
|
|
2
|
+
import { TokenBridgeProcessor } from './types/token_bridge_processor.js'
|
|
3
|
+
|
|
4
|
+
import { token_bridge_idl } from './types/token_bridge.js'
|
|
5
|
+
import { Idl, Instruction } from '@project-serum/anchor'
|
|
6
|
+
import bs58 from 'bs58'
|
|
7
|
+
import { camelCase, upperFirst } from 'lodash-es'
|
|
8
|
+
// @ts-ignore no type definition
|
|
9
|
+
import { Layout } from 'buffer-layout'
|
|
10
|
+
import { IdlField, IdlStateMethod } from '@project-serum/anchor/dist/cjs/idl.js'
|
|
11
|
+
import * as borsh from '@coral-xyz/borsh'
|
|
12
|
+
import { IdlCoder } from '@project-serum/anchor/dist/cjs/coder/borsh/idl.js'
|
|
13
|
+
|
|
14
|
+
// TODO this could be more general
|
|
15
|
+
class TokenBridgeDecoder {
|
|
16
|
+
private ixLayout: Map<string, Layout>
|
|
17
|
+
|
|
18
|
+
constructor(idl: Idl) {
|
|
19
|
+
this.ixLayout = TokenBridgeDecoder.parseIxLayout(idl)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
private static parseIxLayout(idl: Idl): Map<string, Layout> {
|
|
23
|
+
const stateMethods = idl.state ? idl.state.methods : []
|
|
24
|
+
|
|
25
|
+
const ixLayouts = stateMethods
|
|
26
|
+
.map((m: IdlStateMethod): [string, Layout<unknown>] => {
|
|
27
|
+
const fieldLayouts = m.args.map((arg: IdlField) => {
|
|
28
|
+
return IdlCoder.fieldLayout(arg, Array.from([...(idl.accounts ?? []), ...(idl.types ?? [])]))
|
|
29
|
+
})
|
|
30
|
+
const name = camelCase(m.name)
|
|
31
|
+
return [name, borsh.struct(fieldLayouts, name)]
|
|
32
|
+
})
|
|
33
|
+
.concat(
|
|
34
|
+
idl.instructions.map((ix) => {
|
|
35
|
+
const fieldLayouts = ix.args.map((arg: IdlField) =>
|
|
36
|
+
IdlCoder.fieldLayout(arg, Array.from([...(idl.accounts ?? []), ...(idl.types ?? [])]))
|
|
37
|
+
)
|
|
38
|
+
const name = camelCase(ix.name)
|
|
39
|
+
return [name, borsh.struct(fieldLayouts, name)]
|
|
40
|
+
})
|
|
41
|
+
)
|
|
42
|
+
return new Map(ixLayouts)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
public decode(ix: Buffer | string, encoding: 'hex' | 'base58' = 'hex'): Instruction | null {
|
|
46
|
+
if (typeof ix === 'string') {
|
|
47
|
+
ix = encoding === 'hex' ? Buffer.from(ix, 'hex') : Buffer.from(bs58.decode(ix))
|
|
48
|
+
}
|
|
49
|
+
const discriminator = ix.subarray(0, 1).readInt8()
|
|
50
|
+
const data = ix.subarray(1)
|
|
51
|
+
|
|
52
|
+
const name = camelCase(TokenBridgeInstruction[discriminator])
|
|
53
|
+
const layout = this.ixLayout.get(name)
|
|
54
|
+
|
|
55
|
+
if (!layout) {
|
|
56
|
+
return null
|
|
57
|
+
}
|
|
58
|
+
return { data: this.ixLayout.get(name)?.decode(data), name }
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export enum TokenBridgeInstruction {
|
|
63
|
+
Initialize,
|
|
64
|
+
AttestToken,
|
|
65
|
+
CompleteNative,
|
|
66
|
+
CompleteWrapped,
|
|
67
|
+
TransferWrapped,
|
|
68
|
+
TransferNative,
|
|
69
|
+
RegisterChain,
|
|
70
|
+
CreateWrapped,
|
|
71
|
+
UpgradeContract,
|
|
72
|
+
CompleteNativeWithPayload,
|
|
73
|
+
CompleteWrappedWithPayload,
|
|
74
|
+
TransferWrappedWithPayload,
|
|
75
|
+
TransferNativeWithPayload,
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
TokenBridgeProcessor.bind({
|
|
79
|
+
address: 'wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb',
|
|
80
|
+
instructionCoder: new TokenBridgeDecoder(token_bridge_idl as Idl),
|
|
81
|
+
}).onTransferNative((args, accounts, ctx) => {
|
|
82
|
+
ctx.meter.Counter('total_transfer_amount').add(args.amount)
|
|
83
|
+
ctx.meter.Counter(accounts.payer).add(args.amount)
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
SPLTokenProcessor.bind({ address: 'wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb', processInnerInstruction: true })
|
|
87
|
+
.onMintTo((data, ctx) => {
|
|
88
|
+
if (data.mint === '7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs') {
|
|
89
|
+
ctx.meter.Counter('totalWeth_supply').add(BigInt(data.amount))
|
|
90
|
+
}
|
|
91
|
+
})
|
|
92
|
+
.onBurn((data, ctx) => {
|
|
93
|
+
if (data.mint === '7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs') {
|
|
94
|
+
ctx.meter.Counter('totalWeth_supply').sub(BigInt(data.amount))
|
|
95
|
+
}
|
|
96
|
+
})
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from '@sentio/protos'
|
|
15
15
|
import { CallContext } from 'nice-grpc-common'
|
|
16
16
|
import { ProcessorServiceImpl, Endpoints, State } from '@sentio/runtime'
|
|
17
|
-
import { CHAIN_MAP } from '../
|
|
17
|
+
import { CHAIN_MAP } from '../core/chain.js'
|
|
18
18
|
|
|
19
19
|
import { Trace } from '../eth/trace.js'
|
|
20
20
|
import { LogParams, Networkish, BlockParams, Network } from 'ethers/providers'
|
package/src/tsup.config.ts
CHANGED
package/src/utils/conversion.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { BigDecimal } from '../core/big-decimal.js'
|
|
2
|
-
import { Numberish } from '../core/index.js'
|
|
3
|
-
import { MetricValue } from '@sentio/protos'
|
|
4
|
-
|
|
5
|
-
export function toBigDecimal(n: bigint) {
|
|
6
|
-
return new BigDecimal(n.toString())
|
|
7
|
-
}
|
|
1
|
+
// import { BigDecimal } from '../core/big-decimal.js'
|
|
2
|
+
// import { Numberish } from '../core/index.js'
|
|
3
|
+
// import { MetricValue } from '@sentio/protos'
|
|
8
4
|
|
|
9
5
|
export function bytesToBigInt(bytes: Uint8Array) {
|
|
10
6
|
let intValue = BigInt(0)
|
|
@@ -14,21 +10,21 @@ export function bytesToBigInt(bytes: Uint8Array) {
|
|
|
14
10
|
return intValue
|
|
15
11
|
}
|
|
16
12
|
|
|
17
|
-
export function metricValueToNumberish(v: MetricValue): Numberish {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
13
|
+
// export function metricValueToNumberish(v: MetricValue): Numberish {
|
|
14
|
+
// if (v.doubleValue) {
|
|
15
|
+
// return v.doubleValue
|
|
16
|
+
// }
|
|
17
|
+
// if (v.bigInteger) {
|
|
18
|
+
// let intValue = bytesToBigInt(v.bigInteger.data)
|
|
19
|
+
// if (v.bigInteger.negative) {
|
|
20
|
+
// intValue = -intValue
|
|
21
|
+
// }
|
|
22
|
+
// return intValue
|
|
23
|
+
// }
|
|
24
|
+
//
|
|
25
|
+
// if (v.bigDecimal) {
|
|
26
|
+
// return new BigDecimal(v.bigDecimal)
|
|
27
|
+
// }
|
|
28
|
+
//
|
|
29
|
+
// throw Error("MetricValue doesn't contain any of possible value")
|
|
30
|
+
// }
|
package/src/utils/dex-price.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { getEACAggregatorProxyContract } from '../builtin/internal/eacaggregatorproxy_processor.js'
|
|
2
|
-
import path from 'path'
|
|
1
|
+
import { getEACAggregatorProxyContract } from '../eth/builtin/internal/eacaggregatorproxy_processor.js'
|
|
3
2
|
import fs from 'fs'
|
|
4
3
|
import { parse } from 'csv-parse/sync'
|
|
5
4
|
import { BlockTag } from 'ethers/providers'
|
|
6
|
-
import { scaleDown } from './token.js'
|
|
7
5
|
import url from 'url'
|
|
6
|
+
import { scaleDown } from '../core/big-decimal.js'
|
|
8
7
|
|
|
9
8
|
type OralceRecord = {
|
|
10
9
|
Pair: string
|
package/src/utils/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export *
|
|
2
|
-
export *
|
|
3
|
-
export *
|
|
4
|
-
export *
|
|
1
|
+
export * from './conversion.js'
|
|
2
|
+
export * from './token.js'
|
|
3
|
+
export * from './dex-price.js'
|
|
4
|
+
export * from './price.js'
|
package/src/utils/token.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { BigDecimal } from '../core/big-decimal.js'
|
|
1
|
+
import { getERC20Contract } from '../eth/builtin/erc20/index.js'
|
|
2
|
+
import { getERC20BytesContract } from '../eth/builtin/internal/erc20bytes_processor.js'
|
|
3
|
+
import { BigDecimal, scaleDown } from '../core/big-decimal.js'
|
|
5
4
|
// import { toBigDecimal } from './conversion'
|
|
6
5
|
// import { utils } from 'ethers'
|
|
7
|
-
import { PromiseOrValue } from '../builtin/internal/common.js'
|
|
6
|
+
import { PromiseOrValue } from '../eth/builtin/internal/common.js'
|
|
8
7
|
import { decodeBytes32String } from 'ethers'
|
|
9
8
|
|
|
10
9
|
export interface TokenInfo {
|
|
@@ -42,30 +41,25 @@ export async function getERC20TokenInfo(tokenAddress: string, chainId = 1): Prom
|
|
|
42
41
|
const contract = getERC20Contract(tokenAddress, chainId)
|
|
43
42
|
const bytesContract = getERC20BytesContract(tokenAddress, chainId)
|
|
44
43
|
|
|
44
|
+
let name = ''
|
|
45
45
|
try {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
} catch (e) {
|
|
51
|
-
name = decodeBytes32String(await bytesContract.name())
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
let symbol = ''
|
|
55
|
-
try {
|
|
56
|
-
symbol = await contract.symbol()
|
|
57
|
-
} catch (e) {
|
|
58
|
-
symbol = decodeBytes32String(await bytesContract.symbol())
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const decimal = await contract.decimals()
|
|
62
|
-
const info = getTokenInfoPromise(symbol, name, decimal)
|
|
46
|
+
name = await contract.name()
|
|
47
|
+
} catch (e) {
|
|
48
|
+
name = decodeBytes32String(await bytesContract.name())
|
|
49
|
+
}
|
|
63
50
|
|
|
64
|
-
|
|
65
|
-
|
|
51
|
+
let symbol = ''
|
|
52
|
+
try {
|
|
53
|
+
symbol = await contract.symbol()
|
|
66
54
|
} catch (e) {
|
|
67
|
-
|
|
55
|
+
symbol = decodeBytes32String(await bytesContract.symbol())
|
|
68
56
|
}
|
|
57
|
+
|
|
58
|
+
const decimal = await contract.decimals()
|
|
59
|
+
const info = getTokenInfoPromise(symbol, name, decimal)
|
|
60
|
+
|
|
61
|
+
TOKEN_INFOS.set(key, info)
|
|
62
|
+
return info
|
|
69
63
|
}
|
|
70
64
|
|
|
71
65
|
export async function getER20NormalizedAmount(
|
|
@@ -76,8 +70,3 @@ export async function getER20NormalizedAmount(
|
|
|
76
70
|
const tokenInfo = await getERC20TokenInfo(tokenAddress, chainId)
|
|
77
71
|
return scaleDown(amount, tokenInfo.decimal)
|
|
78
72
|
}
|
|
79
|
-
|
|
80
|
-
export function scaleDown(amount: bigint, decimal: number | bigint) {
|
|
81
|
-
const divider = new BigDecimal(10).pow(Number(decimal))
|
|
82
|
-
return amount.asBigDecimal().dividedBy(divider)
|
|
83
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/builtin/eacaggregatorproxy/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AAEpB,cAAc,6CAA6C,CAAC;AAC5D,cAAc,mCAAmC,CAAC;AAClD,cAAc,iBAAiB,CAAC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nexport * from \"../internal/eacaggregatorproxy_processor.js\";\nexport * from \"../internal/EACAggregatorProxy.js\";\nexport * from \"./test-utils.js\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.js","sourceRoot":"","sources":["../../../src/builtin/eacaggregatorproxy/test-utils.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,6BAA6B,GAK9B,MAAM,YAAY,CAAC;AACpB,MAAM,SAAS,GAAG;IAChB,SAAS,EACP,oEAAoE;IACtE,WAAW,EAAE,CAAC;IACd,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,KAAK;IACd,eAAe,EACb,oEAAoE;IACtE,gBAAgB,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,UAAU,oBAAoB,CAClC,eAAuB,EACvB,KAA+B;IAE/B,MAAM,QAAQ,GAAG,6BAA6B,CAAC,eAAe,CAAC,CAAC;IAChE,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,uCAAuC,EACvC,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,CAChD,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,eAAuB,EACvB,KAA0B;IAE1B,MAAM,QAAQ,GAAG,6BAA6B,CAAC,eAAe,CAAC,CAAC;IAChE,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,mCAAmC,EACnC,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAClD,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iCAAiC,CAC/C,eAAuB,EACvB,KAA4C;IAE5C,MAAM,QAAQ,GAAG,6BAA6B,CAAC,eAAe,CAAC,CAAC;IAChE,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,6CAA6C,EAC7C,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,CACvB,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,eAAuB,EACvB,KAAsC;IAEtC,MAAM,QAAQ,GAAG,6BAA6B,CAAC,eAAe,CAAC,CAAC;IAChE,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,uCAAuC,EACvC,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,CACvB,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { LogParams } from \"ethers/providers\";\nimport {\n getEACAggregatorProxyContract,\n AnswerUpdatedEventObject,\n NewRoundEventObject,\n OwnershipTransferRequestedEventObject,\n OwnershipTransferredEventObject,\n} from \"./index.js\";\nconst mockField = {\n blockHash:\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n blockNumber: 0,\n logIndex: 0,\n removed: false,\n transactionHash:\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n transactionIndex: 0,\n};\n\nexport function mockAnswerUpdatedLog(\n contractAddress: string,\n event: AnswerUpdatedEventObject\n): LogParams {\n const contract = getEACAggregatorProxyContract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n \"AnswerUpdated(int256,uint256,uint256)\",\n [event.current, event.roundId, event.updatedAt]\n );\n return {\n ...mockField,\n index: 0,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n\nexport function mockNewRoundLog(\n contractAddress: string,\n event: NewRoundEventObject\n): LogParams {\n const contract = getEACAggregatorProxyContract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n \"NewRound(uint256,address,uint256)\",\n [event.roundId, event.startedBy, event.startedAt]\n );\n return {\n ...mockField,\n index: 0,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n\nexport function mockOwnershipTransferRequestedLog(\n contractAddress: string,\n event: OwnershipTransferRequestedEventObject\n): LogParams {\n const contract = getEACAggregatorProxyContract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n \"OwnershipTransferRequested(address,address)\",\n [event.from, event.to]\n );\n return {\n ...mockField,\n index: 0,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n\nexport function mockOwnershipTransferredLog(\n contractAddress: string,\n event: OwnershipTransferredEventObject\n): LogParams {\n const contract = getEACAggregatorProxyContract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n \"OwnershipTransferred(address,address)\",\n [event.from, event.to]\n );\n return {\n ...mockField,\n index: 0,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/builtin/erc1155/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AAEpB,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nexport * from \"../internal/erc1155_processor.js\";\nexport * from \"../internal/ERC1155.js\";\nexport * from \"./test-utils.js\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.js","sourceRoot":"","sources":["../../../src/builtin/erc1155/test-utils.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,kBAAkB,GAKnB,MAAM,YAAY,CAAC;AACpB,MAAM,SAAS,GAAG;IAChB,SAAS,EACP,oEAAoE;IACtE,WAAW,EAAE,CAAC;IACd,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,KAAK;IACd,eAAe,EACb,oEAAoE;IACtE,gBAAgB,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,UAAU,qBAAqB,CACnC,eAAuB,EACvB,KAAgC;IAEhC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;IACrD,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,sCAAsC,EACtC,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAChD,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,eAAuB,EACvB,KAA+B;IAE/B,MAAM,QAAQ,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;IACrD,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,4DAA4D,EAC5D,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAChE,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,eAAuB,EACvB,KAAgC;IAEhC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;IACrD,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,yDAAyD,EACzD,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAC9D,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,UAAU,CACxB,eAAuB,EACvB,KAAqB;IAErB,MAAM,QAAQ,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;IACrD,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,qBAAqB,EACrB,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,CACxB,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { LogParams } from \"ethers/providers\";\nimport {\n getERC1155Contract,\n ApprovalForAllEventObject,\n TransferBatchEventObject,\n TransferSingleEventObject,\n URIEventObject,\n} from \"./index.js\";\nconst mockField = {\n blockHash:\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n blockNumber: 0,\n logIndex: 0,\n removed: false,\n transactionHash:\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n transactionIndex: 0,\n};\n\nexport function mockApprovalForAllLog(\n contractAddress: string,\n event: ApprovalForAllEventObject\n): LogParams {\n const contract = getERC1155Contract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n \"ApprovalForAll(address,address,bool)\",\n [event.account, event.operator, event.approved]\n );\n return {\n ...mockField,\n index: 0,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n\nexport function mockTransferBatchLog(\n contractAddress: string,\n event: TransferBatchEventObject\n): LogParams {\n const contract = getERC1155Contract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n \"TransferBatch(address,address,address,uint256[],uint256[])\",\n [event.operator, event.from, event.to, event.ids, event.values]\n );\n return {\n ...mockField,\n index: 0,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n\nexport function mockTransferSingleLog(\n contractAddress: string,\n event: TransferSingleEventObject\n): LogParams {\n const contract = getERC1155Contract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n \"TransferSingle(address,address,address,uint256,uint256)\",\n [event.operator, event.from, event.to, event.id, event.value]\n );\n return {\n ...mockField,\n index: 0,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n\nexport function mockURILog(\n contractAddress: string,\n event: URIEventObject\n): LogParams {\n const contract = getERC1155Contract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n \"URI(string,uint256)\",\n [event.value, event.id]\n );\n return {\n ...mockField,\n index: 0,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/builtin/erc20/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AAEpB,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nexport * from \"../internal/erc20_processor.js\";\nexport * from \"../internal/ERC20.js\";\nexport * from \"./test-utils.js\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.js","sourceRoot":"","sources":["../../../src/builtin/erc20/test-utils.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,gBAAgB,GAIjB,MAAM,YAAY,CAAC;AACpB,MAAM,SAAS,GAAG;IAChB,SAAS,EACP,oEAAoE;IACtE,WAAW,EAAE,CAAC;IACd,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,KAAK;IACd,eAAe,EACb,oEAAoE;IACtE,gBAAgB,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,UAAU,eAAe,CAC7B,eAAuB,EACvB,KAA0B;IAE1B,MAAM,QAAQ,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;IACnD,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,mCAAmC,EACnC,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAC1C,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,eAAuB,EACvB,KAAsC;IAEtC,MAAM,QAAQ,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;IACnD,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,uCAAuC,EACvC,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,QAAQ,CAAC,CACtC,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,eAAuB,EACvB,KAA0B;IAE1B,MAAM,QAAQ,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;IACnD,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,mCAAmC,EACnC,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CACpC,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { LogParams } from \"ethers/providers\";\nimport {\n getERC20Contract,\n ApprovalEventObject,\n OwnershipTransferredEventObject,\n TransferEventObject,\n} from \"./index.js\";\nconst mockField = {\n blockHash:\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n blockNumber: 0,\n logIndex: 0,\n removed: false,\n transactionHash:\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n transactionIndex: 0,\n};\n\nexport function mockApprovalLog(\n contractAddress: string,\n event: ApprovalEventObject\n): LogParams {\n const contract = getERC20Contract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n \"Approval(address,address,uint256)\",\n [event.owner, event.spender, event.value]\n );\n return {\n ...mockField,\n index: 0,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n\nexport function mockOwnershipTransferredLog(\n contractAddress: string,\n event: OwnershipTransferredEventObject\n): LogParams {\n const contract = getERC20Contract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n \"OwnershipTransferred(address,address)\",\n [event.previousOwner, event.newOwner]\n );\n return {\n ...mockField,\n index: 0,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n\nexport function mockTransferLog(\n contractAddress: string,\n event: TransferEventObject\n): LogParams {\n const contract = getERC20Contract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n \"Transfer(address,address,uint256)\",\n [event.from, event.to, event.value]\n );\n return {\n ...mockField,\n index: 0,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/builtin/erc20bytes/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AAEpB,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nexport * from \"../internal/erc20bytes_processor.js\";\nexport * from \"../internal/ERC20Bytes.js\";\nexport * from \"./test-utils.js\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.js","sourceRoot":"","sources":["../../../src/builtin/erc20bytes/test-utils.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,qBAAqB,GAGtB,MAAM,YAAY,CAAC;AACpB,MAAM,SAAS,GAAG;IAChB,SAAS,EACP,oEAAoE;IACtE,WAAW,EAAE,CAAC;IACd,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,KAAK;IACd,eAAe,EACb,oEAAoE;IACtE,gBAAgB,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,UAAU,eAAe,CAC7B,eAAuB,EACvB,KAA0B;IAE1B,MAAM,QAAQ,GAAG,qBAAqB,CAAC,eAAe,CAAC,CAAC;IACxD,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,mCAAmC,EACnC,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAC1C,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,eAAuB,EACvB,KAA0B;IAE1B,MAAM,QAAQ,GAAG,qBAAqB,CAAC,eAAe,CAAC,CAAC;IACxD,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,mCAAmC,EACnC,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CACpC,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { LogParams } from \"ethers/providers\";\nimport {\n getERC20BytesContract,\n ApprovalEventObject,\n TransferEventObject,\n} from \"./index.js\";\nconst mockField = {\n blockHash:\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n blockNumber: 0,\n logIndex: 0,\n removed: false,\n transactionHash:\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n transactionIndex: 0,\n};\n\nexport function mockApprovalLog(\n contractAddress: string,\n event: ApprovalEventObject\n): LogParams {\n const contract = getERC20BytesContract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n \"Approval(address,address,uint256)\",\n [event.owner, event.spender, event.value]\n );\n return {\n ...mockField,\n index: 0,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n\nexport function mockTransferLog(\n contractAddress: string,\n event: TransferEventObject\n): LogParams {\n const contract = getERC20BytesContract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n \"Transfer(address,address,uint256)\",\n [event.from, event.to, event.value]\n );\n return {\n ...mockField,\n index: 0,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/builtin/erc721/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AAEpB,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nexport * from \"../internal/erc721_processor.js\";\nexport * from \"../internal/ERC721.js\";\nexport * from \"./test-utils.js\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.js","sourceRoot":"","sources":["../../../src/builtin/erc721/test-utils.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,iBAAiB,GAIlB,MAAM,YAAY,CAAC;AACpB,MAAM,SAAS,GAAG;IAChB,SAAS,EACP,oEAAoE;IACtE,WAAW,EAAE,CAAC;IACd,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,KAAK;IACd,eAAe,EACb,oEAAoE;IACtE,gBAAgB,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,UAAU,eAAe,CAC7B,eAAuB,EACvB,KAA0B;IAE1B,MAAM,QAAQ,GAAG,iBAAiB,CAAC,eAAe,CAAC,CAAC;IACpD,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,mCAAmC,EACnC,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,CAC7C,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,eAAuB,EACvB,KAAgC;IAEhC,MAAM,QAAQ,GAAG,iBAAiB,CAAC,eAAe,CAAC,CAAC;IACpD,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,sCAAsC,EACtC,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAC9C,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,eAAuB,EACvB,KAA0B;IAE1B,MAAM,QAAQ,GAAG,iBAAiB,CAAC,eAAe,CAAC,CAAC;IACpD,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,mCAAmC,EACnC,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,CACtC,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { LogParams } from \"ethers/providers\";\nimport {\n getERC721Contract,\n ApprovalEventObject,\n ApprovalForAllEventObject,\n TransferEventObject,\n} from \"./index.js\";\nconst mockField = {\n blockHash:\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n blockNumber: 0,\n logIndex: 0,\n removed: false,\n transactionHash:\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n transactionIndex: 0,\n};\n\nexport function mockApprovalLog(\n contractAddress: string,\n event: ApprovalEventObject\n): LogParams {\n const contract = getERC721Contract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n \"Approval(address,address,uint256)\",\n [event.owner, event.approved, event.tokenId]\n );\n return {\n ...mockField,\n index: 0,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n\nexport function mockApprovalForAllLog(\n contractAddress: string,\n event: ApprovalForAllEventObject\n): LogParams {\n const contract = getERC721Contract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n \"ApprovalForAll(address,address,bool)\",\n [event.owner, event.operator, event.approved]\n );\n return {\n ...mockField,\n index: 0,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n\nexport function mockTransferLog(\n contractAddress: string,\n event: TransferEventObject\n): LogParams {\n const contract = getERC721Contract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n \"Transfer(address,address,uint256)\",\n [event.from, event.to, event.tokenId]\n );\n return {\n ...mockField,\n index: 0,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n"]}
|
package/lib/builtin/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/builtin/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,+BAA+B,CAAA;AACnE,OAAO,EAAE,2BAA2B,EAAE,mCAAmC,EAAE,MAAM,+BAA+B,CAAA;AAChH,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AACzE,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAA;AACxF,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA","sourcesContent":["export * as eacaggregatorproxy from './eacaggregatorproxy/index.js'\nexport { EACAggregatorProxyProcessor, EACAggregatorProxyProcessorTemplate } from './eacaggregatorproxy/index.js'\nexport * as erc20 from './erc20/index.js'\nexport { ERC20Processor, ERC20ProcessorTemplate } from './erc20/index.js'\nexport * as erc20bytes from './erc20bytes/index.js'\nexport { ERC20BytesProcessor, ERC20BytesProcessorTemplate } from './erc20bytes/index.js'\nexport * as weth9 from './weth9/index.js'\nexport { WETH9Processor, WETH9ProcessorTemplate } from './weth9/index.js'"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EACAggregatorProxy.js","sourceRoot":"","sources":["../../../src/builtin/internal/EACAggregatorProxy.ts"],"names":[],"mappings":"","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport type { BaseContract, Interface, LogDescription } from \"ethers\";\nimport type { ContractRunner } from \"ethers/providers\";\nimport type { TypedEventFilter, TypedEvent, PromiseOrValue } from \"./common.js\";\n\nexport interface EACAggregatorProxyInterface extends Interface {}\n\nexport interface AnswerUpdatedEventObject {\n current: bigint;\n roundId: bigint;\n updatedAt: bigint;\n}\nexport type AnswerUpdatedEvent = TypedEvent<\n [bigint, bigint, bigint],\n AnswerUpdatedEventObject\n> &\n LogDescription;\n\nexport type AnswerUpdatedEventFilter = TypedEventFilter<AnswerUpdatedEvent>;\n\nexport interface NewRoundEventObject {\n roundId: bigint;\n startedBy: string;\n startedAt: bigint;\n}\nexport type NewRoundEvent = TypedEvent<\n [bigint, string, bigint],\n NewRoundEventObject\n> &\n LogDescription;\n\nexport type NewRoundEventFilter = TypedEventFilter<NewRoundEvent>;\n\nexport interface OwnershipTransferRequestedEventObject {\n from: string;\n to: string;\n}\nexport type OwnershipTransferRequestedEvent = TypedEvent<\n [string, string],\n OwnershipTransferRequestedEventObject\n> &\n LogDescription;\n\nexport type OwnershipTransferRequestedEventFilter =\n TypedEventFilter<OwnershipTransferRequestedEvent>;\n\nexport interface OwnershipTransferredEventObject {\n from: string;\n to: string;\n}\nexport type OwnershipTransferredEvent = TypedEvent<\n [string, string],\n OwnershipTransferredEventObject\n> &\n LogDescription;\n\nexport type OwnershipTransferredEventFilter =\n TypedEventFilter<OwnershipTransferredEvent>;\n\nexport interface EACAggregatorProxy extends BaseContract {\n connect(runner: null | ContractRunner): this;\n\n interface: EACAggregatorProxyInterface;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ERC1155.js","sourceRoot":"","sources":["../../../src/builtin/internal/ERC1155.ts"],"names":[],"mappings":"","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport type { BaseContract, Interface, LogDescription } from \"ethers\";\nimport type { ContractRunner } from \"ethers/providers\";\nimport type { TypedEventFilter, TypedEvent, PromiseOrValue } from \"./common.js\";\n\nexport interface ERC1155Interface extends Interface {}\n\nexport interface ApprovalForAllEventObject {\n account: string;\n operator: string;\n approved: boolean;\n}\nexport type ApprovalForAllEvent = TypedEvent<\n [string, string, boolean],\n ApprovalForAllEventObject\n> &\n LogDescription;\n\nexport type ApprovalForAllEventFilter = TypedEventFilter<ApprovalForAllEvent>;\n\nexport interface TransferBatchEventObject {\n operator: string;\n from: string;\n to: string;\n ids: bigint[];\n values: bigint[];\n}\nexport type TransferBatchEvent = TypedEvent<\n [string, string, string, bigint[], bigint[]],\n TransferBatchEventObject\n> &\n LogDescription;\n\nexport type TransferBatchEventFilter = TypedEventFilter<TransferBatchEvent>;\n\nexport interface TransferSingleEventObject {\n operator: string;\n from: string;\n to: string;\n id: bigint;\n value: bigint;\n}\nexport type TransferSingleEvent = TypedEvent<\n [string, string, string, bigint, bigint],\n TransferSingleEventObject\n> &\n LogDescription;\n\nexport type TransferSingleEventFilter = TypedEventFilter<TransferSingleEvent>;\n\nexport interface URIEventObject {\n value: string;\n id: bigint;\n}\nexport type URIEvent = TypedEvent<[string, bigint], URIEventObject> &\n LogDescription;\n\nexport type URIEventFilter = TypedEventFilter<URIEvent>;\n\nexport interface ERC1155 extends BaseContract {\n connect(runner: null | ContractRunner): this;\n\n interface: ERC1155Interface;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ERC20.js","sourceRoot":"","sources":["../../../src/builtin/internal/ERC20.ts"],"names":[],"mappings":"","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport type { BaseContract, Interface, LogDescription } from \"ethers\";\nimport type { ContractRunner } from \"ethers/providers\";\nimport type { TypedEventFilter, TypedEvent, PromiseOrValue } from \"./common.js\";\n\nexport interface ERC20Interface extends Interface {}\n\nexport interface ApprovalEventObject {\n owner: string;\n spender: string;\n value: bigint;\n}\nexport type ApprovalEvent = TypedEvent<\n [string, string, bigint],\n ApprovalEventObject\n> &\n LogDescription;\n\nexport type ApprovalEventFilter = TypedEventFilter<ApprovalEvent>;\n\nexport interface OwnershipTransferredEventObject {\n previousOwner: string;\n newOwner: string;\n}\nexport type OwnershipTransferredEvent = TypedEvent<\n [string, string],\n OwnershipTransferredEventObject\n> &\n LogDescription;\n\nexport type OwnershipTransferredEventFilter =\n TypedEventFilter<OwnershipTransferredEvent>;\n\nexport interface TransferEventObject {\n from: string;\n to: string;\n value: bigint;\n}\nexport type TransferEvent = TypedEvent<\n [string, string, bigint],\n TransferEventObject\n> &\n LogDescription;\n\nexport type TransferEventFilter = TypedEventFilter<TransferEvent>;\n\nexport interface ERC20 extends BaseContract {\n connect(runner: null | ContractRunner): this;\n\n interface: ERC20Interface;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ERC20Bytes.js","sourceRoot":"","sources":["../../../src/builtin/internal/ERC20Bytes.ts"],"names":[],"mappings":"","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport type { BaseContract, Interface, LogDescription } from \"ethers\";\nimport type { ContractRunner } from \"ethers/providers\";\nimport type { TypedEventFilter, TypedEvent, PromiseOrValue } from \"./common.js\";\n\nexport interface ERC20BytesInterface extends Interface {}\n\nexport interface ApprovalEventObject {\n owner: string;\n spender: string;\n value: bigint;\n}\nexport type ApprovalEvent = TypedEvent<\n [string, string, bigint],\n ApprovalEventObject\n> &\n LogDescription;\n\nexport type ApprovalEventFilter = TypedEventFilter<ApprovalEvent>;\n\nexport interface TransferEventObject {\n from: string;\n to: string;\n value: bigint;\n}\nexport type TransferEvent = TypedEvent<\n [string, string, bigint],\n TransferEventObject\n> &\n LogDescription;\n\nexport type TransferEventFilter = TypedEventFilter<TransferEvent>;\n\nexport interface ERC20Bytes extends BaseContract {\n connect(runner: null | ContractRunner): this;\n\n interface: ERC20BytesInterface;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ERC721.js","sourceRoot":"","sources":["../../../src/builtin/internal/ERC721.ts"],"names":[],"mappings":"","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport type { BaseContract, Interface, LogDescription } from \"ethers\";\nimport type { ContractRunner } from \"ethers/providers\";\nimport type { TypedEventFilter, TypedEvent, PromiseOrValue } from \"./common.js\";\n\nexport interface ERC721Interface extends Interface {}\n\nexport interface ApprovalEventObject {\n owner: string;\n approved: string;\n tokenId: bigint;\n}\nexport type ApprovalEvent = TypedEvent<\n [string, string, bigint],\n ApprovalEventObject\n> &\n LogDescription;\n\nexport type ApprovalEventFilter = TypedEventFilter<ApprovalEvent>;\n\nexport interface ApprovalForAllEventObject {\n owner: string;\n operator: string;\n approved: boolean;\n}\nexport type ApprovalForAllEvent = TypedEvent<\n [string, string, boolean],\n ApprovalForAllEventObject\n> &\n LogDescription;\n\nexport type ApprovalForAllEventFilter = TypedEventFilter<ApprovalForAllEvent>;\n\nexport interface TransferEventObject {\n from: string;\n to: string;\n tokenId: bigint;\n}\nexport type TransferEvent = TypedEvent<\n [string, string, bigint],\n TransferEventObject\n> &\n LogDescription;\n\nexport type TransferEventFilter = TypedEventFilter<TransferEvent>;\n\nexport interface ERC721 extends BaseContract {\n connect(runner: null | ContractRunner): this;\n\n interface: ERC721Interface;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WETH9.js","sourceRoot":"","sources":["../../../src/builtin/internal/WETH9.ts"],"names":[],"mappings":"","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport type { BaseContract, Interface, LogDescription } from \"ethers\";\nimport type { ContractRunner } from \"ethers/providers\";\nimport type { TypedEventFilter, TypedEvent, PromiseOrValue } from \"./common.js\";\n\nexport interface WETH9Interface extends Interface {}\n\nexport interface ApprovalEventObject {\n src: string;\n guy: string;\n wad: bigint;\n}\nexport type ApprovalEvent = TypedEvent<\n [string, string, bigint],\n ApprovalEventObject\n> &\n LogDescription;\n\nexport type ApprovalEventFilter = TypedEventFilter<ApprovalEvent>;\n\nexport interface TransferEventObject {\n src: string;\n dst: string;\n wad: bigint;\n}\nexport type TransferEvent = TypedEvent<\n [string, string, bigint],\n TransferEventObject\n> &\n LogDescription;\n\nexport type TransferEventFilter = TypedEventFilter<TransferEvent>;\n\nexport interface DepositEventObject {\n dst: string;\n wad: bigint;\n}\nexport type DepositEvent = TypedEvent<[string, bigint], DepositEventObject> &\n LogDescription;\n\nexport type DepositEventFilter = TypedEventFilter<DepositEvent>;\n\nexport interface WithdrawalEventObject {\n src: string;\n wad: bigint;\n}\nexport type WithdrawalEvent = TypedEvent<\n [string, bigint],\n WithdrawalEventObject\n> &\n LogDescription;\n\nexport type WithdrawalEventFilter = TypedEventFilter<WithdrawalEvent>;\n\nexport interface WETH9 extends BaseContract {\n connect(runner: null | ContractRunner): this;\n\n interface: WETH9Interface;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/builtin/internal/common.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AACpB,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport type { DeferredTopicFilter, LogDescription } from \"ethers\";\n\nexport interface TypedEvent<\n TArgsArray extends Array<any> = any,\n TArgsObject = any\n> {\n args: TArgsArray & TArgsObject;\n}\n\nexport interface TypedEventFilter<_TEvent extends TypedEvent>\n extends DeferredTopicFilter {}\n\n// export interface TypedListener<TEvent extends TypedEvent> {\n// (...listenerArg: [...__TypechainArgsArray<TEvent>, TEvent]): void;\n// }\n\n// type __TypechainArgsArray<T> = T extends TypedEvent<infer U> ? U : never;\n\n// export interface OnEvent<TRes> {\n// <TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>, listener: TypedListener<TEvent>): TRes\n// (eventName: string, listener: Listener): TRes\n// }\n\n// export type MinEthersFactory<C, ARGS> = {\n// deploy(...a: ARGS[]): Promise<C>;\n// };\n\n// export type GetContractTypeFromFactory<F> = F extends MinEthersFactory<\n// infer C,\n// any\n// >\n// ? C\n// : never;\n//\n// export type GetARGsTypeFromFactory<F> = F extends MinEthersFactory<any, any>\n// ? Parameters<F[\"deploy\"]>\n// : never;\n\nexport type PromiseOrValue<T> = T | Promise<T>;\n"]}
|