I am trying to get the address that signed the transaction below in Moonbeam EVM (a Polkadot EVM compatible parachain). By loading the contract ABI i am able to get the call parameters by doing this:
from web3 import Web3
w3 = Web3(Web3.HTTPProvider(endpoint))
contract = w3.eth.contract(address=contract_address, abi=abi)
func_obj, func_params = contract.decode_function_input(input)
However, I haven't found a way to get the signing address from the v,r,s value.
The signing address is 0xb01744745fbBebE6A0Da674F8f45fD1e14D5B488
and Subscan can decode it (not sure how), the extrinsic can be seen here https://moonbeam.subscan.io/extrinsic/333456-3
This is the content of the extrinsic:
{
"extrinsic_hash": "None",
"extrinsic_length": 358,
"call": {
"call_index": "0x3400",
"call_function": "transact",
"call_module": "Ethereum",
"call_args": [
{
"name": "transaction",
"type": "Transaction",
"value": {
"nonce": [
4,
0,
0,
0
],
"gas_price": [
100000000000,
0,
0,
0
],
"gas_limit": [
81203,
0,
0,
0
],
"action": {
"Call": "0x0000000000000000000000000000000000000800"
},
"value": [
0,
0,
0,
0
],
"input": "0x829f5ee30000000000000000000000006ac4b6725efd8a1cb397884769730094e854efd4000000000000000000000000000000000000000000000004fcc1a89027f00000000000000000000000000000000000000000000000000000000000000000018b0000000000000000000000000000000000000000000000000000000000000000",
"signature": {
"v": 2604,
"r": "0x5c13ca196ecb21a46827d2959282b67b807fc733feb314832a5597f2c5e06df4",
"s": "0x62646696b3afa36444924ca8813e237faec7de9f8d044c3cd2f589293dcf5f73"
}
}
}
],
"call_hash": "0x92b544513124ed16ead74de9784661d46e5d8b839a232050ccf3348fc73a0b8a"
}
}
So how do I get the address from the above data? I have tried in many ways without finding anything that brings to that result.
P.S. I am aware that in this specific case I can get that address from one of the events triggered by the call but I do not want to use that method instead I want to decode the address that signed the transaction