Add pythnet migration files (#246)

* Add pythnet migration files

Also:
- Add related env vars for testnet networks. Mainnet ones to be added
when it's ready.
- Rename Pyth2Wormhole env vars to solana

* Add mainnet emitter

* Fix migration file numbers

* Address Jayant comments
This commit is contained in:
Ali Behjati 2022-09-06 13:03:21 +02:00 committed by GitHub
parent b846fc3c84
commit 65c273fa0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 123 additions and 43 deletions

View File

@ -3,7 +3,9 @@ MIGRATIONS_NETWORK=aurora
#Pyth #Pyth
WORMHOLE_BRIDGE_ADDRESS=0xa321448d90d4e5b0A732867c18eA198e75CAC48E WORMHOLE_BRIDGE_ADDRESS=0xa321448d90d4e5b0A732867c18eA198e75CAC48E
PYTH_TO_WORMHOLE_CHAIN_ID=0x1 SOLANA_CHAIN_ID=0x1
PYTH_TO_WORMHOLE_EMITTER=0x6bb14509a612f01fbbc4cffeebd4bbfb492a86df717ebe92eb6df432a3f00a25 SOLANA_EMITTER=0x6bb14509a612f01fbbc4cffeebd4bbfb492a86df717ebe92eb6df432a3f00a25
PYTHNET_CHAIN_ID=0x1a
PYTHNET_EMITTER=0xf8cd23c2ab91237730770bbea08d61005cdda0984348f3f6eecb559638c0bba0
VALID_TIME_PERIOD_SECONDS=60 VALID_TIME_PERIOD_SECONDS=60

View File

@ -3,7 +3,9 @@ MIGRATIONS_NETWORK=aurora_testnet
#Pyth #Pyth
WORMHOLE_BRIDGE_ADDRESS=0xBd07292de7b505a4E803CEe286184f7Acf908F5e WORMHOLE_BRIDGE_ADDRESS=0xBd07292de7b505a4E803CEe286184f7Acf908F5e
PYTH_TO_WORMHOLE_CHAIN_ID=0x1 SOLANA_CHAIN_ID=0x1
PYTH_TO_WORMHOLE_EMITTER=0xf346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0 SOLANA_EMITTER=0xf346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0
PYTHNET_CHAIN_ID=0x1a
PYTHNET_EMITTER=0xa27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6
VALID_TIME_PERIOD_SECONDS=60 VALID_TIME_PERIOD_SECONDS=60

View File

@ -3,7 +3,9 @@ MIGRATIONS_NETWORK=avalanche
#Pyth #Pyth
WORMHOLE_BRIDGE_ADDRESS=0x54a8e5f9c4CbA08F9943965859F6c34eAF03E26c WORMHOLE_BRIDGE_ADDRESS=0x54a8e5f9c4CbA08F9943965859F6c34eAF03E26c
PYTH_TO_WORMHOLE_CHAIN_ID=0x1 SOLANA_CHAIN_ID=0x1
PYTH_TO_WORMHOLE_EMITTER=0x6bb14509a612f01fbbc4cffeebd4bbfb492a86df717ebe92eb6df432a3f00a25 SOLANA_EMITTER=0x6bb14509a612f01fbbc4cffeebd4bbfb492a86df717ebe92eb6df432a3f00a25
PYTHNET_CHAIN_ID=0x1a
PYTHNET_EMITTER=0xf8cd23c2ab91237730770bbea08d61005cdda0984348f3f6eecb559638c0bba0
VALID_TIME_PERIOD_SECONDS=60 VALID_TIME_PERIOD_SECONDS=60

View File

@ -3,7 +3,9 @@ MIGRATIONS_NETWORK=bnb
#Pyth #Pyth
WORMHOLE_BRIDGE_ADDRESS=0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B WORMHOLE_BRIDGE_ADDRESS=0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B
PYTH_TO_WORMHOLE_CHAIN_ID=0x1 SOLANA_CHAIN_ID=0x1
PYTH_TO_WORMHOLE_EMITTER=0x6bb14509a612f01fbbc4cffeebd4bbfb492a86df717ebe92eb6df432a3f00a25 SOLANA_EMITTER=0x6bb14509a612f01fbbc4cffeebd4bbfb492a86df717ebe92eb6df432a3f00a25
PYTHNET_CHAIN_ID=0x1a
PYTHNET_EMITTER=0xf8cd23c2ab91237730770bbea08d61005cdda0984348f3f6eecb559638c0bba0
VALID_TIME_PERIOD_SECONDS=60 VALID_TIME_PERIOD_SECONDS=60

View File

@ -3,7 +3,9 @@ MIGRATIONS_NETWORK=bnb_testnet
#Pyth #Pyth
WORMHOLE_BRIDGE_ADDRESS=0x68605AD7b15c732a30b1BbC62BE8F2A509D74b4D WORMHOLE_BRIDGE_ADDRESS=0x68605AD7b15c732a30b1BbC62BE8F2A509D74b4D
PYTH_TO_WORMHOLE_CHAIN_ID=0x1 SOLANA_CHAIN_ID=0x1
PYTH_TO_WORMHOLE_EMITTER=0xf346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0 SOLANA_EMITTER=0xf346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0
PYTHNET_CHAIN_ID=0x1a
PYTHNET_EMITTER=0xa27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6
VALID_TIME_PERIOD_SECONDS=60 VALID_TIME_PERIOD_SECONDS=60

View File

@ -3,7 +3,9 @@ MIGRATIONS_NETWORK=celo
#Pyth #Pyth
WORMHOLE_BRIDGE_ADDRESS=0xa321448d90d4e5b0A732867c18eA198e75CAC48E WORMHOLE_BRIDGE_ADDRESS=0xa321448d90d4e5b0A732867c18eA198e75CAC48E
PYTH_TO_WORMHOLE_CHAIN_ID=0x1 SOLANA_CHAIN_ID=0x1
PYTH_TO_WORMHOLE_EMITTER=0x6bb14509a612f01fbbc4cffeebd4bbfb492a86df717ebe92eb6df432a3f00a25 SOLANA_EMITTER=0x6bb14509a612f01fbbc4cffeebd4bbfb492a86df717ebe92eb6df432a3f00a25
PYTHNET_CHAIN_ID=0x1a
PYTHNET_EMITTER=0xf8cd23c2ab91237730770bbea08d61005cdda0984348f3f6eecb559638c0bba0
VALID_TIME_PERIOD_SECONDS=60 VALID_TIME_PERIOD_SECONDS=60

View File

@ -3,7 +3,9 @@ MIGRATIONS_NETWORK=celo_alfajores_testnet
#Pyth #Pyth
WORMHOLE_BRIDGE_ADDRESS=0x88505117CA88e7dd2eC6EA1E13f0948db2D50D56 WORMHOLE_BRIDGE_ADDRESS=0x88505117CA88e7dd2eC6EA1E13f0948db2D50D56
PYTH_TO_WORMHOLE_CHAIN_ID=0x1 SOLANA_CHAIN_ID=0x1
PYTH_TO_WORMHOLE_EMITTER=0xf346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0 SOLANA_EMITTER=0xf346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0
PYTHNET_CHAIN_ID=0x1a
PYTHNET_EMITTER=0xa27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6
VALID_TIME_PERIOD_SECONDS=60 VALID_TIME_PERIOD_SECONDS=60

View File

@ -3,8 +3,10 @@ MIGRATIONS_DIR=./migrations/prod
MIGRATIONS_NETWORK=development MIGRATIONS_NETWORK=development
#Pyth #Pyth
WORMHOLE_BRIDGE_ADDRESS=0x68605AD7b15c732a30b1BbC62BE8F2A509D74b4D WORMHOLE_BRIDGE_ADDRESS=0x88505117CA88e7dd2eC6EA1E13f0948db2D50D56
PYTH_TO_WORMHOLE_CHAIN_ID=0x1 SOLANA_CHAIN_ID=0x1
PYTH_TO_WORMHOLE_EMITTER=0x6bb14509a612f01fbbc4cffeebd4bbfb492a86df717ebe92eb6df432a3f00a25 SOLANA_EMITTER=0xf346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0
PYTHNET_CHAIN_ID=0x1a
PYTHNET_EMITTER=0xa27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6
VALID_TIME_PERIOD_SECONDS=60 VALID_TIME_PERIOD_SECONDS=60

View File

@ -3,7 +3,9 @@ MIGRATIONS_NETWORK=fantom
#Pyth #Pyth
WORMHOLE_BRIDGE_ADDRESS=0x126783A6Cb203a3E35344528B26ca3a0489a1485 WORMHOLE_BRIDGE_ADDRESS=0x126783A6Cb203a3E35344528B26ca3a0489a1485
PYTH_TO_WORMHOLE_CHAIN_ID=0x1 SOLANA_CHAIN_ID=0x1
PYTH_TO_WORMHOLE_EMITTER=0x6bb14509a612f01fbbc4cffeebd4bbfb492a86df717ebe92eb6df432a3f00a25 SOLANA_EMITTER=0x6bb14509a612f01fbbc4cffeebd4bbfb492a86df717ebe92eb6df432a3f00a25
PYTHNET_CHAIN_ID=0x1a
PYTHNET_EMITTER=0xf8cd23c2ab91237730770bbea08d61005cdda0984348f3f6eecb559638c0bba0
VALID_TIME_PERIOD_SECONDS=60 VALID_TIME_PERIOD_SECONDS=60

View File

@ -3,7 +3,9 @@ MIGRATIONS_NETWORK=fantom_testnet
#Pyth #Pyth
WORMHOLE_BRIDGE_ADDRESS=0x1BB3B4119b7BA9dfad76B0545fb3F531383c3bB7 WORMHOLE_BRIDGE_ADDRESS=0x1BB3B4119b7BA9dfad76B0545fb3F531383c3bB7
PYTH_TO_WORMHOLE_CHAIN_ID=0x1 SOLANA_CHAIN_ID=0x1
PYTH_TO_WORMHOLE_EMITTER=0xf346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0 SOLANA_EMITTER=0xf346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0
PYTHNET_CHAIN_ID=0x1a
PYTHNET_EMITTER=0xa27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6
VALID_TIME_PERIOD_SECONDS=60 VALID_TIME_PERIOD_SECONDS=60

View File

@ -1,9 +1,13 @@
# Fuji is Avalanche testnet network
MIGRATIONS_DIR=./migrations/prod MIGRATIONS_DIR=./migrations/prod
MIGRATIONS_NETWORK=fuji MIGRATIONS_NETWORK=fuji
#Pyth #Pyth
WORMHOLE_BRIDGE_ADDRESS=0x7bbcE28e64B3F8b84d876Ab298393c38ad7aac4C WORMHOLE_BRIDGE_ADDRESS=0x7bbcE28e64B3F8b84d876Ab298393c38ad7aac4C
PYTH_TO_WORMHOLE_CHAIN_ID=0x1 SOLANA_CHAIN_ID=0x1
PYTH_TO_WORMHOLE_EMITTER=0xf346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0 SOLANA_EMITTER=0xf346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0
PYTHNET_CHAIN_ID=0x1a
PYTHNET_EMITTER=0xa27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6
VALID_TIME_PERIOD_SECONDS=60 VALID_TIME_PERIOD_SECONDS=60

View File

@ -3,7 +3,9 @@ MIGRATIONS_NETWORK=goerli
#Pyth #Pyth
WORMHOLE_BRIDGE_ADDRESS=0x706abc4E45D419950511e474C7B9Ed348A4a716c WORMHOLE_BRIDGE_ADDRESS=0x706abc4E45D419950511e474C7B9Ed348A4a716c
PYTH_TO_WORMHOLE_CHAIN_ID=0x1 SOLANA_CHAIN_ID=0x1
PYTH_TO_WORMHOLE_EMITTER=0xf346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0 SOLANA_EMITTER=0xf346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0
PYTHNET_CHAIN_ID=0x1a
PYTHNET_EMITTER=0xa27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6
VALID_TIME_PERIOD_SECONDS=120 VALID_TIME_PERIOD_SECONDS=120

View File

@ -3,7 +3,9 @@ MIGRATIONS_NETWORK=mainnet
#Pyth #Pyth
WORMHOLE_BRIDGE_ADDRESS=0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B WORMHOLE_BRIDGE_ADDRESS=0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B
PYTH_TO_WORMHOLE_CHAIN_ID=0x1 SOLANA_CHAIN_ID=0x1
PYTH_TO_WORMHOLE_EMITTER=0x6bb14509a612f01fbbc4cffeebd4bbfb492a86df717ebe92eb6df432a3f00a25 SOLANA_EMITTER=0x6bb14509a612f01fbbc4cffeebd4bbfb492a86df717ebe92eb6df432a3f00a25
PYTHNET_CHAIN_ID=0x1a
PYTHNET_EMITTER=0xf8cd23c2ab91237730770bbea08d61005cdda0984348f3f6eecb559638c0bba0
VALID_TIME_PERIOD_SECONDS=120 VALID_TIME_PERIOD_SECONDS=120

View File

@ -1,9 +1,13 @@
# Mumbai is Polygon testnet network
MIGRATIONS_DIR=./migrations/prod MIGRATIONS_DIR=./migrations/prod
MIGRATIONS_NETWORK=mumbai MIGRATIONS_NETWORK=mumbai
#Pyth #Pyth
WORMHOLE_BRIDGE_ADDRESS=0x0CBE91CF822c73C2315FB05100C2F714765d5c20 WORMHOLE_BRIDGE_ADDRESS=0x0CBE91CF822c73C2315FB05100C2F714765d5c20
PYTH_TO_WORMHOLE_CHAIN_ID=0x1 SOLANA_CHAIN_ID=0x1
PYTH_TO_WORMHOLE_EMITTER=0xf346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0 SOLANA_EMITTER=0xf346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0
PYTHNET_CHAIN_ID=0x1a
PYTHNET_EMITTER=0xa27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6
VALID_TIME_PERIOD_SECONDS=60 VALID_TIME_PERIOD_SECONDS=60

View File

@ -3,7 +3,9 @@ MIGRATIONS_NETWORK=polygon
#Pyth #Pyth
WORMHOLE_BRIDGE_ADDRESS=0x7A4B5a56256163F07b2C80A7cA55aBE66c4ec4d7 WORMHOLE_BRIDGE_ADDRESS=0x7A4B5a56256163F07b2C80A7cA55aBE66c4ec4d7
PYTH_TO_WORMHOLE_CHAIN_ID=0x1 SOLANA_CHAIN_ID=0x1
PYTH_TO_WORMHOLE_EMITTER=0x6bb14509a612f01fbbc4cffeebd4bbfb492a86df717ebe92eb6df432a3f00a25 SOLANA_EMITTER=0x6bb14509a612f01fbbc4cffeebd4bbfb492a86df717ebe92eb6df432a3f00a25
PYTHNET_CHAIN_ID=0x1a
PYTHNET_EMITTER=0xf8cd23c2ab91237730770bbea08d61005cdda0984348f3f6eecb559638c0bba0
VALID_TIME_PERIOD_SECONDS=60 VALID_TIME_PERIOD_SECONDS=60

View File

@ -3,7 +3,9 @@ MIGRATIONS_NETWORK=ropsten
#Pyth #Pyth
WORMHOLE_BRIDGE_ADDRESS=0x210c5F5e2AF958B4defFe715Dc621b7a3BA888c5 WORMHOLE_BRIDGE_ADDRESS=0x210c5F5e2AF958B4defFe715Dc621b7a3BA888c5
PYTH_TO_WORMHOLE_CHAIN_ID=0x1 SOLANA_CHAIN_ID=0x1
PYTH_TO_WORMHOLE_EMITTER=0xf346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0 SOLANA_EMITTER=0xf346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0
PYTHNET_CHAIN_ID=0x1a
PYTHNET_EMITTER=0xa27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6
VALID_TIME_PERIOD_SECONDS=120 VALID_TIME_PERIOD_SECONDS=120

View File

@ -15,8 +15,10 @@ INIT_GOV_CONTRACT= # 0x000000000000000000000000000000000000000000
# Pyth Migrations # Example Format # Pyth Migrations # Example Format
WORMHOLE_BRIDGE_ADDRESS # 0x68605AD7b15c732a30b1BbC62BE8F2A509D74b4D (only if wormhole exists) WORMHOLE_BRIDGE_ADDRESS # 0x68605AD7b15c732a30b1BbC62BE8F2A509D74b4D (only if wormhole exists)
PYTH_TO_WORMHOLE_CHAIN_ID= # 0x1 SOLANA_CHAIN_ID= # 0x1
PYTH_TO_WORMHOLE_EMITTER= # 8fuAZUxHecYLMC76ZNjYzwRybUiDv9LhkRQsAccEykLr SOLANA_EMITTER= # 0xf346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0
PYTHNET_CHAIN_ID= # 0x1a
PYTHNET_EMITTER= # 0xa27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6
# The duration that a price feed stored in the contract is considered to be # The duration that a price feed stored in the contract is considered to be
# valid, after this duration, the price feed is stale and will be invalid. # valid, after this duration, the price feed is stale and will be invalid.

View File

@ -20,7 +20,7 @@ BRIDGE_INIT_GOV_CONTRACT=0x00000000000000000000000000000000000000000000000000000
BRIDGE_INIT_WETH=0xDDb64fE46a91D46ee29420539FC25FD07c5FEa3E BRIDGE_INIT_WETH=0xDDb64fE46a91D46ee29420539FC25FD07c5FEa3E
#Pyth #Pyth
PYTH_TO_WORMHOLE_CHAIN_ID=0x1 SOLANA_CHAIN_ID=0x1
PYTH_TO_WORMHOLE_EMITTER=0x71f8dcb863d176e2c420ad6610cf687359612b6fb392e0642b0ca6b1f186aa3b SOLANA_EMITTER=0x71f8dcb863d176e2c420ad6610cf687359612b6fb392e0642b0ca6b1f186aa3b
VALID_TIME_PERIOD_SECONDS=60 VALID_TIME_PERIOD_SECONDS=60

View File

@ -4,8 +4,8 @@ const bs58 = require("bs58");
const PythUpgradable = artifacts.require("PythUpgradable"); const PythUpgradable = artifacts.require("PythUpgradable");
const WormholeReceiver = artifacts.require("WormholeReceiver"); const WormholeReceiver = artifacts.require("WormholeReceiver");
const pyth2WormholeChainId = process.env.PYTH_TO_WORMHOLE_CHAIN_ID; const pyth2WormholeChainId = process.env.SOLANA_CHAIN_ID;
const pyth2WormholeEmitter = process.env.PYTH_TO_WORMHOLE_EMITTER; const pyth2WormholeEmitter = process.env.SOLANA_EMITTER;
const { deployProxy } = require("@openzeppelin/truffle-upgrades"); const { deployProxy } = require("@openzeppelin/truffle-upgrades");
const tdr = require('truffle-deploy-registry'); const tdr = require('truffle-deploy-registry');

View File

@ -0,0 +1,21 @@
require('dotenv').config({ path: "../.env" });
const PythUpgradable = artifacts.require("PythUpgradable");
const pythnetChainId = process.env.PYTHNET_CHAIN_ID;
const pythnetEmitter = process.env.PYTHNET_EMITTER;
console.log("pythnetEmitter: " + pythnetEmitter);
console.log("pythnetChainId: " + pythnetChainId);
/**
* This change:
* - Adds PythNet data source.
*/
module.exports = async function () {
const proxy = await PythUpgradable.deployed();
await proxy.addDataSource(
pythnetChainId,
pythnetEmitter,
);
}

View File

@ -4,8 +4,8 @@ const bs58 = require("bs58");
const PythUpgradable = artifacts.require("PythUpgradable"); const PythUpgradable = artifacts.require("PythUpgradable");
const wormholeBridgeAddress = process.env.WORMHOLE_BRIDGE_ADDRESS; const wormholeBridgeAddress = process.env.WORMHOLE_BRIDGE_ADDRESS;
const pyth2WormholeChainId = process.env.PYTH_TO_WORMHOLE_CHAIN_ID; const pyth2WormholeChainId = process.env.SOLANA_CHAIN_ID;
const pyth2WormholeEmitter = process.env.PYTH_TO_WORMHOLE_EMITTER; const pyth2WormholeEmitter = process.env.SOLANA_EMITTER;
const { deployProxy } = require("@openzeppelin/truffle-upgrades"); const { deployProxy } = require("@openzeppelin/truffle-upgrades");
const tdr = require('truffle-deploy-registry'); const tdr = require('truffle-deploy-registry');

View File

@ -0,0 +1,21 @@
require('dotenv').config({ path: "../.env" });
const PythUpgradable = artifacts.require("PythUpgradable");
const pythnetChainId = process.env.PYTHNET_CHAIN_ID;
const pythnetEmitter = process.env.PYTHNET_EMITTER;
console.log("pythnetEmitter: " + pythnetEmitter);
console.log("pythnetChainId: " + pythnetChainId);
/**
* This change:
* - Adds PythNet data source.
*/
module.exports = async function () {
const proxy = await PythUpgradable.deployed();
await proxy.addDataSource(
pythnetChainId,
pythnetEmitter,
);
}

View File

@ -4,8 +4,8 @@ const bs58 = require("bs58");
const PythUpgradable = artifacts.require("PythUpgradable"); const PythUpgradable = artifacts.require("PythUpgradable");
const Wormhole = artifacts.require("Wormhole"); const Wormhole = artifacts.require("Wormhole");
const pyth2WormholeChainId = process.env.PYTH_TO_WORMHOLE_CHAIN_ID; const pyth2WormholeChainId = process.env.SOLANA_CHAIN_ID;
const pyth2WormholeEmitter = process.env.PYTH_TO_WORMHOLE_EMITTER; const pyth2WormholeEmitter = process.env.SOLANA_EMITTER;
const { deployProxy } = require("@openzeppelin/truffle-upgrades"); const { deployProxy } = require("@openzeppelin/truffle-upgrades");