-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
56d5f37
commit 495a877
Showing
14 changed files
with
1,709 additions
and
12 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.7; | ||
|
||
library DlnExternalCallLib { | ||
struct ExternalCallEnvelopV1 { | ||
// Address that will receive takeToken if ext call failed | ||
address fallbackAddress; | ||
// *optional. Smart contract that will execute ext call. | ||
address executorAddress; | ||
// fee that will pay for executor who will execute ext call | ||
uint160 executionFee; | ||
// If false, the taker must execute an external call with fulfill in a single transaction. | ||
bool allowDelayedExecution; | ||
// if true transaction that will execute ext call will fail if ext call is not success | ||
bool requireSuccessfullExecution; | ||
bytes payload; | ||
} | ||
|
||
struct ExternalCallPayload { | ||
// the address of the contract to call | ||
address to; | ||
// *optional. Tx gas for execute ext call | ||
uint32 txGas; | ||
bytes callData; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,369 @@ | ||
[ | ||
{ | ||
"inputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "constructor" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "AdapterBadRole", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "AdminBadRole", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "CallFailed", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "EthTransferFailed", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "NotEnoughTxGas", | ||
"type": "error" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "bytes32", | ||
"name": "role", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "bytes32", | ||
"name": "previousAdminRole", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "bytes32", | ||
"name": "newAdminRole", | ||
"type": "bytes32" | ||
} | ||
], | ||
"name": "RoleAdminChanged", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "bytes32", | ||
"name": "role", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "account", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "sender", | ||
"type": "address" | ||
} | ||
], | ||
"name": "RoleGranted", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "bytes32", | ||
"name": "role", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "account", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "sender", | ||
"type": "address" | ||
} | ||
], | ||
"name": "RoleRevoked", | ||
"type": "event" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "ADAPTER_ROLE", | ||
"outputs": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "", | ||
"type": "bytes32" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "DEFAULT_ADMIN_ROLE", | ||
"outputs": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "", | ||
"type": "bytes32" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "role", | ||
"type": "bytes32" | ||
} | ||
], | ||
"name": "getRoleAdmin", | ||
"outputs": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "", | ||
"type": "bytes32" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "role", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "account", | ||
"type": "address" | ||
} | ||
], | ||
"name": "grantRole", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "role", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "account", | ||
"type": "address" | ||
} | ||
], | ||
"name": "hasRole", | ||
"outputs": [ | ||
{ | ||
"internalType": "bool", | ||
"name": "", | ||
"type": "bool" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bytes", | ||
"name": "_data", | ||
"type": "bytes" | ||
} | ||
], | ||
"name": "isProhibitedSelector", | ||
"outputs": [ | ||
{ | ||
"internalType": "bool", | ||
"name": "", | ||
"type": "bool" | ||
} | ||
], | ||
"stateMutability": "pure", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "_token", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "_transferredAmount", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "_fallbackAddress", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "_payload", | ||
"type": "bytes" | ||
} | ||
], | ||
"name": "onERC20Received", | ||
"outputs": [ | ||
{ | ||
"internalType": "bool", | ||
"name": "callSucceeded", | ||
"type": "bool" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "callResult", | ||
"type": "bytes" | ||
} | ||
], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "_fallbackAddress", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "_payload", | ||
"type": "bytes" | ||
} | ||
], | ||
"name": "onEtherReceived", | ||
"outputs": [ | ||
{ | ||
"internalType": "bool", | ||
"name": "callSucceeded", | ||
"type": "bool" | ||
}, | ||
{ | ||
"internalType": "bytes", | ||
"name": "callResult", | ||
"type": "bytes" | ||
} | ||
], | ||
"stateMutability": "payable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "role", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "account", | ||
"type": "address" | ||
} | ||
], | ||
"name": "renounceRole", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "_token", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "_recipient", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "_amount", | ||
"type": "uint256" | ||
} | ||
], | ||
"name": "rescueFunds", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "role", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "account", | ||
"type": "address" | ||
} | ||
], | ||
"name": "revokeRole", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bytes4", | ||
"name": "interfaceId", | ||
"type": "bytes4" | ||
} | ||
], | ||
"name": "supportsInterface", | ||
"outputs": [ | ||
{ | ||
"internalType": "bool", | ||
"name": "", | ||
"type": "bool" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
} | ||
] |
Oops, something went wrong.