diff --git a/contracts/identity/ERC725.sol b/contracts/identity/ERC725.sol index 696d50d..6b4dbe5 100644 --- a/contracts/identity/ERC725.sol +++ b/contracts/identity/ERC725.sol @@ -11,6 +11,7 @@ contract ERC725 { 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 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); struct Key { diff --git a/contracts/identity/Identity.sol b/contracts/identity/Identity.sol index c6f8d58..cf65a68 100644 --- a/contracts/identity/Identity.sol +++ b/contracts/identity/Identity.sol @@ -499,8 +499,11 @@ contract Identity is ERC725, ERC735 { delete txx[_id]; //(?) success should be included in event? 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)); + } } }