Skip to content

Solidity PLASMA deposits #31

@k06a

Description

@k06a

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);
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions