tronprotocol / tronwallet-adapter

MIT License
64 stars 29 forks source link

`Web3Modal` has been upgraded to `V3`,please adapt it #33

Closed hhun closed 1 year ago

hhun commented 1 year ago

Web3Modal 已经升级到 V3,请适配 Web3Modal V3 Web3Modal has been upgraded to V3,please adapt it!

https://github.com/tronprotocol/tronwallet-adapter/tree/main/packages/adapters/walletconnect https://www.npmjs.com/package/@tronweb3/walletconnect-tron https://docs.walletconnect.com/web3modal/about

目前V2只适配signTransactionsignMessage方法,请适配下触发合约方法。 Currently V2 only adapts to the signTransaction and signMessage methods. Please adapt the trigger contract method.

svein1010 commented 1 year ago

可否具体说明下您想要实现什么功能吗?Web3Modal 仅仅是提供选择钱包的弹窗UI,不涉及 signTransaction 以及 signMessage 等方法。

hhun commented 1 year ago

@svein1010

https://github.com/tronprotocol/tronwallet-adapter/tree/main/demos/react-ui/vite-app

里面只有signTransactionsignMessage演示,而且我测试了下转账功能会报错。 能否增加查询余额估算转账所需Gas估算写入合约所需Gas读取合约写入合约的演示代码?

Web3Modal V3支持同时连接多个网络钱包,并且支持切换网络。

svein1010 commented 1 year ago

Adapter 提供连接钱包的功能,并封装了钱包的签名功能。转账、查询余额、估算费用、与合约交互等功能不包含在adapter的功能范围内。这些需要开发者调用 tronweb 的 API 来实现。您可以阅读 Tron的开发者指南tronweb 的开发者文档。 下面是一些常用的API: