| 1234567891011121314151617181920212223 |
- require('dotenv').config({ path: "../.env" });
- const bs58 = require("bs58");
- const PythUpgradable = artifacts.require("PythUpgradable");
- const Wormhole = artifacts.require("Wormhole");
- const pyth2WormholeChainId = process.env.PYTH_TO_WORMHOLE_CHAIN_ID;
- const pyth2WormholeEmitter = process.env.PYTH_TO_WORMHOLE_EMITTER;
- const { deployProxy } = require("@openzeppelin/truffle-upgrades");
- console.log("Deploying Pyth with emitter", pyth2WormholeEmitter.toString("hex"))
- module.exports = async function (deployer) {
- // Deploy the proxy script
- await deployProxy(PythUpgradable,
- [
- (await Wormhole.deployed()).address,
- pyth2WormholeChainId,
- pyth2WormholeEmitter
- ],
- { deployer });
- };
|