Authorize a “deploy wallet” to receive a specified amount of funds from a “funding wallet”
The command must be executed from a machine that has access to the funding wallet’s private key (I.e. access to private-key in local key-chain).
NOTE - two wallets will be necessary to test Authorized Spend.
- Replace wallet placeholders with actual addresses
- Ensure that
uakt
is used as denomination for thefund-amount
and as shown inExample Use
.
provider-services tx deployment authz grant <deploy-wallet> <fund-amount> --from <funding-wallet>
provider-services tx deployment authz grant akash17ck7uhkpjjj45fw9s9vpv7jn0m97958vjjxmf8 20000000uakt --from akash10x24jqyplwk37nynqy0pqaez5sx9fqrll59hl9
To view details for a specific deploy wallet authorization from a specified funding wallet.
provider-services query authz grants <funding-wallet> <deploy-wallet>
provider-services query authz grants akash10x24jqyplwk37nynqy0pqaez5sx9fqrll59hl9 akash17ck7uhkpjjj45fw9s9vpv7jn0m97958vjjxmf8
root@ip-10-0-10-95:/home/ubuntu# akash query authz grants akash10x24jqyplwk37nynqy0pqaez5sx9fqrll59hl9 akash17ck7uhkpjjj45fw9s9vpv7jn0m97958vjjxmf8
grants:
- authorization:
'@type': /akash.deployment.v1beta2.DepositDeploymentAuthorization
spend_limit:
amount: "20000000"
denom: uakt
expiration: "2023-01-20T16:04:02Z"
pagination:
next_key: null
total: "0"
To view ALL wallets authorized to spend from the funding wallet
provider-services query authz granter-grants <funding-wallet-address>
provider-services query authz granter-grants akash10x24jqyplwk37nynqy0pqaez5sx9fqrll59hl9
To change the amount of an authorized funds
provider-services tx deployment authz grant <deploy-wallet> <fund-amount> --from <funding-wallet> --gas-prices="0.025uakt" --gas="auto" --gas-adjustment=1.5 -y
provider-services tx deployment authz grant akash17ck7uhkpjjj45fw9s9vpv7jn0m97958vjjxmf8 10000000uakt --from akash10x24jqyplwk37nynqy0pqaez5sx9fqrll59hl9 --gas-prices="0.025uakt" --gas="auto" --gas-adjustment=1.5 -y
Use the funds from the authorizers wallet to create a deployment. Please note that the deployment wallet needs some minimal, additional AKT to cover gas costs.
NOTE - only the creation deployment step is covered in this section. Please refer to our Getting Started with Testnet documentation for additional steps in creating a deployment.
provider-services tx deployment create --depositor-account <funding-wallet> --from <deploy-wallet> deploy.yaml --gas-prices="0.025uakt" --gas="auto" --gas-adjustment=1.5 -y
provider-services tx deployment create --depositor-account akash10x24jqyplwk37nynqy0pqaez5sx9fqrll59hl9 --from akash17ck7uhkpjjj45fw9s9vpv7jn0m97958vjjxmf8 deploy.yaml --gas-prices="0.025uakt" --gas="auto" --gas-adjustment=1.5 -y
Deposit additional funds into the escrow account of a running deployment from the funding wallet
provider-services tx deployment deposit <fund-amount> --dseq <deployment-id> --from <deploy-wallet> -–depositor-account <funding-wallet> --gas-prices="0.025uakt" --gas="auto" --gas-adjustment=1.5 -y
provider-services tx deployment deposit 10000000uakt --dseq 19012 --from akash17ck7uhkpjjj45fw9s9vpv7jn0m97958vjjxmf8 --depositor-account akash10x24jqyplwk37nynqy0pqaez5sx9fqrll59hl9 --gas-prices="0.025uakt" --gas="auto" --gas-adjustment=1.5 -y
Revoke the authorization from a funding wallet
provider-services tx deployment authz revoke <deploy-wallet> --from <funding-wallet>
provider-services tx deployment authz revoke akash17ck7uhkpjjj45fw9s9vpv7jn0m97958vjjxmf8 --from akash10x24jqyplwk37nynqy0pqaez5sx9fqrll59hl9