pyth-crosschain/ethereum/migrations/test/4_pyth_multiple_emitters.js

18 lines
551 B
JavaScript

require("dotenv").config({ path: "../.env" });
const PythUpgradable = artifacts.require("PythUpgradable");
const { upgradeProxy } = require("@openzeppelin/truffle-upgrades");
/**
* Adds multiple emitter/chain ID support
*/
module.exports = async function (deployer) {
const proxy = await PythUpgradable.deployed();
await upgradeProxy(proxy.address, PythUpgradable, { deployer, unsafeSkipStorageCheck: true });
await proxy.addDataSource(
await proxy.pyth2WormholeChainId(),
await proxy.pyth2WormholeEmitter()
);
};