Open njgheorghita opened 5 years ago
Maybe something like:
from pytest_ethereum import pte
chain = pte.Chain(w3)
receipt = chain.transact(...)
Where transact
has some API accepting transactions in a format that's "easy" for users. The Chain
object could then be the place where we expose other convenience APIs like:
>>> account = chain.Account('0x...')
>>> account.balance
1234
Where
transact
has some API accepting transactions in a format that's "easy" for users.
One option is something we've been talking about for web3: chain.transact(sender=..., to=..., gas=...)
.
If y'all are up for it, it'd be helpful to schedule a short call and discuss/whiteboard the general api we're aiming for, and the lines between pte
/web3
. (though, with xmas break coming up soon, i'm also down to punt till early january when i'm fresh and less likely to forget everything we talk about/decide on over break)
punt till early january when i'm fresh and less likely to forget everything we talk about/decide on over break
:+1:
Maybe just toss a calendar invite our way?
Feature Request
What was wrong?
From #25 . . . @carver @pipermerriam
How can it be fixed?
Suggestion - A simple wrapper function that takes a built transaction, sends it on a given
w3
instance, and returns the transaction receipt. Raises aTransactionError
if tx fails.