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

Loom provider with optional private key #307

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

1 participant