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 2
2
3
3
The contract manager is a tool to interact with Pyth related contracts on all supported chains.
4
4
5
- It has the following structure:
6
-
5
+ ## Project Structure
7
6
- ` store ` contains all the necessary information for registered chains and deployed contracts
8
7
- ` scripts ` contains utility scripts to interact with the contract manager and accomplish common tasks
9
8
- ` src ` contains the contract manager code
10
9
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
12
36
13
37
Contract Manager has base classes which you can use to interact with the following entities:
14
38
@@ -18,10 +42,6 @@ Contract Manager has base classes which you can use to interact with the followi
18
42
19
43
Each of these entities has a specialized class for each supported chain (EVM/Cosmos/Aptos/Sui).
20
44
21
- # Docs
45
+ ## Documentation
22
46
23
47
You 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 9
9
" lib/**/*"
10
10
],
11
11
"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" ,
13
15
"shell" : " ts-node ./src/shell.ts" ,
14
16
"test:lint" : " eslint src/ scripts/" ,
15
17
"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