Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ after `--`, for instance you could run `pnpm test -- --concurrency 2`.
checks, as well as whatever other code checks any packages support.
- `pnpm fix`: Run auto fixes, including reformatting code and auto-fixing lint
rules where possible.
- `pnpm turbo build`: Build all packages in the monorepo using turborepo.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove this line, there shouldn't usually be a good reason to build all packages in the monorepo with turbo -- instead we should be doing things like linting / testing / starting / etc and let turbo build what needs to be built.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @jayantk I'm not sure how we should be updating Devin's PRs....

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might understand github comments, not sure. we'll find out though.

I think this might be a setup problem in the repo for contract_manager, because pnpm build:ci doesn't seem to work there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meta comment is i do think a bit more docs here would be useful. based on these directions, I don't know how to run scripts or anything. Last time i worked with contract manager i spent some time digging around to figure this out.

- `pnpm start:dev`: Start all development servers in parallel.
- `pnpm start:prod`: Run production builds and start production mode servers in
parallel.
Expand Down
20 changes: 9 additions & 11 deletions contract_manager/scripts/generate_upgrade_ton_contract_proposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import path from "path";
const parser = yargs(hideBin(process.argv))
.usage(
"Upgrades the Pyth contract on TON and creates a governance proposal for it.\n" +
"Usage: $0 --network <mainnet|testnet> --contract-address <address> --ops-key-path <ops_key_path>"
"Usage: $0 --network <mainnet|testnet> --contract-address <address> --ops-key-path <ops_key_path>\n" +
"Required environment variables:\n" +
" - ENV_TON_MAINNET_API_KEY: API key for TON mainnet\n" +
" - ENV_TON_TESTNET_API_KEY: API key for TON testnet"
)
.options({
network: {
Expand Down Expand Up @@ -38,16 +41,11 @@ async function main() {
const chainId = isMainnet ? CHAINS.ton_mainnet : CHAINS.ton_testnet;
const wormholeChainName = toChainName(chainId);

// Get the TON chain instance with appropriate RPC URL based on network
const chain = new TonChain(
chainId.toString(),
isMainnet,
wormholeChainName,
undefined,
isMainnet
? "https://toncenter.com/api/v2/jsonRPC"
: "https://testnet.toncenter.com/api/v2/jsonRPC"
);
// Get the TON chain instance from DefaultStore based on network
const chain = DefaultStore.chains[isMainnet ? "ton_mainnet" : "ton_testnet"];
if (!chain || !(chain instanceof TonChain)) {
throw new Error(`Chain configuration not found for TON ${argv.network}`);
}

const vault =
DefaultStore.vaults[
Expand Down
Loading