我正在查看makerdao的CDP操作的事件日志,我很困惑为什么一个cdp操作有几个事件日志,比如这个tx:https://etherscan.io/tx/0x0fb6a8d8f10410c544b27b848319e67a422be883e4252fea639c89a444209685#eventlog,它包含了一个cdp操作:makerdao。
第九十五届戴只有一次抽签:

在事件日志中,有几个带有Topic0 (0x440f19ba00000000000000000000000000000000000000000000000000000000)的事件日志(总共6条):

这是为什么?
注:抽签活动签名如下:
function draw(bytes32 cup, uint wad) public note {在这里,日志由修饰符note创建,即:
event LogNote(
bytes4 indexed sig,
address indexed guy,
bytes32 indexed foo,
bytes32 indexed bar,
uint wad,
bytes fax
) anonymous;
modifier note {
bytes32 foo;
bytes32 bar;
assembly {
foo := calldataload(4)
bar := calldataload(36)
}
LogNote(msg.sig, msg.sender, foo, bar, msg.value, msg.data);
_;
}事件LogNote是anonymous,所以topic0是msg.sig,而不是事件的签名。msg.sig for func dai is:draw(bytes32,uint256),keccak is:0x440f19ba0
https://ethereum.stackexchange.com/questions/66866
复制相似问题