From da54e2bf25760191d618323275b15d28adb6c9d0 Mon Sep 17 00:00:00 2001 From: Milan Kotykov Date: Mon, 11 Mar 2024 07:28:47 -0300 Subject: [PATCH] chore: update soroban, arbitrum testnet addresses --- hardhat.config.ts | 1 + scripts/bridge/add-bridge-token.ts | 7 +++++-- scripts/bridge/add-bridge.ts | 4 ++-- scripts/pool/set-owner.ts | 18 ++++++++++++++++++ 4 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 scripts/pool/set-owner.ts diff --git a/hardhat.config.ts b/hardhat.config.ts index 61b1f26..2f00f8f 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -40,6 +40,7 @@ const config: HardhatUserConfig = { }, networks: { arbitrumGoerli: baseNetwork, + arbitrumSepolia: baseNetwork, baseGoerli: baseNetwork, bsc: baseNetwork, goerli: baseNetwork, diff --git a/scripts/bridge/add-bridge-token.ts b/scripts/bridge/add-bridge-token.ts index bb591aa..be36003 100644 --- a/scripts/bridge/add-bridge-token.ts +++ b/scripts/bridge/add-bridge-token.ts @@ -17,6 +17,7 @@ map.set(1, [ map.set(2, [ addressToBytes32('0x49be77224DC061BD53699B25431B9Aa7029A2cB8'), addressToBytes32('0x0209dA4a278956Ca15438af8B108bd85642F096c'), + addressToBytes32('0x1c7d4b196cb0c7b01d743fbc6116a902379c7238'), ]); map.set(3, [ tronAddressToBytes32('TEYM56Hk4554u8ge4vNLZcE59pv7GQy1tv'), @@ -31,8 +32,10 @@ map.set(5, [ addressToBytes32('0x3DBe838b635C54502C318f752187A8d8E7C73743'), addressToBytes32('0xd18967827F4cC29193A7dbe2AA5aD440F6b27597'), ]); -map.set(6, [addressToBytes32('0xfd064A18f3BF249cf1f87FC203E90D8f650f2d63')]); -map.set(7, []); +map.set(6, [ + addressToBytes32('0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d'), +]); +map.set(7, ['0x91c204aa743184184d9cee9da175d703f6a0e42fb8c6ed9eedf6274194160257', '0xc16cc69b695553803c97173165a0ef60bc3e3f30b624098906caf278bd6ff69c']); map.set(8, []); map.set(9, [addressToBytes32('0xf175520c52418dfe19c8098071a252da48cd1c19')]); map.set(10, [ diff --git a/scripts/bridge/add-bridge.ts b/scripts/bridge/add-bridge.ts index 0bf12e3..00b8ba8 100644 --- a/scripts/bridge/add-bridge.ts +++ b/scripts/bridge/add-bridge.ts @@ -17,10 +17,10 @@ map.set( solanaAddressToBytes32('EmLt85sXNvqjzZo3C6BCq55ZzSuvSNFomVnf6b1PgY8R'), ); map.set(5, addressToBytes32('0x763e75cA7bC589396f0e5c1B8049Ac5ED7C8387F')); -map.set(6, addressToBytes32('0xC63C0261c2F1d21b3efE7828032E646c797EE21e')); +map.set(6, addressToBytes32('0x835a712CDFb05bb05aDF5D44A48F98eE1447F61a')); map.set( 7, - '0x2ea921884154a3820a66f501f01825eab0e110ad14f88014af4ed5cd773ca2e6', + '0xe9e8734009ab4b01066e5fa7bd5460158a22f5de09519b48e54b9974149c800d', ); map.set(8, addressToBytes32('0x143c50112e866Aa06716296C7fb30924ECb5672F')); map.set(9, addressToBytes32('0x6E7C9D9D65A5333Fde4b7cF80aA6fc2401edCB65')); diff --git a/scripts/pool/set-owner.ts b/scripts/pool/set-owner.ts new file mode 100644 index 0000000..a1cc04f --- /dev/null +++ b/scripts/pool/set-owner.ts @@ -0,0 +1,18 @@ +import { ethers } from 'hardhat'; +import { getEnv, handleTransactionResult } from '../helper'; + +async function main() { + const poolAddress = getEnv('POOL_ADDRESS'); + const owner = getEnv('OWNER'); + const contract = await ethers.getContractAt('Pool', poolAddress); + const currentOwner = await contract.owner(); + if (currentOwner !== owner) { + const result = await contract.transferOwnership(owner); + await handleTransactionResult(result); + } +} + +main().catch((error) => { + console.error(error); + process.exitCode = 1; +});