Skip to content

Clean interface of main wrap #86

@cbrzn

Description

@cbrzn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions