Depositing
Depositing into Vertex has to be done directly on-chain. The address of the endpoint contract can be found at <vertex-url>/query?type=contracts
The deposit function ABI is:
function depositCollateral(
// last 12 bytes of the subaccount bytes32
bytes12 subaccountName,
uint32 productId,
// raw amount of the ERC20 contract; i.e.
// if USDC has 6 decimals and you want to deposit 1 USDC
// provide 1e6; if wETH has 18 decimals and you want to
// deposit 1 wETH, provide 1e18
uint128 amount
) external {}
Which you can submit to the endpoint contract.
Deposits may take a few seconds to process after they have submitted to the chain. You can find the token addresses associated with specific product ids via the All products query. Ensure that you:
Use the correct
product_id
Have given the endpoint contract enough allowance
Last updated