custody 锁仓合约对接
锁仓dapp操作文档
Custody 资产锁仓/分发一、合约操作示例:
创建锁仓计划,参考操作文档,前端进行操作。
转入锁仓:
# memo params format:
# issue:${receiver}:${plan_id}:${first_unlock_days}, Eg: "issue:receiver1234:1:30"
mpush amax.token transfer '{"from":"merchantxpro","to":"amax.custody","quantity":"10.00000000 AMAX","memo":"issue:receiver1234:1:30"}' -p merchantxpro 二、合约代码调用示例:
struct amax_token {
void transfer(const name& from, const name& to, const asset& quantity, const string& memo);
using transfer_action = eosio::action_wrapper<"transfer"_n, &amax_token::transfer>;
};
#define TRANSFER_OUT(token_contract, to, quantity, memo) \
amax_token::transfer_action(token_contract, { { get_self(), ACTIVE_PERM } }).send(get_self(), to, quantity, memo);
TRANSFER_OUT(_gstateaccts.eec_contract, AMAX_CUSTODY, issue_quantity, "issue:receiver1234:1:30")最后更新于