mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
update transfer log address
This commit is contained in:
parent
6da92026f7
commit
12d59b58e2
2 changed files with 9 additions and 5 deletions
|
|
@ -1489,7 +1489,7 @@ func TestMulticallV1(t *testing.T) {
|
|||
ReturnValue: "0x",
|
||||
GasUsed: "0xd984",
|
||||
Logs: []log{{
|
||||
Address: common.Address{},
|
||||
Address: transferAddress,
|
||||
Topics: []common.Hash{
|
||||
transferTopic,
|
||||
accounts[0].addr.Hash(),
|
||||
|
|
@ -1498,7 +1498,7 @@ func TestMulticallV1(t *testing.T) {
|
|||
Data: hexutil.Bytes(common.BigToHash(big.NewInt(50)).Bytes()),
|
||||
BlockNumber: hexutil.Uint64(11),
|
||||
}, {
|
||||
Address: common.Address{},
|
||||
Address: transferAddress,
|
||||
Topics: []common.Hash{
|
||||
transferTopic,
|
||||
randomAccounts[0].addr.Hash(),
|
||||
|
|
|
|||
|
|
@ -25,8 +25,12 @@ import (
|
|||
"github.com/ethereum/go-ethereum/core/vm"
|
||||
)
|
||||
|
||||
// keccak256("Transfer(address,address,uint256)")
|
||||
var transferTopic = common.HexToHash("ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef")
|
||||
var (
|
||||
// keccak256("Transfer(address,address,uint256)")
|
||||
transferTopic = common.HexToHash("ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef")
|
||||
// ERC-7528
|
||||
transferAddress = common.HexToAddress("0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE")
|
||||
)
|
||||
|
||||
// tracer is a simple tracer that records all logs and
|
||||
// ether transfers. Transfers are recorded as if they
|
||||
|
|
@ -168,7 +172,7 @@ func (t *tracer) captureTransfer(from, to common.Address, value *big.Int) {
|
|||
common.BytesToHash(from.Bytes()),
|
||||
common.BytesToHash(to.Bytes()),
|
||||
}
|
||||
t.captureLog(common.Address{}, topics, common.BigToHash(value).Bytes())
|
||||
t.captureLog(transferAddress, topics, common.BigToHash(value).Bytes())
|
||||
}
|
||||
|
||||
func (t *tracer) Logs() []*types.Log {
|
||||
|
|
|
|||
Loading…
Reference in a new issue