1. 首页
  2. 数据库
  3. 其它
  4. 计算调用一个合约方法需要消耗多少gas

计算调用一个合约方法需要消耗多少gas

上传者: 2021-01-16 16:23:41上传 PDF文件 51.7KB 热度 7次
准备工作 1、三个账户,eth.account[0]为默认账户,挖矿所得的奖励都会进入到这个账户 > eth.getBalance(eth.accounts[0]) 736031150000000000000 > eth.getBalance(eth.accounts[1]) 500050000000000000 > eth.getBalance(eth.accounts[2]) 500050000000000000 普通交易所需的gas > eth.estimateGas({from:eth.accounts[1], to: eth.accounts[2], value:500000000
下载地址
用户评论