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

Solidity PLASMA deposits #31

Open
k06a opened this issue Oct 22, 2018 · 0 comments
Open

Solidity PLASMA deposits #31

k06a opened this issue Oct 22, 2018 · 0 comments
Assignees

Comments

@k06a
Copy link
Contributor

k06a commented Oct 22, 2018

Depends on #30

  • No need to write in smart contract storage who and how many deposited, use events.
  • Maybe no need to store even total amounts of tokens

Example impl:

function deposit(address beneficiary) public payable {
    emit EtherDeposited(msg.sender, beneficiary, msg.value);
}

function depositERC20(IERC20 token, uint256 amount, address beneficiary) public payable {
    // ***
    emit ERC20Deposited(token, msg.sender, beneficiary, amount);
}

function depositERC721(IERC721 token, uint256 tokenId, address beneficiary) public payable {
    // ***
    emit ERC721Deposited(token, msg.sender, beneficiary, tokenId, assetId);
}
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

No branches or pull requests

1 participant