CLI: Fix verify-vaa and Sui submit for testnet (#4204)

This commit is contained in:
bruce-riley 2024-12-19 14:18:23 -06:00 committed by GitHub
parent 79657d4392
commit 1dbe8459b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View File

@ -416,7 +416,7 @@ export const setMaxGasBudgetDevnet = (
network: Network,
tx: TransactionBlock
) => {
if (network === "Devnet") {
if (network === "Devnet" || network === "Testnet") {
// Avoid Error checking transaction input objects: GasBudgetTooHigh { gas_budget: 50000000000, max_budget: 10000000000 }
tx.setGasBudget(10000000000);
}

View File

@ -24,13 +24,18 @@ export const handler = async (
const network = getNetwork(argv.network);
const buf = Buffer.from(String(argv.vaa), "hex");
const contract_address = contracts.coreBridge(network, "Ethereum");
const contract_address =
network === "Testnet"
? contracts.coreBridge(network, "Sepolia")
: contracts.coreBridge(network, "Ethereum");
if (!contract_address) {
throw Error(`Unknown core contract on ${network} for ethereum`);
}
const provider = new ethers.providers.JsonRpcProvider(
NETWORKS[network].Ethereum.rpc
network === "Testnet"
? NETWORKS[network].Sepolia.rpc
: NETWORKS[network].Ethereum.rpc
);
const contract = Implementation__factory.connect(contract_address, provider);
const result = await contract.parseAndVerifyVM(buf);