1 Star 0 Fork 0

两行泪/web3Solidity

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.js 429 Bytes
一键复制 编辑 原始数据 按行查看 历史
两行泪 提交于 2022-06-29 15:01 +08:00 . 初始化
var Web3 = require('web3');
var contractABI = [];
var contractAddress = "bc2d2c684396c2ae9fdacedb8fa90d649b6b22ab";
var web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'));
var simpleSmartContract = new web3.eth.Contract(contractABI, contractAddress);
web3.eth.getBalance(contractAddress).then((result) => {
console.log("wei: " + result)
console.log("bnb:" + web3.utils.fromWei(result, 'ether'))
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/fatesgo/web3-solidity.git
git@gitee.com:fatesgo/web3-solidity.git
fatesgo
web3-solidity
web3Solidity
master

搜索帮助