Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean interface of main wrap #86

Open
Tracked by #77
cbrzn opened this issue May 2, 2023 · 0 comments
Open
Tracked by #77

Clean interface of main wrap #86

cbrzn opened this issue May 2, 2023 · 0 comments

Comments

@cbrzn
Copy link
Contributor

cbrzn commented May 2, 2023

The current interface of ethereum wrap can be simplified with the core building blocks to interact with ethereum. This means that currently we have methods like:

  callContractView(
    address: String!
    method: String!
    args: [String!]
    connection: Connection
  ): String!

  callContractStatic(
    address: String!
    method: String!
    args: [String!]
    options: TxOptions
    connection: Connection
  ): StaticTxResult!

  callContractMethod(
    address: String!
    method: String!
    args: [String!]
    options: TxOptions
    connection: Connection
  ): TxResponse!

  callContractMethodAndWait(
    address: String!
    method: String!
    args: [String!]
    options: TxOptions
    connection: Connection
  ): TxReceipt!

This is inspired by the previous ethereum plugin. We can improve this interface to just expose one method, and the different functionalities can be defined through arguments; for example, in this callContract* methods, we can create one and receive an option that can allow the method to wait or do a staticCall

Another example can be that we have sendTransaction & deployContract, we can expose the send method, and the user can do a deployment of a contract by defining the correct arguments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant