-
Notifications
You must be signed in to change notification settings - Fork 375
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
[ContractKit]Fill more fields before web3 signing #1133
Conversation
7438b0d
to
901dd26
Compare
901dd26
to
6b66bac
Compare
Codecov Report
@@ Coverage Diff @@
## master #1133 +/- ##
=======================================
Coverage 66.16% 66.16%
=======================================
Files 261 261
Lines 7599 7599
Branches 508 508
=======================================
Hits 5028 5028
Misses 2474 2474
Partials 97 97
Continue to review full report at Codecov.
|
packages/contractkit/src/providers/celo-private-keys-subprovider.ts
Outdated
Show resolved
Hide resolved
packages/contractkit/src/providers/celo-private-keys-subprovider.ts
Outdated
Show resolved
Hide resolved
packages/contractkit/src/providers/celo-private-keys-subprovider.ts
Outdated
Show resolved
Hide resolved
e27614b
to
0f8e5c9
Compare
packages/contractkit/src/providers/celo-private-keys-subprovider.ts
Outdated
Show resolved
Hide resolved
@ashishb Let's go back to the drawing board here... Things to note:
And now we are doing similar things on the provider. We should define where we should do "what" and be consitent about it. Need to think about it, but let's talk if you want |
Following on this.
I favor this last fail step, since to access |
That, as we know, only works when geth node is getting unsigned txns.
Why not? Provider seems like the right abstraction level to do this. So, if someone uses web3 instead of using
I modified the code, now it takes an optional |
744ca69
to
9da148b
Compare
I know; but we should have a clear definition of objects responsibilities and expectations web3/kit: They should be able to assume they are speaking directly with a node. No local signing. So, from their perspective setting Provider A provider should behave the same way as a node. It shouldn't be any difference between talking to a provider that does local signing, than talking to a provider that relays all message to a node Because of this; imo, we should set
The question here is: how does the node behave when there's no My thinking goes this way: If the node doesn't automatically set the
I'll check this on the code |
https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sendtransaction |
packages/contractkit/src/providers/celo-private-keys-subprovider.ts
Outdated
Show resolved
Hide resolved
packages/contractkit/src/providers/celo-private-keys-subprovider.ts
Outdated
Show resolved
Hide resolved
8cf2c2d
to
f0881f5
Compare
1. Fill more fields before web3 signing of transaction. 2. Treat '0' as an empty value
1. Fill more fields before web3 signing of transaction. 2. Treat '0' as an empty value
f0881f5
to
52abae1
Compare
Make testing of web3 signing more rigorous
52abae1
to
d1283c8
Compare
* master: [Protocol] Fix network id for alfajores in truffle configs (#1211) When resetting and upgrading a VM testnet, new tx-nodes are included in the new instance group (#771) Upload static VM testnet nodes, add stackdriver logging (#750) Revert "Make packages depend on git vesrion (not npm)" (#1201) Make packages depend on git vesrion (not npm) (#1192) [contractkit] Document methods (#1195) [ck] consistent send tx object in kit (#1191) Move docker images to use node v10 (#1183) [ContractKit]Fill more fields before web3 signing (#1133) [codecov]Fix codecov errors (#1147) [Wallet] Add support for address pasting in send input field (#1180) Fix verification pool validation (#1176) Improve QR Code scan ability (#1036) Add CLI commands around identity metadata (#1167) [wallet]Run geth in an infura-like mode (#1108) # Conflicts: # yarn.lock
Description
Tested
Manually checked that the new methods work by looking at debug logs from
DEBUG=* jest src/utils/tx-signing.test.ts -t test
Issues
Partially addresses #526