@sentio/sdk 2.0.0-rc.19 → 2.0.0-rc.20
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/codegen/codegen.d.ts +1 -3
- package/lib/aptos/codegen/codegen.js +12 -16
- package/lib/aptos/codegen/codegen.js.map +1 -1
- package/lib/aptos/network.js +1 -1
- package/lib/aptos/network.js.map +1 -1
- package/lib/aptos/run-codegen.js +2 -2
- package/lib/aptos/run-codegen.js.map +1 -1
- 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/{chain.d.ts → core/chain.d.ts} +0 -0
- package/lib/{chain.js → 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 +5 -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 +5 -5
- package/lib/eth/base-processor.js +1 -1
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 +1 -1
- package/lib/{builtin → eth/builtin}/internal/eacaggregatorproxy_processor.js +1 -1
- package/lib/eth/builtin/internal/eacaggregatorproxy_processor.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/erc1155_processor.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/internal/erc1155_processor.js +1 -1
- package/lib/eth/builtin/internal/erc1155_processor.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/erc20_processor.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/internal/erc20_processor.js +1 -1
- package/lib/eth/builtin/internal/erc20_processor.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/erc20bytes_processor.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/internal/erc20bytes_processor.js +1 -1
- package/lib/eth/builtin/internal/erc20bytes_processor.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/erc721_processor.d.ts +1 -1
- package/lib/{builtin → eth/builtin}/internal/erc721_processor.js +1 -1
- package/lib/eth/builtin/internal/erc721_processor.js.map +1 -0
- package/lib/{builtin → eth/builtin}/internal/factories/EACAggregatorProxy__factory.d.ts +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 +1 -1
- package/lib/{builtin → eth/builtin}/internal/weth9_processor.js +1 -1
- 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} +27 -34
- 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/{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/{target-ethers-sentio/view-function.cjs → eth/codegen/view-function.js} +13 -20
- package/lib/eth/codegen/view-function.js.map +1 -0
- package/lib/{core → eth}/context.d.ts +3 -3
- package/lib/{core → eth}/context.js +3 -3
- 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 +10 -2
- package/lib/eth/eth.js +43 -1
- package/lib/eth/eth.js.map +1 -1
- package/lib/eth/generic-processor.d.ts +2 -2
- package/lib/eth/generic-processor.js +1 -1
- 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 +4 -1
- package/lib/eth/index.js +4 -1
- package/lib/eth/index.js.map +1 -1
- package/lib/eth/run-codegen.d.ts +2 -0
- package/lib/eth/run-codegen.js +12 -0
- package/lib/eth/run-codegen.js.map +1 -0
- package/lib/index.d.ts +1 -3
- package/lib/index.js +1 -5
- package/lib/index.js.map +1 -1
- package/lib/solana/codegen/codegen.d.ts +1 -1
- package/lib/solana/codegen/codegen.js +1 -1
- package/lib/solana/codegen/codegen.js.map +1 -1
- package/lib/solana/run-codegen.js +2 -2
- package/lib/solana/run-codegen.js.map +1 -1
- 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/dex-price.js +2 -2
- package/lib/utils/dex-price.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 +22 -21
- package/src/aptos/codegen/codegen.ts +13 -22
- package/src/aptos/codegen/tsconfig.json +1 -1
- package/src/aptos/network.ts +1 -1
- package/src/aptos/run-codegen.ts +2 -2
- package/src/core/big-decimal.ts +11 -0
- package/src/{chain.ts → 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 -5
- package/src/eth/base-processor.ts +6 -6
- 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 +0 -0
- package/src/{builtin → eth/builtin}/internal/ERC1155.ts +0 -0
- package/src/{builtin → eth/builtin}/internal/ERC20.ts +0 -0
- package/src/{builtin → eth/builtin}/internal/ERC20Bytes.ts +0 -0
- package/src/{builtin → eth/builtin}/internal/ERC721.ts +0 -0
- package/src/{builtin → eth/builtin}/internal/WETH9.ts +0 -0
- package/src/{builtin → eth/builtin}/internal/common.ts +0 -0
- package/src/{builtin → eth/builtin}/internal/eacaggregatorproxy_processor.ts +1 -1
- package/src/{builtin → eth/builtin}/internal/erc1155_processor.ts +1 -1
- package/src/{builtin → eth/builtin}/internal/erc20_processor.ts +1 -1
- package/src/{builtin → eth/builtin}/internal/erc20bytes_processor.ts +1 -1
- package/src/{builtin → eth/builtin}/internal/erc721_processor.ts +1 -1
- package/src/{builtin → eth/builtin}/internal/factories/EACAggregatorProxy__factory.ts +0 -0
- package/src/{builtin → eth/builtin}/internal/factories/ERC1155__factory.ts +0 -0
- package/src/{builtin → eth/builtin}/internal/factories/ERC20Bytes__factory.ts +0 -0
- package/src/{builtin → eth/builtin}/internal/factories/ERC20__factory.ts +0 -0
- package/src/{builtin → eth/builtin}/internal/factories/ERC721__factory.ts +0 -0
- package/src/{builtin → eth/builtin}/internal/factories/WETH9__factory.ts +0 -0
- 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 +1 -1
- 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} +6 -6
- 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/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} +5 -3
- package/src/{core → eth}/context.ts +4 -4
- package/src/eth/error.ts +4 -0
- package/src/eth/eth.ts +53 -3
- package/src/eth/generic-processor.ts +2 -2
- package/src/eth/index.ts +5 -3
- package/src/eth/run-codegen.ts +12 -0
- package/src/index.ts +1 -6
- package/src/solana/codegen/codegen.ts +1 -1
- package/src/solana/codegen/tsconfig.json +1 -1
- package/src/solana/run-codegen.ts +2 -2
- 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/dex-price.ts +2 -2
- 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/chain.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 +0 -36
- 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.map +0 -1
- package/src/error.ts +0 -43
- package/src/target-ethers-sentio/.eslintrc.json +0 -14
- package/src/target-ethers-sentio/tsconfig.json +0 -9
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { loadFileDescriptions, processOutput, skipEmptyAbis } from 'typechain/dist/typechain/io.js'
|
|
2
|
+
import * as fs from 'fs'
|
|
3
|
+
import { Config, DEFAULT_FLAGS, Services } from 'typechain'
|
|
4
|
+
import EthersSentio from './ethers-sentio.js'
|
|
5
|
+
import * as prettier from 'prettier'
|
|
6
|
+
import path from 'path'
|
|
7
|
+
import mkdirp from 'mkdirp'
|
|
8
|
+
|
|
9
|
+
export async function codegen(abisDir: string, outDir: string) {
|
|
10
|
+
if (!fs.existsSync(abisDir)) {
|
|
11
|
+
return
|
|
12
|
+
}
|
|
13
|
+
console.log('Generated', await codegenInternal(abisDir, outDir), 'files')
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async function codegenInternal(abisDir: string, outDir: string): Promise<number> {
|
|
17
|
+
let allFiles = fs.readdirSync(abisDir)
|
|
18
|
+
if (allFiles.length === 0) {
|
|
19
|
+
return 0
|
|
20
|
+
}
|
|
21
|
+
allFiles = allFiles.map((f) => path.resolve(abisDir, f))
|
|
22
|
+
|
|
23
|
+
allFiles = skipEmptyAbis(allFiles)
|
|
24
|
+
if (allFiles.length === 0) {
|
|
25
|
+
return 0
|
|
26
|
+
}
|
|
27
|
+
const outInternal = path.resolve(outDir, 'internal')
|
|
28
|
+
if (!fs.existsSync(outInternal)) {
|
|
29
|
+
fs.mkdirSync(outInternal, { recursive: true })
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// skip empty paths
|
|
33
|
+
const config: Config = {
|
|
34
|
+
cwd: process.cwd(),
|
|
35
|
+
flags: DEFAULT_FLAGS,
|
|
36
|
+
inputDir: abisDir,
|
|
37
|
+
target: '',
|
|
38
|
+
outDir: outInternal,
|
|
39
|
+
allFiles: allFiles,
|
|
40
|
+
filesToProcess: allFiles,
|
|
41
|
+
}
|
|
42
|
+
const services: Services = {
|
|
43
|
+
fs,
|
|
44
|
+
prettier,
|
|
45
|
+
mkdirp: mkdirp.sync,
|
|
46
|
+
}
|
|
47
|
+
let filesGenerated = 0
|
|
48
|
+
|
|
49
|
+
const target = new EthersSentio(config)
|
|
50
|
+
|
|
51
|
+
const fileDescriptions = loadFileDescriptions(services, config.filesToProcess)
|
|
52
|
+
|
|
53
|
+
filesGenerated += processOutput(services, config, await target.beforeRun())
|
|
54
|
+
|
|
55
|
+
for (const fd of fileDescriptions) {
|
|
56
|
+
filesGenerated += processOutput(services, config, await target.transformFile(fd))
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
filesGenerated += processOutput(services, config, target.afterRun())
|
|
60
|
+
|
|
61
|
+
return filesGenerated
|
|
62
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Ethers from '@sentio/ethers-v6'
|
|
2
2
|
import { Config, extractAbi, extractDocumentation, FileDescription, parse, shortenFullJsonFilePath } from 'typechain'
|
|
3
3
|
import { dirname, join, relative } from 'path'
|
|
4
|
-
import { codeGenIndex, codeGenSentioFile, codeGenTestUtilsFile } from './file.
|
|
4
|
+
import { codeGenIndex, codeGenSentioFile, codeGenTestUtilsFile } from './file.js'
|
|
5
5
|
|
|
6
|
-
export default class EthersSentio extends Ethers {
|
|
6
|
+
export default class EthersSentio extends Ethers.default {
|
|
7
7
|
constructor(config: Config) {
|
|
8
8
|
if (!config.outDir) {
|
|
9
9
|
throw new Error('Out put path not specificed')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventDeclaration, Contract, getFullSignatureAsSymbolForEvent } from 'typechain'
|
|
2
|
-
import { getFullSignatureForEventPatched } from './types.
|
|
3
|
-
import { generateEventInputs } from '@sentio/ethers-v6/dist/codegen/events'
|
|
2
|
+
import { getFullSignatureForEventPatched } from './types.js'
|
|
3
|
+
import { generateEventInputs } from '@sentio/ethers-v6/dist/codegen/events.js'
|
|
4
4
|
|
|
5
5
|
export function generateEventHandler(event: EventDeclaration, contractName: string, includeArgTypes: boolean): string {
|
|
6
6
|
const eventName = includeArgTypes ? getFullSignatureAsSymbolForEvent(event) : event.name
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
createImportsForUsedIdentifiers,
|
|
4
4
|
EventDeclaration,
|
|
5
5
|
getFullSignatureAsSymbolForEvent,
|
|
6
|
+
getFullSignatureForEvent,
|
|
6
7
|
} from 'typechain'
|
|
7
8
|
|
|
8
|
-
import { reservedKeywords } from '@sentio/ethers-v6/dist/codegen/reserved-keywords'
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { generateBoundViewFunctions, generateViewFunctions } from './view-function.cjs'
|
|
9
|
+
import { reservedKeywords } from '@sentio/ethers-v6/dist/codegen/reserved-keywords.js'
|
|
10
|
+
import { codegenCallTraceTypes, generateCallHandlers } from './functions-handler.js'
|
|
11
|
+
import { generateEventFilters, generateEventHandlers } from './event-handler.js'
|
|
12
|
+
import { generateBoundViewFunctions, generateViewFunctions } from './view-function.js'
|
|
13
13
|
|
|
14
14
|
export function codeGenIndex(contract: Contract): string {
|
|
15
15
|
return `
|
|
@@ -146,7 +146,7 @@ export class ${contract.name}ProcessorTemplate extends BaseProcessorTemplate<${c
|
|
|
146
146
|
{
|
|
147
147
|
ethers: ['BigNumberish', 'Overrides', 'BytesLike'],
|
|
148
148
|
'ethers/providers': ['Networkish'],
|
|
149
|
-
'@sentio/sdk': [
|
|
149
|
+
'@sentio/sdk/eth': [
|
|
150
150
|
'addContractByABI',
|
|
151
151
|
'getContractByABI',
|
|
152
152
|
'addProcessor',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateOutputComplexTypeAsArray,
|
|
3
3
|
generateOutputComplexTypesAsObject,
|
|
4
|
-
} from '@sentio/ethers-v6/dist/codegen/types'
|
|
5
|
-
import
|
|
4
|
+
} from '@sentio/ethers-v6/dist/codegen/types.js'
|
|
5
|
+
import sha3 from 'js-sha3'
|
|
6
6
|
import { FunctionDeclaration, getSignatureForFn } from 'typechain'
|
|
7
|
-
import { getFullSignatureAsSymbolForFunction } from './types.
|
|
7
|
+
import { getFullSignatureAsSymbolForFunction } from './types.js'
|
|
8
8
|
|
|
9
9
|
export function generateCallHandlers(fns: FunctionDeclaration[], contractName: string): string {
|
|
10
10
|
if (fns.length === 1) {
|
|
@@ -41,7 +41,7 @@ function generateCallHandler(fn: FunctionDeclaration, contractName: string, over
|
|
|
41
41
|
// utils.toUtf8Bytes(signature))
|
|
42
42
|
|
|
43
43
|
const test = new TextEncoder().encode(signature)
|
|
44
|
-
const sighash =
|
|
44
|
+
const sighash = '0x' + sha3.keccak_256(test).substring(0, 8)
|
|
45
45
|
|
|
46
46
|
return `
|
|
47
47
|
onCall${capitalizeFirstChar(overloadedName ?? fn.name)}(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './codegen.js'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventDeclaration, FunctionDeclaration } from 'typechain'
|
|
2
|
-
import { EvmType } from 'typechain/dist/parser/parseEvmType'
|
|
2
|
+
import { EvmType } from 'typechain/dist/parser/parseEvmType.js'
|
|
3
3
|
|
|
4
4
|
export function getFullSignatureAsSymbolForFunction(fn: FunctionDeclaration): string {
|
|
5
5
|
return `${fn.name}_${fn.inputs
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// https://github.com/dethcrypto/TypeChain/blob/015abb28bd22826611051f27e0ec96a00f9a0b61/packages/target-ethers-v5/src/codegen/functions.ts#L54
|
|
2
2
|
import { FunctionDeclaration } from 'typechain'
|
|
3
|
-
import { generateInputTypes, generateOutputTypes } from '@sentio/ethers-v6/dist/codegen/types'
|
|
4
|
-
import { getFullSignatureAsSymbolForFunction, getFullSignatureForFunction } from './types.
|
|
3
|
+
import { generateInputTypes, generateOutputTypes } from '@sentio/ethers-v6/dist/codegen/types.js'
|
|
4
|
+
import { getFullSignatureAsSymbolForFunction, getFullSignatureForFunction } from './types.js'
|
|
5
5
|
|
|
6
6
|
function generateReturnTypes(fn: FunctionDeclaration) {
|
|
7
7
|
// sounds like returnResultObject should be true but we need to set false to make it work
|
|
@@ -65,7 +65,9 @@ export function generateBoundViewFunction(fn: FunctionDeclaration, includeArgTyp
|
|
|
65
65
|
blockTag: toBlockTag(this.context.blockNumber),
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
return await this.view.${declName}(${
|
|
68
|
+
return await this.view.${declName}(${
|
|
69
|
+
fn.inputs.length > 0 ? fn.inputs.map((input, index) => input.name || `arg${index}`).join(',') + ',' : ''
|
|
70
|
+
} overrides || {})
|
|
69
71
|
}
|
|
70
72
|
`
|
|
71
73
|
}
|
|
@@ -2,10 +2,10 @@ import { BaseContract, Transaction, TransactionReceipt, Block } from 'ethers'
|
|
|
2
2
|
import { LogParams } from 'ethers/providers'
|
|
3
3
|
|
|
4
4
|
import { RecordMetaData } from '@sentio/protos'
|
|
5
|
-
import { Trace } from '
|
|
6
|
-
import { Labels, normalizeLabels } from '
|
|
7
|
-
import { CHAIN_IDS } from '../chain.js'
|
|
8
|
-
import { BaseContext } from '
|
|
5
|
+
import { Trace } from './trace.js'
|
|
6
|
+
import { Labels, normalizeLabels } from '../core/metadata.js'
|
|
7
|
+
import { CHAIN_IDS } from '../core/chain.js'
|
|
8
|
+
import { BaseContext } from '../core/base-context.js'
|
|
9
9
|
|
|
10
10
|
export abstract class EthContext extends BaseContext {
|
|
11
11
|
chainId: number
|
package/src/eth/error.ts
ADDED
package/src/eth/eth.ts
CHANGED
|
@@ -1,6 +1,56 @@
|
|
|
1
|
-
import { LogParams } from 'ethers/providers'
|
|
2
|
-
import { Result } from 'ethers'
|
|
1
|
+
import { BlockTag, LogParams } from 'ethers/providers'
|
|
2
|
+
import { CallExceptionError, Result } from 'ethers'
|
|
3
|
+
import { ContractContext } from './context.js'
|
|
3
4
|
|
|
4
|
-
export interface
|
|
5
|
+
export interface EthLog<TArgsArray extends Array<any> = any, TArgsObject = any> extends LogParams {
|
|
5
6
|
args: TArgsArray & TArgsObject & Result
|
|
6
7
|
}
|
|
8
|
+
|
|
9
|
+
export function toBlockTag(a: number | bigint): BlockTag {
|
|
10
|
+
if (typeof a === 'number') {
|
|
11
|
+
return a
|
|
12
|
+
}
|
|
13
|
+
if (a > Number.MAX_SAFE_INTEGER) {
|
|
14
|
+
return '0x' + a.toString(16)
|
|
15
|
+
}
|
|
16
|
+
return Number(a)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export class SimpleEthersError extends Error {
|
|
20
|
+
e: Error
|
|
21
|
+
|
|
22
|
+
constructor(message: string, e: Error) {
|
|
23
|
+
super(message)
|
|
24
|
+
this.stack = e.stack
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
toString() {
|
|
28
|
+
return this.message + '\n' + this.stack?.toString()
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function transformEtherError(e: Error, ctx: ContractContext<any, any> | undefined): Error {
|
|
33
|
+
if (e instanceof SimpleEthersError) {
|
|
34
|
+
return e
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
let msg = ''
|
|
38
|
+
const err = e as CallExceptionError
|
|
39
|
+
if (err.code === 'CALL_EXCEPTION') {
|
|
40
|
+
if (err.data === '0x') {
|
|
41
|
+
if (ctx) {
|
|
42
|
+
msg =
|
|
43
|
+
"jsonrpc eth_call return '0x' (likely contract not existed) at chain " +
|
|
44
|
+
ctx.chainId +
|
|
45
|
+
': ' +
|
|
46
|
+
JSON.stringify(e)
|
|
47
|
+
} else {
|
|
48
|
+
msg = "jsonrpc eth_call return '0x' (likely contract not existed): " + JSON.stringify(err)
|
|
49
|
+
}
|
|
50
|
+
return new SimpleEthersError(msg, err)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
msg = 'ethers call error\n' + JSON.stringify(e) + '\n' + e.stack?.toString()
|
|
55
|
+
return new Error(msg)
|
|
56
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseContract } from 'ethers'
|
|
2
|
-
import { BoundContractView, ContractView } from '
|
|
3
|
-
import { BindOptions } from '
|
|
2
|
+
import { BoundContractView, ContractView } from './context.js'
|
|
3
|
+
import { BindOptions } from './bind-options.js'
|
|
4
4
|
import { BaseProcessor } from './base-processor.js'
|
|
5
5
|
import { getProvider } from './provider.js'
|
|
6
6
|
import { addProcessor } from './binds.js'
|
package/src/eth/index.ts
CHANGED
|
@@ -3,8 +3,10 @@ export { GenericProcessor } from './generic-processor.js'
|
|
|
3
3
|
export { BaseProcessorTemplate } from './base-processor-template.js'
|
|
4
4
|
export { getProvider, DummyProvider } from './provider.js'
|
|
5
5
|
export type { TypedCallTrace, Trace } from './trace.js'
|
|
6
|
-
export { EthPlugin } from './eth-plugin.js'
|
|
7
|
-
|
|
8
6
|
export * from './eth.js'
|
|
9
|
-
|
|
7
|
+
export * from './error.js'
|
|
8
|
+
export { BindOptions, AccountBindOptions } from './bind-options.js'
|
|
10
9
|
export { getProcessor, addProcessor, getContractByABI, addContractByABI } from './binds.js'
|
|
10
|
+
export { ContractContext, ContractView, BoundContractView } from './context.js'
|
|
11
|
+
|
|
12
|
+
export { EthPlugin } from './eth-plugin.js'
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { codegen } from './codegen/index.js'
|
|
4
|
+
|
|
5
|
+
if (process.argv.length > 3) {
|
|
6
|
+
const abisDir = process.argv[2]
|
|
7
|
+
const targetDir = process.argv[3]
|
|
8
|
+
await codegen(abisDir, targetDir)
|
|
9
|
+
} else {
|
|
10
|
+
console.error('Not enough argument')
|
|
11
|
+
process.exit(1)
|
|
12
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
export { transformEtherError, SimpleEthersError } from './error.js'
|
|
2
|
-
|
|
3
|
-
// TODO maybe remove this
|
|
4
1
|
export * from '@sentio/protos'
|
|
5
2
|
|
|
6
3
|
export * from './core/index.js'
|
|
7
|
-
export * from './eth/index.js'
|
|
8
4
|
|
|
9
|
-
export * from './chain.js'
|
|
10
|
-
// export * from './api'
|
|
5
|
+
export * from './core/chain.js'
|
|
@@ -4,7 +4,7 @@ import chalk from 'chalk'
|
|
|
4
4
|
import { Idl } from '@project-serum/anchor'
|
|
5
5
|
import { IdlAccountItem, IdlField, IdlInstruction, IdlType } from '@project-serum/anchor/dist/cjs/idl.js'
|
|
6
6
|
|
|
7
|
-
export function
|
|
7
|
+
export function codegen(abisDir: string, targetPath = path.join('src', 'types', 'solana')) {
|
|
8
8
|
if (!fs.existsSync(abisDir)) {
|
|
9
9
|
return
|
|
10
10
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import path from 'path'
|
|
4
|
-
import {
|
|
4
|
+
import { codegen } from './codegen/codegen.js'
|
|
5
5
|
|
|
6
6
|
if (process.argv.length > 3) {
|
|
7
7
|
const abisDir = process.argv[2]
|
|
8
8
|
const targetDir = process.argv[3]
|
|
9
|
-
|
|
9
|
+
codegen(abisDir, targetDir)
|
|
10
10
|
} else {
|
|
11
11
|
console.error('Not enough argument')
|
|
12
12
|
process.exit(1)
|
|
@@ -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 '../chain.js'
|
|
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/dex-price.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { getEACAggregatorProxyContract } from '../builtin/internal/eacaggregatorproxy_processor.js'
|
|
1
|
+
import { getEACAggregatorProxyContract } from '../eth/builtin/internal/eacaggregatorproxy_processor.js'
|
|
2
2
|
import fs from 'fs'
|
|
3
3
|
import { parse } from 'csv-parse/sync'
|
|
4
4
|
import { BlockTag } from 'ethers/providers'
|
|
5
|
-
import { scaleDown } from './token.js'
|
|
6
5
|
import url from 'url'
|
|
6
|
+
import { scaleDown } from '../core/big-decimal.js'
|
|
7
7
|
|
|
8
8
|
type OralceRecord = {
|
|
9
9
|
Pair: string
|
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 } 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\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\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\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\nexport type OwnershipTransferredEventFilter =\n TypedEventFilter<OwnershipTransferredEvent>;\n\nexport interface EACAggregatorProxy extends BaseContract {\n connect(runner: null | ContractRunner): this;\n\n interface: EACAggregatorProxyInterface;\n}\n"]}
|