|
1 | | -# iexec-blockchain-client |
2 | | -A blockchain adapter API for iExec Smart-Contracts and other Ethereum things |
| 1 | +# iExec Blockchain Adapter API |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +The Blockchain Adapter API enables interacting with iExec smart contracts plus doing other Ethereum things. |
| 6 | +The Blockchain Adapter API accepts incoming requests asking for submitting transactions to iExec smart contracts. |
| 7 | +Incoming requests are locally stored in a database. |
| 8 | +Transactions related to these requests are being asynchronously sent to a blockchain node. |
| 9 | +At any time, the caller can retrieve the processing status for his request. |
| 10 | + |
| 11 | +The iExec Blockchain Adapter API is available as an OCI image on [Docker Hub](https://hub.docker.com/r/iexechub/iexec-blockchain-adapter-api/tags). |
| 12 | + |
| 13 | +To run properly, the iExec Blockchain Adapter API requires: |
| 14 | +* A blockchain node. iExec smart contracts must be deployed on the blockchain network. |
| 15 | +* A MongoDB instance to persist its data. |
| 16 | +* A broker service to match iExec orders. |
| 17 | +* An Ethereum wallet to interact with smart contracts on the blockchain network. |
| 18 | + |
| 19 | +## Configuration |
| 20 | + |
| 21 | +| Environment variable | Description | Type | Default value | |
| 22 | +| --- | --- | --- | --- | |
| 23 | +| IEXEC_BLOCKCHAIN_ADAPTER_API_PORT | Server HTTP port of the Blockchain Adapter API. | Positive integer | `13010` | |
| 24 | +| IEXEC_BLOCKCHAIN_ADAPTER_API_USERNAME | Login username of the server. | String | `admin` | |
| 25 | +| IEXEC_BLOCKCHAIN_ADAPTER_API_PASSWORD | Login password of the server. | String | `whatever` | |
| 26 | +| IEXEC_BLOCKCHAIN_ADAPTER_API_MONGO_HOST | Mongo server host. Cannot be set with URI. | String | `localhost` | |
| 27 | +| IEXEC_BLOCKCHAIN_ADAPTER_API_MONGO_PORT | Mongo server port. Cannot be set with URI. | Positive integer | `13012` | |
| 28 | +| IEXEC_BLOCKCHAIN_ADAPTER_API_CHAIN_ID | Chain ID of the blockchain network to connect. | Positive integer | `65535` | |
| 29 | +| IEXEC_BLOCKCHAIN_ADAPTER_API_NODE_ADDRESS | URL to connect to the blockchain network. | URL | `http://localhost:8545` | |
| 30 | +| IEXEC_BLOCKCHAIN_ADAPTER_API_BLOCK_TIME | In seconds, parameter of the targeted blockchain. | Positive integer | `1` | |
| 31 | +| IEXEC_BLOCKCHAIN_ADAPTER_API_HUB_ADDRESS | Proxy contract address to interact with the iExec on-chain protocol. | Ethereum Address | `0xBF6B2B07e47326B7c8bfCb4A5460bef9f0Fd2002` | |
| 32 | +| IEXEC_BLOCKCHAIN_ADAPTER_API_IS_SIDECHAIN | Define if iExec on-chain protocol is built on top of token (`false`) or native currency (`true`). | Boolean | `false` | |
| 33 | +| IEXEC_BLOCKCHAIN_ADAPTER_API_GAS_PRICE_MULTIPLIER | Transactions will be sent with `networkGasPrice * gasPriceMultiplier`. | Float | `1.0` | |
| 34 | +| IEXEC_BLOCKCHAIN_ADAPTER_API_GAS_PRICE_CAP | In Wei, will be used for transactions if `networkGasPrice * gasPriceMultiplier > gasPriceCap`. | Positive integer | `22000000000` | |
| 35 | +| IEXEC_BLOCKCHAIN_ADAPTER_API_BROKER_URL | URL of the broker to interact with when matching iExec orders. | URL | `http://localhost:3000` | |
| 36 | +| IEXEC_BLOCKCHAIN_ADAPTER_API_WALLET_PATH | Path to the wallet of the server. | String | `src/main/resources/wallet.json` | |
| 37 | +| IEXEC_BLOCKCHAIN_ADAPTER_API_WALLET_PASSWORD | Password to unlock the wallet of the server. | String | `whatever` | |
| 38 | + |
| 39 | +## Running in development mode |
3 | 40 |
|
4 | | -# Local build |
5 | 41 | `./gradlew docker` |
6 | 42 |
|
7 | | -# CI/CD build |
8 | | -`docker image build -f docker/Dockerfile .` |
| 43 | +## CI/CD build |
| 44 | + |
| 45 | +`docker image build -f docker/Dockerfile .` |
0 commit comments