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

getFromAddress() does not work with r, s, v #56

Open
kelvinzer0 opened this issue Jun 28, 2023 · 1 comment
Open

getFromAddress() does not work with r, s, v #56

kelvinzer0 opened this issue Jun 28, 2023 · 1 comment

Comments

@kelvinzer0
Copy link

The expected outcome on this website https://rawtxdecode.in/?rawTx=f86b0b85250523760082520894eafaf9bb8f35235d0df61275e86fd65d9ef2c3f9870aaa0065c66b8b8026a05fd883bb01a10915ebc06621b925bd6d624cb6768976b73c0d468b31f657d15ba0121d855c539a23aadf6f06ac21165db1ad5efd261842e82a719c9863ca4ac04c.

getFromAddress() does not work with r, s, v:
$transaction['r'] = $r;
$transaction['s'] = $s;
$transaction['v'] = $v;
$fromB = $transaction->getFromAddress();

output error:
Deprecated: Return type of Web3p\EthereumTx\Transaction::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/qindexmedia/xxx/vendor/web3p/ethereum-tx/src/Transaction.php on line 292

Deprecated: Return type of Web3p\EthereumTx\Transaction::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/qindexmedia/xxx/vendor/web3p/ethereum-tx/src/Transaction.php on line 323

Deprecated: Return type of Web3p\EthereumTx\Transaction::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/qindexmedia/xxx/vendor/web3p/ethereum-tx/src/Transaction.php on line 252

Deprecated: Return type of Web3p\EthereumTx\Transaction::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/qindexmedia/xxx/vendor/web3p/ethereum-tx/src/Transaction.php on line 308

Fatal error: Uncaught AssertionError: assert((3 & $j) === $j) in /Users/qindexmedia/xxx/vendor/simplito/elliptic-php/lib/EC.php:224
Stack trace:
#0 /Users/qindexmedia/xxx/vendor/simplito/elliptic-php/lib/EC.php(224): assert(false, 'assert((3 & $j)...')
#1 /Users/qindexmedia/xxx/vendor/web3p/ethereum-tx/src/Transaction.php(474): Elliptic\EC->recoverPubKey('5b6cccfc272b73f...', Array, -12.0)
#2 /Users/qindexmedia/xxx/tes.php(61): Web3p\EthereumTx\Transaction->getFromAddress()
#3 {main}
thrown in /Users/qindexmedia/xxx/vendor/simplito/elliptic-php/lib/EC.php on line 224

@kelvinzer0
Copy link
Author

kelvinzer0 commented Jun 28, 2023

Improvement reference can be found at https://github.com/flightwallet/decode-eth-tx/blob/master/ethereumjs-tx-1.3.3.js

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

No branches or pull requests

1 participant