Skip to content
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

feat: chainbridge linked to new binary for CI test #1376

Closed
wants to merge 4 commits into from
Closed

Conversation

wangminqi
Copy link
Member

@wangminqi wangminqi commented Feb 26, 2023

This PR is for linking chainbridge ts test to latest binary.

In order to properly view this PR. Request code review in
Chainbridge Binary Change
litentry/ChainBridge#2
Chainbridge Solidity Change
litentry/chainbridge-solidity#1

@wangminqi wangminqi requested a review from a team February 28, 2023 08:49
@github-actions github-actions bot added the Stale label Apr 30, 2023
@Kailai-Wang Kailai-Wang removed the Stale label May 1, 2023
@@ -123,9 +123,9 @@ async function setupCrossChainTransfer(
await eConfig.erc20.mint(eConfig.wallets.eve.address, toWei('100000'));
await eConfig.erc20.mint(eConfig.erc20Handler.address, toWei('300'));
await eConfig.bridge.adminSetResource(eConfig.erc20Handler.address, destResourceId, eConfig.erc20.address);
await eConfig.bridge.adminSetDecimals(eConfig.erc20Handler.address, eConfig.erc20.address, 18, 12, opts);
// await eConfig.bridge.adminSetDecimals(eConfig.erc20Handler.address, eConfig.erc20.address, 18, 12, opts);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this ain't needed, please remove it altogether :)

@@ -82,16 +82,24 @@ describeCrossChainTransfer('Test Cross-chain Transfer', ``, (context) => {
const provider = context.ethConfig.wallets.alice.provider;
const currentBlock = await provider.getBlockNumber();
await sleep(15);

let voteTransactionCount = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this counter for? The loop stops after the first voteTransaction anyway, so at the if (voteTransactionCount === 1) { part voteTransactionCount will always equal 1 🤔

if (decodedInput.name === 'voteProposal') {
voteTransactionCount++;
// We have threshold = 1 in this. So it really does not matter
if (voteTransactionCount === 1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💅 the intent can be made a bit more explicit by

Suggested change
if (voteTransactionCount === 1) {
if (voteTransactionCount === approvalThreshold) {

with a const approvalThreshold = 1 earlier

Copy link
Contributor

@grumpygreenguy grumpygreenguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks ok to me

@wangminqi
Copy link
Member Author

This PR is not urgent and we will not change token bridge code in short time.

@wangminqi wangminqi closed this Sep 28, 2023
@wangminqi wangminqi deleted the minqi-dev branch November 22, 2023 08:53
@wangminqi wangminqi restored the minqi-dev branch November 22, 2023 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants