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

Relative daily limit #306

Open
wants to merge 86 commits into
base: develop
Choose a base branch
from
Open

Relative daily limit #306

wants to merge 86 commits into from

Conversation

maxaleks
Copy link
Contributor

@maxaleks maxaleks commented Oct 14, 2019

These changes are adding the ability to use a relative daily limit for withdrawals

contracts/upgradeable_contracts/RelativeDailyLimit.sol Outdated Show resolved Hide resolved
contracts/upgradeable_contracts/RelativeDailyLimit.sol Outdated Show resolved Hide resolved
contracts/upgradeable_contracts/RelativeDailyLimit.sol Outdated Show resolved Hide resolved
contracts/upgradeable_contracts/RelativeDailyLimit.sol Outdated Show resolved Hide resolved
deploy/src/loadEnv.js Outdated Show resolved Hide resolved
deploy/src/amb_erc677_to_erc677/foreign.js Outdated Show resolved Hide resolved
deploy/src/amb_erc677_to_erc677/home.js Outdated Show resolved Hide resolved
Copy link
Contributor

@patitonar patitonar left a comment

Choose a reason for hiding this comment

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

Looks good to me! Here are some details that I think we should address before merging this:

  • Add unit tests that covers functionality in methods from RelativeDailyLimit contract
  • targetLimit and treshold parameter are not initialized in deployment scripts. Should we add them to be also set in initialize methods? @akolotov
  • Update flatten script to include new Home/Foreign contracts
  • For every new parameter added in .env.example we should add a description in https://github.com/poanetwork/poa-bridge-contracts/blob/master/deploy/README.md

@patitonar
Copy link
Contributor

@maxaleks can you please resolve the merge conflicts?

@maxaleks
Copy link
Contributor Author

@maxaleks can you please resolve the merge conflicts?

Done

@patitonar
Copy link
Contributor

patitonar commented Dec 27, 2019

@maxaleks I updated the new script that verifies the contracts in the explorer as part of the deployment to include the new limit contracts 4aa2b66

@maxaleks
Copy link
Contributor Author

@patitonar ok, thanks!

Copy link
Collaborator

@akolotov akolotov left a comment

Choose a reason for hiding this comment

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

Can you check the merge one more time? For example, I have found that _relayTokens was removed from the ForeignBridgeErcToNative.sol by some reason.
Also I see that the tests were failed for the latest changes in the branch -- could you elaborate the root cause of fails?

@maxaleks
Copy link
Contributor Author

maxaleks commented Jan 6, 2020

Can you check the merge one more time? For example, I have found that _relayTokens was removed from the ForeignBridgeErcToNative.sol by some reason.

I removed _relayTokens because it is duplicated in this contract (here and here). Or is this the correct logic?

@maxaleks
Copy link
Contributor Author

maxaleks commented Jan 6, 2020

Also I see that the tests were failed for the latest changes in the branch -- could you elaborate the root cause of fails?

Could you rerun the task or, even better, give me rights to do it by myself?

@akolotov
Copy link
Collaborator

akolotov commented Jan 8, 2020

Can you check the merge one more time? For example, I have found that _relayTokens was removed from the ForeignBridgeErcToNative.sol by some reason.

I removed _relayTokens because it is duplicated in this contract (here and here). Or is this the correct logic?

They are different as far as I see:

95: function _relayTokens(address _sender, address _receiver, uint256 _amount) internal {

vs

183: function _relayTokens(address _sender, address _receiver, uint256 _amount, address _token) internal {

@maxaleks
Copy link
Contributor Author

maxaleks commented Jan 8, 2020

They are different as far as I see

Sorry, I missed it when fixing merge conflicts

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