UNPKG

test-triam-base-contract

Version:

Low level triam smart cotnract support library

25 lines (19 loc) 586 B
const base = require('../lib/index'); const Bignumber = require('bignumber.js'); let IContract = base.IContract; const Storage = base.Storage; const OutputFormat = base.OutputFormat; const State = base.State(); class Test implements IContract { public storage; constructor (_storage) { this.storage = new Storage(_storage); } initialize(_listMember){ this.storage = new Storage(); this.storage.set("member", _listMember); return OutputFormat(0, this.storage.save(), "", State.contractKey, "OK"); } fallback(_sender, _assetcode, _issuer) { } }