Skip to content

Commit 3e0ec34

Browse files
committed
feat: add support to CELO providers
1 parent 142c560 commit 3e0ec34

File tree

6 files changed

+39
-16
lines changed

6 files changed

+39
-16
lines changed

README.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,22 @@ The repository also provides:
1919

2020
`WitnetProxy` is an upgradable delegate-proxy contract that routes Witnet Data Requests coming from a `UsingWitnet`-inheriting contract to a currently active `WitnetRequestBoard` implementation.
2121

22-
The following table contains all the `WinetProxy` instances that act as entry-points for the latest versions of the `WitnetRequestBoard` approved and deployed by the [**Witnet Foundation**](https://witnet.foundation), and that actually integrates with the **Witnet mainnet** from the currently supported EVM-compatible blockchains.
22+
The following table contains the addresses that point to the the latest deployed versions of the `WitnetRequestBoard`, approved by the [**Witnet Foundation**](https://witnet.foundation), and that actually integrates with the **Witnet mainnet** from the currently supported EVM-compatible blockchains.
2323

24-
| Blockchain | Network | `WitnetProxy` |
25-
| ------------ | --------- | :-----------: |
26-
| **Ethereum** | Rinkeby | `0x6cE42a35C61ccfb42907EEE57eDF14Bb69C7fEF4`
27-
| | Göerli | `0xb58D05247d16b3F1BD6B59c52f7f61fFef02BeC8`
28-
| | Mainnet | ``
24+
| Chain | Network | Entrypoint address | Version tag
25+
| ------------ | --------- | :----------------- | :----------
26+
| **Ethereum** | Rinkeby | `0x6cE42a35C61ccfb42907EEE57eDF14Bb69C7fEF4` | `0.4.2-trustable`
27+
| | Göerli | `0xb58D05247d16b3F1BD6B59c52f7f61fFef02BeC8` | `0.4.2-trustable`
28+
| | Mainnet | |
2929
| ------------ | --------- | ---------------------
30-
| **Conflux** | Testnet | `cfxtest:acfnpy71hjhamy075xyps56124zje5154ux9nte7vt`
31-
| | Mainnet | ``
30+
| **Conflux** | Testnet | `cfxtest:acfnpy71hjhamy075xyps56124zje5154ux9nte7vt` | `0.4.2-trustable`
31+
| | Mainnet | |
3232
| ------------ | --------- | ---------------------
33-
| **BOBA.L2** | Rinkeby | `0xA2F4f5290F9cfD3a17Cfa82f2a2fD3E5c05d1442`
34-
| | Mainnet | ``
33+
| **BOBA.L2** | Rinkeby | `0xA2F4f5290F9cfD3a17Cfa82f2a2fD3E5c05d1442` | `0.4.2-trustable-boba`
34+
| | Mainnet | |
3535
| ------------ | --------- | ---------------------
36+
| **CELO** | Alfajores | `0x8e0F6f18DA49e548eBf845aFb6Ca98d43CBc8744` | `0.4.2-trustable`
37+
| | Mainnet | |
3638

3739
## **IWitnetRequest**
3840

contracts/impls/WitnetProxy.sol

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ import "../patterns/Upgradable.sol";
77

88
/// @title WitnetProxy: upgradable delegate-proxy contract that routes Witnet data requests coming from a
99
/// `UsingWitnet`-inheriting contract to a currently active `WitnetRequestBoard` implementation.
10-
/// https://github.com/witnet/witnet-ethereum-bridge/tree/0.3.x
1110
/// @author The Witnet Foundation.
1211
contract WitnetProxy {
1312

1413
struct WitnetProxySlot {
1514
address implementation;
1615
}
1716

18-
/// Event emitted when a new DR is posted.
17+
/// Event emitted every time the implementation gets updated.
1918
event Upgraded(address indexed implementation);
2019

2120
/// Constructor with no params as to ease eventual support of Singleton pattern (i.e. ERC-2470).

migrations/scripts/1_deploy_wrb.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
const { merge } = require("lodash")
22

3-
const realm = process.env.WITNET_EVM_REALM ? process.env.WITNET_EVM_REALM.toLowerCase() : "default"
43
const settings = require("../witnet.settings")
5-
const artifactsName = merge(settings.artifacts.default, settings.artifacts[realm])
64

75
module.exports = async function (deployer, network, accounts) {
8-
const addresses = require("../witnet.addresses")[realm][network.split("-")[0]]
6+
const realm = network === "test"
7+
? "default"
8+
: process.env.WITNET_EVM_REALM ? process.env.WITNET_EVM_REALM.toLowerCase() : "default"
9+
10+
const addresses = require("../witnet.addresses")[realm][network = network.split("-")[0]]
11+
const artifactsName = merge(settings.artifacts.default, settings.artifacts[realm])
912

1013
let WitnetParserLib, WitnetDecoderLib
1114
let WitnetProxy, WitnetRequestBoard

migrations/witnet.addresses.json

+6
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,11 @@
3636
"WitnetParserLib": "",
3737
"WitnetRequestBoard": ""
3838
}
39+
},
40+
"celo": {
41+
"celo.alfajores": {
42+
"WitnetParserLib": "0x1C402c521C8dbF8aCF769d8445dC69c09E3505a5",
43+
"WitnetRequestBoard": "0x8e0F6f18DA49e548eBf845aFb6Ca98d43CBc8744"
44+
}
3945
}
4046
}

migrations/witnet.settings.js

+13
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ module.exports = {
5454
version: "./node_modules/@eth-optimism/solc",
5555
},
5656
},
57+
celo: {
58+
solc: {
59+
version: "0.8.7",
60+
},
61+
},
5762
},
5863
networks: {
5964
default: {
@@ -112,6 +117,14 @@ module.exports = {
112117
skipDryRun: true,
113118
},
114119
},
120+
celo: {
121+
"celo.alfajores": {
122+
network_id: 44787,
123+
host: "localhost",
124+
port: 8538,
125+
skipDryRun: true,
126+
},
127+
},
115128
},
116129
}
117130

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "witnet-ethereum-bridge",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"description": "Witnet Bridge Solidity contracts for EVM-compatible networks",
55
"main": "",
66
"scripts": {

0 commit comments

Comments
 (0)