Replies: 3 comments 1 reply
-
The interface looks reasonable, quick question: should the contract interface also provide the |
Beta Was this translation helpful? Give feedback.
-
With this interface the contract will be more intuitive and easier to use since we will have the direct call for the methods like @fracek mentioned and I agree also on ContractFactory, it can support type transformation on deployment for more complex args, because it will have access to the abi. |
Beta Was this translation helpful? Give feedback.
-
This will be a really great interface to implement. Excited! :) |
Beta Was this translation helpful? Give feedback.
-
Hey all,
I thought a lot about interfaces for v3 and after coming up with the interfaces and default implementations of
Provider
,Signer
and the all newAccount
classes, I'll be on vacation for the next 3 weeks 🌴I think the new v3 Contract interface should work a lot like the ethers.js Contract class. I wrote a little interface before I leave. As I came up with this interface without working on the default implementation maybe I've missed something/some changes are needed.
It borrows a lot from https://docs.ethers.io/v5/api/contract/contract/ and I think we should do that. It also relies a lot on the provided ABI. It is a proven interface and supports a wide combination of use cases, from very simple JS scripts to full blown TS projects using TypeChain etc.
I think additionally there should be a class called
ContractFactory
which can deploy Contracts, just as in ethers https://docs.ethers.io/v5/api/contract/contract-factory/Thanks for the read and let me know what you think about this interface!
Best,
Janek
Beta Was this translation helpful? Give feedback.
All reactions