4 Star 1 Fork 0

stfujnkk/neth-web

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
b.html 903 Bytes
一键复制 编辑 原始数据 按行查看 历史
yfl 提交于 2022-02-15 16:16 . ethers.js metamask 交互
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue 测试实例 - vue实现列表增加和删除</title>
<script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
<link rel="stylesheet" href="./json.css">
<script src="./json.js"></script>
</head>
<body>
<script src="https://cdn.bootcdn.net/ajax/libs/ethers/5.5.4/ethers.umd.min.js"></script>
<script>
let provider = new ethers.providers.Web3Provider(ethereum);
let contractEnsName = '0xee8F33A44752C46Ad16d8389e1E9339Bd9767B9a';
let topic = ethers.utils.id("Transfer(address,address,uint256)");
let filter = {
address: contractEnsName,
fromBlock: 0,
toBlock:15,
topics: [topic]
}
provider.getLogs(filter).then((result) => {
console.log(result);
});
</script>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/stfujnkk/neth-web.git
git@gitee.com:stfujnkk/neth-web.git
stfujnkk
neth-web
neth-web
master

搜索帮助