Single Transfers

When you want to move the assets from a single stealth address to another or you want unshield you asset (in other words withdraw from the arcane contract) you’d call the transferFrom function:

/**
 * @notice Transfer a ETH/ERC20
 * @dev Allows anyone to Withdraw and move their funds without needing
 * them to interact with the contract. Also this function can be used to transfer
 * funds from one stealth address to another
 *
 * Emits a {Transfer} event indicating the transfer
 *
 * Note: The _data parameter is used to call a callback function on the receiver
 * Also, every parameter should be verified by this contract (using _verify) so as to prevent
 * malicious contracts from stealing funds or mutating the parameters for personal gain.
 *
 * @param _token The token to transfer
 * @param _sender The stealth address to transfer the token from
 * @param _amount The amount of tokens to transfer
 * @param _receiver The stealth address to transfer the token to
 * @param _signature The signature of the sender
 * @param _transferData Extra parameters for the withdrawal
 * @param _announcementData The transfer announcement data
 */
function transferFrom(
    address _token,
    address _sender,
    uint256 _amount,
    address payable _receiver,
    Signature calldata _signature,
    TransferData calldata _transferData,
    AnnouncementData calldata _announcementData
) external;

You’d notice the _signature paramater, this signature is generated using the stealth address private key. Keep in mind the _sender is some stealth address.

Last updated