-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
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