add execution failed event
This commit is contained in:
parent
023eca0d5f
commit
0636efd8a7
|
@ -11,6 +11,7 @@ contract ERC725 {
|
||||||
event KeyRemoved(bytes32 indexed key, uint256 indexed purpose, uint256 indexed keyType);
|
event KeyRemoved(bytes32 indexed key, uint256 indexed purpose, uint256 indexed keyType);
|
||||||
event ExecutionRequested(uint256 indexed executionId, address indexed to, uint256 indexed value, bytes data);
|
event ExecutionRequested(uint256 indexed executionId, address indexed to, uint256 indexed value, bytes data);
|
||||||
event Executed(uint256 indexed executionId, address indexed to, uint256 indexed value, bytes data);
|
event Executed(uint256 indexed executionId, address indexed to, uint256 indexed value, bytes data);
|
||||||
|
event ExecutionFailed(uint256 indexed executionId, address indexed to, uint256 indexed value, bytes data);
|
||||||
event Approved(uint256 indexed executionId, bool approved);
|
event Approved(uint256 indexed executionId, bool approved);
|
||||||
|
|
||||||
struct Key {
|
struct Key {
|
||||||
|
|
|
@ -499,8 +499,11 @@ contract Identity is ERC725, ERC735 {
|
||||||
delete txx[_id];
|
delete txx[_id];
|
||||||
//(?) success should be included in event?
|
//(?) success should be included in event?
|
||||||
success = address(trx.to).call.value(trx.value)(trx.data);
|
success = address(trx.to).call.value(trx.value)(trx.data);
|
||||||
emit Executed(_id, trx.to, trx.value, trx.data);
|
if(success){
|
||||||
|
emit Executed(_id, trx.to, trx.value, trx.data);
|
||||||
|
} else {
|
||||||
|
emit ExecutionFailed(_id, trx.to, trx.value, trx.data));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue