Skip to content

Conversation

@eduardonunesp
Copy link
Contributor

@eduardonunesp eduardonunesp commented Sep 11, 2019

  • LoomProvider constructor with option private key
  • Add test for transactions and calls without private key

This PR makes possible to instantiate a LoomProvider without the needing of pass a private key on the second parameter

const client = createTestClient()
const loomProvider = new LoomProvider(client)

However, there's a case where the caller address should be passed, like:

const loomProvider = new LoomProvider(client)
const web3 = new Web3(loomProvider)
const contract = new web3.eth.Contract(ABI, contractAddress)

// Here we inform the from variable or the call will fail
const resultOfGet = await contract.methods.get().call({ from })

@eduardonunesp
Copy link
Contributor Author

#291

@eduardonunesp eduardonunesp changed the title [WIP] Loom provider with optional private key Loom provider with optional private key Sep 11, 2019
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

Successfully merging this pull request may close these issues.

2 participants