Test Setup
Test your DSP with vRAM
Please note, if you wish to test on the mainnet, this will require the purchase of DAPP tokens or the use of DAPPHDL tokens (Air-HODL). In the case of Kylin, we provide a DAPP token faucet.
Create Kylin Account
We will create a Kylin account for the vRAM eosio.token contract. To setup the account, visit here.
Install Zeus:
npm i -g @liquidapps/zeus-cmdUnbox coldtoken contract:
mkdir coldtoken; cd coldtoken
zeus box create
zeus unbox coldtokenCompile and deploy contract for testing:
# your DSP's API endpoint
export DSP_ENDPOINT=
# a new account to deploy your contract to
export ACCOUNT=
# your new account's active public key
export ACTIVE_PUBLIC_KEY=
# compile coldtoken contract
zeus compile
cd contracts/eos
# set eosio.code permission
cleos -u $DSP_ENDPOINT set account permission $ACCOUNT active "{\"threshold\":1,\"keys\":[{\"weight\":1,\"key\":\"$ACTIVE_PUBLIC_KEY\"}],\"accounts\":[{\"permission\":{\"actor\":\"$ACCOUNT\",\"permission\":\"eosio.code\"},\"weight\":1}]}" owner -p $ACCOUNT@active
# set contract
cleos -u $DSP_ENDPOINT set contract $ACCOUNT ./coldtokenSelect and stake to DSP:
Run test commands:
Test vRAM get table row:
Transfer:
vRAM related actions to look for in a block explorer:
Look for “xcommit” and “xcleanup” actions on your contract: https://bloks.io/
xcommit - The commit request instructs a DSP to write new data to their local IPFS cluster node. A developer can utilize the setData function from within their smart contract to first hash the new data in order to return a URI, before dispatching a commit request which is caught by the DSP node. In a similar way the getData function can be utilized in order to fetch the data for the smart contract or request a Warmup in case it is missing.
xcleanup - A cleanup request sends a request to the DSP to evict a file from the cache. This is an asynchronous request.
More information on vRAM related actions can be found here
Last updated
Was this helpful?