Skip to content

Commit 181b014

Browse files
chore: release v8.16.0
## [8.16.0] ### Added - added experimental networks ### Changed - updated `iexec app init --tee` template to Scone v5.9
2 parents c243e60 + 5d6b12e commit 181b014

31 files changed

+574
-246
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Conventional Commits Check
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
check-conventional-commits:
7+
name: Conventional Commits
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: Check Commit Conventions
13+
uses: webiny/[email protected]

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

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

5+
## [8.16.0] 2025-06-19
6+
7+
### Added
8+
9+
- added experimental networks
10+
11+
### Changed
12+
13+
- updated `iexec app init --tee` template to Scone v5.9
14+
515
## [8.15.0] 2025-04-10
616

717
### Added

docs/classes/internal_.IExecContractsClient.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ Create a client for IExec contracts
4444
| Name | Type | Description |
4545
| :------ | :------ | :------ |
4646
| `args` | `Object` | - |
47-
| `args.chainId` | `string` \| `number` | id of the chain to use (used to resolve IExec contract address) |
47+
| `args.chainId` | `string` \| `number` | id of the chain |
4848
| `args.confirms?` | `number` | number of block to wait for transactions confirmation (default 1) |
49-
| `args.hubAddress?` | `string` | override the IExec contract address to target a custom instance |
49+
| `args.hubAddress` | `string` | IExec contract address |
5050
| `args.isNative?` | `boolean` | true if IExec contract use the chain native token |
5151
| `args.provider` | `Provider` | ethers Provider |
5252
| `args.signer?` | `Signer` | ethers Signer, required to sign transactions and messages |

docs/interfaces/IExecConfigOptions.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
### Properties
88

9+
- [allowExperimentalNetworks](IExecConfigOptions.md#allowexperimentalnetworks)
910
- [bridgeAddress](IExecConfigOptions.md#bridgeaddress)
1011
- [bridgedNetworkConf](IExecConfigOptions.md#bridgednetworkconf)
1112
- [confirms](IExecConfigOptions.md#confirms)
@@ -25,6 +26,16 @@
2526

2627
## Properties
2728

29+
### allowExperimentalNetworks
30+
31+
`Optional` **allowExperimentalNetworks**: `boolean`
32+
33+
if true allows using a provider connected to an experimental networks (default false)
34+
35+
⚠️ 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.
36+
37+
___
38+
2839
### bridgeAddress
2940

3041
`Optional` **bridgeAddress**: `string`

docs/modules/utils.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ const iexec = new IExec({ ethProvider });
183183
| `host` | `string` | node RPC url |
184184
| `privateKey` | `string` | wallet private key |
185185
| `options?` | `Object` | - |
186+
| `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. |
186187
| `options.gasPrice?` | `string` \| `number` \| `bigint` | gas price override |
187188
| `options.getTransactionCount?` | (`blockTag?`: `BlockTag`) => `Promise`<`number`\> | nonce override |
188189
| `options.providers` | [`ProviderOptions`](../interfaces/ProviderOptions.md) | providers options |

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iexec",
3-
"version": "8.15.0",
3+
"version": "8.16.0",
44
"description": "iExec SDK",
55
"bin": {
66
"iexec": "./dist/esm/cli/cmd/iexec.js"

src/cli/cmd/iexec.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,7 @@ infoCmd
123123
const chain = await loadChain(opts.chain, { spinner });
124124

125125
const host =
126-
chain.host === getChainDefaults({ id: chain.id }).host
127-
? 'default'
128-
: chain.host;
126+
chain.host === getChainDefaults(chain.id).host ? 'default' : chain.host;
129127
spinner.info(`Ethereum host: ${host}`);
130128

131129
spinner.start(info.checking('iExec contracts info'));

src/cli/utils/chains.js

Lines changed: 50 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Debug from 'debug';
2-
import { getChainDefaults } from '../../common/utils/config.js';
2+
import { getId, getChainDefaults } from '../../common/utils/config.js';
33
import IExecContractsClient from '../../common/utils/IExecContractsClient.js';
44
import { EnhancedWallet } from '../../common/utils/signers.js';
55
import { loadChainConf } from './fs.js';
@@ -8,27 +8,21 @@ import { getReadOnlyProvider } from '../../common/utils/providers.js';
88

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

11-
const CHAIN_ALIASES_MAP = {
12-
1: 'mainnet',
13-
134: 'bellecour',
14-
};
15-
16-
const CHAIN_NAME_MAP = {
17-
1: { id: '1' },
18-
mainnet: { id: '1' },
19-
134: { id: '134' },
20-
bellecour: { id: '134' },
21-
};
22-
2311
const createChainFromConf = (
2412
chainName,
2513
chainConf,
26-
{ bridgeConf, providerOptions, txOptions = {} } = {},
14+
{
15+
bridgeConf,
16+
providerOptions,
17+
txOptions = {},
18+
allowExperimentalNetworks = false,
19+
} = {},
2720
) => {
2821
try {
2922
const chain = { ...chainConf };
3023
const provider = getReadOnlyProvider(chainConf.host, {
3124
providers: providerOptions,
25+
allowExperimentalNetworks,
3226
});
3327

3428
chain.name = chainName;
@@ -45,6 +39,7 @@ const createChainFromConf = (
4539
chain.bridgedNetwork = { ...bridgeConf };
4640
const bridgeProvider = getReadOnlyProvider(bridgeConf.host, {
4741
providers: providerOptions,
42+
allowExperimentalNetworks,
4843
});
4944
chain.bridgedNetwork.contracts = new IExecContractsClient({
5045
provider: bridgeProvider,
@@ -63,26 +58,34 @@ const createChainFromConf = (
6358
};
6459

6560
export const loadChain = async (
66-
chainName,
61+
chainNameOrId,
6762
{ txOptions, spinner = Spinner() } = {},
6863
) => {
6964
try {
7065
const chainsConf = await loadChainConf();
71-
debug('chainsConf', chainsConf);
66+
const { allowExperimentalNetworks } = chainsConf;
7267
const providerOptions = chainsConf.providers;
7368
let name;
7469
let loadedConf;
75-
if (chainName) {
76-
if (chainsConf.chains[chainName]) {
77-
loadedConf = chainsConf.chains[chainName];
78-
name = chainName;
70+
if (chainNameOrId) {
71+
if (chainsConf.chains[chainNameOrId]) {
72+
loadedConf = chainsConf.chains[chainNameOrId];
73+
name = chainNameOrId;
7974
} else {
80-
const alias = CHAIN_ALIASES_MAP[chainName];
75+
const { name: alias } = getChainDefaults(
76+
getId(chainNameOrId, {
77+
allowExperimentalNetworks,
78+
}),
79+
{
80+
allowExperimentalNetworks,
81+
},
82+
);
8183
if (alias && chainsConf.chains[alias]) {
8284
loadedConf = chainsConf.chains[alias];
8385
name = alias;
8486
}
85-
if (!name) throw Error(`Missing "${chainName}" chain in "chain.json"`);
87+
if (!name)
88+
throw Error(`Missing "${chainNameOrId}" chain in "chain.json"`);
8689
}
8790
} else if (chainsConf.default) {
8891
if (chainsConf.chains[chainsConf.default]) {
@@ -96,11 +99,16 @@ export const loadChain = async (
9699
throw Error('Missing chain parameter. Check your "chain.json" file');
97100

98101
const idConf = {
99-
...CHAIN_NAME_MAP[name],
100-
...(loadedConf.id && { id: loadedConf.id }),
102+
id:
103+
loadedConf.id ||
104+
getId(name, {
105+
allowExperimentalNetworks,
106+
}),
101107
};
102108

103-
const defaultConf = getChainDefaults(idConf);
109+
const defaultConf = getChainDefaults(idConf.id, {
110+
allowExperimentalNetworks,
111+
});
104112

105113
debug('loading chain', name);
106114
debug('loadedConf', loadedConf);
@@ -120,18 +128,30 @@ export const loadChain = async (
120128
if (chainsConf.chains[bridgedChainNameOrId]) {
121129
bridgeLoadedConf = chainsConf.chains[bridgedChainNameOrId];
122130
} else {
123-
const alias = CHAIN_ALIASES_MAP[bridgedChainNameOrId];
131+
const { name: alias } = getChainDefaults(
132+
getId(bridgedChainNameOrId, {
133+
allowExperimentalNetworks,
134+
}),
135+
{
136+
allowExperimentalNetworks,
137+
},
138+
);
124139
if (alias && chainsConf.chains[alias]) {
125140
bridgeLoadedConf = chainsConf.chains[alias];
126141
}
127142
if (!bridgeLoadedConf)
128143
throw Error(`Missing "${name}" chain in "chain.json"`);
129144
}
130145
const bridgeIdConf = {
131-
...CHAIN_NAME_MAP[bridgedChainNameOrId],
132-
...(bridgeLoadedConf.id && { id: bridgeLoadedConf.id }),
146+
id:
147+
bridgeLoadedConf.id ||
148+
getId(bridgedChainNameOrId, {
149+
allowExperimentalNetworks,
150+
}),
133151
};
134-
const bridgeDefaultConf = getChainDefaults(bridgeIdConf);
152+
const bridgeDefaultConf = getChainDefaults(bridgeIdConf.id, {
153+
allowExperimentalNetworks,
154+
});
135155
debug('bridgeLoadedConf', bridgeLoadedConf);
136156
debug('bridgeDefaultConf', defaultConf);
137157
bridgeConf = {
@@ -150,6 +170,7 @@ export const loadChain = async (
150170
bridgeConf,
151171
providerOptions,
152172
txOptions,
173+
allowExperimentalNetworks,
153174
});
154175
spinner.info(`Using chain ${name} [chainId: ${chain.id}]`);
155176
return chain;

src/cli/utils/fs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const chainConfSchema = () =>
5151
const chainsConfSchema = () =>
5252
object({
5353
default: string(),
54+
allowExperimentalNetworks: boolean().default(false),
5455
chains: object()
5556
.test(async (chainsOjb) => {
5657
await Promise.all(

0 commit comments

Comments
 (0)