@sentio/sdk 1.13.1 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli/commands/run-create.js +2 -0
- package/lib/cli/commands/run-create.js.map +1 -1
- package/lib/gen/processor/protos/processor.d.ts +0 -1
- package/lib/gen/processor/protos/processor.js +0 -10
- package/lib/gen/processor/protos/processor.js.map +1 -1
- package/lib/meter.js +0 -5
- package/lib/meter.js.map +1 -1
- package/lib/test/metric-utils.js +2 -2
- package/lib/test/metric-utils.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/commands/run-create.ts +3 -0
- package/src/gen/processor/protos/processor.ts +0 -11
- package/src/meter.ts +0 -5
- package/src/test/metric-utils.ts +2 -2
- 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,205 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.TestProcessorServer = void 0;
|
|
7
|
-
const sdk_1 = require("@sentio/sdk");
|
|
8
|
-
const chainmap_1 = require("../utils/chainmap");
|
|
9
|
-
const long_1 = __importDefault(require("long"));
|
|
10
|
-
const providers_1 = require("@ethersproject/providers");
|
|
11
|
-
const TEST_CONTEXT = {};
|
|
12
|
-
function cleanTest() {
|
|
13
|
-
global.PROCESSOR_STATE = new sdk_1.ProcessorState();
|
|
14
|
-
}
|
|
15
|
-
class TestProcessorServer {
|
|
16
|
-
service;
|
|
17
|
-
contractConfig;
|
|
18
|
-
constructor(loader, httpEndpoints = {}) {
|
|
19
|
-
cleanTest();
|
|
20
|
-
this.service = new sdk_1.ProcessorServiceImpl(loader);
|
|
21
|
-
const dummyConfig = {};
|
|
22
|
-
for (const k in chainmap_1.CHAIN_MAP) {
|
|
23
|
-
const http = httpEndpoints[k] || '';
|
|
24
|
-
dummyConfig[k] = {
|
|
25
|
-
ChainID: k,
|
|
26
|
-
Https: [http],
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
(0, sdk_1.setProvider)(dummyConfig);
|
|
30
|
-
}
|
|
31
|
-
async start(request = { templateInstances: [] }, context = TEST_CONTEXT) {
|
|
32
|
-
const res = await this.service.start(request, context);
|
|
33
|
-
this.contractConfig = (await this.getConfig({})).contractConfigs;
|
|
34
|
-
return res;
|
|
35
|
-
}
|
|
36
|
-
stop(request, context = TEST_CONTEXT) {
|
|
37
|
-
return this.service.stop(request, context);
|
|
38
|
-
}
|
|
39
|
-
getConfig(request, context = TEST_CONTEXT) {
|
|
40
|
-
return this.service.getConfig(request, context);
|
|
41
|
-
}
|
|
42
|
-
processBlocks(request, context = TEST_CONTEXT) {
|
|
43
|
-
return this.service.processBlocks(request, context);
|
|
44
|
-
}
|
|
45
|
-
processInstructions(request, context = TEST_CONTEXT) {
|
|
46
|
-
return this.service.processInstructions(request, context);
|
|
47
|
-
}
|
|
48
|
-
processLogs(request, context = TEST_CONTEXT) {
|
|
49
|
-
return this.service.processLogs(request, context);
|
|
50
|
-
}
|
|
51
|
-
processTraces(request, context = TEST_CONTEXT) {
|
|
52
|
-
return this.service.processTraces(request, context);
|
|
53
|
-
}
|
|
54
|
-
processTransactions(request, context = TEST_CONTEXT) {
|
|
55
|
-
return this.service.processTransactions(request, context);
|
|
56
|
-
}
|
|
57
|
-
testTrace(trace, network = 1) {
|
|
58
|
-
return this.testTraces([trace], network);
|
|
59
|
-
}
|
|
60
|
-
testTraces(traces, network = 1) {
|
|
61
|
-
const bindings = [];
|
|
62
|
-
for (const trace of traces) {
|
|
63
|
-
const binding = this.buildTraceBinding(trace, network);
|
|
64
|
-
if (!binding) {
|
|
65
|
-
throw Error('Invalid test trace: ' + JSON.stringify(trace));
|
|
66
|
-
}
|
|
67
|
-
bindings.push(binding);
|
|
68
|
-
}
|
|
69
|
-
return this.processTraces({
|
|
70
|
-
traceBindings: bindings,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
buildTraceBinding(trace, network = 1) {
|
|
74
|
-
if (trace.type !== 'call' || !trace.action.input) {
|
|
75
|
-
throw Error('Invalid test trace: ' + JSON.stringify(trace));
|
|
76
|
-
}
|
|
77
|
-
const signature = trace.action.input.slice(0, 10);
|
|
78
|
-
for (const contract of this.contractConfig) {
|
|
79
|
-
if (contract.contract?.chainId !== (0, providers_1.getNetwork)(network).chainId.toString()) {
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
if (trace.action.to?.toLowerCase() !== contract.contract?.address.toLowerCase()) {
|
|
83
|
-
continue;
|
|
84
|
-
}
|
|
85
|
-
for (const config of contract.traceConfigs) {
|
|
86
|
-
if (config.signature == signature) {
|
|
87
|
-
return {
|
|
88
|
-
trace: {
|
|
89
|
-
raw: toBytes(trace),
|
|
90
|
-
},
|
|
91
|
-
handlerId: config.handlerId,
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return undefined;
|
|
97
|
-
}
|
|
98
|
-
testLog(log, network = 1) {
|
|
99
|
-
return this.testLogs([log], network);
|
|
100
|
-
}
|
|
101
|
-
testLogs(logs, network = 1) {
|
|
102
|
-
const bindings = [];
|
|
103
|
-
for (const log of logs) {
|
|
104
|
-
const binding = this.buildLogBinding(log, network);
|
|
105
|
-
if (!binding) {
|
|
106
|
-
throw Error('Invalid test log: ' + JSON.stringify(log));
|
|
107
|
-
}
|
|
108
|
-
bindings.push(binding);
|
|
109
|
-
}
|
|
110
|
-
return this.processLogs({
|
|
111
|
-
logBindings: bindings,
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
buildLogBinding(log, network = 1) {
|
|
115
|
-
for (const contract of this.contractConfig) {
|
|
116
|
-
if (contract.contract?.chainId !== (0, providers_1.getNetwork)(network).chainId.toString()) {
|
|
117
|
-
continue;
|
|
118
|
-
}
|
|
119
|
-
if (log.address.toLowerCase() !== contract.contract?.address.toLowerCase()) {
|
|
120
|
-
continue;
|
|
121
|
-
}
|
|
122
|
-
for (const config of contract.logConfigs) {
|
|
123
|
-
for (const filter of config.filters) {
|
|
124
|
-
// if (filter.topics.length != log.topics.length) {
|
|
125
|
-
// continue
|
|
126
|
-
// }
|
|
127
|
-
let match = true;
|
|
128
|
-
for (const topicIdx in filter.topics) {
|
|
129
|
-
const logTopic = log.topics[topicIdx];
|
|
130
|
-
const possibleTopic = filter.topics[topicIdx].hashes;
|
|
131
|
-
if (possibleTopic.length === 0) {
|
|
132
|
-
// match all
|
|
133
|
-
continue;
|
|
134
|
-
}
|
|
135
|
-
if (possibleTopic.find((e) => e.toLowerCase() === logTopic.toLowerCase())) {
|
|
136
|
-
// find one
|
|
137
|
-
continue;
|
|
138
|
-
}
|
|
139
|
-
match = false;
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
if (match) {
|
|
143
|
-
return {
|
|
144
|
-
log: {
|
|
145
|
-
raw: toBytes(log),
|
|
146
|
-
},
|
|
147
|
-
handlerId: config.handlerId,
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
return undefined;
|
|
154
|
-
}
|
|
155
|
-
testBlock(block, network = 1) {
|
|
156
|
-
return this.testBlocks([block], network);
|
|
157
|
-
}
|
|
158
|
-
testBlocks(blocks, network = 1) {
|
|
159
|
-
const bindings = [];
|
|
160
|
-
for (const block of blocks) {
|
|
161
|
-
const binding = this.buildBlockBinding(block, network);
|
|
162
|
-
if (!binding) {
|
|
163
|
-
throw Error('Invalid test block: ' + JSON.stringify(block));
|
|
164
|
-
}
|
|
165
|
-
bindings.push(binding);
|
|
166
|
-
}
|
|
167
|
-
return this.processBlocks({
|
|
168
|
-
blockBindings: bindings,
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
buildBlockBinding(block, network = 1) {
|
|
172
|
-
const binding = {
|
|
173
|
-
block: {
|
|
174
|
-
raw: toBytes(block),
|
|
175
|
-
},
|
|
176
|
-
handlerIds: [],
|
|
177
|
-
};
|
|
178
|
-
for (const contract of this.contractConfig) {
|
|
179
|
-
if (contract.contract?.chainId !== (0, providers_1.getNetwork)(network).chainId.toString()) {
|
|
180
|
-
continue;
|
|
181
|
-
}
|
|
182
|
-
const longBlockNumber = long_1.default.fromNumber(block.number);
|
|
183
|
-
if (longBlockNumber < contract.startBlock) {
|
|
184
|
-
continue;
|
|
185
|
-
}
|
|
186
|
-
if (contract.endBlock !== long_1.default.ZERO && longBlockNumber >= contract.endBlock) {
|
|
187
|
-
continue;
|
|
188
|
-
}
|
|
189
|
-
for (const config of contract.blockConfigs) {
|
|
190
|
-
binding.handlerIds.push(config.handlerId);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
return binding;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
exports.TestProcessorServer = TestProcessorServer;
|
|
197
|
-
function toBytes(obj) {
|
|
198
|
-
const logJsonStr = JSON.stringify(obj);
|
|
199
|
-
const raw = new Uint8Array(logJsonStr.length);
|
|
200
|
-
for (let i = 0; i < logJsonStr.length; i++) {
|
|
201
|
-
raw[i] = logJsonStr.charCodeAt(i);
|
|
202
|
-
}
|
|
203
|
-
return raw;
|
|
204
|
-
}
|
|
205
|
-
//# sourceMappingURL=test-processor-server.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-processor-server.js","sourceRoot":"","sources":["../../src/test/test-processor-server.ts"],"names":[],"mappings":";;;;;;AAAA,qCAsBoB;AAIpB,gDAA6C;AAE7C,gDAAuB;AACvB,wDAAiE;AAGjE,MAAM,YAAY,GAA6B,EAAE,CAAA;AAEjD,SAAS,SAAS;IAChB,MAAM,CAAC,eAAe,GAAG,IAAI,oBAAc,EAAE,CAAA;AAC/C,CAAC;AAED,MAAa,mBAAmB;IAC9B,OAAO,CAAsB;IAC7B,cAAc,CAAkB;IAEhC,YAAY,MAAkB,EAAE,gBAAwC,EAAE;QACxE,SAAS,EAAE,CAAA;QAEX,IAAI,CAAC,OAAO,GAAG,IAAI,0BAAoB,CAAC,MAAM,CAAC,CAAA;QAC/C,MAAM,WAAW,GAAg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aACT;YACD,IAAI,QAAQ,CAAC,QAAQ,KAAK,cAAI,CAAC,IAAI,IAAI,eAAe,IAAI,QAAQ,CAAC,QAAQ,EAAE;gBAC3E,SAAQ;aACT;YAED,KAAK,MAAM,MAAM,IAAI,QAAQ,CAAC,YAAY,EAAE;gBAC1C,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;aAC1C;SACF;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;CACF;AAlND,kDAkNC;AAED,SAAS,OAAO,CAAC,GAAQ;IACvB,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA;IACtC,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IAC7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC1C,GAAG,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;KAClC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC","sourcesContent":["import {\n BlockBinding,\n ContractConfig,\n LogBinding,\n ProcessBlocksRequest,\n ProcessBlocksResponse,\n ProcessConfigRequest,\n ProcessConfigResponse,\n ProcessInstructionsRequest,\n ProcessInstructionsResponse,\n ProcessLogsRequest,\n ProcessLogsResponse,\n ProcessorServiceImpl,\n ProcessorServiceImplementation,\n ProcessorState,\n ProcessTracesRequest,\n ProcessTracesResponse,\n ProcessTransactionsRequest,\n ProcessTransactionsResponse,\n setProvider,\n StartRequest,\n TraceBinding,\n} from '@sentio/sdk'\nimport { CallContext } from 'nice-grpc-common'\nimport { Empty } from '../gen/google/protobuf/empty'\nimport { ChainConfig } from '../chain-config'\nimport { CHAIN_MAP } from '../utils/chainmap'\nimport { Block, Log } from '@ethersproject/abstract-provider'\nimport Long from 'long'\nimport { getNetwork, Networkish } from '@ethersproject/providers'\nimport { Trace } from '../trace'\n\nconst TEST_CONTEXT: CallContext = <CallContext>{}\n\nfunction cleanTest() {\n global.PROCESSOR_STATE = new ProcessorState()\n}\n\nexport class TestProcessorServer implements ProcessorServiceImplementation {\n service: ProcessorServiceImpl\n contractConfig: ContractConfig[]\n\n constructor(loader: () => void, httpEndpoints: Record<string, string> = {}) {\n cleanTest()\n\n this.service = new ProcessorServiceImpl(loader)\n const dummyConfig: Record<string, ChainConfig> = {}\n\n for (const k in CHAIN_MAP) {\n const http = httpEndpoints[k] || ''\n dummyConfig[k] = {\n ChainID: k,\n Https: [http],\n }\n }\n\n setProvider(dummyConfig)\n }\n\n async start(request: StartRequest = { templateInstances: [] }, context = TEST_CONTEXT): Promise<Empty> {\n const res = await this.service.start(request, context)\n this.contractConfig = (await this.getConfig({})).contractConfigs\n return res\n }\n\n stop(request: Empty, context = TEST_CONTEXT): Promise<Empty> {\n return this.service.stop(request, context)\n }\n\n getConfig(request: ProcessConfigRequest, context = TEST_CONTEXT): Promise<ProcessConfigResponse> {\n return this.service.getConfig(request, context)\n }\n\n processBlocks(request: ProcessBlocksRequest, context = TEST_CONTEXT): Promise<ProcessBlocksResponse> {\n return this.service.processBlocks(request, context)\n }\n\n processInstructions(\n request: ProcessInstructionsRequest,\n context = TEST_CONTEXT\n ): Promise<ProcessInstructionsResponse> {\n return this.service.processInstructions(request, context)\n }\n\n processLogs(request: ProcessLogsRequest, context = TEST_CONTEXT): Promise<ProcessLogsResponse> {\n return this.service.processLogs(request, context)\n }\n\n processTraces(request: ProcessTracesRequest, context: CallContext = TEST_CONTEXT): Promise<ProcessTracesResponse> {\n return this.service.processTraces(request, context)\n }\n\n processTransactions(\n request: ProcessTransactionsRequest,\n context = TEST_CONTEXT\n ): Promise<ProcessTransactionsResponse> {\n return this.service.processTransactions(request, context)\n }\n\n testTrace(trace: Trace, network: Networkish = 1): Promise<ProcessTracesResponse> {\n return this.testTraces([trace], network)\n }\n\n testTraces(traces: Trace[], network: Networkish = 1): Promise<ProcessTracesResponse> {\n const bindings = []\n for (const trace of traces) {\n const binding = this.buildTraceBinding(trace, network)\n if (!binding) {\n throw Error('Invalid test trace: ' + JSON.stringify(trace))\n }\n bindings.push(binding)\n }\n return this.processTraces({\n traceBindings: bindings,\n })\n }\n\n buildTraceBinding(trace: Trace, network: Networkish = 1): TraceBinding | undefined {\n if (trace.type !== 'call' || !trace.action.input) {\n throw Error('Invalid test trace: ' + JSON.stringify(trace))\n }\n const signature = trace.action.input.slice(0, 10)\n\n for (const contract of this.contractConfig) {\n if (contract.contract?.chainId !== getNetwork(network).chainId.toString()) {\n continue\n }\n if (trace.action.to?.toLowerCase() !== contract.contract?.address.toLowerCase()) {\n continue\n }\n for (const config of contract.traceConfigs) {\n if (config.signature == signature) {\n return {\n trace: {\n raw: toBytes(trace),\n },\n handlerId: config.handlerId,\n }\n }\n }\n }\n return undefined\n }\n\n testLog(log: Log, network: Networkish = 1): Promise<ProcessLogsResponse> {\n return this.testLogs([log], network)\n }\n\n testLogs(logs: Log[], network: Networkish = 1): Promise<ProcessLogsResponse> {\n const bindings = []\n for (const log of logs) {\n const binding = this.buildLogBinding(log, network)\n if (!binding) {\n throw Error('Invalid test log: ' + JSON.stringify(log))\n }\n bindings.push(binding)\n }\n return this.processLogs({\n logBindings: bindings,\n })\n }\n\n buildLogBinding(log: Log, network: Networkish = 1): LogBinding | undefined {\n for (const contract of this.contractConfig) {\n if (contract.contract?.chainId !== getNetwork(network).chainId.toString()) {\n continue\n }\n if (log.address.toLowerCase() !== contract.contract?.address.toLowerCase()) {\n continue\n }\n for (const config of contract.logConfigs) {\n for (const filter of config.filters) {\n // if (filter.topics.length != log.topics.length) {\n // continue\n // }\n\n let match = true\n for (const topicIdx in filter.topics) {\n const logTopic = log.topics[topicIdx]\n const possibleTopic = filter.topics[topicIdx].hashes\n if (possibleTopic.length === 0) {\n // match all\n continue\n }\n if (possibleTopic.find((e) => e.toLowerCase() === logTopic.toLowerCase())) {\n // find one\n continue\n }\n match = false\n break\n }\n if (match) {\n return {\n log: {\n raw: toBytes(log),\n },\n handlerId: config.handlerId,\n }\n }\n }\n }\n }\n return undefined\n }\n\n testBlock(block: Partial<Block> & { number: number }, network: Networkish = 1): Promise<ProcessBlocksResponse> {\n return this.testBlocks([block], network)\n }\n\n testBlocks(blocks: Partial<Block> & { number: number }[], network: Networkish = 1) {\n const bindings = []\n for (const block of blocks) {\n const binding = this.buildBlockBinding(block, network)\n if (!binding) {\n throw Error('Invalid test block: ' + JSON.stringify(block))\n }\n bindings.push(binding)\n }\n return this.processBlocks({\n blockBindings: bindings,\n })\n }\n\n buildBlockBinding(block: Partial<Block> & { number: number }, network: Networkish = 1): BlockBinding {\n const binding: BlockBinding = {\n block: {\n raw: toBytes(block),\n },\n handlerIds: [],\n }\n for (const contract of this.contractConfig) {\n if (contract.contract?.chainId !== getNetwork(network).chainId.toString()) {\n continue\n }\n const longBlockNumber = Long.fromNumber(block.number)\n if (longBlockNumber < contract.startBlock) {\n continue\n }\n if (contract.endBlock !== Long.ZERO && longBlockNumber >= contract.endBlock) {\n continue\n }\n\n for (const config of contract.blockConfigs) {\n binding.handlerIds.push(config.handlerId)\n }\n }\n return binding\n }\n}\n\nfunction toBytes(obj: any): Uint8Array {\n const logJsonStr = JSON.stringify(obj)\n const raw = new Uint8Array(logJsonStr.length)\n for (let i = 0; i < logJsonStr.length; i++) {\n raw[i] = logJsonStr.charCodeAt(i)\n }\n return raw\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function loadTestProvidersFromEnv(ids: string[] | string): boolean;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.loadTestProvidersFromEnv = void 0;
|
|
4
|
-
const sdk_1 = require("@sentio/sdk");
|
|
5
|
-
function loadTestProvidersFromEnv(ids) {
|
|
6
|
-
const dummyConfig = {};
|
|
7
|
-
if (!Array.isArray(ids)) {
|
|
8
|
-
ids = [ids];
|
|
9
|
-
}
|
|
10
|
-
for (const k of ids) {
|
|
11
|
-
const envKey = 'TEST_ENDPOINT_' + k;
|
|
12
|
-
const http = process.env[envKey];
|
|
13
|
-
if (!http) {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
dummyConfig[k] = {
|
|
17
|
-
ChainID: k,
|
|
18
|
-
Https: [http],
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
(0, sdk_1.setProvider)(dummyConfig);
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
exports.loadTestProvidersFromEnv = loadTestProvidersFromEnv;
|
|
25
|
-
//# sourceMappingURL=test-provider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-provider.js","sourceRoot":"","sources":["../../src/test/test-provider.ts"],"names":[],"mappings":";;;AACA,qCAAyC;AAEzC,SAAgB,wBAAwB,CAAC,GAAsB;IAC7D,MAAM,WAAW,GAAgC,EAAE,CAAA;IAEnD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACvB,GAAG,GAAG,CAAC,GAAG,CAAC,CAAA;KACZ;IAED,KAAK,MAAM,CAAC,IAAI,GAAG,EAAE;QACnB,MAAM,MAAM,GAAG,gBAAgB,GAAG,CAAC,CAAA;QACnC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QAChC,IAAI,CAAC,IAAI,EAAE;YACT,OAAO,KAAK,CAAA;SACb;QACD,WAAW,CAAC,CAAC,CAAC,GAAG;YACf,OAAO,EAAE,CAAC;YACV,KAAK,EAAE,CAAC,IAAI,CAAC;SACd,CAAA;KACF;IAED,IAAA,iBAAW,EAAC,WAAW,CAAC,CAAA;IACxB,OAAO,IAAI,CAAA;AACb,CAAC;AArBD,4DAqBC","sourcesContent":["import { ChainConfig } from '../chain-config'\nimport { setProvider } from '@sentio/sdk'\n\nexport function loadTestProvidersFromEnv(ids: string[] | string): boolean {\n const dummyConfig: Record<string, ChainConfig> = {}\n\n if (!Array.isArray(ids)) {\n ids = [ids]\n }\n\n for (const k of ids) {\n const envKey = 'TEST_ENDPOINT_' + k\n const http = process.env[envKey]\n if (!http) {\n return false\n }\n dummyConfig[k] = {\n ChainID: k,\n Https: [http],\n }\n }\n\n setProvider(dummyConfig)\n return true\n}\n"]}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export declare const game_wallet_idl: {
|
|
2
|
-
version: string;
|
|
3
|
-
name: string;
|
|
4
|
-
instructions: {
|
|
5
|
-
name: string;
|
|
6
|
-
accounts: {
|
|
7
|
-
name: string;
|
|
8
|
-
isMut: boolean;
|
|
9
|
-
isSigner: boolean;
|
|
10
|
-
}[];
|
|
11
|
-
args: {
|
|
12
|
-
name: string;
|
|
13
|
-
type: string;
|
|
14
|
-
}[];
|
|
15
|
-
}[];
|
|
16
|
-
accounts: {
|
|
17
|
-
name: string;
|
|
18
|
-
type: {
|
|
19
|
-
kind: string;
|
|
20
|
-
fields: ({
|
|
21
|
-
name: string;
|
|
22
|
-
type: string;
|
|
23
|
-
} | {
|
|
24
|
-
name: string;
|
|
25
|
-
type: {
|
|
26
|
-
defined: string;
|
|
27
|
-
};
|
|
28
|
-
})[];
|
|
29
|
-
};
|
|
30
|
-
}[];
|
|
31
|
-
types: {
|
|
32
|
-
name: string;
|
|
33
|
-
type: {
|
|
34
|
-
kind: string;
|
|
35
|
-
variants: {
|
|
36
|
-
name: string;
|
|
37
|
-
}[];
|
|
38
|
-
};
|
|
39
|
-
}[];
|
|
40
|
-
errors: {
|
|
41
|
-
code: number;
|
|
42
|
-
name: string;
|
|
43
|
-
msg: string;
|
|
44
|
-
}[];
|
|
45
|
-
};
|