CLI: Fix verify-vaa and Sui submit for testnet (#4204)
This commit is contained in:
parent
79657d4392
commit
1dbe8459b9
|
@ -416,7 +416,7 @@ export const setMaxGasBudgetDevnet = (
|
||||||
network: Network,
|
network: Network,
|
||||||
tx: TransactionBlock
|
tx: TransactionBlock
|
||||||
) => {
|
) => {
|
||||||
if (network === "Devnet") {
|
if (network === "Devnet" || network === "Testnet") {
|
||||||
// Avoid Error checking transaction input objects: GasBudgetTooHigh { gas_budget: 50000000000, max_budget: 10000000000 }
|
// Avoid Error checking transaction input objects: GasBudgetTooHigh { gas_budget: 50000000000, max_budget: 10000000000 }
|
||||||
tx.setGasBudget(10000000000);
|
tx.setGasBudget(10000000000);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,13 +24,18 @@ export const handler = async (
|
||||||
const network = getNetwork(argv.network);
|
const network = getNetwork(argv.network);
|
||||||
|
|
||||||
const buf = Buffer.from(String(argv.vaa), "hex");
|
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) {
|
if (!contract_address) {
|
||||||
throw Error(`Unknown core contract on ${network} for ethereum`);
|
throw Error(`Unknown core contract on ${network} for ethereum`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const provider = new ethers.providers.JsonRpcProvider(
|
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 contract = Implementation__factory.connect(contract_address, provider);
|
||||||
const result = await contract.parseAndVerifyVM(buf);
|
const result = await contract.parseAndVerifyVM(buf);
|
||||||
|
|
Loading…
Reference in New Issue