Skip to content

Commit 230e035

Browse files
zguesmiLe-Caignec
andauthored
fix: Fix Sharing contract constructor arguments order (#433)
Co-authored-by: Robin Le Caignec <[email protected]>
1 parent b3d33ee commit 230e035

File tree

23 files changed

+127
-164
lines changed

23 files changed

+127
-164
lines changed

.github/workflows/root-checks.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ jobs:
4444
working-directory: ${{ matrix.package }}
4545
run: |
4646
npm run refresh-abis
47+
# TODO check that SDK and Subgraph projects build is OK.

packages/sdk/abis/sharing/DataProtectorSharing.sol/DataProtectorSharing.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"inputs": [
44
{
5-
"internalType": "contract IExecPocoDelegate",
5+
"internalType": "address",
66
"name": "_proxy",
77
"type": "address"
88
},
@@ -195,7 +195,7 @@
195195
},
196196
{
197197
"inputs": [],
198-
"name": "FailedInnerCall",
198+
"name": "FailedCall",
199199
"type": "error"
200200
},
201201
{

packages/sdk/abis/sharing/interfaces/IExecPocoDelegate.sol/IExecPocoDelegate.json renamed to packages/sdk/abis/sharing/interfaces/IPoCo.sol/IPoCo.json

File renamed without changes.

packages/sdk/abis/sharing/libs/IexecLibOrders_v5.sol/IexecLibOrders_v5.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/sdk/abis/sharing/registry/AddOnlyAppWhitelistRegistry.sol/AddOnlyAppWhitelistRegistry.json

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44
"stateMutability": "nonpayable",
55
"type": "constructor"
66
},
7-
{
8-
"inputs": [],
9-
"name": "ERC1167FailedCreateClone",
10-
"type": "error"
11-
},
127
{
138
"inputs": [
149
{
@@ -112,6 +107,27 @@
112107
"name": "ERC721NonexistentToken",
113108
"type": "error"
114109
},
110+
{
111+
"inputs": [],
112+
"name": "FailedDeployment",
113+
"type": "error"
114+
},
115+
{
116+
"inputs": [
117+
{
118+
"internalType": "uint256",
119+
"name": "balance",
120+
"type": "uint256"
121+
},
122+
{
123+
"internalType": "uint256",
124+
"name": "needed",
125+
"type": "uint256"
126+
}
127+
],
128+
"name": "InsufficientBalance",
129+
"type": "error"
130+
},
115131
{
116132
"inputs": [],
117133
"name": "InvalidInitialization",
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { IExecModule } from 'iexec';
2-
import type { IExecPocoDelegate } from '../../../../generated/typechain/sharing/interfaces/IExecPocoDelegate.js';
2+
import type { IPoCo } from '../../../../generated/typechain/sharing/interfaces/IPoCo.js';
33

44
export async function getPocoContract(
55
iexec: IExecModule
6-
): Promise<IExecPocoDelegate> {
6+
): Promise<IPoCo> {
77
const client = await iexec.config.resolveContractsClient();
8-
return client.getIExecContract() as unknown as IExecPocoDelegate;
8+
return client.getIExecContract() as unknown as IPoCo;
99
}

packages/sdk/src/lib/dataProtectorSharing/smartContract/pocoContract.reads.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { IExecPocoDelegate } from '../../../../generated/typechain/sharing/interfaces/IExecPocoDelegate.js';
1+
import type { IPoCo } from '../../../../generated/typechain/sharing/interfaces/IPoCo.js';
22
import type { Address } from '../../types/index.js';
33
import type { AccountDetails } from '../../types/pocoTypes.js';
44

@@ -12,7 +12,7 @@ const getAccountAllowance = async ({
1212
owner,
1313
spender,
1414
}: {
15-
pocoContract: IExecPocoDelegate;
15+
pocoContract: IPoCo;
1616
owner: Address;
1717
spender: Address;
1818
}) => {
@@ -23,7 +23,7 @@ const getAccountBalance = async ({
2323
pocoContract,
2424
owner,
2525
}: {
26-
pocoContract: IExecPocoDelegate;
26+
pocoContract: IPoCo;
2727
owner: Address;
2828
}) => {
2929
return pocoContract.balanceOf(owner);
@@ -34,7 +34,7 @@ export const getAccountDetails = async ({
3434
userAddress,
3535
sharingContractAddress,
3636
}: {
37-
pocoContract: IExecPocoDelegate;
37+
pocoContract: IPoCo;
3838
userAddress: Address;
3939
sharingContractAddress: Address;
4040
}): Promise<AccountDetails> => {

packages/sharing-smart-contract/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ All notable changes to this project will be documented in this file.
66

77
### Changed
88

9-
- update blockscout url
9+
- Fix Sharing contract constructor arguments order (#433)
10+
- Update blockscout url
1011

1112
## [2.0.0]
1213

packages/sharing-smart-contract/abis/DataProtectorSharing.sol/DataProtectorSharing.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"inputs": [
44
{
5-
"internalType": "contract IExecPocoDelegate",
5+
"internalType": "address",
66
"name": "_proxy",
77
"type": "address"
88
},

packages/sharing-smart-contract/abis/interfaces/IExecPocoDelegate.sol/IExecPocoDelegate.json renamed to packages/sharing-smart-contract/abis/interfaces/IPoCo.sol/IPoCo.json

File renamed without changes.

0 commit comments

Comments
 (0)