@sentio/sdk 1.19.6 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/aptos/aptos-processor.js +0 -8
- package/lib/aptos/aptos-processor.js.map +1 -1
- package/lib/aptos/bind-options.d.ts +5 -0
- package/lib/aptos/bind-options.js +7 -1
- package/lib/aptos/bind-options.js.map +1 -1
- package/lib/aptos/index.d.ts +1 -1
- package/lib/aptos/index.js +2 -1
- package/lib/aptos/index.js.map +1 -1
- package/lib/aptos-codegen/codegen.d.ts +11 -0
- package/lib/aptos-codegen/codegen.js +110 -0
- package/lib/aptos-codegen/codegen.js.map +1 -0
- package/lib/cli/build.d.ts +3 -3
- package/lib/cli/build.js +44 -22
- package/lib/cli/build.js.map +1 -1
- package/lib/cli/cli.js +11 -11
- package/lib/cli/cli.js.map +1 -1
- package/lib/cli/config.d.ts +0 -7
- package/lib/cli/config.js +9 -4
- package/lib/cli/config.js.map +1 -1
- package/lib/cli/upload.js +1 -1
- package/lib/cli/upload.js.map +1 -1
- package/lib/service.js +1 -1
- package/lib/service.js.map +1 -1
- package/lib/{cli/solana-code-gen.d.ts → test-abi-code-gen.d.ts} +0 -0
- package/lib/test-abi-code-gen.js +19 -0
- package/lib/test-abi-code-gen.js.map +1 -0
- package/lib/tests/aptos.test.js +3 -3
- package/lib/tests/aptos.test.js.map +1 -1
- package/lib/tests/souffl3.js +16 -18
- package/lib/tests/souffl3.js.map +1 -1
- package/lib/tests/types/aptos/account-4188c8.d.ts +27 -0
- package/lib/tests/types/aptos/account-4188c8.js +137 -0
- package/lib/tests/types/aptos/account-4188c8.js.map +1 -0
- package/lib/tests/types/{basic_1.d.ts → solana/basic_1.d.ts} +0 -0
- package/lib/tests/types/{basic_1.js → solana/basic_1.js} +0 -0
- package/lib/tests/types/solana/basic_1.js.map +1 -0
- package/lib/tests/types/{basic_1_processor.d.ts → solana/basic_1_processor.d.ts} +0 -0
- package/lib/tests/types/{basic_1_processor.js → solana/basic_1_processor.js} +0 -0
- package/lib/tests/types/solana/basic_1_processor.js.map +1 -0
- package/package.json +4 -3
- package/src/aptos/aptos-processor.ts +0 -8
- package/src/aptos/bind-options.ts +6 -0
- package/src/aptos/index.ts +1 -1
- package/src/aptos-codegen/codegen.ts +128 -0
- package/src/aptos-codegen/codgen.test.ts +11 -0
- package/src/aptos-codegen/tsconfig.json +9 -0
- package/src/cli/build.ts +49 -20
- package/src/cli/cli.ts +12 -12
- package/src/cli/config.ts +9 -9
- package/src/cli/upload.ts +1 -1
- package/src/service.ts +2 -2
- package/src/test-abi-code-gen.ts +14 -0
- package/src/tests/abis/aptos/0x4188c8694687e844677c2aa87171019e23d61cac60de5082a278a8aa47e9d807.json +389 -0
- package/src/tests/aptos.test.ts +3 -3
- package/src/tests/souffl3.ts +21 -25
- package/src/tests/types/aptos/account-4188c8.ts +241 -0
- package/src/tests/types/{basic_1.ts → solana/basic_1.ts} +0 -0
- package/src/tests/types/{basic_1_processor.ts → solana/basic_1_processor.ts} +0 -0
- package/lib/cli/solana-code-gen.js +0 -19
- package/lib/cli/solana-code-gen.js.map +0 -1
- package/lib/tests/types/basic_1.js.map +0 -1
- package/lib/tests/types/basic_1_processor.js.map +0 -1
- package/src/cli/solana-code-gen.ts +0 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-4188c8.js","sourceRoot":"","sources":["../../../../src/tests/types/aptos/account-4188c8.ts"],"names":[],"mappings":"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","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\n/* Generated modules for account 0x4188c8694687e844677c2aa87171019e23d61cac60de5082a278a8aa47e9d807 */\n\nimport { aptos } from \"@sentio/sdk\";\n\nexport class CandyMachine extends aptos.AptosBaseProcessor {\n static DEFAULT_OPTIONS: aptos.NamedAptosBindOptions = {\n address:\n \"0x4188c8694687e844677c2aa87171019e23d61cac60de5082a278a8aa47e9d807\",\n network: aptos.AptosNetwork.TEST_NET,\n };\n static bind(options = CandyMachine.DEFAULT_OPTIONS): CandyMachine {\n return new CandyMachine({ ...options, name: \"CandyMachine\" });\n }\n\n onEntryAddAcl(\n func: (\n call: aptos.TransactionPayload_EntryFunctionPayload,\n ctx: aptos.AptosContext\n ) => void\n ): CandyMachine {\n this.onEntryFunctionCall(func, {\n function: \"CandyMachine::add_acl\",\n });\n return this;\n }\n\n onEntryCreateCandyMachine(\n func: (\n call: aptos.TransactionPayload_EntryFunctionPayload,\n ctx: aptos.AptosContext\n ) => void\n ): CandyMachine {\n this.onEntryFunctionCall(func, {\n function: \"CandyMachine::create_candy_machine\",\n });\n return this;\n }\n\n onEntryCreateCollection(\n func: (\n call: aptos.TransactionPayload_EntryFunctionPayload,\n ctx: aptos.AptosContext\n ) => void\n ): CandyMachine {\n this.onEntryFunctionCall(func, {\n function: \"CandyMachine::create_collection\",\n });\n return this;\n }\n\n onEntryPullToken(\n func: (\n call: aptos.TransactionPayload_EntryFunctionPayload,\n ctx: aptos.AptosContext\n ) => void\n ): CandyMachine {\n this.onEntryFunctionCall(func, {\n function: \"CandyMachine::pull_token\",\n });\n return this;\n }\n\n onEntryUpdateTokenProperty(\n func: (\n call: aptos.TransactionPayload_EntryFunctionPayload,\n ctx: aptos.AptosContext\n ) => void\n ): CandyMachine {\n this.onEntryFunctionCall(func, {\n function: \"CandyMachine::update_token_property\",\n });\n return this;\n }\n}\n\nexport class SouffleChefCampaign extends aptos.AptosBaseProcessor {\n static DEFAULT_OPTIONS: aptos.NamedAptosBindOptions = {\n address:\n \"0x4188c8694687e844677c2aa87171019e23d61cac60de5082a278a8aa47e9d807\",\n network: aptos.AptosNetwork.TEST_NET,\n };\n static bind(\n options = SouffleChefCampaign.DEFAULT_OPTIONS\n ): SouffleChefCampaign {\n return new SouffleChefCampaign({ ...options, name: \"SouffleChefCampaign\" });\n }\n\n onEntryAddAcl(\n func: (\n call: aptos.TransactionPayload_EntryFunctionPayload,\n ctx: aptos.AptosContext\n ) => void\n ): SouffleChefCampaign {\n this.onEntryFunctionCall(func, {\n function: \"SouffleChefCampaign::add_acl\",\n });\n return this;\n }\n\n onEntryAddBurnTokenRule(\n func: (\n call: aptos.TransactionPayload_EntryFunctionPayload,\n ctx: aptos.AptosContext\n ) => void\n ): SouffleChefCampaign {\n this.onEntryFunctionCall(func, {\n function: \"SouffleChefCampaign::add_burn_token_rule\",\n });\n return this;\n }\n\n onEntryBatchAddAcl(\n func: (\n call: aptos.TransactionPayload_EntryFunctionPayload,\n ctx: aptos.AptosContext\n ) => void\n ): SouffleChefCampaign {\n this.onEntryFunctionCall(func, {\n function: \"SouffleChefCampaign::batch_add_acl\",\n });\n return this;\n }\n\n onEntryBurnAndEnjoy(\n func: (\n call: aptos.TransactionPayload_EntryFunctionPayload,\n ctx: aptos.AptosContext\n ) => void\n ): SouffleChefCampaign {\n this.onEntryFunctionCall(func, {\n function: \"SouffleChefCampaign::burn_and_enjoy\",\n });\n return this;\n }\n\n onEntryClaim(\n func: (\n call: aptos.TransactionPayload_EntryFunctionPayload,\n ctx: aptos.AptosContext\n ) => void\n ): SouffleChefCampaign {\n this.onEntryFunctionCall(func, {\n function: \"SouffleChefCampaign::claim\",\n });\n return this;\n }\n\n onEntryCreateCandyMachine(\n func: (\n call: aptos.TransactionPayload_EntryFunctionPayload,\n ctx: aptos.AptosContext\n ) => void\n ): SouffleChefCampaign {\n this.onEntryFunctionCall(func, {\n function: \"SouffleChefCampaign::create_candy_machine\",\n });\n return this;\n }\n\n onEntryCreateCollection(\n func: (\n call: aptos.TransactionPayload_EntryFunctionPayload,\n ctx: aptos.AptosContext\n ) => void\n ): SouffleChefCampaign {\n this.onEntryFunctionCall(func, {\n function: \"SouffleChefCampaign::create_collection\",\n });\n return this;\n }\n\n onEntryPullToken(\n func: (\n call: aptos.TransactionPayload_EntryFunctionPayload,\n ctx: aptos.AptosContext\n ) => void\n ): SouffleChefCampaign {\n this.onEntryFunctionCall(func, {\n function: \"SouffleChefCampaign::pull_token\",\n });\n return this;\n }\n\n onEntryPullTokenV2(\n func: (\n call: aptos.TransactionPayload_EntryFunctionPayload,\n ctx: aptos.AptosContext\n ) => void\n ): SouffleChefCampaign {\n this.onEntryFunctionCall(func, {\n function: \"SouffleChefCampaign::pull_token_v2\",\n });\n return this;\n }\n\n onEntryRemoveBurnTokenRule(\n func: (\n call: aptos.TransactionPayload_EntryFunctionPayload,\n ctx: aptos.AptosContext\n ) => void\n ): SouffleChefCampaign {\n this.onEntryFunctionCall(func, {\n function: \"SouffleChefCampaign::remove_burn_token_rule\",\n });\n return this;\n }\n\n onEntryUpdateTokenProperty(\n func: (\n call: aptos.TransactionPayload_EntryFunctionPayload,\n ctx: aptos.AptosContext\n ) => void\n ): SouffleChefCampaign {\n this.onEntryFunctionCall(func, {\n function: \"SouffleChefCampaign::update_token_property\",\n });\n return this;\n }\n\n onEventBurnEnjoyEvent(\n func: (event: aptos.Event, ctx: aptos.AptosContext) => void\n ): SouffleChefCampaign {\n this.onEvent(func, {\n type: \"0x4188c8694687e844677c2aa87171019e23d61cac60de5082a278a8aa47e9d807::SouffleChefCampaign::BurnEnjoyEvent\",\n });\n return this;\n }\n\n onEventPullTokenEvent(\n func: (event: aptos.Event, ctx: aptos.AptosContext) => void\n ): SouffleChefCampaign {\n this.onEvent(func, {\n type: \"0x4188c8694687e844677c2aa87171019e23d61cac60de5082a278a8aa47e9d807::SouffleChefCampaign::PullTokenEvent\",\n });\n return this;\n }\n}\n"]}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basic_1.js","sourceRoot":"","sources":["../../../../src/tests/types/solana/basic_1.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IACzB,SAAS,EAAE,OAAO;IAClB,MAAM,EAAE,SAAS;IACjB,cAAc,EAAE;QACd;YACE,MAAM,EAAE,YAAY;YACpB,UAAU,EAAE;gBACV;oBACE,MAAM,EAAE,WAAW;oBACnB,OAAO,EAAE,IAAI;oBACb,UAAU,EAAE,IAAI;iBACjB;gBACD;oBACE,MAAM,EAAE,MAAM;oBACd,OAAO,EAAE,IAAI;oBACb,UAAU,EAAE,IAAI;iBACjB;gBACD;oBACE,MAAM,EAAE,eAAe;oBACvB,OAAO,EAAE,KAAK;oBACd,UAAU,EAAE,KAAK;iBAClB;aACF;YACD,MAAM,EAAE;gBACN;oBACE,MAAM,EAAE,MAAM;oBACd,MAAM,EAAE,KAAK;iBACd;aACF;SACF;QACD;YACE,MAAM,EAAE,QAAQ;YAChB,UAAU,EAAE;gBACV;oBACE,MAAM,EAAE,WAAW;oBACnB,OAAO,EAAE,IAAI;oBACb,UAAU,EAAE,KAAK;iBAClB;aACF;YACD,MAAM,EAAE;gBACN;oBACE,MAAM,EAAE,MAAM;oBACd,MAAM,EAAE,KAAK;iBACd;aACF;SACF;KACF;IACD,UAAU,EAAE;QACV;YACE,MAAM,EAAE,WAAW;YACnB,MAAM,EAAE;gBACN,MAAM,EAAE,QAAQ;gBAChB,QAAQ,EAAE;oBACR;wBACE,MAAM,EAAE,MAAM;wBACd,MAAM,EAAE,KAAK;qBACd;iBACF;aACF;SACF;KACF;CACF,CAAA","sourcesContent":["export const basic_1_idl = {\n \"version\": \"0.1.0\",\n \"name\": \"basic_1\",\n \"instructions\": [\n {\n \"name\": \"initialize\",\n \"accounts\": [\n {\n \"name\": \"myAccount\",\n \"isMut\": true,\n \"isSigner\": true\n },\n {\n \"name\": \"user\",\n \"isMut\": true,\n \"isSigner\": true\n },\n {\n \"name\": \"systemProgram\",\n \"isMut\": false,\n \"isSigner\": false\n }\n ],\n \"args\": [\n {\n \"name\": \"data\",\n \"type\": \"u64\"\n }\n ]\n },\n {\n \"name\": \"update\",\n \"accounts\": [\n {\n \"name\": \"myAccount\",\n \"isMut\": true,\n \"isSigner\": false\n }\n ],\n \"args\": [\n {\n \"name\": \"data\",\n \"type\": \"u64\"\n }\n ]\n }\n ],\n \"accounts\": [\n {\n \"name\": \"MyAccount\",\n \"type\": {\n \"kind\": \"struct\",\n \"fields\": [\n {\n \"name\": \"data\",\n \"type\": \"u64\"\n }\n ]\n }\n }\n ]\n}\n"]}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basic_1_processor.js","sourceRoot":"","sources":["../../../../src/tests/types/solana/basic_1_processor.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAmF;AACnF,qCAAmF;AACnF,uCAAuC;AACvC,gDAAuB;AAGvB,MAAa,eAAgB,SAAQ,yBAAmB;IACtD,MAAM,CAAC,IAAI,CAAC,OAA0B;QACpC,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;YAC5B,OAAO,CAAC,IAAI,GAAG,QAAQ,CAAA;SACxB;QACD,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC,CAAA;IACrC,CAAC;IAED,iBAAiB,GAAmD,CAAC,cAAc,EAAE,EAAE;QACrF,MAAM,gBAAgB,GAAG,IAAI,8BAAqB,CAAC,qBAAkB,CAAC,CAAA;QACtE,MAAM,UAAU,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,cAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAA;QACpF,OAAO,UAAU,CAAA;IACnB,CAAC,CAAA;IAGD,YAAY,CAAC,OAAyD;QACpE,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC,GAAgB,EAAE,GAAG,EAAE,EAAE;YACzD,IAAI,GAAG,EAAE;gBACP,OAAO,CAAC,GAAG,CAAC,IAAoB,EAAE,GAAG,CAAC,CAAA;aACvC;QACH,CAAC,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,QAAQ,CAAC,OAAyD;QAChE,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,GAAgB,EAAE,GAAG,EAAE,EAAE;YACrD,IAAI,GAAG,EAAE;gBACP,OAAO,CAAC,GAAG,CAAC,IAAoB,EAAE,GAAG,CAAC,CAAA;aACvC;QACH,CAAC,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;CAEF;AAjCD,0CAiCC","sourcesContent":["import { BorshInstructionCoder, Instruction, Idl, BN } from '@project-serum/anchor'\nimport { SolanaBaseProcessor, SolanaContext, SolanaBindOptions } from \"@sentio/sdk\"\nimport { basic_1_idl } from \"./basic_1\"\nimport bs58 from 'bs58'\nimport { PublicKey } from '@solana/web3.js'\n\nexport class Basic1Processor extends SolanaBaseProcessor {\n static bind(options: SolanaBindOptions): Basic1Processor {\n if (options && !options.name) {\n options.name = 'Basic1'\n }\n return new Basic1Processor(options)\n }\n\n decodeInstruction: (rawInstruction: string) => Instruction | null = (rawInstruction) => {\n const instructionCoder = new BorshInstructionCoder(basic_1_idl as Idl)\n const decodedIns = instructionCoder.decode(Buffer.from(bs58.decode(rawInstruction)))\n return decodedIns\n }\n\n \n onInitialize(handler: (args: { data: BN }, ctx: SolanaContext) => void): Basic1Processor {\n this.onInstruction('initialize', (ins: Instruction, ctx) => {\n if (ins) {\n handler(ins.data as { data: BN }, ctx)\n }\n })\n return this\n }\n \n onUpdate(handler: (args: { data: BN }, ctx: SolanaContext) => void): Basic1Processor {\n this.onInstruction('update', (ins: Instruction, ctx) => {\n if (ins) {\n handler(ins.data as { data: BN }, ctx)\n }\n })\n return this\n }\n \n}\n "]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentio/sdk",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.20.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"compile_target": "yarn tsc -b src/target-ethers-sentio/tsconfig.json",
|
|
7
7
|
"compile": "tsc -p . && cp src/cli/webpack.config.js lib/cli && cp src/utils/*.csv lib/utils",
|
|
@@ -13,9 +13,8 @@
|
|
|
13
13
|
"cli": "ts-node src/cli/cli.ts",
|
|
14
14
|
"test": "jest",
|
|
15
15
|
"gen": "yarn compile_target && yarn gen_bultin_evm && yarn gen_test_abi",
|
|
16
|
-
"gen_test_abi": "
|
|
16
|
+
"gen_test_abi": "ts-node src/test-abi-code-gen.ts src/tests/abis src/tests/types",
|
|
17
17
|
"gen_bultin_evm": "typechain --target lib/target-ethers-sentio --out-dir src/builtin/internal 'src/abis/*.json'",
|
|
18
|
-
"gen_solana_abi": "ts-node src/cli/solana-code-gen.ts src/tests types",
|
|
19
18
|
"postbuild": "echo || clear-package-json package.json -o ./lib/package.json && cp release.config.js ./lib",
|
|
20
19
|
"docs": "typedoc --options typedoc.json"
|
|
21
20
|
},
|
|
@@ -59,7 +58,9 @@
|
|
|
59
58
|
"chai": "^4.3.6",
|
|
60
59
|
"clean-publish": "^4.0.1",
|
|
61
60
|
"conventional-changelog-conventionalcommits": "^5.0.0",
|
|
61
|
+
"jest": "^29.0.3",
|
|
62
62
|
"semantic-release": "^19.0.5",
|
|
63
|
+
"ts-jest": "^29.0.3",
|
|
63
64
|
"ts-node": "^10.9.1",
|
|
64
65
|
"tsconfig-paths": "^4.0.0",
|
|
65
66
|
"typedoc": "^0.23.15",
|
|
@@ -151,14 +151,6 @@ export class AptosBaseProcessor {
|
|
|
151
151
|
network: options.network || AptosNetwork.TEST_NET,
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
//
|
|
155
|
-
// public endBlock(endBlock: Long | number) {
|
|
156
|
-
// if (typeof endBlock === 'number') {
|
|
157
|
-
// endBlock = Long.fromNumber(endBlock)
|
|
158
|
-
// }
|
|
159
|
-
// this.config.endSeqNumber = endBlock
|
|
160
|
-
// return this
|
|
161
|
-
// }
|
|
162
154
|
|
|
163
155
|
getChainId(): string {
|
|
164
156
|
switch (this.config.network) {
|
package/src/aptos/index.ts
CHANGED
|
@@ -2,4 +2,4 @@ export type { Transaction_UserTransaction, TransactionPayload_EntryFunctionPaylo
|
|
|
2
2
|
export type { Event, CallFilter, EventFilter } from './aptos-processor'
|
|
3
3
|
export { AptosBaseProcessor } from './aptos-processor'
|
|
4
4
|
export { AptosContext } from './context'
|
|
5
|
-
export { AptosBindOptions, AptosNetwork } from './bind-options'
|
|
5
|
+
export { AptosBindOptions, NamedAptosBindOptions, AptosNetwork } from './bind-options'
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { MoveModuleBytecode } from 'aptos/src/generated'
|
|
2
|
+
import fs from 'fs'
|
|
3
|
+
import path from 'path'
|
|
4
|
+
import { MoveFunction, MoveModule } from 'aptos/src/generated'
|
|
5
|
+
import { MoveStruct } from 'aptos/src/generated/models/MoveStruct'
|
|
6
|
+
import prettier from 'prettier'
|
|
7
|
+
|
|
8
|
+
interface Config {
|
|
9
|
+
outputDir: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class AptosCodegen {
|
|
13
|
+
modules: MoveModuleBytecode[]
|
|
14
|
+
config: Config
|
|
15
|
+
|
|
16
|
+
constructor(srcFile: string, config: Config) {
|
|
17
|
+
const json = fs.readFileSync(srcFile, 'utf-8')
|
|
18
|
+
this.modules = JSON.parse(json)
|
|
19
|
+
this.config = config
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
generate() {
|
|
23
|
+
if (!this.modules) {
|
|
24
|
+
return
|
|
25
|
+
}
|
|
26
|
+
let address: string | undefined
|
|
27
|
+
for (const module of this.modules) {
|
|
28
|
+
if (module.abi && module.abi.address) {
|
|
29
|
+
address = module.abi.address
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (!address) {
|
|
33
|
+
return
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const imports = `import { aptos } from "@sentio/sdk"`
|
|
37
|
+
|
|
38
|
+
let source = `
|
|
39
|
+
/* Autogenerated file. Do not edit manually. */
|
|
40
|
+
/* tslint:disable */
|
|
41
|
+
/* eslint-disable */
|
|
42
|
+
|
|
43
|
+
/* Generated modules for account ${address} */
|
|
44
|
+
|
|
45
|
+
${imports}
|
|
46
|
+
|
|
47
|
+
${this.modules.map(generateModule).join('\n')}
|
|
48
|
+
` // source
|
|
49
|
+
|
|
50
|
+
source = prettier.format(source, { parser: 'typescript' })
|
|
51
|
+
fs.writeFileSync(path.join(this.config.outputDir, 'account-' + address.slice(2, 8) + '.ts'), source)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function generateModule(moduleByteCode: MoveModuleBytecode) {
|
|
56
|
+
if (!moduleByteCode.abi) {
|
|
57
|
+
return ''
|
|
58
|
+
}
|
|
59
|
+
const module = moduleByteCode.abi
|
|
60
|
+
|
|
61
|
+
const functions = module.exposed_functions.map((f) => generateOnEntryFunctions(module, f)).filter((s) => s !== '')
|
|
62
|
+
const events = module.structs.map((e) => generateOnEvents(module, e)).filter((s) => s !== '')
|
|
63
|
+
|
|
64
|
+
return `
|
|
65
|
+
export class ${module.name} extends aptos.AptosBaseProcessor {
|
|
66
|
+
static DEFAULT_OPTIONS: aptos.NamedAptosBindOptions = {
|
|
67
|
+
address: "${module.address}",
|
|
68
|
+
network: aptos.AptosNetwork.TEST_NET
|
|
69
|
+
}
|
|
70
|
+
static bind(options = ${module.name}.DEFAULT_OPTIONS): ${module.name} {
|
|
71
|
+
return new ${module.name}({ ...options, name: "${module.name}" })
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
${functions.join('\n')}
|
|
75
|
+
|
|
76
|
+
${events.join('\n')}
|
|
77
|
+
}`
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function generateOnEntryFunctions(module: MoveModule, func: MoveFunction) {
|
|
81
|
+
if (!func.is_entry) {
|
|
82
|
+
return ''
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const camelFuncName = capitalizeFirstChar(camelize(func.name))
|
|
86
|
+
const source = `
|
|
87
|
+
onEntry${camelFuncName}(func: (call: aptos.TransactionPayload_EntryFunctionPayload, ctx: aptos.AptosContext) => void): ${module.name} {
|
|
88
|
+
this.onEntryFunctionCall(func, {
|
|
89
|
+
function: '${module.name}::${func.name}'
|
|
90
|
+
})
|
|
91
|
+
return this
|
|
92
|
+
}`
|
|
93
|
+
|
|
94
|
+
return source
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function generateOnEvents(module: MoveModule, struct: MoveStruct): string {
|
|
98
|
+
// for struct that has drop + store
|
|
99
|
+
if (!struct.abilities.includes('drop') || !struct.abilities.includes('store') || !struct.name.endsWith('Event')) {
|
|
100
|
+
return ''
|
|
101
|
+
}
|
|
102
|
+
const source = `
|
|
103
|
+
onEvent${struct.name}(func: (event: aptos.Event, ctx: aptos.AptosContext) => void): ${module.name} {
|
|
104
|
+
this.onEvent(func, {
|
|
105
|
+
type: '${module.address}::${module.name}::${struct.name}'
|
|
106
|
+
})
|
|
107
|
+
return this
|
|
108
|
+
}
|
|
109
|
+
`
|
|
110
|
+
return source
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function camelize(input: string): string {
|
|
114
|
+
return input
|
|
115
|
+
.split('_')
|
|
116
|
+
.reduce(
|
|
117
|
+
(res, word, i) =>
|
|
118
|
+
i === 0 ? word.toLowerCase() : `${res}${word.charAt(0).toUpperCase()}${word.substr(1).toLowerCase()}`,
|
|
119
|
+
''
|
|
120
|
+
)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function capitalizeFirstChar(input: string): string {
|
|
124
|
+
if (!input) {
|
|
125
|
+
return input
|
|
126
|
+
}
|
|
127
|
+
return input[0].toUpperCase() + (input.length > 1 ? input.substring(1) : '')
|
|
128
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import path from 'path'
|
|
2
|
+
import { AptosCodegen } from './codegen'
|
|
3
|
+
|
|
4
|
+
describe('Test Aptos Example', () => {
|
|
5
|
+
test.skip('code gen for aptos', async () => {
|
|
6
|
+
const filename = path.join(__dirname, '0x4188c8694687e844677c2aa87171019e23d61cac60de5082a278a8aa47e9d807')
|
|
7
|
+
|
|
8
|
+
const codegen = new AptosCodegen(filename, { outputDir: path.join(__dirname, '..') })
|
|
9
|
+
codegen.generate()
|
|
10
|
+
})
|
|
11
|
+
})
|
package/src/cli/build.ts
CHANGED
|
@@ -2,17 +2,18 @@ import chalk from 'chalk'
|
|
|
2
2
|
import path from 'path'
|
|
3
3
|
import fs from 'fs'
|
|
4
4
|
import { exec } from 'child_process'
|
|
5
|
-
import {
|
|
5
|
+
import { AptosCodegen } from '../aptos-codegen/codegen'
|
|
6
|
+
// import { EVM, SOLANA, Target } from './config'
|
|
6
7
|
|
|
7
|
-
export async function buildProcessor(onlyGen: boolean
|
|
8
|
+
export async function buildProcessor(onlyGen: boolean) {
|
|
8
9
|
if (!onlyGen) {
|
|
9
10
|
await installDeps()
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
// targets.forEach(async (target) => await buildProcessorForTarget(onlyGen, target))
|
|
13
|
-
for (const target
|
|
14
|
-
|
|
15
|
-
}
|
|
14
|
+
// for (const target) {
|
|
15
|
+
await buildProcessorForTarget(onlyGen)
|
|
16
|
+
// }
|
|
16
17
|
|
|
17
18
|
if (!onlyGen) {
|
|
18
19
|
const WEBPACK_CONFIG = path.join(__dirname, 'webpack.config.js')
|
|
@@ -21,12 +22,10 @@ export async function buildProcessor(onlyGen: boolean, targets: Target[]) {
|
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
async function buildProcessorForTarget(onlyGen: boolean
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
codeGenSolanaProcessor(target.abisDir ?? path.join('abis', 'solana'))
|
|
29
|
-
}
|
|
25
|
+
async function buildProcessorForTarget(onlyGen: boolean) {
|
|
26
|
+
await codeGenEthersProcessor(path.join('abis', 'evm'))
|
|
27
|
+
codeGenSolanaProcessor(path.join('abis', 'solana'))
|
|
28
|
+
codeGenAptosProcessor(path.join('abis', 'aptos'))
|
|
30
29
|
|
|
31
30
|
if (onlyGen) {
|
|
32
31
|
return
|
|
@@ -37,6 +36,27 @@ async function installDeps() {
|
|
|
37
36
|
await execStep('yarn install --ignore-scripts', 'Yarn Install')
|
|
38
37
|
}
|
|
39
38
|
|
|
39
|
+
export function codeGenAptosProcessor(abisDir: string, outDir = 'src/types/aptos') {
|
|
40
|
+
if (!fs.existsSync(abisDir)) {
|
|
41
|
+
return
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const files = fs.readdirSync(abisDir)
|
|
45
|
+
|
|
46
|
+
console.log(chalk.green('Generated Types for Aptos'))
|
|
47
|
+
for (const file of files) {
|
|
48
|
+
if (path.extname(file) === '.json') {
|
|
49
|
+
if (!fs.existsSync(outDir)) {
|
|
50
|
+
fs.mkdirSync(outDir, { recursive: true })
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const codegen = new AptosCodegen(path.join(abisDir, file), {
|
|
54
|
+
outputDir: outDir,
|
|
55
|
+
})
|
|
56
|
+
codegen.generate()
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
40
60
|
export async function codeGenEthersProcessor(
|
|
41
61
|
abisDir: string,
|
|
42
62
|
ETHERS_TARGET = path.join(__dirname, '../target-ethers-sentio'),
|
|
@@ -58,6 +78,8 @@ export async function codeGenEthersProcessor(
|
|
|
58
78
|
return
|
|
59
79
|
}
|
|
60
80
|
|
|
81
|
+
console.log(chalk.green('Generated Types for EVM'))
|
|
82
|
+
|
|
61
83
|
// TODO this will fail during postinstall, need to locate real typechain path
|
|
62
84
|
await execStep(
|
|
63
85
|
'yarn typechain --target ' + ETHERS_TARGET + ` --out-dir ${outDir} ${path.join(abisDir, '*.json')}`,
|
|
@@ -65,21 +87,28 @@ export async function codeGenEthersProcessor(
|
|
|
65
87
|
)
|
|
66
88
|
}
|
|
67
89
|
|
|
68
|
-
export function codeGenSolanaProcessor(abisDir: string,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
90
|
+
export function codeGenSolanaProcessor(abisDir: string, targetPath = path.join('src', 'types', 'solana')) {
|
|
91
|
+
if (!fs.existsSync(abisDir)) {
|
|
92
|
+
return
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const abisFiles = fs.readdirSync(abisDir)
|
|
96
|
+
|
|
97
|
+
if (abisFiles.length > 0) {
|
|
98
|
+
console.log(chalk.green('Generated Types for Solana'))
|
|
99
|
+
}
|
|
100
|
+
|
|
72
101
|
for (const file of abisFiles) {
|
|
73
102
|
if (path.extname(file) === '.json') {
|
|
74
|
-
if (!fs.existsSync(
|
|
75
|
-
fs.mkdirSync(
|
|
103
|
+
if (!fs.existsSync(targetPath)) {
|
|
104
|
+
fs.mkdirSync(targetPath, { recursive: true })
|
|
76
105
|
}
|
|
77
|
-
const idlContent = fs.readFileSync(path.join(
|
|
106
|
+
const idlContent = fs.readFileSync(path.join(abisDir, file), 'utf-8')
|
|
78
107
|
const idlObj = JSON.parse(idlContent)
|
|
79
108
|
const idlName = idlObj.name
|
|
80
|
-
const idlFile = path.join(
|
|
109
|
+
const idlFile = path.join(targetPath, idlName + '.ts')
|
|
81
110
|
fs.writeFileSync(idlFile, `export const ${idlName}_idl = ${idlContent}`)
|
|
82
|
-
fs.writeFileSync(path.join(
|
|
111
|
+
fs.writeFileSync(path.join(targetPath, `${idlName}_processor.ts`), codeGenSolanaIdlProcessor(idlObj))
|
|
83
112
|
}
|
|
84
113
|
}
|
|
85
114
|
}
|
package/src/cli/cli.ts
CHANGED
|
@@ -6,7 +6,7 @@ import fs from 'fs'
|
|
|
6
6
|
import path from 'path'
|
|
7
7
|
|
|
8
8
|
import yaml from 'js-yaml'
|
|
9
|
-
import {
|
|
9
|
+
import { finalizeHost, FinalizeProjectName, SentioProjectConfig } from './config'
|
|
10
10
|
import { uploadFile } from './upload'
|
|
11
11
|
import chalk from 'chalk'
|
|
12
12
|
import { buildProcessor } from './build'
|
|
@@ -35,7 +35,7 @@ if (mainOptions.command === 'login') {
|
|
|
35
35
|
// TODO move them to their own modules
|
|
36
36
|
|
|
37
37
|
// Process configs
|
|
38
|
-
let processorConfig: SentioProjectConfig = { host: '', project: '', source: '', build: true
|
|
38
|
+
let processorConfig: SentioProjectConfig = { host: '', project: '', source: '', build: true }
|
|
39
39
|
// Fist step, read from project yaml file
|
|
40
40
|
try {
|
|
41
41
|
console.log(chalk.blue('Loading Process config'))
|
|
@@ -68,14 +68,14 @@ if (mainOptions.command === 'login') {
|
|
|
68
68
|
if (!processorConfig.source) {
|
|
69
69
|
processorConfig.source = 'src/processor.ts'
|
|
70
70
|
}
|
|
71
|
-
if (!processorConfig.targets) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
if (processorConfig.targets.length === 0) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
71
|
+
// if (!processorConfig.targets) {
|
|
72
|
+
// console.warn('targets is not defined, use EVM as the default target')
|
|
73
|
+
// processorConfig.targets = []
|
|
74
|
+
// }
|
|
75
|
+
// if (processorConfig.targets.length === 0) {
|
|
76
|
+
// // By default evm
|
|
77
|
+
// processorConfig.targets.push({ chain: EVM })
|
|
78
|
+
// }
|
|
79
79
|
} catch (e) {
|
|
80
80
|
console.error(e)
|
|
81
81
|
process.exit(1)
|
|
@@ -141,9 +141,9 @@ if (mainOptions.command === 'login') {
|
|
|
141
141
|
uploadFile(processorConfig, apiOverride)
|
|
142
142
|
}
|
|
143
143
|
} else if (mainOptions.command === 'build') {
|
|
144
|
-
buildProcessor(false
|
|
144
|
+
buildProcessor(false)
|
|
145
145
|
} else if (mainOptions.command === 'gen') {
|
|
146
|
-
buildProcessor(true
|
|
146
|
+
buildProcessor(true)
|
|
147
147
|
} else {
|
|
148
148
|
usage()
|
|
149
149
|
}
|
package/src/cli/config.ts
CHANGED
|
@@ -3,7 +3,7 @@ export interface SentioProjectConfig {
|
|
|
3
3
|
host: string
|
|
4
4
|
source: string
|
|
5
5
|
build: boolean
|
|
6
|
-
targets: Target[]
|
|
6
|
+
// targets: Target[]
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export function getFinalizedHost(host: string): string {
|
|
@@ -36,11 +36,11 @@ export function FinalizeProjectName(config: SentioProjectConfig, owner: string |
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
export interface Target {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// Supported target chain, lower case
|
|
45
|
-
export const EVM = 'evm'
|
|
46
|
-
export const SOLANA = 'solana'
|
|
39
|
+
// export interface Target {
|
|
40
|
+
// chain: string
|
|
41
|
+
// abisDir?: string
|
|
42
|
+
// }
|
|
43
|
+
//
|
|
44
|
+
// // Supported target chain, lower case
|
|
45
|
+
// export const EVM = 'evm'
|
|
46
|
+
// export const SOLANA = 'solana'
|
package/src/cli/upload.ts
CHANGED
|
@@ -24,7 +24,7 @@ async function createProject(options: SentioProjectConfig, apiKey: string) {
|
|
|
24
24
|
|
|
25
25
|
export async function uploadFile(options: SentioProjectConfig, apiKeyOverride: string) {
|
|
26
26
|
if (options.build) {
|
|
27
|
-
await buildProcessor(false
|
|
27
|
+
await buildProcessor(false)
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
console.log(chalk.blue('Prepare to upload'))
|
package/src/service.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Block, Log } from '@ethersproject/abstract-provider'
|
|
2
2
|
import { CallContext, ServerError, Status } from 'nice-grpc'
|
|
3
|
-
import {
|
|
3
|
+
import { SOL_MAINMET_ID, SUI_DEVNET_ID } from './utils/chain'
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
AptosCallHandlerConfig,
|
|
@@ -212,7 +212,7 @@ export class ProcessorServiceImpl implements ProcessorServiceImplementation {
|
|
|
212
212
|
processorType: USER_PROCESSOR,
|
|
213
213
|
contract: {
|
|
214
214
|
name: aptosProcessor.name,
|
|
215
|
-
chainId:
|
|
215
|
+
chainId: aptosProcessor.getChainId(),
|
|
216
216
|
address: aptosProcessor.config.address,
|
|
217
217
|
abi: '',
|
|
218
218
|
},
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { codeGenAptosProcessor, codeGenSolanaProcessor } from './cli/build'
|
|
4
|
+
import path from 'path'
|
|
5
|
+
|
|
6
|
+
if (process.argv.length > 3) {
|
|
7
|
+
const abisDir = process.argv[2]
|
|
8
|
+
const targetDir = process.argv[3]
|
|
9
|
+
codeGenAptosProcessor(path.join(abisDir, 'aptos'), path.join(targetDir, 'aptos'))
|
|
10
|
+
codeGenSolanaProcessor(path.join(abisDir, 'solana'), path.join(targetDir, 'solana'))
|
|
11
|
+
} else {
|
|
12
|
+
console.error('Not enough argument')
|
|
13
|
+
process.exit(1)
|
|
14
|
+
}
|