Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 0 additions & 88 deletions abis/contracts/interfaces/IexecERC20.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,75 +24,6 @@
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "Lock",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "ref",
"type": "bytes32"
}
],
"name": "Reward",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "ref",
"type": "bytes32"
}
],
"name": "Seize",
"type": "event"
},
{
"anonymous": false,
"inputs": [
Expand All @@ -118,25 +49,6 @@
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "Unlock",
"type": "event"
},
{
"inputs": [
{
Expand Down
27 changes: 27 additions & 0 deletions abis/contracts/interfaces/IexecERC20Events.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
}
]
90 changes: 90 additions & 0 deletions abis/contracts/interfaces/IexecEscrowEvents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
[
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "Lock",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "ref",
"type": "bytes32"
}
],
"name": "Reward",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "ref",
"type": "bytes32"
}
],
"name": "Seize",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "Unlock",
"type": "event"
}
]
88 changes: 88 additions & 0 deletions abis/contracts/interfaces/IexecEscrowToken.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,94 @@
"name": "UnsupportedOperation",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "Lock",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "ref",
"type": "bytes32"
}
],
"name": "Reward",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "ref",
"type": "bytes32"
}
],
"name": "Seize",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "Unlock",
"type": "event"
},
{
"stateMutability": "payable",
"type": "fallback"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
[
"event Approval(address indexed,address indexed,uint256)",
"event Lock(address,uint256)",
"event Reward(address,uint256,bytes32)",
"event Seize(address,uint256,bytes32)",
"event Transfer(address indexed,address indexed,uint256)",
"event Unlock(address,uint256)",
"function approve(address,uint256) returns (bool)",
"function approveAndCall(address,uint256,bytes) returns (bool)",
"function decreaseAllowance(address,uint256) returns (bool)",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
"event Transfer(address indexed,address indexed,uint256)"
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
"event Lock(address,uint256)",
"event Reward(address,uint256,bytes32)",
"event Seize(address,uint256,bytes32)",
"event Unlock(address,uint256)"
]
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"error CallerIsNotTheRequester()",
"error OperationFailed()",
"error UnsupportedOperation(bytes4)",
"event Lock(address,uint256)",
"event Reward(address,uint256,bytes32)",
"event Seize(address,uint256,bytes32)",
"event Unlock(address,uint256)",
"function deposit(uint256) returns (bool)",
"function depositFor(uint256,address) returns (bool)",
"function depositForArray(uint256[],address[]) returns (bool)",
Expand Down
10 changes: 3 additions & 7 deletions contracts/abstract/IexecEscrow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,14 @@

pragma solidity ^0.8.0;
import {PocoStorageLib} from "../libs/PocoStorageLib.sol";
import {IexecERC20Events} from "../interfaces/IexecERC20Events.sol";
import {IexecEscrowEvents} from "../interfaces/IexecEscrowEvents.sol";
import {FacetBase} from "./FacetBase.sol";

/**
* @title Manage (lock/unlock/reward/seize) user funds.
*/
abstract contract IexecEscrow is FacetBase {
event Transfer(address indexed from, address indexed to, uint256 value);
event Lock(address owner, uint256 amount);
event Unlock(address owner, uint256 amount);
event Reward(address owner, uint256 amount, bytes32 ref);
event Seize(address owner, uint256 amount, bytes32 ref);

abstract contract IexecEscrow is FacetBase, IexecERC20Events, IexecEscrowEvents {
/**
* Lock some value of an account.
* @param account The account where the value should be locked.
Expand Down
11 changes: 4 additions & 7 deletions contracts/interfaces/IexecERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@

pragma solidity ^0.8.0;

interface IexecERC20 {
import {IexecERC20Events} from "./IexecERC20Events.sol";

interface IexecERC20 is IexecERC20Events {
// ERC20 standard events
event Transfer(address indexed from, address indexed to, uint256 value);
// `Transfer` is inherited from {IexecERC20Events}.
event Approval(address indexed owner, address indexed spender, uint256 value);
// iExec specific events
event Reward(address owner, uint256 amount, bytes32 ref);
event Seize(address owner, uint256 amount, bytes32 ref);
event Lock(address owner, uint256 amount);
event Unlock(address owner, uint256 amount);

function transfer(address, uint256) external returns (bool);
function approve(address, uint256) external returns (bool);
Expand Down
Loading
Loading