Skip to content
Merged
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
8 changes: 0 additions & 8 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ jobs:
with:
node-version: '20'
upload-coverage: true
secrets:
infura-project-id: ${{ secrets.INFURA_PROJECT_ID }}
etherscan-api-key: ${{ secrets.ETHERSCAN_API_KEY }}
alchemy-api-key: ${{ secrets.ALCHEMY_API_KEY }}

test-supported-node-versions:
uses: ./.github/workflows/reusable-test.yml
Expand All @@ -55,10 +51,6 @@ jobs:
node-version: ['22', '24']
with:
node-version: ${{ matrix.node-version }}
secrets:
infura-project-id: ${{ secrets.INFURA_PROJECT_ID }}
etherscan-api-key: ${{ secrets.ETHERSCAN_API_KEY }}
alchemy-api-key: ${{ secrets.ALCHEMY_API_KEY }}

# sonar:
# runs-on: ubuntu-latest
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/reusable-test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: test SDK
description: reusable test workflow for this project

on:
workflow_call:
Expand All @@ -12,13 +11,6 @@ on:
description: 'Upload coverage data for later reuse'
type: boolean
default: false
secrets:
infura-project-id:
required: true
etherscan-api-key:
required: true
alchemy-api-key:
required: true
outputs:
coverage-artifact-id:
description: 'Coverage artifact id (if `upload-coverage: true`)'
Expand Down Expand Up @@ -53,9 +45,7 @@ jobs:
- name: Test
run: npm test
env:
INFURA_PROJECT_ID: ${{ secrets.infura-project-id }}
ETHERSCAN_API_KEY: ${{ secrets.etherscan-api-key }}
ALCHEMY_API_KEY: ${{ secrets.alchemy-api-key }}
USE_LOCAL_CLI: true

- name: Stop e2e test stack
if: always()
Expand Down
32 changes: 7 additions & 25 deletions CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,43 +68,25 @@ iexec wallet show # show your wallet
iexec storage init # initialize your remote storage
```

> _NB:_ iExec SDK CLI access the blockchain through [ethers](https://github.com/ethers-io/ethers.js/) to connect different backends ([Alchemy](https://alchemyapi.io/), [Etherscan](https://etherscan.io/), [INFURA](https://infura.io/)).
>
> Default API keys for backend services are provided for convenience.
> As these keys are shared across all users and are subject to rate limits, **you must use your own API keys** or better **your own node**.
> _NB:_ iExec SDK CLI access the blockchain through RPC nodes
> Default RPCs are provided for convenience.
> As these RPC nodes are shared across all users and are subject to limitations, **you must use your own API keys** or better **your own node**.
>
> Get API keys for backend services:
>
> - [INFURA](https://infura.io/register) ([more details on Infura's blog](https://blog.infura.io/getting-started-with-infura-28e41844cc89/))
> - [INFURA](https://app.infura.io/register)
> - [Etherscan](https://etherscan.io/apis)
> - [Alchemy](https://alchemyapi.io/signup)
>
> Once you created your access, you can add your API keys in the `chains.json` configuration file:
>
> ```json
> {
> "default": ...,
> "chains": { ... },
> "providers": {
> "infura": {
> "projectId": "INFURA_PROJECT_ID",
> "projectSecret": "INFURA_PROJECT_SECRET"
> },
> "etherscan": "ETHERSCAN_API_KEY",
> "alchemy": "ALCHEMY_API_KEY"
> }
> }
> ```
> - [Alchemy](https://www.alchemy.com)
>
> If you run your own node, you can add an `host` key in the `chains.json` configuration file to target your node:
> You can add your RPC as `host` in the `chains.json` configuration file:
>
> ```json
> {
> "default": ...,
> "chains": {
> ...
> "arbitrum-mainnet": {
> "host": "http://localhost:8545"
> "host": "https://<your_node_url>",
> }
> }
> }
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,6 @@ Run tests when the stack is up
npm run test
```

> Some tests relies on RPC API providers, to have them running smoothly you can provide the following envs
>
> - ALCHEMY_API_KEY (obtained from <https://alchemy.com>)
> - ETHERSCAN_API_KEY (obtained from <https://etherscan.io>)
> - INFURA_PROJECT_ID (obtained from <https://infura.io>)
## Changelog

Find changes in the [CHANGELOG](./CHANGELOG.md)
Expand Down
32 changes: 7 additions & 25 deletions cli_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,43 +68,25 @@ iexec wallet show # show your wallet
iexec storage init # initialize your remote storage
```

> _NB:_ iExec SDK CLI access the blockchain through [ethers](https://github.com/ethers-io/ethers.js/) to connect different backends ([Alchemy](https://alchemyapi.io/), [Etherscan](https://etherscan.io/), [INFURA](https://infura.io/)).
>
> Default API keys for backend services are provided for convenience.
> As these keys are shared across all users and are subject to rate limits, **you must use your own API keys** or better **your own node**.
> _NB:_ iExec SDK CLI access the blockchain through RPC nodes
> Default RPCs are provided for convenience.
> As these RPC nodes are shared across all users and are subject to limitations, **you must use your own API keys** or better **your own node**.
>
> Get API keys for backend services:
>
> - [INFURA](https://infura.io/register) ([more details on Infura's blog](https://blog.infura.io/getting-started-with-infura-28e41844cc89/))
> - [INFURA](https://app.infura.io/register)
> - [Etherscan](https://etherscan.io/apis)
> - [Alchemy](https://alchemyapi.io/signup)
>
> Once you created your access, you can add your API keys in the `chains.json` configuration file:
>
> ```json
> {
> "default": ...,
> "chains": { ... },
> "providers": {
> "infura": {
> "projectId": "INFURA_PROJECT_ID",
> "projectSecret": "INFURA_PROJECT_SECRET"
> },
> "etherscan": "ETHERSCAN_API_KEY",
> "alchemy": "ALCHEMY_API_KEY"
> }
> }
> ```
> - [Alchemy](https://www.alchemy.com)
>
> If you run your own node, you can add an `host` key in the `chains.json` configuration file to target your node:
> You can add your RPC as `host` in the `chains.json` configuration file:
>
> ```json
> {
> "default": ...,
> "chains": {
> ...
> "arbitrum-mainnet": {
> "host": "http://localhost:8545"
> "host": "https://<your_node_url>",
> }
> }
> }
Expand Down
15 changes: 9 additions & 6 deletions src/cli/utils/templates.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { IEXEC_REQUEST_PARAMS } from '../../common/utils/constant.js';
import {
IEXEC_REQUEST_PARAMS,
TDX_DEFAULT_TAG,
} from '../../common/utils/constant.js';

export const main = {
description:
Expand All @@ -25,7 +28,7 @@
params: {
[IEXEC_REQUEST_PARAMS.IEXEC_ARGS]: '',
},
tag: '0x0000000000000000000000000000000000000000000000000000000000000000',
tag: TDX_DEFAULT_TAG,
trust: '0',
callback: '0x0000000000000000000000000000000000000000',
};
Expand Down Expand Up @@ -58,16 +61,16 @@
app: '0x0000000000000000000000000000000000000000',
appprice: '0',
volume: '1000000',
tag: [],
tag: ['tee', 'tdx'],
datasetrestrict: '0x0000000000000000000000000000000000000000', // todo remove from default

Check warning on line 65 in src/cli/utils/templates.js

View workflow job for this annotation

GitHub Actions / npm-dry-run / npm-publish / build

Complete the task associated to this "TODO" comment

Check warning on line 65 in src/cli/utils/templates.js

View workflow job for this annotation

GitHub Actions / check-code

Complete the task associated to this "TODO" comment
workerpoolrestrict: '0x0000000000000000000000000000000000000000', // todo remove from default

Check warning on line 66 in src/cli/utils/templates.js

View workflow job for this annotation

GitHub Actions / npm-dry-run / npm-publish / build

Complete the task associated to this "TODO" comment

Check warning on line 66 in src/cli/utils/templates.js

View workflow job for this annotation

GitHub Actions / check-code

Complete the task associated to this "TODO" comment
requesterrestrict: '0x0000000000000000000000000000000000000000', // todo remove from default
},
datasetorder: {
dataset: '0x0000000000000000000000000000000000000000',
datasetprice: '0',
volume: '1000000',
tag: [], // todo remove from default
tag: ['tee', 'tdx'], // todo remove from default
apprestrict: '0x0000000000000000000000000000000000000000', // todo remove from default
workerpoolrestrict: '0x0000000000000000000000000000000000000000', // todo remove from default
requesterrestrict: '0x0000000000000000000000000000000000000000', // todo remove from default
Expand All @@ -78,7 +81,7 @@
volume: '1',
category: '0',
trust: '0',
tag: [], // todo remove from default
tag: ['tee', 'tdx'], // todo remove from default
apprestrict: '0x0000000000000000000000000000000000000000', // todo remove from default
datasetrestrict: '0x0000000000000000000000000000000000000000', // todo remove from default
requesterrestrict: '0x0000000000000000000000000000000000000000', // todo remove from default
Expand All @@ -93,7 +96,7 @@
volume: '1',
category: '0',
trust: '0', // todo remove from default
tag: [], // todo remove from default
tag: ['tee', 'tdx'], // todo remove from default
beneficiary: '0x0000000000000000000000000000000000000000', // todo remove from default
callback: '0x0000000000000000000000000000000000000000', // todo remove from default
params: {
Expand Down
Loading
Loading