Git Product home page Git Product logo

dappreader-v2's Issues

讨论一下如何自动 fetch proxy contract 的 implemetation abi

对于 proxy 合约,比较正确的方式应该是使用 implmentation 的 abi,或者是将 proxy 和 implementation 的 abi 结合在一起,因为其 纯 proxy 的 abi 没什么调用的意义。

etherscan 并没有直接获取 proxy 合约实现地址的方法,但根据 etherscan 之前的 blog(https://medium.com/etherscan-blog/and-finally-proxy-contract-support-on-etherscan-693e3da0714b) ,可以仿照着这样做:

  1. 支持一些简单的 proxy 模式(单个 implemtation),记下来这些简单的 implemtation 的存储槽位。
  2. 读特定存储槽位是否有值,如果有值,就可以认为是代理合约,然后去拿读到的 implementation 合约的 abi

一些简单的例子:

  • EIP1967 的实现地址槽位是 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc
  • EIP1822 的槽位: 0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7
  • EIP1167 的实现合约地址在 bytecode 里面,读它的前几位判断是否是 eip1167,然后再拆分字符串找到实现地址

yarn run serve 启动失败

yarn 1.22.19
node 16.0
npm 7.10.0

yarn install, yarn run serve 会出现如下报错

 ERROR  Failed to compile with 4 errors                                                                                              1:27:39 PM

This dependency was not found:

* naive-ui in ./src/main.js, ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/Menu.vue?vue&type=script&lang=js and 2 others

To install it, you can run: npm install --save naive-ui

跑了 npm install --save naive-ui 之后就正常了,但就又变成 npm 装包了

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.