Skip to main content
deleted 1 character in body
Link
Twiddles
  • 43
  • 2
  • 7

web3 python convert addresses from transaction log topics

deleted 1 character in body
Source Link
Twiddles
  • 43
  • 2
  • 7

I'm trying to get the to and from address from the logs in a transaction. In my example, the log entry is for a Transfer(address,address,uint256).

The resulting topics[1] and [2] return the addresses, but in a long format: 0x0000000000000000000000002dbbbebef9915110dac11a89ca986ba6051d0972

How do I convert this to a regular address? Eg: 0x22dbbbebef9915110dac11a89ca986ba6051d09720x2dbbbebef9915110dac11a89ca986ba6051d0972

I'm trying to get the to and from address from the logs in a transaction. In my example, the log entry is for a Transfer(address,address,uint256).

The resulting topics[1] and [2] return the addresses, but in a long format: 0x0000000000000000000000002dbbbebef9915110dac11a89ca986ba6051d0972

How do I convert this to a regular address? Eg: 0x22dbbbebef9915110dac11a89ca986ba6051d0972

I'm trying to get the to and from address from the logs in a transaction. In my example, the log entry is for a Transfer(address,address,uint256).

The resulting topics[1] and [2] return the addresses, but in a long format: 0x0000000000000000000000002dbbbebef9915110dac11a89ca986ba6051d0972

How do I convert this to a regular address? Eg: 0x2dbbbebef9915110dac11a89ca986ba6051d0972

Source Link
Twiddles
  • 43
  • 2
  • 7

web3 python convert addresses from topics

I'm trying to get the to and from address from the logs in a transaction. In my example, the log entry is for a Transfer(address,address,uint256).

The resulting topics[1] and [2] return the addresses, but in a long format: 0x0000000000000000000000002dbbbebef9915110dac11a89ca986ba6051d0972

How do I convert this to a regular address? Eg: 0x22dbbbebef9915110dac11a89ca986ba6051d0972