Storage Staking
Storage Deposit
storage_deposit
Parameters:
Registers an account in the smart contract/Deposit storage fee*
*It cannot be used without any deposit attached
This API creates a NEAR account_id in the Orderly contract or is used to top up storage deposit and is a payable method, thus requires a specified amount of NEAR to be attached when first registering an account. The required amount can be retrieved using storage_balance_bounds
.
If registration_only
=true
only the minimum required NEAR amount to register an account is accepted which can be retrieved using storage_balance_bounds
. This cannot be true if the account already exists.
If the account already exists or the value of registration_only
=false,
it can also be omitted.
Any data stored in the contract, such as setting Access/Trading keys, token balance, etc., requires storage staking as per NEAR architecture
Check Storage Deposit Balance
storage_balance_of
Parameters:
Check the Cost of Creating an Account
storage_balance_bounds
Parameters:
none
Queries min and max values of storage cost required for initial registration (only use the min value)
Check the Cost of Setting Access Key
storage_cost_of_announce_key
Parameters:
none
Setting each Access Key requires a storage deposit
Check the Cost of Having a Token
storage_cost_of_token_balance
Parameters:
none
Depositing each new token requires a storage deposit
Withdraw Storage Deposit
storage_withdraw
Parameters:
Withdraw a specified amount of NEAR from storage staking
Close the Account
storage_unregister
Parameters: