orderly.vault
Documentation for eth_defi.orderly.vault Python module.
Orderly deposit vault handling
Functions
|
Deposit tokens into the Orderly vault. |
|
Withdraw tokens from the Orderly vault. |
Classes
Orderly deposit vault instance. |
- class OrderlyVault
Bases:
objectOrderly deposit vault instance.
Orderly handles deposits as “vaults” that can be used to deposit and withdraw tokens. Vautls also have “settle” functionality to reflect the balances back onchain.
- deposit(vault, *, amount, token, depositor_address, orderly_account_id, broker_id, token_id=None)
Deposit tokens into the Orderly vault.
See also: https://orderly.network/docs/build-on-omnichain/user-flows/withdrawal-deposit
- Parameters
vault (eth_defi.orderly.vault.OrderlyVault) – The vault to deposit into.
amount (int) – The amount of tokens to deposit.
token (web3.contract.contract.Contract) – The token to deposit.
depositor_address (eth_typing.evm.HexAddress) – The address that will be used to deposit.
orderly_account_id (eth_typing.evm.HexAddress) – The orderly account ID to deposit to.
broker_id (str) – The broker ID to deposit to.
token_id (str | None) – The token ID to deposit to.
- Return type
tuple[web3.contract.contract.ContractFunction, web3.contract.contract.ContractFunction, web3.contract.contract.ContractFunction]
- withdraw(vault, *, amount, token, wallet_address, orderly_account_id, broker_id, token_id=None)
Withdraw tokens from the Orderly vault.
See also: https://orderly.network/docs/build-on-omnichain/user-flows/withdrawal-deposit
- Parameters
vault (eth_defi.orderly.vault.OrderlyVault) – The vault to deposit into.
amount (int) – The amount of tokens to deposit.
token (web3.contract.contract.Contract) – The token to deposit.
wallet_address (eth_typing.evm.HexAddress) – The wallet address to deposit from.
orderly_account_id (eth_typing.evm.HexAddress) – The orderly account ID to deposit to.
broker_id (str) – The broker ID to deposit to.
token_id (str | None) – The token ID to deposit to.
- Return type
tuple[web3.contract.contract.ContractFunction, web3.contract.contract.ContractFunction, web3.contract.contract.ContractFunction]