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

Add WrappedToken.sol #1095

Draft
wants to merge 67 commits into
base: feature/1.5.0.0-interflux
Choose a base branch
from

Conversation

quantumagi
Copy link
Contributor

No description provided.

// When the tokens are burnt we need to know where to credit the equivalent value on the Stratis chain.
// Currently it is only possible to assign a single address here, so if multiple recipients are required
// the burner will have to wait until each burn is processed before proceeding with the next.
withdrawalAddresses[msg.sender] = address;
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe add additional method with onlyOwner modifier that removes value withdrawalAddresses[address].
And in burn method if address is set- revert.
That will prevent users sending requests with multiple recepients in a row before prev requests are processed and subsequently loosing money

Copy link
Contributor Author

@quantumagi quantumagi Nov 18, 2022

Choose a reason for hiding this comment

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

@noescape00 , I've made the following change:

        string memory key = string(abi.encodePacked(msg.sender, " ", burnId));
        withdrawalAddresses[key] = tokenAddress;

Trying to clean-up the dictionary may not be worth the additional costs for each multisig node.

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.

3 participants