feat(contract_manager): separate store for wormhole (#1493)
* rename wormhole contract as per other names * store for wormhole * fix var name * rename var * rename contract based on other namings * add yaml for aptos and cosmwasm
This commit is contained in:
parent
48a5faf4d9
commit
d31cefb446
|
@ -23,7 +23,7 @@ import {
|
|||
EvmEntropyContract,
|
||||
EvmPriceFeedContract,
|
||||
getCodeDigestWithoutAddress,
|
||||
WormholeEvmContract,
|
||||
EvmWormholeContract,
|
||||
} from "../src/contracts/evm";
|
||||
import Web3 from "web3";
|
||||
|
||||
|
@ -73,7 +73,7 @@ async function main() {
|
|||
instruction.governanceAction.targetChainId
|
||||
) {
|
||||
const address = instruction.governanceAction.address;
|
||||
const contract = new WormholeEvmContract(chain, address);
|
||||
const contract = new EvmWormholeContract(chain, address);
|
||||
const currentIndex = await contract.getCurrentGuardianSetIndex();
|
||||
const guardianSet = await contract.getGuardianSet();
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
PrivateKey,
|
||||
toDeploymentType,
|
||||
toPrivateKey,
|
||||
WormholeEvmContract,
|
||||
EvmWormholeContract,
|
||||
} from "../src";
|
||||
import {
|
||||
COMMON_DEPLOY_OPTIONS,
|
||||
|
@ -200,7 +200,7 @@ async function main() {
|
|||
saveContract: argv.saveContract,
|
||||
wormholeAddr,
|
||||
};
|
||||
const wormholeContract = new WormholeEvmContract(
|
||||
const wormholeContract = new EvmWormholeContract(
|
||||
chain,
|
||||
deploymentConfig.wormholeAddr
|
||||
);
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
PrivateKey,
|
||||
toDeploymentType,
|
||||
toPrivateKey,
|
||||
WormholeEvmContract,
|
||||
EvmWormholeContract,
|
||||
} from "../src";
|
||||
import {
|
||||
COMMON_DEPLOY_OPTIONS,
|
||||
|
@ -98,15 +98,12 @@ async function deployWormholeReceiverContracts(
|
|||
[receiverSetupAddr, initData]
|
||||
);
|
||||
|
||||
const wormholeEvmContract = new WormholeEvmContract(
|
||||
chain,
|
||||
wormholeReceiverAddr
|
||||
);
|
||||
const wormholeContract = new EvmWormholeContract(chain, wormholeReceiverAddr);
|
||||
|
||||
if (config.type === "stable") {
|
||||
console.log(`Syncing mainnet guardian sets for ${chain.getId()}...`);
|
||||
// TODO: Add a way to pass gas configs to this
|
||||
await wormholeEvmContract.syncMainnetGuardianSets(config.privateKey);
|
||||
await wormholeContract.syncMainnetGuardianSets(config.privateKey);
|
||||
console.log(`✅ Synced mainnet guardian sets for ${chain.getId()}`);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,39 @@ type GuardianSet = {
|
|||
index: { number: string };
|
||||
};
|
||||
|
||||
export class WormholeAptosContract extends WormholeContract {
|
||||
export class AptosWormholeContract extends WormholeContract {
|
||||
static type = "AptosWormholeContract";
|
||||
|
||||
getId(): string {
|
||||
return `${this.chain.getId()}_${this.address}`;
|
||||
}
|
||||
|
||||
getType(): string {
|
||||
return AptosWormholeContract.type;
|
||||
}
|
||||
|
||||
toJson() {
|
||||
return {
|
||||
chain: this.chain.getId(),
|
||||
address: this.address,
|
||||
type: AptosWormholeContract.type,
|
||||
};
|
||||
}
|
||||
|
||||
static fromJson(
|
||||
chain: Chain,
|
||||
parsed: {
|
||||
type: string;
|
||||
address: string;
|
||||
}
|
||||
): AptosWormholeContract {
|
||||
if (parsed.type !== AptosWormholeContract.type)
|
||||
throw new Error("Invalid type");
|
||||
if (!(chain instanceof AptosChain))
|
||||
throw new Error(`Wrong chain type ${chain}`);
|
||||
return new AptosWormholeContract(chain, parsed.address);
|
||||
}
|
||||
|
||||
constructor(public chain: AptosChain, public address: string) {
|
||||
super();
|
||||
}
|
||||
|
@ -124,8 +156,8 @@ export class AptosPriceFeedContract extends PriceFeedContract {
|
|||
return this.chain.sendTransaction(senderPrivateKey, txPayload);
|
||||
}
|
||||
|
||||
public getWormholeContract(): WormholeAptosContract {
|
||||
return new WormholeAptosContract(this.chain, this.wormholeStateId);
|
||||
public getWormholeContract(): AptosWormholeContract {
|
||||
return new AptosWormholeContract(this.chain, this.wormholeStateId);
|
||||
}
|
||||
|
||||
async executeUpdatePriceFeed(
|
||||
|
|
|
@ -38,7 +38,36 @@ export interface DeploymentConfig {
|
|||
fee: { amount: string; denom: string };
|
||||
}
|
||||
|
||||
export class WormholeCosmWasmContract extends WormholeContract {
|
||||
export class CosmWasmWormholeContract extends WormholeContract {
|
||||
static type = "CosmWasmWormholeContract";
|
||||
|
||||
getId(): string {
|
||||
return `${this.chain.getId()}_${this.address}`;
|
||||
}
|
||||
|
||||
getType(): string {
|
||||
return CosmWasmWormholeContract.type;
|
||||
}
|
||||
|
||||
toJson() {
|
||||
return {
|
||||
chain: this.chain.getId(),
|
||||
address: this.address,
|
||||
type: CosmWasmWormholeContract.type,
|
||||
};
|
||||
}
|
||||
|
||||
static fromJson(
|
||||
chain: Chain,
|
||||
parsed: { type: string; address: string }
|
||||
): CosmWasmWormholeContract {
|
||||
if (parsed.type !== CosmWasmWormholeContract.type)
|
||||
throw new Error("Invalid type");
|
||||
if (!(chain instanceof CosmWasmChain))
|
||||
throw new Error(`Wrong chain type ${chain}`);
|
||||
return new CosmWasmWormholeContract(chain, parsed.address);
|
||||
}
|
||||
|
||||
constructor(public chain: CosmWasmChain, public address: string) {
|
||||
super();
|
||||
}
|
||||
|
@ -310,10 +339,10 @@ export class CosmWasmPriceFeedContract extends PriceFeedContract {
|
|||
return { id: result.txHash, info: result };
|
||||
}
|
||||
|
||||
async getWormholeContract(): Promise<WormholeCosmWasmContract> {
|
||||
async getWormholeContract(): Promise<CosmWasmWormholeContract> {
|
||||
const config = await this.getConfig();
|
||||
const wormholeAddress = config.config_v1.wormhole_contract;
|
||||
return new WormholeCosmWasmContract(this.chain, wormholeAddress);
|
||||
return new CosmWasmWormholeContract(this.chain, wormholeAddress);
|
||||
}
|
||||
|
||||
async getUpdateFee(msgs: string[]): Promise<Coin> {
|
||||
|
|
|
@ -390,7 +390,37 @@ export async function getCodeDigestWithoutAddress(
|
|||
return Web3.utils.keccak256(strippedCode);
|
||||
}
|
||||
|
||||
export class WormholeEvmContract extends WormholeContract {
|
||||
export class EvmWormholeContract extends WormholeContract {
|
||||
static type = "EvmWormholeContract";
|
||||
|
||||
getId(): string {
|
||||
return `${this.chain.getId()}_${this.address}`;
|
||||
}
|
||||
|
||||
getChain(): EvmChain {
|
||||
return this.chain;
|
||||
}
|
||||
|
||||
getType(): string {
|
||||
return EvmWormholeContract.type;
|
||||
}
|
||||
|
||||
async getVersion(): Promise<string> {
|
||||
const contract = this.getContract();
|
||||
return contract.methods.version().call();
|
||||
}
|
||||
|
||||
static fromJson(
|
||||
chain: Chain,
|
||||
parsed: { type: string; address: string }
|
||||
): EvmWormholeContract {
|
||||
if (parsed.type !== EvmWormholeContract.type)
|
||||
throw new Error("Invalid type");
|
||||
if (!(chain instanceof EvmChain))
|
||||
throw new Error(`Wrong chain type ${chain}`);
|
||||
return new EvmWormholeContract(chain, parsed.address);
|
||||
}
|
||||
|
||||
constructor(public chain: EvmChain, public address: string) {
|
||||
super();
|
||||
}
|
||||
|
@ -436,6 +466,14 @@ export class WormholeEvmContract extends WormholeContract {
|
|||
);
|
||||
return { id: result.transactionHash, info: result };
|
||||
}
|
||||
|
||||
toJson() {
|
||||
return {
|
||||
chain: this.chain.getId(),
|
||||
address: this.address,
|
||||
type: EvmWormholeContract.type,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
interface EntropyProviderInfo {
|
||||
|
@ -651,13 +689,13 @@ export class EvmExecutorContract {
|
|||
return `${this.chain.getId()}_${this.address}`;
|
||||
}
|
||||
|
||||
async getWormholeContract(): Promise<WormholeEvmContract> {
|
||||
async getWormholeContract(): Promise<EvmWormholeContract> {
|
||||
const web3 = new Web3(this.chain.getRpcUrl());
|
||||
//Unfortunately, there is no public method to get the wormhole address
|
||||
//Found 251 by using `forge build --extra-output storageLayout` and finding the slot for the wormhole variable.
|
||||
let address = await web3.eth.getStorageAt(this.address, 251);
|
||||
address = "0x" + address.slice(26);
|
||||
return new WormholeEvmContract(this.chain, address);
|
||||
return new EvmWormholeContract(this.chain, address);
|
||||
}
|
||||
|
||||
getContract() {
|
||||
|
@ -822,10 +860,10 @@ export class EvmPriceFeedContract extends PriceFeedContract {
|
|||
/**
|
||||
* Returns the wormhole contract which is being used for VAA verification
|
||||
*/
|
||||
async getWormholeContract(): Promise<WormholeEvmContract> {
|
||||
async getWormholeContract(): Promise<EvmWormholeContract> {
|
||||
const pythContract = this.getContract();
|
||||
const address = await pythContract.methods.wormhole().call();
|
||||
return new WormholeEvmContract(this.chain, address);
|
||||
return new EvmWormholeContract(this.chain, address);
|
||||
}
|
||||
|
||||
async getBaseUpdateFee() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { PrivateKey, TxResult } from "../base";
|
||||
import { PrivateKey, Storable, TxResult } from "../base";
|
||||
|
||||
export abstract class WormholeContract {
|
||||
export abstract class WormholeContract extends Storable {
|
||||
abstract getCurrentGuardianSetIndex(): Promise<number>;
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,9 +8,9 @@ repl.evalCode(
|
|||
"import { loadHotWallet, Vault } from './src/governance';" +
|
||||
"import { SuiChain, CosmWasmChain, AptosChain, EvmChain } from './src/chains';" +
|
||||
"import { SuiPriceFeedContract } from './src/contracts/sui';" +
|
||||
"import { WormholeCosmWasmContract, CosmWasmPriceFeedContract } from './src/contracts/cosmwasm';" +
|
||||
"import { WormholeEvmContract, EvmPriceFeedContract } from './src/contracts/evm';" +
|
||||
"import { WormholeAptosContract, AptosPriceFeedContract } from './src/contracts/aptos';" +
|
||||
"import { CosmWasmWormholeContract, CosmWasmPriceFeedContract } from './src/contracts/cosmwasm';" +
|
||||
"import { EvmWormholeContract, EvmPriceFeedContract } from './src/contracts/evm';" +
|
||||
"import { AptosWormholeContract, AptosPriceFeedContract } from './src/contracts/aptos';" +
|
||||
"import { DefaultStore } from './src/store';" +
|
||||
"import { toPrivateKey } from './src/base';" +
|
||||
"DefaultStore"
|
||||
|
|
|
@ -8,10 +8,14 @@ import {
|
|||
} from "./chains";
|
||||
import {
|
||||
AptosPriceFeedContract,
|
||||
AptosWormholeContract,
|
||||
CosmWasmPriceFeedContract,
|
||||
CosmWasmWormholeContract,
|
||||
EvmEntropyContract,
|
||||
EvmPriceFeedContract,
|
||||
EvmWormholeContract,
|
||||
SuiPriceFeedContract,
|
||||
WormholeContract,
|
||||
} from "./contracts";
|
||||
import { Token } from "./token";
|
||||
import { PriceFeedContract, Storable } from "./base";
|
||||
|
@ -23,6 +27,7 @@ export class Store {
|
|||
public chains: Record<string, Chain> = { global: new GlobalChain() };
|
||||
public contracts: Record<string, PriceFeedContract> = {};
|
||||
public entropy_contracts: Record<string, EvmEntropyContract> = {};
|
||||
public wormhole_contracts: Record<string, WormholeContract> = {};
|
||||
public tokens: Record<string, Token> = {};
|
||||
public vaults: Record<string, Vault> = {};
|
||||
|
||||
|
@ -81,6 +86,7 @@ export class Store {
|
|||
const contractsByType: Record<string, Storable[]> = {};
|
||||
const contracts: Storable[] = Object.values(this.contracts);
|
||||
contracts.push(...Object.values(this.entropy_contracts));
|
||||
contracts.push(...Object.values(this.wormhole_contracts));
|
||||
for (const contract of contracts) {
|
||||
if (!contractsByType[contract.getType()]) {
|
||||
contractsByType[contract.getType()] = [];
|
||||
|
@ -114,10 +120,13 @@ export class Store {
|
|||
loadAllContracts() {
|
||||
const allContractClasses = {
|
||||
[CosmWasmPriceFeedContract.type]: CosmWasmPriceFeedContract,
|
||||
[CosmWasmWormholeContract.type]: CosmWasmWormholeContract,
|
||||
[SuiPriceFeedContract.type]: SuiPriceFeedContract,
|
||||
[EvmPriceFeedContract.type]: EvmPriceFeedContract,
|
||||
[AptosPriceFeedContract.type]: AptosPriceFeedContract,
|
||||
[AptosWormholeContract.type]: AptosWormholeContract,
|
||||
[EvmEntropyContract.type]: EvmEntropyContract,
|
||||
[EvmWormholeContract.type]: EvmWormholeContract,
|
||||
};
|
||||
this.getYamlFiles(`${this.path}/contracts/`).forEach((yamlFile) => {
|
||||
const parsedArray = parse(readFileSync(yamlFile, "utf-8"));
|
||||
|
@ -132,13 +141,16 @@ export class Store {
|
|||
);
|
||||
if (
|
||||
this.contracts[chainContract.getId()] ||
|
||||
this.entropy_contracts[chainContract.getId()]
|
||||
this.entropy_contracts[chainContract.getId()] ||
|
||||
this.wormhole_contracts[chainContract.getId()]
|
||||
)
|
||||
throw new Error(
|
||||
`Multiple contracts with id ${chainContract.getId()} found`
|
||||
);
|
||||
if (chainContract instanceof EvmEntropyContract) {
|
||||
this.entropy_contracts[chainContract.getId()] = chainContract;
|
||||
} else if (chainContract instanceof WormholeContract) {
|
||||
this.wormhole_contracts[chainContract.getId()] = chainContract;
|
||||
} else {
|
||||
this.contracts[chainContract.getId()] = chainContract;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
- chain: aptos_mainnet
|
||||
address: "0x5bc11445584a763c1fa7ed39081f1b920954da14e04b32440cba863d03e19625"
|
||||
type: AptosWormholeContract
|
||||
- chain: aptos_testnet
|
||||
address: "0x5bc11445584a763c1fa7ed39081f1b920954da14e04b32440cba863d03e19625"
|
||||
type: AptosWormholeContract
|
||||
- chain: movement_move_devnet
|
||||
address: "0x9236893d6444b208b7e0b3e8d4be4ace90b6d17817ab7d1584e46a33ef5c50c9"
|
||||
type: AptosWormholeContract
|
|
@ -0,0 +1,45 @@
|
|||
- chain: rol_testnet
|
||||
address: rol17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9jfksztgw5uh69wac2pgss2u902
|
||||
type: CosmWasmWormholeContract
|
||||
- chain: osmosis
|
||||
address: osmo1t7qham5kle36rs28se2xd7cckm9mpwzgt65t40lrdf8fcq3837qqjvw80s
|
||||
type: CosmWasmWormholeContract
|
||||
- chain: sei_testnet_atlantic_2
|
||||
address: sei14utt2wp7hamd2qmuz0e5yj728y4u08cm7etujxkc6qprnrla3uwq95jz86
|
||||
type: CosmWasmWormholeContract
|
||||
- chain: juno_testnet
|
||||
address: juno1h7m0xwgu4qh0nrthahpydxzw7klvyd5w8d7jjl675p944ds7jr4sf3ta4l
|
||||
type: CosmWasmWormholeContract
|
||||
- chain: sei_testnet_atlantic_2
|
||||
address: sei1cn8ygrvqk03p5zce3c6rrst7j97qarm33d23rxgme7rzmasddfusw7cpxw
|
||||
type: CosmWasmWormholeContract
|
||||
- chain: neutron_testnet_pion_1
|
||||
address: neutron1nxs2ajn4ejrggfuvqczfx4txghrendcpy3526avg2tsngjktedtspgla8t
|
||||
type: CosmWasmWormholeContract
|
||||
- chain: neutron_testnet_pion_1
|
||||
address: neutron1wtuuak4yt4vyhtv7gt4xnv0m8zfakad5lnz6r7dx8alyydu0sgns67kmvy
|
||||
type: CosmWasmWormholeContract
|
||||
- chain: juno_testnet
|
||||
address: juno1g9xhl5jzhlm6lqc2earxkzyazwl2cshr5cnemxtjy0le64s4w22skukkxj
|
||||
type: CosmWasmWormholeContract
|
||||
- chain: osmosis_testnet_5
|
||||
address: osmo19ah8ak7rgmds40te22xnz7zsdmx5twjulv3sypqm79skkl2ajm4skuhwmf
|
||||
type: CosmWasmWormholeContract
|
||||
- chain: sei_pacific_1
|
||||
address: sei12qq3cufehhsaprjfjrwpx5ltyr43lcrxvf6eaqf0p4jsjpc7semq8p6ewa
|
||||
type: CosmWasmWormholeContract
|
||||
- chain: injective_testnet
|
||||
address: inj1hglkee95shfsl5xxky26hdqxj0mqp54lh7xm59
|
||||
type: CosmWasmWormholeContract
|
||||
- chain: neutron
|
||||
address: neutron178ruq7gf6gk3uus5n8xztj5tsrt5xwxfelw88mc9egfw5d99ktksnk5rsh
|
||||
type: CosmWasmWormholeContract
|
||||
- chain: osmosis_testnet_5
|
||||
address: osmo1llum0y8zc4h2f0rhcdn63xje4mrkdljrve9l40lun9lpeyu2l7cq4phaw6
|
||||
type: CosmWasmWormholeContract
|
||||
- chain: injective_testnet
|
||||
address: inj17sy3vx5dfeva9wx33d09yqdwruntpccnjyw0hj
|
||||
type: CosmWasmWormholeContract
|
||||
- chain: injective
|
||||
address: inj17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9l2q74d
|
||||
type: CosmWasmWormholeContract
|
|
@ -0,0 +1,297 @@
|
|||
- chain: polygon
|
||||
address: "0x35a58BeeE77a2Ad547FcDed7e8CB1c6e19746b13"
|
||||
type: EvmWormholeContract
|
||||
- chain: aurora
|
||||
address: "0x41955476936DdA8d0fA98b8d1778172F7E4fCcA1"
|
||||
type: EvmWormholeContract
|
||||
- chain: fantom
|
||||
address: "0x35a58BeeE77a2Ad547FcDed7e8CB1c6e19746b13"
|
||||
type: EvmWormholeContract
|
||||
- chain: optimism
|
||||
address: "0x87047526937246727E4869C5f76A347160e08672"
|
||||
type: EvmWormholeContract
|
||||
- chain: arbitrum
|
||||
address: "0xEbe57e8045F2F230872523bbff7374986E45C486"
|
||||
type: EvmWormholeContract
|
||||
- chain: gnosis
|
||||
address: "0x26DD80569a8B23768A1d80869Ed7339e07595E85"
|
||||
type: EvmWormholeContract
|
||||
- chain: polygon_zkevm
|
||||
address: "0x41955476936DdA8d0fA98b8d1778172F7E4fCcA1"
|
||||
type: EvmWormholeContract
|
||||
- chain: conflux_espace
|
||||
address: "0xDd24F84d36BF92C65F92307595335bdFab5Bbd21"
|
||||
type: EvmWormholeContract
|
||||
- chain: bsc
|
||||
address: "0x41955476936DdA8d0fA98b8d1778172F7E4fCcA1"
|
||||
type: EvmWormholeContract
|
||||
- chain: kava
|
||||
address: "0x0708325268dF9F66270F1401206434524814508b"
|
||||
type: EvmWormholeContract
|
||||
- chain: avalanche
|
||||
address: "0x41955476936DdA8d0fA98b8d1778172F7E4fCcA1"
|
||||
type: EvmWormholeContract
|
||||
- chain: canto
|
||||
address: "0xf0a1b566B55e0A0CB5BeF52Eb2a57142617Bee67"
|
||||
type: EvmWormholeContract
|
||||
- chain: linea
|
||||
address: "0x0708325268dF9F66270F1401206434524814508b"
|
||||
type: EvmWormholeContract
|
||||
- chain: neon
|
||||
address: "0xCd76c50c3210C5AaA9c39D53A4f95BFd8b1a3a19"
|
||||
type: EvmWormholeContract
|
||||
- chain: mantle
|
||||
address: "0xf0a1b566B55e0A0CB5BeF52Eb2a57142617Bee67"
|
||||
type: EvmWormholeContract
|
||||
- chain: meter
|
||||
address: "0xfA133831D350A2A5997d6db182B6Ca9e8ad4191B"
|
||||
type: EvmWormholeContract
|
||||
- chain: kcc
|
||||
address: "0x41955476936DdA8d0fA98b8d1778172F7E4fCcA1"
|
||||
type: EvmWormholeContract
|
||||
- chain: eos
|
||||
address: "0xEbe57e8045F2F230872523bbff7374986E45C486"
|
||||
type: EvmWormholeContract
|
||||
- chain: celo
|
||||
address: "0x41955476936DdA8d0fA98b8d1778172F7E4fCcA1"
|
||||
type: EvmWormholeContract
|
||||
- chain: wemix
|
||||
address: "0xEbe57e8045F2F230872523bbff7374986E45C486"
|
||||
type: EvmWormholeContract
|
||||
- chain: base
|
||||
address: "0x87047526937246727E4869C5f76A347160e08672"
|
||||
type: EvmWormholeContract
|
||||
- chain: zksync
|
||||
address: "0x53cD6960888cA09361506678adfE267b4CE81A08"
|
||||
type: EvmWormholeContract
|
||||
- chain: horizen_eon
|
||||
address: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"
|
||||
type: EvmWormholeContract
|
||||
- chain: shimmer
|
||||
address: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"
|
||||
type: EvmWormholeContract
|
||||
- chain: boba
|
||||
address: "0x26DD80569a8B23768A1d80869Ed7339e07595E85"
|
||||
type: EvmWormholeContract
|
||||
- chain: manta
|
||||
address: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"
|
||||
type: EvmWormholeContract
|
||||
- chain: scroll
|
||||
address: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"
|
||||
type: EvmWormholeContract
|
||||
- chain: chiliz
|
||||
address: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"
|
||||
type: EvmWormholeContract
|
||||
- chain: coredao
|
||||
address: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"
|
||||
type: EvmWormholeContract
|
||||
- chain: viction
|
||||
address: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"
|
||||
type: EvmWormholeContract
|
||||
- chain: arbitrum_sepolia
|
||||
address: "0xfA25E653b44586dBbe27eE9d252192F0e4956683"
|
||||
type: EvmWormholeContract
|
||||
- chain: fuji
|
||||
address: "0x5744Cbf430D99456a0A8771208b674F27f8EF0Fb"
|
||||
type: EvmWormholeContract
|
||||
- chain: canto_testnet
|
||||
address: "0x41c9e39574F40Ad34c79f1C99B66A45eFB830d4c"
|
||||
type: EvmWormholeContract
|
||||
- chain: aurora_testnet
|
||||
address: "0x2880aB155794e7179c9eE2e38200202908C17B43"
|
||||
type: EvmWormholeContract
|
||||
- chain: chiado
|
||||
address: "0x87047526937246727E4869C5f76A347160e08672"
|
||||
type: EvmWormholeContract
|
||||
- chain: kava_testnet
|
||||
address: "0xD458261E832415CFd3BAE5E416FdF3230ce6F134"
|
||||
type: EvmWormholeContract
|
||||
- chain: conflux_espace_testnet
|
||||
address: "0xEbe57e8045F2F230872523bbff7374986E45C486"
|
||||
type: EvmWormholeContract
|
||||
- chain: celo_alfajores_testnet
|
||||
address: "0x2880aB155794e7179c9eE2e38200202908C17B43"
|
||||
type: EvmWormholeContract
|
||||
- chain: bsc_testnet
|
||||
address: "0xe9d69CdD6Fe41e7B621B4A688C5D1a68cB5c8ADc"
|
||||
type: EvmWormholeContract
|
||||
- chain: kcc_testnet
|
||||
address: "0x2880aB155794e7179c9eE2e38200202908C17B43"
|
||||
type: EvmWormholeContract
|
||||
- chain: eos_testnet
|
||||
address: "0x8D254a21b3C86D32F7179855531CE99164721933"
|
||||
type: EvmWormholeContract
|
||||
- chain: meter_testnet
|
||||
address: "0x257c3B61102442C1c3286Efbd24242322d002920"
|
||||
type: EvmWormholeContract
|
||||
- chain: shimmer_testnet
|
||||
address: "0x98046Bd286715D3B0BC227Dd7a956b83D8978603"
|
||||
type: EvmWormholeContract
|
||||
- chain: scroll_sepolia
|
||||
address: "0x36825bf3Fbdf5a29E2d5148bfe7Dcf7B5639e320"
|
||||
type: EvmWormholeContract
|
||||
- chain: boba_goerli
|
||||
address: "0x98046Bd286715D3B0BC227Dd7a956b83D8978603"
|
||||
type: EvmWormholeContract
|
||||
- chain: manta_testnet
|
||||
address: "0x98046Bd286715D3B0BC227Dd7a956b83D8978603"
|
||||
type: EvmWormholeContract
|
||||
- chain: chiliz_spicy
|
||||
address: "0x98046Bd286715D3B0BC227Dd7a956b83D8978603"
|
||||
type: EvmWormholeContract
|
||||
- chain: coredao_testnet
|
||||
address: "0x98046Bd286715D3B0BC227Dd7a956b83D8978603"
|
||||
type: EvmWormholeContract
|
||||
- chain: cronos_testnet
|
||||
address: "0x74f09cb3c7e2A01865f424FD14F6dc9A14E3e94E"
|
||||
type: EvmWormholeContract
|
||||
- chain: wemix_testnet
|
||||
address: "0x41c9e39574F40Ad34c79f1C99B66A45eFB830d4c"
|
||||
type: EvmWormholeContract
|
||||
- chain: evmos_testnet
|
||||
address: "0x2880aB155794e7179c9eE2e38200202908C17B43"
|
||||
type: EvmWormholeContract
|
||||
- chain: zetachain_testnet
|
||||
address: "0x8D254a21b3C86D32F7179855531CE99164721933"
|
||||
type: EvmWormholeContract
|
||||
- chain: neon_devnet
|
||||
address: "0x23f0e8FAeE7bbb405E7A7C3d60138FCfd43d7509"
|
||||
type: EvmWormholeContract
|
||||
- chain: optimism_sepolia
|
||||
address: "0x8D254a21b3C86D32F7179855531CE99164721933"
|
||||
type: EvmWormholeContract
|
||||
- chain: mode
|
||||
address: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"
|
||||
type: EvmWormholeContract
|
||||
- chain: mode_testnet
|
||||
address: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"
|
||||
type: EvmWormholeContract
|
||||
- chain: bttc_testnet
|
||||
address: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"
|
||||
type: EvmWormholeContract
|
||||
- chain: bttc
|
||||
address: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"
|
||||
type: EvmWormholeContract
|
||||
- chain: zksync_sepolia
|
||||
address: "0xc10F5BE78E464BB0E1f534D66E5A6ecaB150aEFa"
|
||||
type: EvmWormholeContract
|
||||
- chain: base_sepolia
|
||||
address: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"
|
||||
type: EvmWormholeContract
|
||||
- chain: movement_evm_devnet
|
||||
address: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"
|
||||
type: EvmWormholeContract
|
||||
- chain: zkfair_testnet
|
||||
address: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"
|
||||
type: EvmWormholeContract
|
||||
- chain: blast_s2_testnet
|
||||
address: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"
|
||||
type: EvmWormholeContract
|
||||
- chain: zkfair
|
||||
address: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"
|
||||
type: EvmWormholeContract
|
||||
- chain: filecoin_calibration
|
||||
address: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"
|
||||
type: EvmWormholeContract
|
||||
- chain: filecoin
|
||||
address: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"
|
||||
type: EvmWormholeContract
|
||||
- chain: zetachain
|
||||
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
|
||||
type: EvmWormholeContract
|
||||
- chain: sei_evm_devnet
|
||||
address: "0x66E9cBa5529824a03B5Bc9931d9c63637101D0F7"
|
||||
type: EvmWormholeContract
|
||||
- chain: lightlink_pegasus_testnet
|
||||
address: "0x5f3c61944CEb01B3eAef861251Fb1E0f14b848fb"
|
||||
type: EvmWormholeContract
|
||||
- chain: fantom_sonic_testnet
|
||||
address: "0x74f09cb3c7e2A01865f424FD14F6dc9A14E3e94E"
|
||||
type: EvmWormholeContract
|
||||
- chain: dela_deperp_testnet
|
||||
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
|
||||
type: EvmWormholeContract
|
||||
- chain: lightlink_phoenix
|
||||
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
|
||||
type: EvmWormholeContract
|
||||
- chain: injective_inevm_testnet
|
||||
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
|
||||
type: EvmWormholeContract
|
||||
- chain: injective_inevm
|
||||
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
|
||||
type: EvmWormholeContract
|
||||
- chain: hedera_testnet
|
||||
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
|
||||
type: EvmWormholeContract
|
||||
- chain: hedera
|
||||
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
|
||||
type: EvmWormholeContract
|
||||
- chain: berachain_testnet
|
||||
address: "0x74f09cb3c7e2A01865f424FD14F6dc9A14E3e94E"
|
||||
type: EvmWormholeContract
|
||||
- chain: blast
|
||||
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
|
||||
type: EvmWormholeContract
|
||||
- chain: astar_zkevm
|
||||
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
|
||||
type: EvmWormholeContract
|
||||
- chain: merlin_testnet
|
||||
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
|
||||
type: EvmWormholeContract
|
||||
- chain: mantle_sepolia
|
||||
address: "0x66E9cBa5529824a03B5Bc9931d9c63637101D0F7"
|
||||
type: EvmWormholeContract
|
||||
- chain: merlin
|
||||
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
|
||||
type: EvmWormholeContract
|
||||
- chain: manta_sepolia
|
||||
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
|
||||
type: EvmWormholeContract
|
||||
- chain: polygon_blackberry
|
||||
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
|
||||
type: EvmWormholeContract
|
||||
- chain: arbitrum_blueberry
|
||||
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
|
||||
type: EvmWormholeContract
|
||||
- chain: optimism_celestia_raspberry
|
||||
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
|
||||
type: EvmWormholeContract
|
||||
- chain: polynomial_testnet
|
||||
address: "0x87047526937246727E4869C5f76A347160e08672"
|
||||
type: EvmWormholeContract
|
||||
- chain: parallel_testnet
|
||||
address: "0x87047526937246727E4869C5f76A347160e08672"
|
||||
type: EvmWormholeContract
|
||||
- chain: parallel
|
||||
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
|
||||
type: EvmWormholeContract
|
||||
- chain: linea_sepolia
|
||||
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
|
||||
type: EvmWormholeContract
|
||||
- chain: morph_testnet
|
||||
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
|
||||
type: EvmWormholeContract
|
||||
- chain: cronos
|
||||
address: "0x41955476936DdA8d0fA98b8d1778172F7E4fCcA1"
|
||||
type: EvmWormholeContract
|
||||
- chain: ronin
|
||||
address: "0x41955476936DdA8d0fA98b8d1778172F7E4fCcA1"
|
||||
type: EvmWormholeContract
|
||||
- chain: saigon
|
||||
address: "0x36825bf3Fbdf5a29E2d5148bfe7Dcf7B5639e320"
|
||||
type: EvmWormholeContract
|
||||
- chain: ethereum
|
||||
address: "0x74f09cb3c7e2A01865f424FD14F6dc9A14E3e94E"
|
||||
type: EvmWormholeContract
|
||||
- chain: mumbai
|
||||
address: "0x876A4e56A51386aBb1a5ab5d62f77E814372f0C7"
|
||||
type: EvmWormholeContract
|
||||
- chain: fantom_testnet
|
||||
address: "0xe9d69CdD6Fe41e7B621B4A688C5D1a68cB5c8ADc"
|
||||
type: EvmWormholeContract
|
||||
- chain: sepolia
|
||||
address: "0x41c9e39574F40Ad34c79f1C99B66A45eFB830d4c"
|
||||
type: EvmWormholeContract
|
||||
- chain: linea_goerli
|
||||
address: "0xfA25E653b44586dBbe27eE9d252192F0e4956683"
|
||||
type: EvmWormholeContract
|
|
@ -6,7 +6,7 @@ import {
|
|||
CosmWasmPriceFeedContract,
|
||||
DefaultStore,
|
||||
toPrivateKey,
|
||||
WormholeCosmWasmContract,
|
||||
CosmWasmWormholeContract,
|
||||
} from "contract_manager";
|
||||
import { CHAINS } from "xc_admin_common";
|
||||
import { DeploymentType } from "./helper";
|
||||
|
@ -75,7 +75,7 @@ async function run() {
|
|||
});
|
||||
console.log(`Contract admin set to ${instantiateContractRes.contractAddr}`);
|
||||
|
||||
const contract = new WormholeCosmWasmContract(
|
||||
const contract = new CosmWasmWormholeContract(
|
||||
chain,
|
||||
instantiateContractRes.contractAddr
|
||||
);
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
DefaultStore,
|
||||
EvmChain,
|
||||
loadHotWallet,
|
||||
WormholeEvmContract,
|
||||
EvmWormholeContract,
|
||||
} from "contract_manager";
|
||||
import Web3 from "web3";
|
||||
import { CHAINS } from "xc_admin_common";
|
||||
|
@ -111,7 +111,7 @@ async function main() {
|
|||
receiverInfo.bytecode,
|
||||
[setupAddress, initData]
|
||||
);
|
||||
const contract = new WormholeEvmContract(chain, receiverAddress);
|
||||
const contract = new EvmWormholeContract(chain, receiverAddress);
|
||||
console.log("receiverAddress", receiverAddress);
|
||||
await contract.syncMainnetGuardianSets(privateKey);
|
||||
console.log("synced");
|
||||
|
|
Loading…
Reference in New Issue