Skip to content

Commit be65435

Browse files
committed
refactor: remove ApprovalReceivedAndMatched event and related references
1 parent 22e3b3e commit be65435

File tree

10 files changed

+10
-108
lines changed

10 files changed

+10
-108
lines changed

abis/contracts/IexecInterfaceToken.json

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -54,31 +54,6 @@
5454
"name": "Approval",
5555
"type": "event"
5656
},
57-
{
58-
"anonymous": false,
59-
"inputs": [
60-
{
61-
"indexed": true,
62-
"internalType": "address",
63-
"name": "sender",
64-
"type": "address"
65-
},
66-
{
67-
"indexed": false,
68-
"internalType": "uint256",
69-
"name": "amount",
70-
"type": "uint256"
71-
},
72-
{
73-
"indexed": true,
74-
"internalType": "bytes32",
75-
"name": "dealId",
76-
"type": "bytes32"
77-
}
78-
],
79-
"name": "ApprovalReceivedAndMatched",
80-
"type": "event"
81-
},
8257
{
8358
"anonymous": false,
8459
"inputs": [

abis/contracts/facets/IexecEscrowTokenFacet.json

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,6 @@
2424
"name": "Approval",
2525
"type": "event"
2626
},
27-
{
28-
"anonymous": false,
29-
"inputs": [
30-
{
31-
"indexed": true,
32-
"internalType": "address",
33-
"name": "sender",
34-
"type": "address"
35-
},
36-
{
37-
"indexed": false,
38-
"internalType": "uint256",
39-
"name": "amount",
40-
"type": "uint256"
41-
},
42-
{
43-
"indexed": true,
44-
"internalType": "bytes32",
45-
"name": "dealId",
46-
"type": "bytes32"
47-
}
48-
],
49-
"name": "ApprovalReceivedAndMatched",
50-
"type": "event"
51-
},
5227
{
5328
"anonymous": false,
5429
"inputs": [

abis/contracts/interfaces/IexecEscrowToken.json

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,4 @@
11
[
2-
{
3-
"anonymous": false,
4-
"inputs": [
5-
{
6-
"indexed": true,
7-
"internalType": "address",
8-
"name": "sender",
9-
"type": "address"
10-
},
11-
{
12-
"indexed": false,
13-
"internalType": "uint256",
14-
"name": "amount",
15-
"type": "uint256"
16-
},
17-
{
18-
"indexed": true,
19-
"internalType": "bytes32",
20-
"name": "dealId",
21-
"type": "bytes32"
22-
}
23-
],
24-
"name": "ApprovalReceivedAndMatched",
25-
"type": "event"
26-
},
272
{
283
"stateMutability": "payable",
294
"type": "fallback"

abis/human-readable-abis/contracts/IexecInterfaceToken.sol/IexecInterfaceToken.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"error IncompatibleDatasetOrder(string)",
33
"event AccurateContribution(address indexed,bytes32 indexed)",
44
"event Approval(address indexed,address indexed,uint256)",
5-
"event ApprovalReceivedAndMatched(address indexed,uint256,bytes32 indexed)",
65
"event BroadcastAppOrder(tuple(address,uint256,uint256,bytes32,address,address,address,bytes32,bytes))",
76
"event BroadcastDatasetOrder(tuple(address,uint256,uint256,bytes32,address,address,address,bytes32,bytes))",
87
"event BroadcastRequestOrder(tuple(address,uint256,address,uint256,address,uint256,address,uint256,bytes32,uint256,uint256,address,address,string,bytes32,bytes))",

abis/human-readable-abis/contracts/facets/IexecEscrowTokenFacet.sol/IexecEscrowTokenFacet.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[
22
"event Approval(address indexed,address indexed,uint256)",
3-
"event ApprovalReceivedAndMatched(address indexed,uint256,bytes32 indexed)",
43
"event Lock(address,uint256)",
54
"event Reward(address,uint256,bytes32)",
65
"event Seize(address,uint256,bytes32)",

abis/human-readable-abis/contracts/interfaces/IexecEscrowToken.sol/IexecEscrowToken.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[
2-
"event ApprovalReceivedAndMatched(address indexed,uint256,bytes32 indexed)",
32
"function deposit(uint256) returns (bool)",
43
"function depositFor(uint256,address) returns (bool)",
54
"function depositForArray(uint256[],address[]) returns (bool)",

contracts/facets/IexecEscrowTokenFacet.sol

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ contract IexecEscrowTokenFacet is IexecEscrowToken, IexecTokenSpender, FacetBase
111111
if (data.length > 0) {
112112
dealId = _matchOrdersAfterDeposit(sender, data);
113113
}
114-
emit ApprovalReceivedAndMatched(sender, amount, dealId);
115114
return true;
116115
}
117116

contracts/interfaces/IexecEscrowToken.sol

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ pragma solidity ^0.8.0;
66
interface IexecEscrowToken {
77
receive() external payable;
88
fallback() external payable;
9-
event ApprovalReceivedAndMatched(
10-
address indexed sender,
11-
uint256 amount,
12-
bytes32 indexed dealId
13-
);
149
function deposit(uint256) external returns (bool);
1510
function depositFor(uint256, address) external returns (bool);
1611
function depositForArray(uint256[] calldata, address[] calldata) external returns (bool);

docs/solidity/index.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
# Solidity API
22

3-
## IexecInterfaceToken
4-
5-
A global interface that aggregates all the interfaces needed to interact with
6-
the PoCo contracts in token mode.
7-
8-
_Referenced in the SDK with the current path `contracts/IexecInterfaceToken.sol`.
9-
Changing the name or the path would cause a breaking change in the SDK._
10-
113
## IexecERC20Core
124

135
## IexecEscrowTokenFacet
@@ -68,14 +60,12 @@ function receiveApproval(address sender, uint256 amount, address token, bytes da
6860

6961
Receives approval and optionally matches orders in one transaction
7062

71-
_This is the magic function that enables approve+deposit+match atomicity
72-
7363
Usage patterns:
7464
1. Simple deposit: RLC.approveAndCall(escrow, amount, "")
7565
2. Deposit + match: RLC.approveAndCall(escrow, amount, encodedOrders)
7666

7767
The `data` parameter should be ABI-encoded orders if matching is desired:
78-
abi.encode(appOrder, datasetOrder, workerpoolOrder, requestOrder)_
68+
abi.encode(appOrder, datasetOrder, workerpoolOrder, requestOrder)
7969

8070
#### Parameters
8171

@@ -90,7 +80,7 @@ abi.encode(appOrder, datasetOrder, workerpoolOrder, requestOrder)_
9080

9181
| Name | Type | Description |
9282
| ---- | ---- | ----------- |
93-
| [0] | bool | success True if operation succeeded @custom:example ```solidity // Encode orders bytes memory data = abi.encode(appOrder, datasetOrder, workerpoolOrder, requestOrder); // One transaction does it all RLC.approveAndCall(iexecProxy, dealCost, data); ``` |
83+
| [0] | bool | success True if operation succeeded @custom:example ```solidity // Encode orders bytes memory data = abi.encode(appOrder, datasetOrder, workerpoolOrder, requestOrder); // One transaction does it all RLC(token).approveAndCall(iexecProxy, dealCost, data); ``` |
9484

9585
## IexecLibCore_v5
9686

@@ -565,6 +555,14 @@ struct PocoStorage {
565555
function isRegistered(address _entry) external view returns (bool)
566556
```
567557

558+
## IexecInterfaceToken
559+
560+
A global interface that aggregates all the interfaces needed to interact with
561+
the PoCo contracts in token mode.
562+
563+
_Referenced in the SDK with the current path `contracts/IexecInterfaceToken.sol`.
564+
Changing the name or the path would cause a breaking change in the SDK._
565+
568566
## IexecInterfaceNative
569567

570568
A global interface that aggregates all the interfaces needed to interact with

test/byContract/IexecEscrow/IexecEscrowToken.receiveApproval.test.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,6 @@ describe('IexecEscrowToken-receiveApproval', () => {
250250
.to.emit(iexecPoco, 'Transfer')
251251
.withArgs(AddressZero, requester.address, dealCost);
252252

253-
await expect(tx)
254-
.to.emit(iexecPoco, 'ApprovalReceivedAndMatched')
255-
.withArgs(requester.address, dealCost, dealId);
256-
257253
await expect(tx)
258254
.to.emit(iexecPoco, 'OrdersMatched')
259255
.withArgs(
@@ -298,10 +294,6 @@ describe('IexecEscrowToken-receiveApproval', () => {
298294

299295
const tx = rlcInstanceAsRequester.approveAndCall(proxyAddress, dealCost, encodedOrders);
300296

301-
await expect(tx)
302-
.to.emit(iexecPoco, 'ApprovalReceivedAndMatched')
303-
.withArgs(requester.address, dealCost, dealId);
304-
305297
// Total balance should be existing + new deposit - frozen
306298
expect(await iexecPoco.balanceOf(requester.address)).to.equal(
307299
initialBalance + dealCost - dealCost,
@@ -454,10 +446,6 @@ describe('IexecEscrowToken-receiveApproval', () => {
454446
.to.emit(iexecPoco, 'Transfer')
455447
.withArgs(AddressZero, requester.address, dealCost);
456448

457-
await expect(tx)
458-
.to.emit(iexecPoco, 'ApprovalReceivedAndMatched')
459-
.withArgs(requester.address, dealCost, dealId);
460-
461449
expect(await iexecPoco.frozenOf(requester.address)).to.equal(0n);
462450
});
463451
});

0 commit comments

Comments
 (0)