Skip to content

Make From param optional in Transaction object#32

Merged
onrik merged 1 commit intoonrik:masterfrom
oilnam:manlio-fix-call-params
Jul 27, 2022
Merged

Make From param optional in Transaction object#32
onrik merged 1 commit intoonrik:masterfrom
oilnam:manlio-fix-call-params

Conversation

@oilnam
Copy link
Contributor

@oilnam oilnam commented Sep 7, 2019

In eth_call the from field is optional (unlike for instance in eth_sendTransaction).

However, the current code always fills in the from field with an empty string if no actual value is provided, which results in the following error:

invalid argument 0: hex string has length 0, want 40 for common.Address

when using eth_call with no from field provided.

This fix makes the from field optional so that the rpc json request gets correctly serialized.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.004%) to 98.268% when pulling d977398 on oilnam:manlio-fix-call-params into 4a39f95 on onrik:master.

@oilnam
Copy link
Contributor Author

oilnam commented Oct 7, 2019

@onrik any thoughts on this small PR? Thanks ;)

@onrik onrik merged commit 1256c94 into onrik:master Jul 27, 2022
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.

3 participants