Truffle(1)スマート見積りへのアクセス



truffle console
const instance - await Faucet.deployed()
instance
Intanceを入力し、次のように出力します.
storageに変数を格納すると、自動的にメソッドが生成されます.

const funds = await instance.funds();
return > undefined
funds
BN {
  negative: 0,
  words: [ 1000, <1 empty item> ],
  length: 1,
  red: null
} 
funds.toString()
'1000'
const test2 = await instance.test()
undefined
test2.toString()
'4294967295'