mirror of
https://github.com/Instadapp/smart-contract.git
synced 2024-07-29 22:08:07 +00:00
Small code refactoring.
This commit is contained in:
parent
e6b993bf54
commit
7b554cf461
|
@ -24,8 +24,7 @@ contract AddressRecord {
|
||||||
*/
|
*/
|
||||||
modifier logicAuth(address logicAddr) {
|
modifier logicAuth(address logicAddr) {
|
||||||
require(logicAddr != address(0), "logic-proxy-address-required");
|
require(logicAddr != address(0), "logic-proxy-address-required");
|
||||||
bool islogic = RegistryInterface(registry).logic(logicAddr);
|
require(RegistryInterface(registry).logic(logicAddr), "logic-not-authorised");
|
||||||
require(islogic, "logic-not-authorised");
|
|
||||||
_;
|
_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +109,7 @@ contract UserNote {
|
||||||
*/
|
*/
|
||||||
contract UserWallet is UserAuth, UserNote {
|
contract UserWallet is UserAuth, UserNote {
|
||||||
|
|
||||||
event LogExecute(address sender, address target, uint srcNum, uint sessionNum);
|
event LogExecute(address target, uint srcNum, uint sessionNum);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dev sets the "address registry", owner's last activity, owner's active period and initial owner
|
* @dev sets the "address registry", owner's last activity, owner's active period and initial owner
|
||||||
|
@ -126,14 +125,14 @@ contract UserWallet is UserAuth, UserNote {
|
||||||
* @dev Execute authorised calls via delegate call
|
* @dev Execute authorised calls via delegate call
|
||||||
* @param _target logic proxy address
|
* @param _target logic proxy address
|
||||||
* @param _data delegate call data
|
* @param _data delegate call data
|
||||||
* @param _srcNum to find the source
|
* @param _src to find the source
|
||||||
* @param _sessionNum to find the session
|
* @param _session to find the session
|
||||||
*/
|
*/
|
||||||
function execute(
|
function execute(
|
||||||
address _target,
|
address _target,
|
||||||
bytes memory _data,
|
bytes memory _data,
|
||||||
uint _srcNum,
|
uint _src,
|
||||||
uint _sessionNum
|
uint _session
|
||||||
)
|
)
|
||||||
public
|
public
|
||||||
payable
|
payable
|
||||||
|
@ -143,10 +142,9 @@ contract UserWallet is UserAuth, UserNote {
|
||||||
returns (bytes memory response)
|
returns (bytes memory response)
|
||||||
{
|
{
|
||||||
emit LogExecute(
|
emit LogExecute(
|
||||||
msg.sender,
|
|
||||||
_target,
|
_target,
|
||||||
_srcNum,
|
_src,
|
||||||
_sessionNum
|
_session
|
||||||
);
|
);
|
||||||
|
|
||||||
// call contract in current context
|
// call contract in current context
|
||||||
|
|
Loading…
Reference in New Issue
Block a user