Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
1 change: 1 addition & 0 deletions .github/workflows/root-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ jobs:
working-directory: ${{ matrix.package }}
run: |
npm run refresh-abis
# TODO check that SDK and Subgraph projects build is OK.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"inputs": [
{
"internalType": "contract IExecPocoDelegate",
"internalType": "address",
"name": "_proxy",
"type": "address"
},
Expand Down Expand Up @@ -195,7 +195,7 @@
},
{
"inputs": [],
"name": "FailedInnerCall",
"name": "FailedCall",
"type": "error"
},
{
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "ERC1167FailedCreateClone",
"type": "error"
},
{
"inputs": [
{
Expand Down Expand Up @@ -112,6 +107,27 @@
"name": "ERC721NonexistentToken",
"type": "error"
},
{
"inputs": [],
"name": "FailedDeployment",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "InsufficientBalance",
"type": "error"
},
{
"inputs": [],
"name": "InvalidInitialization",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { IExecModule } from 'iexec';
import type { IExecPocoDelegate } from '../../../../generated/typechain/sharing/interfaces/IExecPocoDelegate.js';
import type { IPoCo } from '../../../../generated/typechain/sharing/interfaces/IPoCo.js';

export async function getPocoContract(
iexec: IExecModule
): Promise<IExecPocoDelegate> {
): Promise<IPoCo> {
const client = await iexec.config.resolveContractsClient();
return client.getIExecContract() as unknown as IExecPocoDelegate;
return client.getIExecContract() as unknown as IPoCo;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { IExecPocoDelegate } from '../../../../generated/typechain/sharing/interfaces/IExecPocoDelegate.js';
import type { IPoCo } from '../../../../generated/typechain/sharing/interfaces/IPoCo.js';
import type { Address } from '../../types/index.js';
import type { AccountDetails } from '../../types/pocoTypes.js';

Expand All @@ -12,7 +12,7 @@ const getAccountAllowance = async ({
owner,
spender,
}: {
pocoContract: IExecPocoDelegate;
pocoContract: IPoCo;
owner: Address;
spender: Address;
}) => {
Expand All @@ -23,7 +23,7 @@ const getAccountBalance = async ({
pocoContract,
owner,
}: {
pocoContract: IExecPocoDelegate;
pocoContract: IPoCo;
owner: Address;
}) => {
return pocoContract.balanceOf(owner);
Expand All @@ -34,7 +34,7 @@ export const getAccountDetails = async ({
userAddress,
sharingContractAddress,
}: {
pocoContract: IExecPocoDelegate;
pocoContract: IPoCo;
userAddress: Address;
sharingContractAddress: Address;
}): Promise<AccountDetails> => {
Expand Down
3 changes: 2 additions & 1 deletion packages/sharing-smart-contract/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ All notable changes to this project will be documented in this file.

### Changed

- update blockscout url
- Fix Sharing contract constructor arguments order (#433)
- Update blockscout url

## [2.0.0]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"inputs": [
{
"internalType": "contract IExecPocoDelegate",
"internalType": "address",
"name": "_proxy",
"type": "address"
},
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0

/******************************************************************************
* Copyright 2024 IEXEC BLOCKCHAIN TECH *
* Copyright 2024-2025 IEXEC BLOCKCHAIN TECH *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
Expand All @@ -25,7 +25,7 @@ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Hol
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
import {IDataProtectorSharing, IexecLibOrders_v5, ICollection, ISubscription, IRental, ISale} from "./interfaces/IDataProtectorSharing.sol";
import {AddOnlyAppWhitelistRegistry, IAddOnlyAppWhitelist} from "./registry/AddOnlyAppWhitelistRegistry.sol";
import {ManageOrders, IExecPocoDelegate} from "./ManageOrders.sol";
import {ManageOrders} from "./ManageOrders.sol";
import {IRegistry} from "./interfaces/IRegistry.sol";

/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
Expand Down Expand Up @@ -57,7 +57,7 @@ contract DataProtectorSharing is
**************************************************************************/
/// @custom:oz-upgrades-unsafe-allow constructor
constructor(
IExecPocoDelegate _proxy,
address _proxy,
IRegistry protectedDataRegistry_,
AddOnlyAppWhitelistRegistry addOnlyAppWhitelistRegistry_
) ManageOrders(_proxy) {
Expand Down
11 changes: 6 additions & 5 deletions packages/sharing-smart-contract/contracts/ManageOrders.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0

/******************************************************************************
* Copyright 2024 IEXEC BLOCKCHAIN TECH *
* Copyright 2024-2025 IEXEC BLOCKCHAIN TECH *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
Expand All @@ -17,7 +17,8 @@
******************************************************************************/
pragma solidity ^0.8.24;

import {IExecPocoDelegate, IexecLibOrders_v5} from "./interfaces/IExecPocoDelegate.sol";
import {IexecLibOrders_v5} from "./interfaces/IPoCo.sol";
import {IPoCo} from "./interfaces/IPoCo.sol";

/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
// eslint-disable-next-line quotes
Expand All @@ -32,7 +33,7 @@
using IexecLibOrders_v5 for IexecLibOrders_v5.RequestOrderOperation;

// ---------------------ManageOrders state----------------------------------
IExecPocoDelegate internal immutable POCO_DELEGATE;
IPoCo internal immutable POCO_DELEGATE;

Check warning

Code scanning / Slither

Conformance to Solidity naming conventions Warning

Variable ManageOrders.POCO_DELEGATE is not in mixedCase
bytes32 internal constant TAG =
0x0000000000000000000000000000000000000000000000000000000000000003; // [tee,scone]
uint256 internal constant TRUST = 0; // No replication
Expand All @@ -44,8 +45,8 @@
* Constructor *
**************************************************************************/
/// @custom:oz-upgrades-unsafe-allow constructor
constructor(IExecPocoDelegate pocoDelegate_) {
POCO_DELEGATE = pocoDelegate_;
constructor(address pocoAddress) {
POCO_DELEGATE = IPoCo(pocoAddress);
}

/***************************************************************************
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0

/******************************************************************************
* Copyright 2024 IEXEC BLOCKCHAIN TECH *
* Copyright 2024-2025 IEXEC BLOCKCHAIN TECH *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
Expand All @@ -17,9 +17,9 @@
******************************************************************************/
pragma solidity ^0.8.24;

import {IexecLibOrders_v5} from "../libs/IexecLibOrders_v5.sol";
import {ISubscription} from "./ISubscription.sol";
import {ICollection} from "./ICollection.sol";
import {IexecLibOrders_v5} from "./IPoCo.sol";
import {IRental} from "./IRental.sol";
import {ISale} from "./ISale.sol";
import {IAddOnlyAppWhitelist} from "./IAddOnlyAppWhitelist.sol";
Expand Down

This file was deleted.

Loading
Loading