Background
- As of 2021-04-01, Platform Operators can now withdraw ETH to Smart Contract addresses via the Zero Hash API.
- As of 2022-06-01, Platform Operators can now withdraw any EVM-compatible asset Zero Hash supports (i.e. Ethereum, Polygon, Avalanche, Fantom) to Smart Contract addresses via the Zero Hash API.
- As of 2022-12-02, Platform operators can now withdraw Solana to smart contract addresses via the Zero Hash API. Please see notes below as the input_data format is different than for EVM chains.
- As of 2023-03-14 Zero Hash has improved the security vector of our withdrawal endpoint by disabling the execution of arbitrary smart contract calls. Please see notes below for more details.
- As of 2023-05-24, The contracts to create forwarding smart contracts on Ethereum have been optimized and implemented batching, resulting in approximately 70% network fee savings.
How it Works
- Initiate a withdrawal by issuing a HTTP request to the POST /withdrawals/requests endpoint and specify the address of the smart contract you’d like to withdraw to in the address field of the payload.
- You can retrieve the transaction_id in the GET /withdrawals/requests or GET /withdrawals/requests:id endpoint the same way you would for a non-smart contract transaction.
Ethereum and EVM compatible chains
- Zero hash supports the withdrawal of base blockchain assets and supported ERC20 tokens to smart contract addresses that meet the technical criteria on the Ethereum network to receive these tokens. Check with the developer of the smart contract to confirm they are capable of receiving tokens before initiating a withdrawal to a smart contract.
- Solidity smart contracts which have been marked as payable are capable of receiving base blockchain asset (e.g. ETH).
- Ownership of ERC20 tokens is transferred to smart contract addresses in the same way as is it to wallet addresses using the ERC20 standard transfer function as part of a withdrawal from Zero Hash.
Solana
- Zero hash supports the withdrawal of SOL and supported SPL tokens to program addresses that meet the technical criteria on the Solana network to receive these tokens.
- Ownership of SPL tokens is transferred to a program using the standard transfer function.