-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[VEN-3101][VEN-3102]: XVS, XVS Vault and XVS Bridge on Berachain #505
base: feat/berachain-oracle-governance
Are you sure you want to change the base?
Conversation
hardhat.config.ts
Outdated
@@ -222,7 +222,10 @@ const config: HardhatUserConfig = { | |||
berachainbartio: { | |||
url: process.env.ARCHIVE_NODE_berachainbartio || "https://bartio.rpc.berachain.com", | |||
chainId: 80084, | |||
accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], | |||
// accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we have commented this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
vips/vip-453/bsctestnet.ts
Outdated
[ | ||
{ | ||
target: ACM, | ||
signature: "giveCallPermission(address,string,address)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also add them in Aggregator, WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that we can have all permission related thing at one place, i.e. in ACMAggregator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
vips/vip-453/bsctestnet.ts
Outdated
maxDailyReceiveLimit: parseUnits("102000", 18), | ||
maxSingleReceiveTransactionLimit: parseUnits("20400", 18), | ||
}, | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also add base and unichain configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
vips/vip-453/bsctestnet.ts
Outdated
]; | ||
} | ||
|
||
const vip452 = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const vip452 = () => { | |
const vip453 = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
}); | ||
|
||
describe("Pre-VIP behaviour", async () => { | ||
it("Bridge Owner != multisig", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be Normal Timelock?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
}); | ||
|
||
it("Trusted remote should not exist for any network(bsctestnet, opbnbtestnet, sepolia, arbitumsepolia, zksyncsepolia)", async () => { | ||
await expect(xvsBridge.getTrustedRemoteAddress(LzChainId.bsctestnet)).to.be.revertedWith( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also add base and unichain sepolia.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
testForkedNetworkVipCommands("vip453 configures bridge", await vip453()); | ||
|
||
describe("Post-VIP behaviour", async () => { | ||
it("Should set bridge owner to multisig", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it("Should set bridge owner to multisig", async () => { | |
it("Should set bridge owner to Normal Timelock", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
||
it("Should set correct max single receive limit for all six networks", async () => { | ||
let limit = await xvsBridge.chainIdToMaxSingleReceiveTransactionLimit(LzChainId.bsctestnet); | ||
expect(limit).equals(parseUnits("20400", 18)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expect(limit).equals(parseUnits("20400", 18)); | |
expect(limit).equals(SINGLE_RECEIVE_LIMIT); |
Just for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
expect(limit).equals(MIN_DEST_GAS); | ||
}); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use checkXVSBridge
to test bridge on Berachain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is meant to test the other networks
expect(isActive).equals(true); | ||
}); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also check for pause state of vault.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
vips/vip-453/permissions.ts
Outdated
}, | ||
}; | ||
|
||
function splitPermissions( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we need to configure 93 permissions for this VIP, so we don't need to split them into different chunks. I would remote this logic from this specific file. If we need it in the future, we could add it to the src/permissions.ts
file.
This VIP is specific for berachainbartio
, we can assume it, and remove the network dimension from the different variables in this file (berachainbartio
), to simplify it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
a3500c4
to
0cb0a6f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reviewed commands and permissions. They lgtm. I've not reviewed the simulations yet
Description
Resolves VEN