News article
Please, vote for us as an EOS Block Producer, we need your support to continue offering tools and services!

How to Use Our Dsp-Package

Mar 12, 2019

Attic Lab has become a dApp Service Provider on the DAPP Network. We provide reliable, scalable and secure services for EOS dApp developers. So, how does this whole system works and how can a developer obtain ‘Simple’ package by Attic Lab? The process is quite simple and consists of three steps.

  1. You need an account for dApp smart contract your_dapp_contract. Set the contract and the account permission to your_dapp_contract. dApp smart contracts must include the vRAM library to gain access to data storages. A few examples of smart contracts with the vRAM library can be found here ,].

    cleos set contract your_dapp_contract /path/to/contract/coldtoken

    cleos set account permission your_dapp_contract active ‘{“threshold”: 1,”keys”: [{“key”: “your_dapp_contract_active_public_key”,”weight”: 1}], ”accounts”: [{“permission”:{“actor”:”your_dapp_contract”,”permission”:”eosio.code”},”weight”:1}]}’ owner -p your_dapp_contract@owner.

  2. Select the ‘Simple’ package [ ] provided by the Attic Lab DSP account atticlabdapp.

    cleos push action dappservices selectpkg ‘[“your_dapp_contract”,”atticlabdapp”,”ipfsservice1",”package1"]}’ -p your_dapp_contract

    Here are a few details about the package and its conditions:

    provider: atticlabdapp



    cost_per_action: 1


    cost_per_action: 1


    cost_per_action: 1

    package_id: package1

    i.e. the cost of executing the operations cleanup, warmup and commit is 1 DAPP token. Please note that since the system economics has not been tested yet, the cost is not final and may be a subject to a change in the future.

    The developer needs to stake the sufficient amount of DAPP tokens, depending on the amount of operations executed.

  3. Finally, stake DAPP tokens from your smart contract to the Attic Lab DSP data storage. The amount of staked DAPP tokens have to be sufficient to accommodate for the required data storage and access needs.

    cleos push action dappservices stake ‘[“your_dapp_contract”,”atticlabdapp”,”ipfsservice1",”10.000 DAPP”]}’ -p your_dapp_contract

    cleos set account permission your_dapp_contract dsp ‘{“threshold”:1,”keys”:[],”accounts”:[{“permission”:{“actor”:”atticlabdapp”,”permission”:”active”},”weight”:1}]}’ owner -p your_dapp_contract

    Now your Client App can use your contract actions via the Attic Lab DSP API.

    cleos -u push action your_dapp_contract some_action ‘[“some_parameter”,”some_parameter1"]}’ -p your_dapp_contract