Skip to content

Release/v8.16.0 #442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
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
13 changes: 13 additions & 0 deletions .github/workflows/conventional-commits-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Conventional Commits Check

on: [pull_request]

jobs:
check-conventional-commits:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check Commit Conventions
uses: webiny/[email protected]
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

All notable changes to this project will be documented in this file.

## [8.16.0] 2025-06-19

### Added

- added experimental networks

### Changed

- updated `iexec app init --tee` template to Scone v5.9

## [8.15.0] 2025-04-10

### Added
Expand Down
4 changes: 2 additions & 2 deletions docs/classes/internal_.IExecContractsClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ Create a client for IExec contracts
| Name | Type | Description |
| :------ | :------ | :------ |
| `args` | `Object` | - |
| `args.chainId` | `string` \| `number` | id of the chain to use (used to resolve IExec contract address) |
| `args.chainId` | `string` \| `number` | id of the chain |
| `args.confirms?` | `number` | number of block to wait for transactions confirmation (default 1) |
| `args.hubAddress?` | `string` | override the IExec contract address to target a custom instance |
| `args.hubAddress` | `string` | IExec contract address |
| `args.isNative?` | `boolean` | true if IExec contract use the chain native token |
| `args.provider` | `Provider` | ethers Provider |
| `args.signer?` | `Signer` | ethers Signer, required to sign transactions and messages |
Expand Down
11 changes: 11 additions & 0 deletions docs/interfaces/IExecConfigOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

### Properties

- [allowExperimentalNetworks](IExecConfigOptions.md#allowexperimentalnetworks)
- [bridgeAddress](IExecConfigOptions.md#bridgeaddress)
- [bridgedNetworkConf](IExecConfigOptions.md#bridgednetworkconf)
- [confirms](IExecConfigOptions.md#confirms)
Expand All @@ -25,6 +26,16 @@

## Properties

### allowExperimentalNetworks

• `Optional` **allowExperimentalNetworks**: `boolean`

if true allows using a provider connected to an experimental networks (default false)

⚠️ experimental networks are networks on which the iExec's stack is partially deployed, experimental networks can be subject to instabilities or discontinuity. Access is provided without warranties.

___

### bridgeAddress

• `Optional` **bridgeAddress**: `string`
Expand Down
1 change: 1 addition & 0 deletions docs/modules/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ const iexec = new IExec({ ethProvider });
| `host` | `string` | node RPC url |
| `privateKey` | `string` | wallet private key |
| `options?` | `Object` | - |
| `options.allowExperimentalNetworks?` | `boolean` | if true allows using a provider connected to an experimental networks (default false) ⚠️ experimental networks are networks on which the iExec's stack is partially deployed, experimental networks can be subject to instabilities or discontinuity. Access is provided without warranties. |
| `options.gasPrice?` | `string` \| `number` \| `bigint` | gas price override |
| `options.getTransactionCount?` | (`blockTag?`: `BlockTag`) => `Promise`<`number`\> | nonce override |
| `options.providers` | [`ProviderOptions`](../interfaces/ProviderOptions.md) | providers options |
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iexec",
"version": "8.15.0",
"version": "8.16.0",
"description": "iExec SDK",
"bin": {
"iexec": "./dist/esm/cli/cmd/iexec.js"
Expand Down
4 changes: 1 addition & 3 deletions src/cli/cmd/iexec.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ infoCmd
const chain = await loadChain(opts.chain, { spinner });

const host =
chain.host === getChainDefaults({ id: chain.id }).host
? 'default'
: chain.host;
chain.host === getChainDefaults(chain.id).host ? 'default' : chain.host;
spinner.info(`Ethereum host: ${host}`);

spinner.start(info.checking('iExec contracts info'));
Expand Down
79 changes: 50 additions & 29 deletions src/cli/utils/chains.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Debug from 'debug';
import { getChainDefaults } from '../../common/utils/config.js';
import { getId, getChainDefaults } from '../../common/utils/config.js';
import IExecContractsClient from '../../common/utils/IExecContractsClient.js';
import { EnhancedWallet } from '../../common/utils/signers.js';
import { loadChainConf } from './fs.js';
Expand All @@ -8,27 +8,21 @@ import { getReadOnlyProvider } from '../../common/utils/providers.js';

const debug = Debug('iexec:chains');

const CHAIN_ALIASES_MAP = {
1: 'mainnet',
134: 'bellecour',
};

const CHAIN_NAME_MAP = {
1: { id: '1' },
mainnet: { id: '1' },
134: { id: '134' },
bellecour: { id: '134' },
};

const createChainFromConf = (
chainName,
chainConf,
{ bridgeConf, providerOptions, txOptions = {} } = {},
{
bridgeConf,
providerOptions,
txOptions = {},
allowExperimentalNetworks = false,
} = {},
) => {
try {
const chain = { ...chainConf };
const provider = getReadOnlyProvider(chainConf.host, {
providers: providerOptions,
allowExperimentalNetworks,
});

chain.name = chainName;
Expand All @@ -45,6 +39,7 @@ const createChainFromConf = (
chain.bridgedNetwork = { ...bridgeConf };
const bridgeProvider = getReadOnlyProvider(bridgeConf.host, {
providers: providerOptions,
allowExperimentalNetworks,
});
chain.bridgedNetwork.contracts = new IExecContractsClient({
provider: bridgeProvider,
Expand All @@ -63,26 +58,34 @@ const createChainFromConf = (
};

export const loadChain = async (
chainName,
chainNameOrId,
{ txOptions, spinner = Spinner() } = {},
) => {
try {
const chainsConf = await loadChainConf();
debug('chainsConf', chainsConf);
const { allowExperimentalNetworks } = chainsConf;
const providerOptions = chainsConf.providers;
let name;
let loadedConf;
if (chainName) {
if (chainsConf.chains[chainName]) {
loadedConf = chainsConf.chains[chainName];
name = chainName;
if (chainNameOrId) {
if (chainsConf.chains[chainNameOrId]) {
loadedConf = chainsConf.chains[chainNameOrId];
name = chainNameOrId;
} else {
const alias = CHAIN_ALIASES_MAP[chainName];
const { name: alias } = getChainDefaults(
getId(chainNameOrId, {
allowExperimentalNetworks,
}),
{
allowExperimentalNetworks,
},
);
if (alias && chainsConf.chains[alias]) {
loadedConf = chainsConf.chains[alias];
name = alias;
}
if (!name) throw Error(`Missing "${chainName}" chain in "chain.json"`);
if (!name)
throw Error(`Missing "${chainNameOrId}" chain in "chain.json"`);
}
} else if (chainsConf.default) {
if (chainsConf.chains[chainsConf.default]) {
Expand All @@ -96,11 +99,16 @@ export const loadChain = async (
throw Error('Missing chain parameter. Check your "chain.json" file');

const idConf = {
...CHAIN_NAME_MAP[name],
...(loadedConf.id && { id: loadedConf.id }),
id:
loadedConf.id ||
getId(name, {
allowExperimentalNetworks,
}),
};

const defaultConf = getChainDefaults(idConf);
const defaultConf = getChainDefaults(idConf.id, {
allowExperimentalNetworks,
});

debug('loading chain', name);
debug('loadedConf', loadedConf);
Expand All @@ -120,18 +128,30 @@ export const loadChain = async (
if (chainsConf.chains[bridgedChainNameOrId]) {
bridgeLoadedConf = chainsConf.chains[bridgedChainNameOrId];
} else {
const alias = CHAIN_ALIASES_MAP[bridgedChainNameOrId];
const { name: alias } = getChainDefaults(
getId(bridgedChainNameOrId, {
allowExperimentalNetworks,
}),
{
allowExperimentalNetworks,
},
);
if (alias && chainsConf.chains[alias]) {
bridgeLoadedConf = chainsConf.chains[alias];
}
if (!bridgeLoadedConf)
throw Error(`Missing "${name}" chain in "chain.json"`);
}
const bridgeIdConf = {
...CHAIN_NAME_MAP[bridgedChainNameOrId],
...(bridgeLoadedConf.id && { id: bridgeLoadedConf.id }),
id:
bridgeLoadedConf.id ||
getId(bridgedChainNameOrId, {
allowExperimentalNetworks,
}),
};
const bridgeDefaultConf = getChainDefaults(bridgeIdConf);
const bridgeDefaultConf = getChainDefaults(bridgeIdConf.id, {
allowExperimentalNetworks,
});
debug('bridgeLoadedConf', bridgeLoadedConf);
debug('bridgeDefaultConf', defaultConf);
bridgeConf = {
Expand All @@ -150,6 +170,7 @@ export const loadChain = async (
bridgeConf,
providerOptions,
txOptions,
allowExperimentalNetworks,
});
spinner.info(`Using chain ${name} [chainId: ${chain.id}]`);
return chain;
Expand Down
1 change: 1 addition & 0 deletions src/cli/utils/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const chainConfSchema = () =>
const chainsConfSchema = () =>
object({
default: string(),
allowExperimentalNetworks: boolean().default(false),
chains: object()
.test(async (chainsOjb) => {
await Promise.all(
Expand Down
9 changes: 5 additions & 4 deletions src/cli/utils/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ export const sconeTeeApp = {
owner: '0x0000000000000000000000000000000000000000',
name: 'hello-world-scone',
type: 'DOCKER',
multiaddr: 'iexechub/python-hello-world:8.0.0-sconify-5.7.5-v12-production',
multiaddr:
'docker.io/iexechub/python-hello-world:8.0.0-sconify-5.9.1-v15-production',
checksum:
'0xc9d25041956bfc6961d47294b528887879c26ad4110de17cf4b985ba51f93bd2',
'0x15de77fd7ac448028884256b3ab376e7d4560e9ef6acf0594ea0b3c031d5d395',
mrenclave: {
framework: 'SCONE',
version: 'v5',
version: 'v5.9',
entrypoint: 'python /app/app.py',
heapSize: 1073741824,
fingerprint:
'a5b171bd7b8ecd9724b07d901c21f2d0c02d64339a818562a8554c7f60dec2cb',
'2d4b9efd066d0bb058b8da79bf8551be7d244779bc41d03a12201a4004779609',
},
};

Expand Down
2 changes: 1 addition & 1 deletion src/common/generated/sdk/package.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// this file is auto generated do not edit it
export const name = "iexec";
export const version = "8.15.0";
export const version = "8.16.0";
export const description = "iExec SDK";
export default { name, version, description };
2 changes: 1 addition & 1 deletion src/common/market/order.js
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ const getMatchableVolume = async (

export const estimateMatchOrders = async ({
contracts = throwIfMissing(),
voucherHubAddress = throwIfMissing(),
voucherHubAddress,
apporder,
datasetorder = NULL_DATASETORDER,
workerpoolorder,
Expand Down
6 changes: 3 additions & 3 deletions src/common/utils/IExecContractsClient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ export default class IExecContractsClient {
*/
signer?: Signer;
/**
* id of the chain to use (used to resolve IExec contract address)
* id of the chain
*/
chainId: number | string;
/**
* override the IExec contract address to target a custom instance
* IExec contract address
*/
hubAddress?: string;
hubAddress: string;
/**
* if false set the gasPrice to 0 (default true)
*/
Expand Down
27 changes: 4 additions & 23 deletions src/common/utils/IExecContractsClient.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Debug from 'debug';
import { Contract } from 'ethers';
import { version as pocoVersion } from '../generated/@iexec/poco/package.js';
import { networks as iexecProxyNetworks } from '../generated/@iexec/poco/ERC1538Proxy.js';
import iexecTokenDesc from '../generated/@iexec/poco/IexecInterfaceToken.js';
import iexecNativeDesc from '../generated/@iexec/poco/IexecInterfaceNative.js';
import appRegistryDesc from '../generated/@iexec/poco/AppRegistry.js';
Expand All @@ -20,17 +19,6 @@ const gasPriceByNetwork = {
134: 0n,
};

const getHubAddress = (chainId) => {
if (
iexecProxyNetworks &&
iexecProxyNetworks[chainId] &&
iexecProxyNetworks[chainId].address
) {
return iexecProxyNetworks[chainId].address;
}
throw Error(`Missing iExec contract default address for chain ${chainId}`);
};

const getIsNative = (chainId) => nativeNetworks.includes(chainId);

const getGasPriceOverride = (chainId) => gasPriceByNetwork[chainId];
Expand Down Expand Up @@ -76,19 +64,12 @@ const getContractsDescMap = (isNative) => ({
},
});

const createClient = ({
ethSigner,
ethProvider,
chainId,
globalHubAddress,
isNative,
}) => {
const createClient = ({ ethSigner, ethProvider, hubAddress, isNative }) => {
const cachedAddresses = {};
if (!hubAddress) throw Error('Missing iExec contract address');

const contractsDescMap = getContractsDescMap(isNative);

const hubAddress = globalHubAddress || getHubAddress(chainId);

const getContract = (objName, address) => {
try {
const { contractDesc } = contractsDescMap[objName];
Expand Down Expand Up @@ -184,6 +165,7 @@ class IExecContractsClient {
} = {}) {
const stringChainId = `${chainId}`;
if (!provider) throw Error('missing provider key');
if (!hubAddress) throw Error('missing hubAddress key');
if (!stringChainId) throw Error('missing chainId key');
if (!Number.isInteger(confirms) || confirms <= 0)
throw Error('invalid confirms');
Expand All @@ -206,8 +188,7 @@ class IExecContractsClient {
const client = createClient({
ethSigner: signer,
ethProvider: provider,
chainId: stringChainId,
globalHubAddress: hubAddress,
hubAddress,
isNative: native,
});

Expand Down
Loading