File tree Expand file tree Collapse file tree 3 files changed +38
-9
lines changed Expand file tree Collapse file tree 3 files changed +38
-9
lines changed Original file line number Diff line number Diff line change 22
33The contract manager is a tool to interact with Pyth related contracts on all supported chains.
44
5- It has the following structure:
6-
5+ ## Project Structure
76- ` store ` contains all the necessary information for registered chains and deployed contracts
87- ` scripts ` contains utility scripts to interact with the contract manager and accomplish common tasks
98- ` src ` contains the contract manager code
109
11- # Main Entities
10+ ## Setup and Building
11+ ``` bash
12+ # Install dependencies
13+ pnpm install
14+
15+ # Build the package (done automatically by test/lint commands)
16+ pnpm build
17+ ```
18+
19+ ## Running Scripts
20+ Scripts can be run using either ts-node directly or the shell command:
21+
22+ ``` bash
23+ # Run a script directly with ts-node
24+ ts-node scripts/generate_upgrade_ton_contract_proposal.ts --help
25+
26+ # Or use the shell command
27+ pnpm shell generate_upgrade_ton_contract_proposal --help
28+ ```
29+
30+ ### Available Scripts
31+ - ` generate_upgrade_ton_contract_proposal.ts ` : Generate proposal for TON contract upgrade
32+ - Required env vars: ENV_TON_MAINNET_API_KEY, ENV_TON_TESTNET_API_KEY
33+ - Uses chain configuration from store/chains/TonChains.yaml
34+
35+ ## Main Entities
1236
1337Contract Manager has base classes which you can use to interact with the following entities:
1438
@@ -18,10 +42,6 @@ Contract Manager has base classes which you can use to interact with the followi
1842
1943Each of these entities has a specialized class for each supported chain (EVM/Cosmos/Aptos/Sui).
2044
21- # Docs
45+ ## Documentation
2246
2347You can generate the docs by running ` pnpm exec typedoc src/index.ts ` from this directory. Open the docs by opening ` docs/index.html ` in your browser.
24-
25- # Scripts
26-
27- You can run the scripts by executing ` pnpm exec ts-node scripts/<script_name>.ts ` from this directory.
Original file line number Diff line number Diff line change 99 " lib/**/*"
1010 ],
1111 "scripts" : {
12- "build" : " tsc" ,
12+ "build" : " pnpm run build:cjs && pnpm run build:esm" ,
13+ "build:cjs" : " tsc -p tsconfig.json" ,
14+ "build:esm" : " tsc -p tsconfig.esm.json" ,
1315 "shell" : " ts-node ./src/shell.ts" ,
1416 "test:lint" : " eslint src/ scripts/" ,
1517 "format" : " prettier --write \" src/**/*.ts\" \" scripts/**/*.ts\" "
Original file line number Diff line number Diff line change 1+ {
2+ "extends" : " ./tsconfig.json" ,
3+ "compilerOptions" : {
4+ "module" : " esnext" ,
5+ "outDir" : " ./lib/esm"
6+ }
7+ }
You can’t perform that action at this time.
0 commit comments