Skip to content

Conversation

UrAvgDeveloper
Copy link
Contributor

@UrAvgDeveloper UrAvgDeveloper commented Jun 21, 2023

This PR resolves following issue: Issue

  • To deploy fast-bridge on desired network :
npx hardhat deploy_fastbridge --verification <boolean> --network <network-name>

NOTE:

  1. --verification <bool> is to verify the contract on the network just after the deployment. It's optional and default value is false.
  2. Since this is an upgradable contract so tokens for whitelists are picked from this file at time of contract initialisation, so you need to modify this file as per your's requirement.

@UrAvgDeveloper UrAvgDeveloper added the enhancement New feature or request label Jun 21, 2023
@UrAvgDeveloper UrAvgDeveloper changed the title Issue Resolvement: https://github.com/aurora-is-near/fast-bridge-protocol/issues/81 Hardhat task for Eth-FastBridge Jun 21, 2023
@UrAvgDeveloper UrAvgDeveloper requested review from sept-en and removed request for sept-en June 21, 2023 12:28
@UrAvgDeveloper UrAvgDeveloper changed the title Hardhat task for Eth-FastBridge [WIP] Hardhat task for Eth-FastBridge Jun 26, 2023
@UrAvgDeveloper UrAvgDeveloper marked this pull request as ready for review June 28, 2023 10:11
@UrAvgDeveloper UrAvgDeveloper requested a review from karim-en as a code owner June 28, 2023 10:11
@UrAvgDeveloper UrAvgDeveloper changed the title [WIP] Hardhat task for Eth-FastBridge Hardhat task for Eth-FastBridge Jun 28, 2023
@UrAvgDeveloper UrAvgDeveloper changed the title Hardhat task for Eth-FastBridge Added Hardhat tasks for FastBridge solidity Jun 28, 2023
true,
true
]
1. To call any method of EthErc20FastBridge use hardhat task `method`
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest removing this generic task and creating separate hardhat tasks for each contract method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have implemented separate tasks for each contract method in this PR, just not removed this generic function which could work as add-on functionality. Please let me know if you differ from this thought. I can remove the generic task.

Copy link
Contributor

Choose a reason for hiding this comment

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

The implementation for methods transferTokens and withdrawStuckTokens is missed. This tasks also can be useful for debugging.

I prefer to remove the generic method, but it is up to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

README.md Outdated
npx hardhat whitelists_token_in_bulk --tokenaddresses 0xF0b0c5E2c3A35213992bD9b45Af352D6D4035203,0xaa2D6608241B6B930BCcaFE245eFDf052e46C9aA --whiteliststatus true,true,true --network mumbai
```
Here also signer need to have the access role to make txn successful.
6. To check whether the token is whitelisted or not run `npx hardhat is_token_whitelisted --tokenaddress <token_address> --network <network_name>`
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice to have an opportunity to set up the address of the fast bridge contract

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added in cad08e9

README.md Outdated
npx hardhat method --jsonstring '{"signature":"setWhitelistedTokens","arguments":{"arg1":["0xdAC17F958D2ee523a2206206994597C13D831ec7"],"arg2":[true]}}'
```
2. To deploy fast-bridge run `npx hardhat deploy_fastbridge --verification <bool> --network <network_name>` , here `--verification` is an optional parameter with default value `false` if passed `true` than contract is verified just after the deployment.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you write commands in the separate code block, not as inline code? It will be much easier to read.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants