Helper Functions
getCreateKeys | Code
The getCreateKeys function is intended to create a new key pair in ~/.zeus/networks/development/accounts if a key pair does not already exist for the account provided. The sub directory to ~/.zeus/network can be any chain that you are developing on as well, e.g., kylin, jungle, mainnet. If an account name has a contract deployed to it with the deploy function, then a key pair will automatically be assigned during the deployment.
/**
* @param account - account name to generate or fetch keys for
*/
const { requireBox } = require('@liquidapps/box-utils');
const { getCreateKeys } = requireBox('eos-keystore/helpers/key-utils');
var keys = await getCreateKeys(account);artifacts | Code
The artifacts helper pulls the relevant contract files, such as the wasm / ABI, to be used within the unit test.
/**
* @param f - contract name within the /contracts/eos directory
*/
const { requireBox } = require('@liquidapps/box-utils');
const artifacts =requireBox('seed-eos/tools/eos/artifacts');
var contractCode = 'mycontract';
var ctrt = artifacts.require(`./${contractCode}/`);deployer | Code
The deployer function deploys a contract to an account based on the contract files and the account name passed. You may also pass your own args, if not specified, the getDefaultArgs() function will be passed.
genAllocateDAPPTokens | Code
The genAllocateDAPPTokens function allocates DAPP tokens to the specified contract provided. It also issues, selects a package, stakes, and updates auth to include eosio.code.
readVRAMData | Code
The readVRAMData function makes a vRAM get table row call by providing the contract, key, table, and scope arguments.
getTestContract | Code
The getTestContract function creates an EOSJS instance to be used for sending EOS transactions.
Last updated
Was this helpful?