Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
5b39d9d
deploy: xdeployed and verified payments on goerli
yomarion Jul 8, 2022
a8e030f
deploy: goerli contracts
romtref Jul 8, 2022
c0d1b74
Update index.ts
romtref Jul 8, 2022
0163f8c
wip: ETHConversionProxy
yomarion Jul 8, 2022
eb63055
refactor: squash unsigned commits
romtref Jul 11, 2022
853d9b6
feat: add goerli
romtref Jul 15, 2022
08f4efe
fix(smart-contracts): update batch fees (#873)
olivier7delf Jul 11, 2022
01b640a
feat: add cancel stream function (#884)
bertux Jul 12, 2022
d0390af
fixed ethFeeProxy subgraph goerli test
KolevDarko Jul 15, 2022
bbe2a4a
refactor: move goerli to the newest versions
romtref Jul 15, 2022
666b7f4
refactor: move goerli to the newest versions
romtref Jul 15, 2022
8e83c98
new escrow deployed on mainnet, rinkeby, goerli, matic and fuse
KolevDarko Jul 18, 2022
0bd6171
refactor: contract setup compression fix (#888)
KolevDarko Jul 28, 2022
f772e9f
feat: goerli storage (#890)
romtref Jul 28, 2022
e8f24d7
fix: modify smart contract address
romtref Jul 28, 2022
ac2f343
fix: ETHConversionProxy to EthConversionProxy
romtref Jul 28, 2022
110d298
fix: add MIT License
romtref Jul 28, 2022
2caf6f1
doc: modify command to create request (#880)
romtref Jul 28, 2022
d1b6003
deploy: goerli contracts
romtref Jul 8, 2022
b0f15ec
refactor: add goerli address contract
romtref Jul 11, 2022
d70ada0
-S
romtref Jul 12, 2022
756206b
-S
romtref Jul 11, 2022
f66a8cd
refactor: goerli tests
romtref Jul 12, 2022
41d883a
refactor: goerli contract address in tests
romtref Jul 12, 2022
64f70cb
refactor: goerli tests
romtref Jul 12, 2022
e7bca19
fixed ethFeeProxy subgraph goerli test
KolevDarko Jul 15, 2022
8df5c70
refactor: move goerli to the newest versions
romtref Jul 15, 2022
8cb36e0
refactor: move goerli to the newest versions
romtref Jul 15, 2022
c844097
new escrow deployed on mainnet, rinkeby, goerli, matic and fuse
KolevDarko Jul 18, 2022
7d038c0
refactor: contract setup compression fix (#888)
KolevDarko Jul 28, 2022
c46d591
fix: ETHConversionProxy to EthConversionProxy
romtref Jul 29, 2022
8aa6874
ETHConversionProxy to EthConversionProxy
romtref Jul 29, 2022
c50295d
refactor: keep 0.2.0 goerli version
romtref Jul 29, 2022
ef7ad8f
Merge branch 'master' into deploy/goerli-payments
romtref Jul 29, 2022
624a320
fix: EthConversionProxy to setupEth...
romtref Jul 29, 2022
0b1afee
Merge branch 'deploy/goerli-payments' of https://github.com/RequestNe…
romtref Jul 29, 2022
f107716
fix: EthConversionProxy to ETHConversion...
romtref Jul 29, 2022
42826d1
commented goerli in eth-input detector
KolevDarko Jul 30, 2022
35ce742
fixing eth-input-data goerli test
KolevDarko Jul 30, 2022
0dc4e86
fixed formatting
KolevDarko Jul 30, 2022
5a507df
removed goerli input data test
KolevDarko Jul 30, 2022
9fda90d
updated escrow test config
KolevDarko Jul 30, 2022
874d00b
fixed formatting
KolevDarko Jul 31, 2022
dca533a
fixed casing
KolevDarko Jul 31, 2022
edf224a
fixed amount
KolevDarko Jul 31, 2022
1553b7d
fix: escrow audit fix 2 (#878)
KolevDarko Jul 7, 2022
e2f11d8
deploy: xdeployed and verified payments on goerli
yomarion Jul 8, 2022
d74e957
deploy: goerli contracts
romtref Jul 8, 2022
e53849b
Update index.ts
romtref Jul 8, 2022
ae58bc8
wip: ETHConversionProxy
yomarion Jul 8, 2022
61b510c
refactor: squash unsigned commits
romtref Jul 11, 2022
23ef8ec
feat: add goerli
romtref Jul 15, 2022
a0af723
fix(smart-contracts): update batch fees (#873)
olivier7delf Jul 11, 2022
bfe2e9e
feat: Add cancel stream function (#884)
bertux Jul 12, 2022
7a8194c
fixed ethFeeProxy subgraph goerli test
KolevDarko Jul 15, 2022
bf0d578
refactor: move goerli to the newest versions
romtref Jul 15, 2022
1608de0
refactor: move goerli to the newest versions
romtref Jul 15, 2022
08717cc
new escrow deployed on mainnet, rinkeby, goerli, matic and fuse
KolevDarko Jul 18, 2022
e693ba1
refactor: contract setup compression fix (#888)
KolevDarko Jul 28, 2022
dc731e3
feat: goerli storage (#890)
romtref Jul 28, 2022
61f72a5
fix: modify smart contract address
romtref Jul 28, 2022
b5eb9fb
fix: ETHConversionProxy to EthConversionProxy
romtref Jul 28, 2022
1dcc857
fix: add MIT License
romtref Jul 28, 2022
a684a32
doc : modify command to create request (#880)
romtref Jul 28, 2022
ce2eeec
deploy: goerli contracts
romtref Jul 8, 2022
cd2e852
refactor: add goerli address contract
romtref Jul 11, 2022
5c2255d
-S
romtref Jul 12, 2022
6b77926
-S
romtref Jul 11, 2022
7bd57e5
refactor: goerli tests
romtref Jul 12, 2022
e3e067b
refactor: goerli contract address in tests
romtref Jul 12, 2022
9ef2a45
refactor: goerli tests
romtref Jul 12, 2022
5323513
fixed ethFeeProxy subgraph goerli test
KolevDarko Jul 15, 2022
07a34bb
refactor: move goerli to the newest versions
romtref Jul 15, 2022
17605d4
refactor: move goerli to the newest versions
romtref Jul 15, 2022
eb21df8
new escrow deployed on mainnet, rinkeby, goerli, matic and fuse
KolevDarko Jul 18, 2022
c70c173
refactor: contract setup compression fix (#888)
KolevDarko Jul 28, 2022
46d427d
fix: ETHConversionProxy to EthConversionProxy
romtref Jul 29, 2022
2e69920
ETHConversionProxy to EthConversionProxy
romtref Jul 29, 2022
cf5fdea
fix: EthConversionProxy to setupEth...
romtref Jul 29, 2022
d64f685
refactor: keep 0.2.0 goerli version
romtref Jul 29, 2022
414865f
refactor: contract setup compression fix (#888)
KolevDarko Jul 28, 2022
60e430a
fix: EthConversionProxy to ETHConversion...
romtref Jul 29, 2022
22519fe
commented goerli in eth-input detector
KolevDarko Jul 30, 2022
cf34428
fixing eth-input-data goerli test
KolevDarko Jul 30, 2022
5be827a
fixed formatting
KolevDarko Jul 30, 2022
80e413f
removed goerli input data test
KolevDarko Jul 30, 2022
8ac0f6f
updated escrow test config
KolevDarko Jul 30, 2022
20cb310
refactor: goerli test
romtref Jul 31, 2022
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
52 changes: 30 additions & 22 deletions packages/smart-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,28 +102,6 @@ And in another terminal, deploy the smart contracts locally with:
yarn run deploy
```

### Live deployment (Payment only)

The goal of this script is to let all our payment contracts be deployed with the same sequence on every chain.

The script also verify deployed contracts.

**Be sure that artifacts are up-to-date with most recent deployments**

Environment variables needed: `ETHERSCAN_API_KEY`, `ADMIN_WALLET_ADDRESS`, `DEPLOYMENT_PRIVATE_KEY`

```bash
# First check what will be done
yarn hardhat deploy-live-payments --network matic --dry-run

# Run
yarn hardhat deploy-live-payments --network matic

# To test locally
yarn hardhat deploy-live-payments --network private --force
yarn hardhat deploy-live-payments --network private --force --dry-run
```

### Deployment through request deployer

The request deployer enables multichain deployment of several smart contracts at predefined address. It is based on https://github.com/pcaversaccio/xdeployer
Expand Down Expand Up @@ -159,6 +137,14 @@ Environment variables needed: `ADMIN_PRIVATE_KEY`
You will need the request deployer to be deployed.
Then run:

To deploy all contracts to one network, use:

```bash
NETWORK=<NETWORK> yarn hardhat deploy-contracts-through-deployer
```

If you want to deploy all contracts on all networks:

```bash
yarn hardhat deploy-contracts-through-deployer
```
Expand All @@ -181,6 +167,28 @@ yarn hardhat verify-contract-from-deployer --network <NETWORK>

The associated `EXPLORER_API_KEY` is mandatory.

### Live deployment (Payment only - deprecated method)

The goal of this script is to let all our payment contracts be deployed with the same sequence on every chain.

The script also verify deployed contracts.

**Be sure that artifacts are up-to-date with most recent deployments**

Environment variables needed: `ETHERSCAN_API_KEY`, `ADMIN_WALLET_ADDRESS`, `DEPLOYMENT_PRIVATE_KEY`

```bash
# First check what will be done
yarn hardhat deploy-live-payments --network matic --dry-run

# Run
yarn hardhat deploy-live-payments --network matic

# To test locally
yarn hardhat deploy-live-payments --network private --force
yarn hardhat deploy-live-payments --network private --force --dry-run
```

### Tests

After a local deployment:
Expand Down
6 changes: 6 additions & 0 deletions packages/smart-contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ export default {
chainId: 4,
accounts,
},
goerli: {
url: process.env.WEB3_PROVIDER_URL || 'https://goerli.infura.io/v3/YOUR_API_KEY',
chainId: 5,
accounts,
},
matic: {
url: url('matic'),
chainId: 137,
Expand Down Expand Up @@ -124,6 +129,7 @@ export default {
apiKey: {
mainnet: process.env.ETHERSCAN_API_KEY,
rinkeby: process.env.ETHERSCAN_API_KEY,
goerli: process.env.ETHERSCAN_API_KEY,
// binance smart chain
bsc: process.env.BSCSCAN_API_KEY,
bscTestnet: process.env.BSCSCAN_API_KEY,
Expand Down
13 changes: 10 additions & 3 deletions packages/smart-contracts/scripts-create2/compute-one-address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,18 @@ export const computeCreate2DeploymentAddressesFromList = async (
switch (contract) {
case 'EthereumProxy':
case 'EthereumFeeProxy':
case 'ERC20FeeProxy':
case 'Erc20ConversionProxy':
case 'ERC20EscrowToPay':
case 'BatchPayments':
case 'ERC20SwapToConversion': {
const constructorArgs = getConstructorArgs(contract);
address = await computeCreate2DeploymentAddress({ contract, constructorArgs }, hre);
console.log(`${contract.padEnd(36, ' ')}${address}`);
try {
const constructorArgs = getConstructorArgs(contract, hre.network.name);
address = await computeCreate2DeploymentAddress({ contract, constructorArgs }, hre);
console.log(`${contract.padEnd(36, ' ')}${address}`);
} catch (e) {
console.warn(`ERROR computing address of ${contract}: ${e}`);
}
break;
}
// Other cases to add when necessary
Expand Down
5 changes: 3 additions & 2 deletions packages/smart-contracts/scripts-create2/deploy-one.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const deployOneWithCreate2 = async (
const deploymentResult = await xdeploy(deploymentParams, hre);
for (let i = 0; i < hre.config.xdeploy.networks.length; i++) {
if (deploymentResult[i].deployed) {
console.log(`${deploymentParams.contract} succesffuly deployed:`);
console.log(`${deploymentParams.contract} successfully deployed:`);
console.log(` On network: ${hre.config.xdeploy.networks[i]}`);
console.log(` At address: ${deploymentResult[i].address}`);
console.log(` At block: ${deploymentResult[i].receipt.blockNumber}`);
Expand Down Expand Up @@ -53,6 +53,7 @@ export const deployWithCreate2FromList = async (
switch (contract) {
case 'EthereumProxy':
case 'EthereumFeeProxy':
case 'ERC20FeeProxy':
case 'Erc20ConversionProxy': {
const constructorArgs = getConstructorArgs(contract);
await deployOneWithCreate2({ contract, constructorArgs }, hre);
Expand All @@ -79,7 +80,7 @@ export const deployWithCreate2FromList = async (
}
// Other cases to add when necessary
default:
throw new Error(`The contrat ${contract} is not to be deployed using the CREATE2 scheme`);
throw new Error(`The contract ${contract} is not to be deployed using the CREATE2 scheme`);
}
}
};
1 change: 1 addition & 0 deletions packages/smart-contracts/scripts-create2/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import * as artifacts from '../src/lib';
export const create2ContractDeploymentList = [
'EthereumProxy',
'EthereumFeeProxy',
'ERC20FeeProxy',
'Erc20ConversionProxy',
'ERC20SwapToConversion',
'ERC20EscrowToPay',
Expand Down
1 change: 1 addition & 0 deletions packages/smart-contracts/scripts-create2/verify-one.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export async function VerifyCreate2FromList(hre: HardhatRuntimeEnvironmentExtend
switch (contract) {
case 'EthereumProxy':
case 'EthereumFeeProxy':
case 'ERC20FeeProxy':
case 'ERC20SwapToConversion':
case 'Erc20ConversionProxy': {
const constructorArgs = getConstructorArgs(contract);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export const batchPaymentsArtifact = new ContractArtifact<BatchPayments>(
address: '0x0DD57FFe83a53bCbd657e234B16A3e74fEDb8fBA',
creationBlockNumber: 10857190,
},
goerli: {
address: '0x0DD57FFe83a53bCbd657e234B16A3e74fEDb8fBA',
creationBlockNumber: 7091488,
},
mainnet: {
address: '0x0DD57FFe83a53bCbd657e234B16A3e74fEDb8fBA',
creationBlockNumber: 14884721,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export const chainlinkConversionPath = new ContractArtifact<ChainlinkConversionP
address: '0xBFAD7f00A3988BFf17144728b624267Fee7F236e',
creationBlockNumber: 7684572,
},
goerli: {
address: '0x70bE16E6B7F465bED2237Cf609341A29C019B3bf',
creationBlockNumber: 7108894,
},
matic: {
address: '0xEEc4790306C43DC00cebbE4D0c36Fadf8634B533',
creationBlockNumber: 17427745,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export const erc20EscrowToPayArtifact = new ContractArtifact<ERC20EscrowToPay>(
address: '0xEbe28A2B7336670Ba752bfEad4a121D2c4FF2464',
creationBlockNumber: 10461945,
},
goerli: {
address: '0xEbe28A2B7336670Ba752bfEad4a121D2c4FF2464',
creationBlockNumber: 10461945,
},
matic: {
address: '0xc7f471F5A8f8b33F131049b1e9A43941CbE31792',
creationBlockNumber: 29821569,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export const erc20FeeProxyArtifact = new ContractArtifact<ERC20FeeProxy>(
address: '0xda46309973bFfDdD5a10cE12c44d2EE266f45A44',
creationBlockNumber: 7118080,
},
goerli: {
address: '0x399F5EE127ce7432E4921a61b8CF52b0af52cbfE',
creationBlockNumber: 7091472,
},
matic: {
address: '0x2171a0dc12a9E5b1659feF2BB20E54c84Fa7dB0C',
creationBlockNumber: 14163521,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export const erc20SwapToPayArtifact = new ContractArtifact<ERC20SwapToPay>(
address: '0xb674e3d228e631594D8fd4BF947E1811288bf836',
creationBlockNumber: 7363204,
},
goerli: {
address: '0x0Ef49176A87Adcc88bD5125126C6a6c23a28303C',
creationBlockNumber: 7109102,
},
},
},
'0.3.0': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export const erc20ConversionProxy = new ContractArtifact<Erc20ConversionProxy>(
address: '0x78334ed20da456e89cd7e5a90de429d705f5bc88',
creationBlockNumber: 8014584,
},
goerli: {
address: '0x493d6cBeE0142c73eE5461fA92CaC94e3e75df62',
creationBlockNumber: 7091387,
},
matic: {
address: '0xf0f49873C50765239F6f9534Ba13c4fe16eD5f2E',
creationBlockNumber: 17427747,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export const erc20SwapConversionArtifact = new ContractArtifact<ERC20SwapToConve
address: '0x1d6B06C6f7adFd9314BD4C58a6D306261113a1D4',
creationBlockNumber: 9447192,
},
goerli: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can keep the 2nd one only. Cf. the end of the file, the default version is 0.2.0

address: '0x3b4837C9F4A606b71e61FD56Db6241781194df92',
creationBlockNumber: 7091388,
},
bsc: {
address: '0x1d6B06C6f7adFd9314BD4C58a6D306261113a1D4',
creationBlockNumber: 16165023,
Expand Down Expand Up @@ -63,6 +67,10 @@ export const erc20SwapConversionArtifact = new ContractArtifact<ERC20SwapToConve
address: '0x3b4837C9F4A606b71e61FD56Db6241781194df92',
creationBlockNumber: 0,
},
goerli: {
address: '0x3b4837C9F4A606b71e61FD56Db6241781194df92',
creationBlockNumber: 7091388,
},
matic: {
address: '0x3b4837C9F4A606b71e61FD56Db6241781194df92',
creationBlockNumber: 27597829,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export const ethConversionArtifact = new ContractArtifact<EthConversionProxy>(
address: '0xCa3353a15fCb5C83a1Ff64BFf055781aC5c4d2F4',
creationBlockNumber: 9447194,
},
goerli: {
address: '0xED250D9219EB93098Bb67aEbc992963172B9c8DA',
creationBlockNumber: 7108896,
},
fantom: {
address: '0xCa3353a15fCb5C83a1Ff64BFf055781aC5c4d2F4',
creationBlockNumber: 20066436,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export const ethereumFeeProxyArtifact = new ContractArtifact<EthereumFeeProxy>(
address: '0xC6E23a20C0a1933ACC8E30247B5D1e2215796C1F',
creationBlockNumber: 9447193,
},
goerli: {
address: '0xe11BF2fDA23bF0A98365e1A4c04A87C9339e8687',
creationBlockNumber: 7091386,
},
fantom: {
address: '0xC6E23a20C0a1933ACC8E30247B5D1e2215796C1F',
creationBlockNumber: 20066431,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export const ethereumProxyArtifact = new ContractArtifact<EthereumProxy>(
address: '0x9c6c7817e3679c4b3f9ef9486001eae5aaed25ff',
creationBlockNumber: 5955681,
},
goerli: {
address: '0x171Ee0881407d4c0C11eA1a2FB7D5b4cdED71e6e',
creationBlockNumber: 7069045,
},
xdai: {
address: '0x27c60BE17e853c47A9F1d280B05365f483c2dFAF',
creationBlockNumber: 18326895,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export const requestDeployer = new ContractArtifact<RequestDeployer>(
address: '0xE99Ab70a5FAE59551544FA326fA048f7B95A24B2',
creationBlockNumber: 10307305,
},
goerli: {
address: '0xE99Ab70a5FAE59551544FA326fA048f7B95A24B2',
creationBlockNumber: 7068867,
},
'arbitrum-rinkeby': {
address: '0xE99Ab70a5FAE59551544FA326fA048f7B95A24B2',
creationBlockNumber: 10382055,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export const requestHashStorageArtifact = new ContractArtifact<RequestHashStorag
address: '0x309a3a9898f9cafc26499243a980992156671e5e',
creationBlockNumber: 4742809,
},
goerli: {
address: '0x132D0c7309Ca3286a644668469D3b09dFb81f757',
creationBlockNumber: 7145146,
},
xdai: {
address: '0x2256938E8225a998C498bf86B43c1768EE14b90B',
creationBlockNumber: 15193752,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export const requestHashSubmitterArtifact = new ContractArtifact<RequestOpenHash
address: '0xf4eacf30944a1a029b567a9ed29db8d120452c2c',
creationBlockNumber: 4742922,
},
goerli: {
address: '0x2C96132bae414000E267E6A8d4BfFd8bfaa21309',
creationBlockNumber: 7145146,
},
xdai: {
address: '0x268C146Afb4790902Ee26A6D2d3aff968623Ec80',
creationBlockNumber: 15193804,
Expand Down