@sentio/sdk 1.13.0 → 1.13.2
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/cli/commands/run-create.js +2 -0
- package/lib/cli/commands/run-create.js.map +1 -1
- package/lib/test/index.d.ts +1 -0
- package/lib/test/index.js +5 -1
- package/lib/test/index.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/commands/run-create.ts +3 -0
- package/src/test/index.ts +1 -0
- package/template/package.json +2 -3
- package/template/src/processor.test.ts +1 -1
- package/template/src/processor.ts +20 -16
- package/template/node_modules/@sentio/sdk/lib/base-processor-template.d.ts +0 -27
- package/template/node_modules/@sentio/sdk/lib/base-processor-template.js +0 -80
- package/template/node_modules/@sentio/sdk/lib/base-processor-template.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/base-processor.d.ts +0 -30
- package/template/node_modules/@sentio/sdk/lib/base-processor.js +0 -148
- package/template/node_modules/@sentio/sdk/lib/base-processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/bind-options.d.ts +0 -21
- package/template/node_modules/@sentio/sdk/lib/bind-options.js +0 -42
- package/template/node_modules/@sentio/sdk/lib/bind-options.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/binds.d.ts +0 -10
- package/template/node_modules/@sentio/sdk/lib/binds.js +0 -59
- package/template/node_modules/@sentio/sdk/lib/binds.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20/index.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20/index.js +0 -22
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20/test-utils.d.ts +0 -5
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20/test-utils.js +0 -46
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20/test-utils.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20bytes/index.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20bytes/index.js +0 -22
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20bytes/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20bytes/test-utils.d.ts +0 -4
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20bytes/test-utils.js +0 -35
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20bytes/test-utils.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/ERC20.d.ts +0 -307
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/ERC20.js +0 -3
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/ERC20.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/ERC20Bytes.d.ts +0 -166
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/ERC20Bytes.js +0 -3
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/ERC20Bytes.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/WETH9.d.ts +0 -221
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/WETH9.js +0 -3
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/WETH9.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/common.d.ts +0 -22
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/common.js +0 -3
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/common.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/erc20_processor.d.ts +0 -184
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/erc20_processor.js +0 -453
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/erc20_processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/erc20bytes_processor.d.ts +0 -110
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/erc20bytes_processor.js +0 -325
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/erc20bytes_processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/ERC20Bytes__factory.d.ts +0 -48
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/ERC20Bytes__factory.js +0 -254
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/ERC20Bytes__factory.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/ERC20__factory.d.ts +0 -42
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/ERC20__factory.js +0 -404
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/ERC20__factory.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/WETH9__factory.d.ts +0 -45
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/WETH9__factory.js +0 -297
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/WETH9__factory.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/index.d.ts +0 -3
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/index.js +0 -13
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/index.d.ts +0 -7
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/index.js +0 -34
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/weth9_processor.d.ts +0 -126
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/weth9_processor.js +0 -361
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/weth9_processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/weth9/index.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/builtin/weth9/index.js +0 -22
- package/template/node_modules/@sentio/sdk/lib/builtin/weth9/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/weth9/test-utils.d.ts +0 -6
- package/template/node_modules/@sentio/sdk/lib/builtin/weth9/test-utils.js +0 -57
- package/template/node_modules/@sentio/sdk/lib/builtin/weth9/test-utils.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/chain-config.d.ts +0 -6
- package/template/node_modules/@sentio/sdk/lib/chain-config.js +0 -3
- package/template/node_modules/@sentio/sdk/lib/chain-config.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/build.d.ts +0 -4
- package/template/node_modules/@sentio/sdk/lib/cli/build.js +0 -178
- package/template/node_modules/@sentio/sdk/lib/cli/build.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/cli.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/cli/cli.js +0 -163
- package/template/node_modules/@sentio/sdk/lib/cli/cli.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/commands/run-create.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/commands/run-create.js +0 -43
- package/template/node_modules/@sentio/sdk/lib/cli/commands/run-create.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/commands/run-login.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/commands/run-login.js +0 -77
- package/template/node_modules/@sentio/sdk/lib/cli/commands/run-login.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/config.d.ts +0 -16
- package/template/node_modules/@sentio/sdk/lib/cli/config.js +0 -36
- package/template/node_modules/@sentio/sdk/lib/cli/config.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/key.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/cli/key.js +0 -44
- package/template/node_modules/@sentio/sdk/lib/cli/key.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/solana-code-gen.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/cli/solana-code-gen.js +0 -19
- package/template/node_modules/@sentio/sdk/lib/cli/solana-code-gen.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/upload.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/cli/upload.js +0 -85
- package/template/node_modules/@sentio/sdk/lib/cli/upload.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/webpack.config.js +0 -42
- package/template/node_modules/@sentio/sdk/lib/context.d.ts +0 -49
- package/template/node_modules/@sentio/sdk/lib/context.js +0 -93
- package/template/node_modules/@sentio/sdk/lib/context.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/contract-namer.d.ts +0 -6
- package/template/node_modules/@sentio/sdk/lib/contract-namer.js +0 -20
- package/template/node_modules/@sentio/sdk/lib/contract-namer.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/error.d.ts +0 -7
- package/template/node_modules/@sentio/sdk/lib/error.js +0 -43
- package/template/node_modules/@sentio/sdk/lib/error.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/gen/builtin.d.ts +0 -6
- package/template/node_modules/@sentio/sdk/lib/gen/builtin.js +0 -3
- package/template/node_modules/@sentio/sdk/lib/gen/builtin.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/gen/google/protobuf/empty.d.ts +0 -16
- package/template/node_modules/@sentio/sdk/lib/gen/google/protobuf/empty.js +0 -47
- package/template/node_modules/@sentio/sdk/lib/gen/google/protobuf/empty.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/gen/processor/protos/processor.d.ts +0 -666
- package/template/node_modules/@sentio/sdk/lib/gen/processor/protos/processor.js +0 -2837
- package/template/node_modules/@sentio/sdk/lib/gen/processor/protos/processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/generic-processor.d.ts +0 -10
- package/template/node_modules/@sentio/sdk/lib/generic-processor.js +0 -32
- package/template/node_modules/@sentio/sdk/lib/generic-processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/index.d.ts +0 -18
- package/template/node_modules/@sentio/sdk/lib/index.js +0 -63
- package/template/node_modules/@sentio/sdk/lib/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/loader.d.ts +0 -5
- package/template/node_modules/@sentio/sdk/lib/loader.js +0 -30
- package/template/node_modules/@sentio/sdk/lib/loader.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/meter.d.ts +0 -26
- package/template/node_modules/@sentio/sdk/lib/meter.js +0 -131
- package/template/node_modules/@sentio/sdk/lib/meter.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/meter.test.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/meter.test.js +0 -16
- package/template/node_modules/@sentio/sdk/lib/meter.test.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/numberish.d.ts +0 -6
- package/template/node_modules/@sentio/sdk/lib/numberish.js +0 -96
- package/template/node_modules/@sentio/sdk/lib/numberish.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/numberish.test.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/numberish.test.js +0 -70
- package/template/node_modules/@sentio/sdk/lib/numberish.test.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/processor-runner.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/processor-runner.js +0 -40
- package/template/node_modules/@sentio/sdk/lib/processor-runner.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/processor-state.d.ts +0 -16
- package/template/node_modules/@sentio/sdk/lib/processor-state.js +0 -20
- package/template/node_modules/@sentio/sdk/lib/processor-state.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/promise-or-void.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/promise-or-void.js +0 -3
- package/template/node_modules/@sentio/sdk/lib/promise-or-void.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/provider.d.ts +0 -6
- package/template/node_modules/@sentio/sdk/lib/provider.js +0 -66
- package/template/node_modules/@sentio/sdk/lib/provider.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/release.config.js +0 -31
- package/template/node_modules/@sentio/sdk/lib/service.d.ts +0 -25
- package/template/node_modules/@sentio/sdk/lib/service.js +0 -406
- package/template/node_modules/@sentio/sdk/lib/service.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/index.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/index.js +0 -19
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/spl-token-processor.d.ts +0 -26
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/spl-token-processor.js +0 -138
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/spl-token-processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/types.d.ts +0 -330
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/types.js +0 -203
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/types.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/wormhole-processor.d.ts +0 -18
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/wormhole-processor.js +0 -192
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/wormhole-processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/solana-processor.d.ts +0 -34
- package/template/node_modules/@sentio/sdk/lib/solana-processor.js +0 -95
- package/template/node_modules/@sentio/sdk/lib/solana-processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/target-ethers-sentio/codegen.d.ts +0 -4
- package/template/node_modules/@sentio/sdk/lib/target-ethers-sentio/codegen.js +0 -292
- package/template/node_modules/@sentio/sdk/lib/target-ethers-sentio/codegen.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/target-ethers-sentio/functions.d.ts +0 -3
- package/template/node_modules/@sentio/sdk/lib/target-ethers-sentio/functions.js +0 -61
- package/template/node_modules/@sentio/sdk/lib/target-ethers-sentio/functions.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/target-ethers-sentio/index.d.ts +0 -6
- package/template/node_modules/@sentio/sdk/lib/target-ethers-sentio/index.js +0 -51
- package/template/node_modules/@sentio/sdk/lib/target-ethers-sentio/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/codegen.test.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/codegen.test.js +0 -49
- package/template/node_modules/@sentio/sdk/lib/test/codegen.test.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/erc20-template.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/erc20-template.js +0 -23
- package/template/node_modules/@sentio/sdk/lib/test/erc20-template.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/erc20-template.test.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/erc20-template.test.js +0 -37
- package/template/node_modules/@sentio/sdk/lib/test/erc20-template.test.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/erc20.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/erc20.js +0 -44
- package/template/node_modules/@sentio/sdk/lib/test/erc20.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/erc20.test.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/erc20.test.js +0 -96
- package/template/node_modules/@sentio/sdk/lib/test/erc20.test.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/generic-processor.test.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/generic-processor.test.js +0 -59
- package/template/node_modules/@sentio/sdk/lib/test/generic-processor.test.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/index.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/test/index.js +0 -8
- package/template/node_modules/@sentio/sdk/lib/test/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/metric-utils.d.ts +0 -6
- package/template/node_modules/@sentio/sdk/lib/test/metric-utils.js +0 -50
- package/template/node_modules/@sentio/sdk/lib/test/metric-utils.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/mirrorworld.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/mirrorworld.js +0 -42
- package/template/node_modules/@sentio/sdk/lib/test/mirrorworld.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/solana.test.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/solana.test.js +0 -90
- package/template/node_modules/@sentio/sdk/lib/test/solana.test.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/test-processor-server.d.ts +0 -34
- package/template/node_modules/@sentio/sdk/lib/test/test-processor-server.js +0 -205
- package/template/node_modules/@sentio/sdk/lib/test/test-processor-server.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/test-provider.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/test-provider.js +0 -25
- package/template/node_modules/@sentio/sdk/lib/test/test-provider.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/types/game_wallet.d.ts +0 -45
- package/template/node_modules/@sentio/sdk/lib/test/types/game_wallet.js +0 -1396
- package/template/node_modules/@sentio/sdk/lib/test/types/game_wallet.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/types/game_wallet_processor.d.ts +0 -107
- package/template/node_modules/@sentio/sdk/lib/test/types/game_wallet_processor.js +0 -105
- package/template/node_modules/@sentio/sdk/lib/test/types/game_wallet_processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/wormhole-token-bridge.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/wormhole-token-bridge.js +0 -22
- package/template/node_modules/@sentio/sdk/lib/test/wormhole-token-bridge.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/trace.d.ts +0 -35
- package/template/node_modules/@sentio/sdk/lib/trace.js +0 -43
- package/template/node_modules/@sentio/sdk/lib/trace.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/utils/chainmap.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/utils/chainmap.js +0 -98
- package/template/node_modules/@sentio/sdk/lib/utils/chainmap.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/utils/convert.d.ts +0 -5
- package/template/node_modules/@sentio/sdk/lib/utils/convert.js +0 -27
- package/template/node_modules/@sentio/sdk/lib/utils/convert.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/utils/erc20.d.ts +0 -14
- package/template/node_modules/@sentio/sdk/lib/utils/erc20.js +0 -62
- package/template/node_modules/@sentio/sdk/lib/utils/erc20.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/utils/erc20.test.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/utils/erc20.test.js +0 -23
- package/template/node_modules/@sentio/sdk/lib/utils/erc20.test.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/utils/index.d.ts +0 -3
- package/template/node_modules/@sentio/sdk/lib/utils/index.js +0 -14
- package/template/node_modules/@sentio/sdk/lib/utils/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/package.json +0 -78
- package/template/node_modules/@sentio/sdk/src/abis/ERC20.json +0 -174
- package/template/node_modules/@sentio/sdk/src/abis/ERC20Bytes.json +0 -236
- package/template/node_modules/@sentio/sdk/src/abis/WETH9.json +0 -153
- package/template/node_modules/@sentio/sdk/src/base-processor-template.ts +0 -105
- package/template/node_modules/@sentio/sdk/src/base-processor.ts +0 -172
- package/template/node_modules/@sentio/sdk/src/bind-options.ts +0 -41
- package/template/node_modules/@sentio/sdk/src/binds.ts +0 -73
- package/template/node_modules/@sentio/sdk/src/builtin/erc20/index.ts +0 -6
- package/template/node_modules/@sentio/sdk/src/builtin/erc20/test-utils.ts +0 -71
- package/template/node_modules/@sentio/sdk/src/builtin/erc20bytes/index.ts +0 -6
- package/template/node_modules/@sentio/sdk/src/builtin/erc20bytes/test-utils.ts +0 -53
- package/template/node_modules/@sentio/sdk/src/builtin/internal/ERC20.ts +0 -679
- package/template/node_modules/@sentio/sdk/src/builtin/internal/ERC20Bytes.ts +0 -384
- package/template/node_modules/@sentio/sdk/src/builtin/internal/WETH9.ts +0 -480
- package/template/node_modules/@sentio/sdk/src/builtin/internal/common.ts +0 -46
- package/template/node_modules/@sentio/sdk/src/builtin/internal/erc20_processor.ts +0 -762
- package/template/node_modules/@sentio/sdk/src/builtin/internal/erc20bytes_processor.ts +0 -531
- package/template/node_modules/@sentio/sdk/src/builtin/internal/factories/ERC20Bytes__factory.ts +0 -257
- package/template/node_modules/@sentio/sdk/src/builtin/internal/factories/ERC20__factory.ts +0 -404
- package/template/node_modules/@sentio/sdk/src/builtin/internal/factories/WETH9__factory.ts +0 -297
- package/template/node_modules/@sentio/sdk/src/builtin/internal/factories/index.ts +0 -6
- package/template/node_modules/@sentio/sdk/src/builtin/internal/index.ts +0 -10
- package/template/node_modules/@sentio/sdk/src/builtin/internal/weth9_processor.ts +0 -589
- package/template/node_modules/@sentio/sdk/src/builtin/weth9/index.ts +0 -6
- package/template/node_modules/@sentio/sdk/src/builtin/weth9/test-utils.ts +0 -89
- package/template/node_modules/@sentio/sdk/src/chain-config.ts +0 -6
- package/template/node_modules/@sentio/sdk/src/cli/build.ts +0 -196
- package/template/node_modules/@sentio/sdk/src/cli/cli.ts +0 -160
- package/template/node_modules/@sentio/sdk/src/cli/commands/run-create.ts +0 -36
- package/template/node_modules/@sentio/sdk/src/cli/commands/run-login.ts +0 -70
- package/template/node_modules/@sentio/sdk/src/cli/config.ts +0 -45
- package/template/node_modules/@sentio/sdk/src/cli/key.ts +0 -43
- package/template/node_modules/@sentio/sdk/src/cli/solana-code-gen.ts +0 -16
- package/template/node_modules/@sentio/sdk/src/cli/upload.ts +0 -88
- package/template/node_modules/@sentio/sdk/src/cli/webpack.config.js +0 -42
- package/template/node_modules/@sentio/sdk/src/context.ts +0 -103
- package/template/node_modules/@sentio/sdk/src/contract-namer.ts +0 -17
- package/template/node_modules/@sentio/sdk/src/error.ts +0 -45
- package/template/node_modules/@sentio/sdk/src/gen/builtin.ts +0 -22
- package/template/node_modules/@sentio/sdk/src/gen/google/protobuf/empty.ts +0 -70
- package/template/node_modules/@sentio/sdk/src/gen/processor/protos/processor.ts +0 -3626
- package/template/node_modules/@sentio/sdk/src/generic-processor.ts +0 -35
- package/template/node_modules/@sentio/sdk/src/index.ts +0 -21
- package/template/node_modules/@sentio/sdk/src/loader.ts +0 -24
- package/template/node_modules/@sentio/sdk/src/meter.test.ts +0 -16
- package/template/node_modules/@sentio/sdk/src/meter.ts +0 -140
- package/template/node_modules/@sentio/sdk/src/numberish.test.ts +0 -82
- package/template/node_modules/@sentio/sdk/src/numberish.ts +0 -100
- package/template/node_modules/@sentio/sdk/src/processor-runner.ts +0 -46
- package/template/node_modules/@sentio/sdk/src/processor-state.ts +0 -24
- package/template/node_modules/@sentio/sdk/src/promise-or-void.ts +0 -1
- package/template/node_modules/@sentio/sdk/src/provider.ts +0 -74
- package/template/node_modules/@sentio/sdk/src/service.ts +0 -491
- package/template/node_modules/@sentio/sdk/src/solana/builtin/index.ts +0 -2
- package/template/node_modules/@sentio/sdk/src/solana/builtin/spl-token-processor.ts +0 -164
- package/template/node_modules/@sentio/sdk/src/solana/builtin/types.ts +0 -268
- package/template/node_modules/@sentio/sdk/src/solana/builtin/wormhole-processor.ts +0 -178
- package/template/node_modules/@sentio/sdk/src/solana-processor.ts +0 -106
- package/template/node_modules/@sentio/sdk/src/target-ethers-sentio/codegen.ts +0 -315
- package/template/node_modules/@sentio/sdk/src/target-ethers-sentio/functions.ts +0 -68
- package/template/node_modules/@sentio/sdk/src/target-ethers-sentio/index.ts +0 -50
- package/template/node_modules/@sentio/sdk/src/target-ethers-sentio/tsconfig.json +0 -9
- package/template/node_modules/@sentio/sdk/src/test/abis/evm/CommitmentPool.json +0 -1034
- package/template/node_modules/@sentio/sdk/src/test/abis/evm/anyswapRouter.json +0 -490
- package/template/node_modules/@sentio/sdk/src/test/abis/solana/mirrorworld.json +0 -1392
- package/template/node_modules/@sentio/sdk/src/test/codegen.test.ts +0 -29
- package/template/node_modules/@sentio/sdk/src/test/erc20-template.test.ts +0 -37
- package/template/node_modules/@sentio/sdk/src/test/erc20-template.ts +0 -25
- package/template/node_modules/@sentio/sdk/src/test/erc20.test.ts +0 -117
- package/template/node_modules/@sentio/sdk/src/test/erc20.ts +0 -50
- package/template/node_modules/@sentio/sdk/src/test/generic-processor.test.ts +0 -70
- package/template/node_modules/@sentio/sdk/src/test/index.ts +0 -2
- package/template/node_modules/@sentio/sdk/src/test/metric-utils.ts +0 -49
- package/template/node_modules/@sentio/sdk/src/test/mirrorworld.ts +0 -40
- package/template/node_modules/@sentio/sdk/src/test/sentio.yaml +0 -4
- package/template/node_modules/@sentio/sdk/src/test/solana.test.ts +0 -93
- package/template/node_modules/@sentio/sdk/src/test/test-processor-server.ts +0 -258
- package/template/node_modules/@sentio/sdk/src/test/test-provider.ts +0 -25
- package/template/node_modules/@sentio/sdk/src/test/types/game_wallet.ts +0 -1392
- package/template/node_modules/@sentio/sdk/src/test/types/game_wallet_processor.ts +0 -113
- package/template/node_modules/@sentio/sdk/src/test/wormhole-token-bridge.ts +0 -21
- package/template/node_modules/@sentio/sdk/src/trace.ts +0 -86
- package/template/node_modules/@sentio/sdk/src/types/global.d.ts +0 -17
- package/template/node_modules/@sentio/sdk/src/utils/chainmap.ts +0 -95
- package/template/node_modules/@sentio/sdk/src/utils/convert.ts +0 -26
- package/template/node_modules/@sentio/sdk/src/utils/erc20.test.ts +0 -26
- package/template/node_modules/@sentio/sdk/src/utils/erc20.ts +0 -66
- package/template/node_modules/@sentio/sdk/src/utils/index.ts +0 -3
- package/template/node_modules/base-x/LICENSE.md +0 -22
- package/template/node_modules/base-x/README.md +0 -73
- package/template/node_modules/base-x/package.json +0 -46
- package/template/node_modules/base-x/src/index.d.ts +0 -9
- package/template/node_modules/base-x/src/index.js +0 -121
- package/template/node_modules/bs58/CHANGELOG.md +0 -65
- package/template/node_modules/bs58/LICENSE +0 -21
- package/template/node_modules/bs58/README.md +0 -91
- package/template/node_modules/bs58/index.d.ts +0 -5
- package/template/node_modules/bs58/index.js +0 -4
- package/template/node_modules/bs58/package.json +0 -39
- package/template/src/types/internal/X2y2.ts +0 -684
- package/template/src/types/internal/common.ts +0 -46
- package/template/src/types/internal/factories/X2y2__factory.ts +0 -436
- package/template/src/types/internal/factories/index.ts +0 -4
- package/template/src/types/internal/index.ts +0 -6
- package/template/src/types/internal/x2y2_processor.ts +0 -1004
- package/template/src/types/x2y2/index.ts +0 -6
- package/template/src/types/x2y2/test-utils.ts +0 -89
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"constant": true,
|
|
4
|
-
"inputs": [],
|
|
5
|
-
"name": "name",
|
|
6
|
-
"outputs": [
|
|
7
|
-
{
|
|
8
|
-
"name": "",
|
|
9
|
-
"type": "bytes32"
|
|
10
|
-
}
|
|
11
|
-
],
|
|
12
|
-
"payable": false,
|
|
13
|
-
"stateMutability": "view",
|
|
14
|
-
"type": "function"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"constant": false,
|
|
18
|
-
"inputs": [
|
|
19
|
-
{
|
|
20
|
-
"name": "spender",
|
|
21
|
-
"type": "address"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"name": "value",
|
|
25
|
-
"type": "uint256"
|
|
26
|
-
}
|
|
27
|
-
],
|
|
28
|
-
"name": "approve",
|
|
29
|
-
"outputs": [
|
|
30
|
-
{
|
|
31
|
-
"name": "",
|
|
32
|
-
"type": "bool"
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
"payable": false,
|
|
36
|
-
"stateMutability": "nonpayable",
|
|
37
|
-
"type": "function"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"constant": true,
|
|
41
|
-
"inputs": [],
|
|
42
|
-
"name": "totalSupply",
|
|
43
|
-
"outputs": [
|
|
44
|
-
{
|
|
45
|
-
"name": "",
|
|
46
|
-
"type": "uint256"
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
"payable": false,
|
|
50
|
-
"stateMutability": "view",
|
|
51
|
-
"type": "function"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"constant": false,
|
|
55
|
-
"inputs": [
|
|
56
|
-
{
|
|
57
|
-
"name": "from",
|
|
58
|
-
"type": "address"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"name": "to",
|
|
62
|
-
"type": "address"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"name": "value",
|
|
66
|
-
"type": "uint256"
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
"name": "transferFrom",
|
|
70
|
-
"outputs": [
|
|
71
|
-
{
|
|
72
|
-
"name": "",
|
|
73
|
-
"type": "bool"
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
"payable": false,
|
|
77
|
-
"stateMutability": "nonpayable",
|
|
78
|
-
"type": "function"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"constant": true,
|
|
82
|
-
"inputs": [],
|
|
83
|
-
"name": "decimals",
|
|
84
|
-
"outputs": [
|
|
85
|
-
{
|
|
86
|
-
"name": "",
|
|
87
|
-
"type": "uint8"
|
|
88
|
-
}
|
|
89
|
-
],
|
|
90
|
-
"payable": false,
|
|
91
|
-
"stateMutability": "view",
|
|
92
|
-
"type": "function"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"constant": true,
|
|
96
|
-
"inputs": [
|
|
97
|
-
{
|
|
98
|
-
"name": "who",
|
|
99
|
-
"type": "address"
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
"name": "balanceOf",
|
|
103
|
-
"outputs": [
|
|
104
|
-
{
|
|
105
|
-
"name": "",
|
|
106
|
-
"type": "uint256"
|
|
107
|
-
}
|
|
108
|
-
],
|
|
109
|
-
"payable": false,
|
|
110
|
-
"stateMutability": "view",
|
|
111
|
-
"type": "function"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"constant": true,
|
|
115
|
-
"inputs": [],
|
|
116
|
-
"name": "symbol",
|
|
117
|
-
"outputs": [
|
|
118
|
-
{
|
|
119
|
-
"name": "",
|
|
120
|
-
"type": "bytes32"
|
|
121
|
-
}
|
|
122
|
-
],
|
|
123
|
-
"payable": false,
|
|
124
|
-
"stateMutability": "view",
|
|
125
|
-
"type": "function"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"constant": false,
|
|
129
|
-
"inputs": [
|
|
130
|
-
{
|
|
131
|
-
"name": "to",
|
|
132
|
-
"type": "address"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"name": "value",
|
|
136
|
-
"type": "uint256"
|
|
137
|
-
}
|
|
138
|
-
],
|
|
139
|
-
"name": "transfer",
|
|
140
|
-
"outputs": [
|
|
141
|
-
{
|
|
142
|
-
"name": "",
|
|
143
|
-
"type": "bool"
|
|
144
|
-
}
|
|
145
|
-
],
|
|
146
|
-
"payable": false,
|
|
147
|
-
"stateMutability": "nonpayable",
|
|
148
|
-
"type": "function"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"constant": true,
|
|
152
|
-
"inputs": [
|
|
153
|
-
{
|
|
154
|
-
"name": "owner",
|
|
155
|
-
"type": "address"
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"name": "spender",
|
|
159
|
-
"type": "address"
|
|
160
|
-
}
|
|
161
|
-
],
|
|
162
|
-
"name": "allowance",
|
|
163
|
-
"outputs": [
|
|
164
|
-
{
|
|
165
|
-
"name": "",
|
|
166
|
-
"type": "uint256"
|
|
167
|
-
}
|
|
168
|
-
],
|
|
169
|
-
"payable": false,
|
|
170
|
-
"stateMutability": "view",
|
|
171
|
-
"type": "function"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"inputs": [
|
|
175
|
-
{
|
|
176
|
-
"name": "_name",
|
|
177
|
-
"type": "string"
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
"name": "_symbol",
|
|
181
|
-
"type": "string"
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
"name": "_decimals",
|
|
185
|
-
"type": "uint8"
|
|
186
|
-
}
|
|
187
|
-
],
|
|
188
|
-
"payable": false,
|
|
189
|
-
"stateMutability": "nonpayable",
|
|
190
|
-
"type": "constructor"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"anonymous": false,
|
|
194
|
-
"inputs": [
|
|
195
|
-
{
|
|
196
|
-
"indexed": true,
|
|
197
|
-
"name": "owner",
|
|
198
|
-
"type": "address"
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
"indexed": true,
|
|
202
|
-
"name": "spender",
|
|
203
|
-
"type": "address"
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
"indexed": false,
|
|
207
|
-
"name": "value",
|
|
208
|
-
"type": "uint256"
|
|
209
|
-
}
|
|
210
|
-
],
|
|
211
|
-
"name": "Approval",
|
|
212
|
-
"type": "event"
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
"anonymous": false,
|
|
216
|
-
"inputs": [
|
|
217
|
-
{
|
|
218
|
-
"indexed": true,
|
|
219
|
-
"name": "from",
|
|
220
|
-
"type": "address"
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
"indexed": true,
|
|
224
|
-
"name": "to",
|
|
225
|
-
"type": "address"
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
"indexed": false,
|
|
229
|
-
"name": "value",
|
|
230
|
-
"type": "uint256"
|
|
231
|
-
}
|
|
232
|
-
],
|
|
233
|
-
"name": "Transfer",
|
|
234
|
-
"type": "event"
|
|
235
|
-
}
|
|
236
|
-
]
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"constant": true,
|
|
4
|
-
"inputs": [],
|
|
5
|
-
"name": "name",
|
|
6
|
-
"outputs": [{ "name": "", "type": "string" }],
|
|
7
|
-
"payable": false,
|
|
8
|
-
"stateMutability": "view",
|
|
9
|
-
"type": "function"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"constant": false,
|
|
13
|
-
"inputs": [
|
|
14
|
-
{ "name": "guy", "type": "address" },
|
|
15
|
-
{ "name": "wad", "type": "uint256" }
|
|
16
|
-
],
|
|
17
|
-
"name": "approve",
|
|
18
|
-
"outputs": [{ "name": "", "type": "bool" }],
|
|
19
|
-
"payable": false,
|
|
20
|
-
"stateMutability": "nonpayable",
|
|
21
|
-
"type": "function"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"constant": true,
|
|
25
|
-
"inputs": [],
|
|
26
|
-
"name": "totalSupply",
|
|
27
|
-
"outputs": [{ "name": "", "type": "uint256" }],
|
|
28
|
-
"payable": false,
|
|
29
|
-
"stateMutability": "view",
|
|
30
|
-
"type": "function"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"constant": false,
|
|
34
|
-
"inputs": [
|
|
35
|
-
{ "name": "src", "type": "address" },
|
|
36
|
-
{ "name": "dst", "type": "address" },
|
|
37
|
-
{ "name": "wad", "type": "uint256" }
|
|
38
|
-
],
|
|
39
|
-
"name": "transferFrom",
|
|
40
|
-
"outputs": [{ "name": "", "type": "bool" }],
|
|
41
|
-
"payable": false,
|
|
42
|
-
"stateMutability": "nonpayable",
|
|
43
|
-
"type": "function"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"constant": false,
|
|
47
|
-
"inputs": [{ "name": "wad", "type": "uint256" }],
|
|
48
|
-
"name": "withdraw",
|
|
49
|
-
"outputs": [],
|
|
50
|
-
"payable": false,
|
|
51
|
-
"stateMutability": "nonpayable",
|
|
52
|
-
"type": "function"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"constant": true,
|
|
56
|
-
"inputs": [],
|
|
57
|
-
"name": "decimals",
|
|
58
|
-
"outputs": [{ "name": "", "type": "uint8" }],
|
|
59
|
-
"payable": false,
|
|
60
|
-
"stateMutability": "view",
|
|
61
|
-
"type": "function"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"constant": true,
|
|
65
|
-
"inputs": [{ "name": "", "type": "address" }],
|
|
66
|
-
"name": "balanceOf",
|
|
67
|
-
"outputs": [{ "name": "", "type": "uint256" }],
|
|
68
|
-
"payable": false,
|
|
69
|
-
"stateMutability": "view",
|
|
70
|
-
"type": "function"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"constant": true,
|
|
74
|
-
"inputs": [],
|
|
75
|
-
"name": "symbol",
|
|
76
|
-
"outputs": [{ "name": "", "type": "string" }],
|
|
77
|
-
"payable": false,
|
|
78
|
-
"stateMutability": "view",
|
|
79
|
-
"type": "function"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"constant": false,
|
|
83
|
-
"inputs": [
|
|
84
|
-
{ "name": "dst", "type": "address" },
|
|
85
|
-
{ "name": "wad", "type": "uint256" }
|
|
86
|
-
],
|
|
87
|
-
"name": "transfer",
|
|
88
|
-
"outputs": [{ "name": "", "type": "bool" }],
|
|
89
|
-
"payable": false,
|
|
90
|
-
"stateMutability": "nonpayable",
|
|
91
|
-
"type": "function"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"constant": false,
|
|
95
|
-
"inputs": [],
|
|
96
|
-
"name": "deposit",
|
|
97
|
-
"outputs": [],
|
|
98
|
-
"payable": true,
|
|
99
|
-
"stateMutability": "payable",
|
|
100
|
-
"type": "function"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"constant": true,
|
|
104
|
-
"inputs": [
|
|
105
|
-
{ "name": "", "type": "address" },
|
|
106
|
-
{ "name": "", "type": "address" }
|
|
107
|
-
],
|
|
108
|
-
"name": "allowance",
|
|
109
|
-
"outputs": [{ "name": "", "type": "uint256" }],
|
|
110
|
-
"payable": false,
|
|
111
|
-
"stateMutability": "view",
|
|
112
|
-
"type": "function"
|
|
113
|
-
},
|
|
114
|
-
{ "payable": true, "stateMutability": "payable", "type": "fallback" },
|
|
115
|
-
{
|
|
116
|
-
"anonymous": false,
|
|
117
|
-
"inputs": [
|
|
118
|
-
{ "indexed": true, "name": "src", "type": "address" },
|
|
119
|
-
{ "indexed": true, "name": "guy", "type": "address" },
|
|
120
|
-
{ "indexed": false, "name": "wad", "type": "uint256" }
|
|
121
|
-
],
|
|
122
|
-
"name": "Approval",
|
|
123
|
-
"type": "event"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"anonymous": false,
|
|
127
|
-
"inputs": [
|
|
128
|
-
{ "indexed": true, "name": "src", "type": "address" },
|
|
129
|
-
{ "indexed": true, "name": "dst", "type": "address" },
|
|
130
|
-
{ "indexed": false, "name": "wad", "type": "uint256" }
|
|
131
|
-
],
|
|
132
|
-
"name": "Transfer",
|
|
133
|
-
"type": "event"
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"anonymous": false,
|
|
137
|
-
"inputs": [
|
|
138
|
-
{ "indexed": true, "name": "dst", "type": "address" },
|
|
139
|
-
{ "indexed": false, "name": "wad", "type": "uint256" }
|
|
140
|
-
],
|
|
141
|
-
"name": "Deposit",
|
|
142
|
-
"type": "event"
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
"anonymous": false,
|
|
146
|
-
"inputs": [
|
|
147
|
-
{ "indexed": true, "name": "src", "type": "address" },
|
|
148
|
-
{ "indexed": false, "name": "wad", "type": "uint256" }
|
|
149
|
-
],
|
|
150
|
-
"name": "Withdrawal",
|
|
151
|
-
"type": "event"
|
|
152
|
-
}
|
|
153
|
-
]
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { BoundContractView, Context, ContractView } from './context'
|
|
2
|
-
import { Block } from '@ethersproject/abstract-provider'
|
|
3
|
-
import { BaseContract, EventFilter } from 'ethers'
|
|
4
|
-
import { Event } from '@ethersproject/contracts'
|
|
5
|
-
import { BaseProcessor } from './base-processor'
|
|
6
|
-
import { BindOptions, getOptionsSignature } from './bind-options'
|
|
7
|
-
import { TemplateInstance } from './gen/processor/protos/processor'
|
|
8
|
-
import Long from 'long'
|
|
9
|
-
import { getNetwork } from '@ethersproject/providers'
|
|
10
|
-
import { PromiseOrVoid } from './promise-or-void'
|
|
11
|
-
import { Trace } from './trace'
|
|
12
|
-
|
|
13
|
-
export abstract class BaseProcessorTemplate<
|
|
14
|
-
TContract extends BaseContract,
|
|
15
|
-
TBoundContractView extends BoundContractView<TContract, ContractView<TContract>>
|
|
16
|
-
> {
|
|
17
|
-
id: number
|
|
18
|
-
binds = new Set<string>()
|
|
19
|
-
blockHandlers: ((block: Block, ctx: Context<TContract, TBoundContractView>) => PromiseOrVoid)[] = []
|
|
20
|
-
traceHandlers: {
|
|
21
|
-
signature: string
|
|
22
|
-
handler: (trace: Trace, ctx: Context<TContract, TBoundContractView>) => PromiseOrVoid
|
|
23
|
-
}[] = []
|
|
24
|
-
eventHandlers: {
|
|
25
|
-
handler: (event: Event, ctx: Context<TContract, TBoundContractView>) => PromiseOrVoid
|
|
26
|
-
filter: EventFilter | EventFilter[]
|
|
27
|
-
}[] = []
|
|
28
|
-
|
|
29
|
-
constructor() {
|
|
30
|
-
this.id = global.PROCESSOR_STATE.templates.length
|
|
31
|
-
global.PROCESSOR_STATE.templates.push(this)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
public bind(options: BindOptions) {
|
|
35
|
-
const sig = getOptionsSignature(options)
|
|
36
|
-
if (this.binds.has(sig)) {
|
|
37
|
-
return
|
|
38
|
-
}
|
|
39
|
-
this.binds.add(sig)
|
|
40
|
-
|
|
41
|
-
const processor = this.bindInternal(options)
|
|
42
|
-
|
|
43
|
-
for (const eh of this.eventHandlers) {
|
|
44
|
-
processor.onEvent(eh.handler, eh.filter)
|
|
45
|
-
}
|
|
46
|
-
for (const bh of this.blockHandlers) {
|
|
47
|
-
processor.onBlock(bh)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const instance: TemplateInstance = {
|
|
51
|
-
templateId: this.id,
|
|
52
|
-
contract: {
|
|
53
|
-
address: options.address,
|
|
54
|
-
name: options.name || '',
|
|
55
|
-
chainId: options.network ? getNetwork(options.network).chainId.toString() : '1',
|
|
56
|
-
abi: '',
|
|
57
|
-
},
|
|
58
|
-
startBlock: Long.ZERO,
|
|
59
|
-
endBlock: Long.ZERO,
|
|
60
|
-
}
|
|
61
|
-
if (options.startBlock) {
|
|
62
|
-
if (typeof options.startBlock === 'number') {
|
|
63
|
-
instance.startBlock = Long.fromNumber(options.startBlock)
|
|
64
|
-
} else {
|
|
65
|
-
instance.startBlock = options.startBlock
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
if (options.endBlock) {
|
|
69
|
-
if (typeof options.endBlock === 'number') {
|
|
70
|
-
instance.endBlock = Long.fromNumber(options.endBlock)
|
|
71
|
-
} else {
|
|
72
|
-
instance.endBlock = options.endBlock
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
global.PROCESSOR_STATE.templatesInstances.push(instance)
|
|
76
|
-
|
|
77
|
-
return processor
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
public onEvent(
|
|
81
|
-
handler: (event: Event, ctx: Context<TContract, TBoundContractView>) => PromiseOrVoid,
|
|
82
|
-
filter: EventFilter | EventFilter[]
|
|
83
|
-
) {
|
|
84
|
-
this.eventHandlers.push({
|
|
85
|
-
handler: handler,
|
|
86
|
-
filter: filter,
|
|
87
|
-
})
|
|
88
|
-
return this
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
public onBlock(handler: (block: Block, ctx: Context<TContract, TBoundContractView>) => PromiseOrVoid) {
|
|
92
|
-
this.blockHandlers.push(handler)
|
|
93
|
-
return this
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
public onTrace(
|
|
97
|
-
signature: string,
|
|
98
|
-
handler: (trace: Trace, ctx: Context<TContract, TBoundContractView>) => PromiseOrVoid
|
|
99
|
-
) {
|
|
100
|
-
this.traceHandlers.push({ signature, handler })
|
|
101
|
-
return this
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
protected abstract bindInternal(options: BindOptions): BaseProcessor<TContract, TBoundContractView>
|
|
105
|
-
}
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { Event } from '@ethersproject/contracts'
|
|
2
|
-
import { BytesLike } from '@ethersproject/bytes'
|
|
3
|
-
import { Block, Log, getNetwork } from '@ethersproject/providers'
|
|
4
|
-
import { BaseContract, EventFilter } from '@ethersproject/contracts'
|
|
5
|
-
import Long from 'long'
|
|
6
|
-
|
|
7
|
-
import { BoundContractView, Context, ContractView } from './context'
|
|
8
|
-
import { ProcessResult } from './gen/processor/protos/processor'
|
|
9
|
-
import { BindInternalOptions, BindOptions } from './bind-options'
|
|
10
|
-
import { PromiseOrVoid } from './promise-or-void'
|
|
11
|
-
import { Trace } from './trace'
|
|
12
|
-
|
|
13
|
-
export class EventsHandler {
|
|
14
|
-
filters: EventFilter[]
|
|
15
|
-
handler: (event: Log) => Promise<ProcessResult>
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export class TraceHandler {
|
|
19
|
-
signature: string
|
|
20
|
-
handler: (trace: Trace) => Promise<ProcessResult>
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export abstract class BaseProcessor<
|
|
24
|
-
TContract extends BaseContract,
|
|
25
|
-
TBoundContractView extends BoundContractView<TContract, ContractView<TContract>>
|
|
26
|
-
> {
|
|
27
|
-
blockHandlers: ((block: Block) => Promise<ProcessResult>)[] = []
|
|
28
|
-
eventHandlers: EventsHandler[] = []
|
|
29
|
-
traceHandlers: TraceHandler[] = []
|
|
30
|
-
|
|
31
|
-
name: string
|
|
32
|
-
config: BindInternalOptions
|
|
33
|
-
|
|
34
|
-
constructor(config: BindOptions) {
|
|
35
|
-
this.config = {
|
|
36
|
-
address: config.address,
|
|
37
|
-
name: config.name || '',
|
|
38
|
-
network: config.network ? config.network : 1,
|
|
39
|
-
startBlock: new Long(0),
|
|
40
|
-
}
|
|
41
|
-
if (config.startBlock) {
|
|
42
|
-
if (typeof config.startBlock === 'number') {
|
|
43
|
-
this.config.startBlock = Long.fromNumber(config.startBlock)
|
|
44
|
-
} else {
|
|
45
|
-
this.config.startBlock = config.startBlock
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
if (config.endBlock) {
|
|
49
|
-
if (typeof config.endBlock === 'number') {
|
|
50
|
-
this.config.endBlock = Long.fromNumber(config.endBlock)
|
|
51
|
-
} else {
|
|
52
|
-
this.config.endBlock = config.endBlock
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
protected abstract CreateBoundContractView(): TBoundContractView
|
|
58
|
-
|
|
59
|
-
public getChainId(): number {
|
|
60
|
-
return getNetwork(this.config.network).chainId
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
public onEvent(
|
|
64
|
-
handler: (event: Event, ctx: Context<TContract, TBoundContractView>) => PromiseOrVoid,
|
|
65
|
-
filter: EventFilter | EventFilter[]
|
|
66
|
-
) {
|
|
67
|
-
const chainId = this.getChainId()
|
|
68
|
-
|
|
69
|
-
let _filters: EventFilter[] = []
|
|
70
|
-
|
|
71
|
-
if (Array.isArray(filter)) {
|
|
72
|
-
_filters = filter
|
|
73
|
-
} else {
|
|
74
|
-
_filters.push(filter)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const contractView = this.CreateBoundContractView()
|
|
78
|
-
this.eventHandlers.push({
|
|
79
|
-
filters: _filters,
|
|
80
|
-
handler: async function (log) {
|
|
81
|
-
const ctx = new Context<TContract, TBoundContractView>(contractView, chainId, undefined, log)
|
|
82
|
-
// let event: Event = <Event>deepCopy(log);
|
|
83
|
-
const event: Event = <Event>log
|
|
84
|
-
const parsed = contractView.rawContract.interface.parseLog(log)
|
|
85
|
-
if (parsed) {
|
|
86
|
-
event.args = parsed.args
|
|
87
|
-
event.decode = (data: BytesLike, topics?: Array<any>) => {
|
|
88
|
-
return contractView.rawContract.interface.decodeEventLog(parsed.eventFragment, data, topics)
|
|
89
|
-
}
|
|
90
|
-
event.event = parsed.name
|
|
91
|
-
event.eventSignature = parsed.signature
|
|
92
|
-
|
|
93
|
-
// TODO fix this bug
|
|
94
|
-
await handler(event, ctx)
|
|
95
|
-
return {
|
|
96
|
-
gauges: ctx.gauges,
|
|
97
|
-
counters: ctx.counters,
|
|
98
|
-
logs: [],
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return {
|
|
102
|
-
gauges: [],
|
|
103
|
-
counters: [],
|
|
104
|
-
logs: [],
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
})
|
|
108
|
-
return this
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
public onBlock(handler: (block: Block, ctx: Context<TContract, TBoundContractView>) => PromiseOrVoid) {
|
|
112
|
-
const chainId = this.getChainId()
|
|
113
|
-
const contractView = this.CreateBoundContractView()
|
|
114
|
-
|
|
115
|
-
this.blockHandlers.push(async function (block: Block) {
|
|
116
|
-
const ctx = new Context<TContract, TBoundContractView>(contractView, chainId, block, undefined)
|
|
117
|
-
await handler(block, ctx)
|
|
118
|
-
return {
|
|
119
|
-
gauges: ctx.gauges,
|
|
120
|
-
counters: ctx.counters,
|
|
121
|
-
logs: [],
|
|
122
|
-
}
|
|
123
|
-
})
|
|
124
|
-
return this
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
public onAllEvents(handler: (event: Log, ctx: Context<TContract, TBoundContractView>) => PromiseOrVoid) {
|
|
128
|
-
const _filters: EventFilter[] = []
|
|
129
|
-
const tmpContract = this.CreateBoundContractView()
|
|
130
|
-
|
|
131
|
-
for (const key in tmpContract.filters) {
|
|
132
|
-
_filters.push(tmpContract.filters[key]())
|
|
133
|
-
}
|
|
134
|
-
return this.onEvent(function (log, ctx) {
|
|
135
|
-
return handler(log, ctx)
|
|
136
|
-
}, _filters)
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
protected onTrace(
|
|
140
|
-
signature: string,
|
|
141
|
-
handler: (trace: Trace, ctx: Context<TContract, TBoundContractView>) => PromiseOrVoid
|
|
142
|
-
) {
|
|
143
|
-
const chainId = this.getChainId()
|
|
144
|
-
const contractView = this.CreateBoundContractView()
|
|
145
|
-
|
|
146
|
-
this.traceHandlers.push({
|
|
147
|
-
signature,
|
|
148
|
-
handler: async function (trace: Trace) {
|
|
149
|
-
const contractInterface = contractView.rawContract.interface
|
|
150
|
-
const fragment = contractInterface.getFunction(signature)
|
|
151
|
-
if (!trace.action.input) {
|
|
152
|
-
return {
|
|
153
|
-
gauges: [],
|
|
154
|
-
counters: [],
|
|
155
|
-
logs: [],
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
const traceData = '0x' + trace.action.input.slice(10)
|
|
159
|
-
trace.args = contractInterface._abiCoder.decode(fragment.inputs, traceData)
|
|
160
|
-
|
|
161
|
-
const ctx = new Context<TContract, TBoundContractView>(contractView, chainId, undefined, undefined, trace)
|
|
162
|
-
await handler(trace, ctx)
|
|
163
|
-
return {
|
|
164
|
-
gauges: ctx.gauges,
|
|
165
|
-
counters: ctx.counters,
|
|
166
|
-
logs: [],
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
})
|
|
170
|
-
return this
|
|
171
|
-
}
|
|
172
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Networkish } from '@ethersproject/networks'
|
|
2
|
-
import Long from 'long'
|
|
3
|
-
import { getNetwork } from '@ethersproject/providers'
|
|
4
|
-
|
|
5
|
-
export class BindOptions {
|
|
6
|
-
address: string
|
|
7
|
-
network?: Networkish = 1
|
|
8
|
-
name?: string
|
|
9
|
-
startBlock?: Long | number
|
|
10
|
-
endBlock?: Long | number
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function getOptionsSignature(opts: BindOptions): string {
|
|
14
|
-
const sig = [opts.address]
|
|
15
|
-
if (opts.network) {
|
|
16
|
-
sig.push(getNetwork(opts.network).chainId.toString())
|
|
17
|
-
}
|
|
18
|
-
if (opts.name) {
|
|
19
|
-
sig.push(opts.name)
|
|
20
|
-
}
|
|
21
|
-
if (opts.startBlock) {
|
|
22
|
-
sig.push(opts.startBlock.toString())
|
|
23
|
-
}
|
|
24
|
-
if (opts.endBlock) {
|
|
25
|
-
sig.push(opts.endBlock.toString())
|
|
26
|
-
}
|
|
27
|
-
return sig.join('_')
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export class BindInternalOptions {
|
|
31
|
-
address: string
|
|
32
|
-
network: Networkish
|
|
33
|
-
name: string
|
|
34
|
-
startBlock: Long
|
|
35
|
-
endBlock?: Long
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export class SolanaBindOptions extends BindOptions {
|
|
39
|
-
declare network?: string
|
|
40
|
-
processInnerInstruction?: boolean
|
|
41
|
-
}
|