Skip to content

Commit

Permalink
refactor: update addresses and block number of vai bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
GitGuru7 committed Feb 27, 2024
1 parent d0673f5 commit 630f028
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
3 changes: 2 additions & 1 deletion multisig/proposals/vip-011/vip-011-sepolia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { NETWORK_ADDRESSES } from "../../../src/networkAddresses";
import { makeProposal } from "../../../src/utils";

const { sepolia } = NETWORK_ADDRESSES;
const TRUSTED_REMOTE = "0xeaa89cF3bAB8245F8A2F438595e1fF5cC3eEaE18";

export const vip011 = () => {
return makeProposal([
Expand Down Expand Up @@ -160,7 +161,7 @@ export const vip011 = () => {
{
target: sepolia.TOKEN_BRIDGE_ADMIN_VAI,
signature: "setTrustedRemoteAddress(uint16,bytes)",
params: ["10102", "0x2280aCD3BE2eE270161a11A6176814C26FD747f9"],
params: ["10102", TRUSTED_REMOTE],
},
{
target: sepolia.VAI,
Expand Down
5 changes: 3 additions & 2 deletions multisig/simulations/vip-011/vip-011-sepolia/simulations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ import VAI_BRIDGE_ABI from "./abi/vaiBridge.json";
import VAI_BRIDGE_ADMIN_ABI from "./abi/vaiBridgeAdmin.json";

const { sepolia } = NETWORK_ADDRESSES;
const TRUSTED_REMOTE = "0xeaa89cf3bab8245f8a2f438595e1ff5cc3eeae18";
const DEST_CHAIN_ID = 10102;

forking(5340851, () => {
forking(5373511, () => {
let vai: Contract;
let vaiBridgeAdmin: Contract;
let vaiBridge: Contract;
Expand Down Expand Up @@ -66,7 +67,7 @@ forking(5340851, () => {

it("Should set trusted remote address in bridge", async () => {
const trustedRemote = await vaiBridge.getTrustedRemoteAddress(10102);
expect(trustedRemote).equals("0x2280acd3be2ee270161a11a6176814c26fd747f9");
expect(trustedRemote).equals(TRUSTED_REMOTE);
});

it("Should set minting limit in sepolia.VAI token", async () => {
Expand Down
12 changes: 6 additions & 6 deletions simulations/vip-260/bsctestnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import VAIBridgeAdmin_ABI from "./abi/VAIBridgeAdmin.json";
import VAI_BRIDGE_ABI from "./abi/VAITokenBridge.json";

const DEST_CHAIN_ID = 10161;
const TOKEN_BRIDGE_CONTROLLER_VAI = "0x91b653f7527D698320133Eb97BB55a617663e792";
const TRUSTED_REMOTE = "0xfa62bc6c0e20a507e3ad0df4f6b89e71953161fa";
const TOKEN_BRIDGE_CONTROLLER_VAI = "0x5E19dc192DaB0d97986e02795817F72BA85E52A8";
const TRUSTED_REMOTE = "0x69ffbfce81c105a07916d3a8fca205ed1758b826";
const VAI_HOLDER = "0x7Db4f5cC3bBA3e12FF1F528D2e3417afb0a57118";

const { bsctestnet } = NETWORK_ADDRESSES;

forking(37969204, () => {
forking(38107132, () => {
const provider = ethers.provider;
let vaiBridge: ethers.Contract;
let bridgeAdmin: ethers.Contract;
Expand Down Expand Up @@ -94,13 +94,13 @@ forking(37969204, () => {
expect(await vaiBridge.chainIdToMaxDailyReceiveLimit(DEST_CHAIN_ID)).to.equal("50000000000000000000000");
});

it("Should emit an event on successfull bridging of VAI", async () => {
it("Should emit an event on successful bridging of VAI", async () => {
const amount = parseUnits("0.5", 18);
const nativeFee = (
await vaiBridge.estimateSendFee(DEST_CHAIN_ID, receiverAddressBytes32, amount, false, defaultAdapterParams)
).nativeFee;

await vai.connect(vaiHolderSigner).approve(vaiBridge.address, amount);
await vai.connect(vaiHolderSigner).approve(tokenController.address, amount);

await expect(
vaiBridge
Expand Down Expand Up @@ -143,7 +143,7 @@ forking(37969204, () => {
const maxPlusAmount = ethers.utils.parseUnits("50001");
const amount = ethers.utils.parseUnits("10000");

await vai.connect(vaiHolderSigner).approve(vaiBridge.address, maxPlusAmount);
await vai.connect(vaiHolderSigner).approve(tokenController.address, maxPlusAmount);
const nativeFee = (
await vaiBridge.estimateSendFee(DEST_CHAIN_ID, receiverAddressBytes32, amount, false, defaultAdapterParams)
).nativeFee;
Expand Down
12 changes: 6 additions & 6 deletions src/networkAddresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ export const NETWORK_ADDRESSES = {
POOL_REGISTRY: il_bsctestnet_deployed_contracts.addresses.PoolRegistry,
BINANCE_ORACLE: bsctestnet_deployed_contracts.contracts.BinanceOracle.address,
RESILIENT_ORACLE: bsctestnet_deployed_contracts.contracts.ResilientOracle.address,
TOKEN_BRIDGE_VAI: "0x2280aCD3BE2eE270161a11A6176814C26FD747f9",
TOKEN_BRIDGE_ADMIN_VAI: "0xfF058122378BD9AC5B572A2F7c1815E09504D859",
TOKEN_BRIDGE_CONTROLLER_VAI: "0x91b653f7527D698320133Eb97BB55a617663e792",
TOKEN_BRIDGE_VAI: "0xeaa89cF3bAB8245F8A2F438595e1fF5cC3eEaE18",
TOKEN_BRIDGE_ADMIN_VAI: "0xDD2FbCC0145199773EbD46eBba8C81D8743e5324",
TOKEN_BRIDGE_CONTROLLER_VAI: "0x5E19dc192DaB0d97986e02795817F72BA85E52A8",
},
ethereum: {
NORMAL_TIMELOCK: "0x285960C5B22fD66A736C7136967A3eB15e93CC67",
Expand Down Expand Up @@ -96,9 +96,9 @@ export const NETWORK_ADDRESSES = {
MOCK_crvUSD: "0x36421d873abCa3E2bE6BB3c819C0CF26374F63b6",
XVS_VAULT_PROXY: "0x1129f882eAa912aE6D4f6D445b2E2b1eCbA99fd5",
GENERIC_TEST_USER_ACCOUNT: "0x2Ce1d0ffD7E869D9DF33e28552b12DdDed326706",
VAI: "0x9414b9d8fbC128799B896A50c8927C369AA553CB",
TOKEN_BRIDGE_VAI: "0xFA62BC6C0E20A507E3Ad0dF4F6b89E71953161fa",
TOKEN_BRIDGE_ADMIN_VAI: "0x296349C4E86C7C3dd1fC9e5b30Ca47cf31162486",
VAI: "0x87C10aFb916961706B4958816336BB336B483d29",
TOKEN_BRIDGE_VAI: "0x69fFBFCe81c105a07916d3a8fCA205Ed1758B826",
TOKEN_BRIDGE_ADMIN_VAI: "0x71a6c67C9394c3D64593B5A527a11980D1C0cDEB",
},
opbnbtestnet: {
NORMAL_TIMELOCK: "0xb15f6EfEbC276A3b9805df81b5FB3D50C2A62BDf",
Expand Down
2 changes: 1 addition & 1 deletion vips/vip-260/bsctestnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ProposalType } from "../../src/types";
import { makeProposal } from "../../src/utils";

const GUARDIAN = "0x2Ce1d0ffD7E869D9DF33e28552b12DdDed326706";
const TRUSTED_REMOTE = "0xFA62BC6C0E20A507E3Ad0dF4F6b89E71953161fa";
const TRUSTED_REMOTE = "0x69fFBFCe81c105a07916d3a8fCA205Ed1758B826";
const { bsctestnet } = NETWORK_ADDRESSES;

export const vip260Testnet = () => {
Expand Down

0 comments on commit 630f028

Please sign in to comment.