Relayers
struct WithdrawETH {
relayer_address: AccountId,
relayer_fee: u128,
withdraw_address: AccountId,
amount_eth: u128,
}fn update(acc: Account, op: WithdrawETH) -> Account {
decrease balance of AZERO in acc by op.relayer_fee
decrease balance of ETH in acc by op.amount_eth
return acc;
}fn public_exec(op: WithdrawETH) {
transfer op.relayer_fee AZERO from shielder to op.relayer_address
transfer op.amount_eth ETH from shielder to op.withdraw_address
}Last updated
Was this helpful?
