• Mark Tyneway's avatar
    contracts-bedrock: add TransferOnion contract · 062ebb63
    Mark Tyneway authored
    Adds the `TransferOnion` contract which can be used to batch
    send tokens. The set of transfers are committed to during
    contract initialization, and the token owner must approve
    the `TransferOnion` contract and then anybody can unwrap
    the commitment to the transfers.
    
    The transfers are committed to with a hash onion. This is
    a simple vector commitment that must be linearly unwrapped.
    Each hash commits to the next hash and the very first hash
    is `bytes32(0)`.
    062ebb63
TransferOnion.t.sol 3.56 KB