Skip to content

Commit

Permalink
configure gnosis, document deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
malteish committed Mar 14, 2024
1 parent 9554c38 commit 2e333b2
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 40 deletions.
16 changes: 16 additions & 0 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,19 @@ Use these settings for the Chiado network:
```
forge [... deployment commands ...] --rpc-url $CHIADO_RPC_URL --verify --verifier blockscout --verifier-url https://gnosis-chiado.blockscout.com/api?
```

#### Verify on Gnosis Mainnet

- blockscout

```
forge script script/DeployPlatform.s.sol:DeployPlatform --private-key $PRIVATE_KEY --rpc-url $GNOSIS_RPC_URL --verify --verifier blockscout --verifier-url https://gnosis.blockscout.com/api? --resume
```

Note that the URL provided in the output will point to gnosisscan, but that is wrong. The verification only happens on blockscout.

- gnosisscan (requires a gnosisscan api key):

```
forge script script/DeployPlatform.s.sol:DeployPlatform --private-key $PRIVATE_KEY --rpc-url $GNOSIS_RPC_URL --verify --etherscan-api-key $GNOSISSCAN_API_KEY --resume
```
21 changes: 18 additions & 3 deletions docs/deployments.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,20 @@ The contracts are deployed to these production networks:
- Ethereum Mainnet
- [Gnosis Chain](https://www.gnosis.io/)

These are the most relevant contracts:
These are the most relevant contracts. Those that we deployed were verified on blockscout and gnosisscan, as both explorers seem to be used by the community.

| Contract | Ethereum Mainnet | Gnosis Chain (fomerly xDai chain) | | Comment |
| -------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------- | ------- |
| Forwarder | | [0x7eEae829DF28F9Ce522274D5771A6Be91d00E5ED](https://gnosis.blockscout.com/address/0x7eEae829DF28F9Ce522274D5771A6Be91d00E5ED) | These were deployed by the GSN team |
| FeeSettingsCloneFactory | | [0x2659B6c5121049626363dBc1d22f267e79a0BFDE](https://gnosisscan.io/address/0x2659b6c5121049626363dbc1d22f267e79a0bfde) | |
| AllowListCloneFactory | | [0x2b27853251fcEc49617f7a3E2C9809108CCC36d6](https://gnosisscan.io/address/0x2b27853251fcec49617f7a3e2c9809108ccc36d6) | |
| TokenProxyFactory | | [0x994257AcCF99E5995F011AB2A3025063e5367629](https://gnosisscan.io/address/0x994257accf99e5995f011ab2a3025063e5367629) | |
| VestingCloneFactory | | [0xCCC45E788bcf916b3b7cA79c2e1A1fC694aD03F7](https://gnosisscan.io/address/0xccc45e788bcf916b3b7ca79c2e1a1fc694ad03f7) | |
| PrivateOfferFactory | | [0x66330A3718F68c293046d39498EDC6a043CF7190](https://gnosisscan.io/address/0x66330a3718f68c293046d39498edc6a043cf7190) | |
| FeeSettings | | [0x3797aFd759a92BCADCB6e340536823433caE6f0a](https://gnosisscan.io/address/0x3797afd759a92bcadcb6e340536823433cae6f0a) | |
| AllowList | | [0xf2c479836b1f23eBE127CFB3B6dabf535d60B6DD](https://gnosisscan.io/address/0xf2c479836b1f23ebe127cfb3b6dabf535d60b6dd) |
| CrowdinvestingCloneFactory | | [0x470586e0a7c2E641c39930B96E58E4300Be32cF3](https://gnosisscan.io/address/0x470586e0a7c2e641c39930b96e58e4300be32cf3) | | |
| monerium | | [0xcB444e90D8198415266c6a2724b7900fb12FC56E](https://gnosis.blockscout.com/token/0xcB444e90D8198415266c6a2724b7900fb12FC56E) | these were deployed by the monerium team |

## Testing

Expand All @@ -16,8 +29,8 @@ The contracts are deployed to these testing networks:
- Sepolia
- [Chiado](https://docs.gnosischain.com/concepts/networks/chiado)

| Contract | Sepolia | Chiado | | |
| -------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | --- |
| Contract | Sepolia | Chiado | | Comment |
| -------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | ------- |
| Forwarder | | [0x2659B6c5121049626363dBc1d22f267e79a0BFDE](https://gnosis-chiado.blockscout.com/address/0x2659B6c5121049626363dBc1d22f267e79a0BFDE) | |
| FeeSettingsCloneFactory | | [0xf2c479836b1f23eBE127CFB3B6dabf535d60B6DD](https://blockscout.chiadochain.net/address/0xf2c479836b1f23ebe127cfb3b6dabf535d60b6dd) | |
| AllowListCloneFactory | | [0xCCC45E788bcf916b3b7cA79c2e1A1fC694aD03F7](https://blockscout.chiadochain.net/address/0xccc45e788bcf916b3b7ca79c2e1a1fc694ad03f7) | |
Expand All @@ -30,3 +43,5 @@ The contracts are deployed to these testing networks:
| tokenize.it_USDC | | [0xC3Ea9c8BF307c7022670C88dF0357E28DA975267](https://blockscout.chiadochain.net/address/0xc3ea9c8bf307c7022670c88df0357e28da975267) | |
| tokenize.it_EUROC | | [0x730653cEB98334937431e27be111369a90B9aCc7](https://blockscout.chiadochain.net/address/0x730653ceb98334937431e27be111369a90b9acc7) | |
| monerium | | [0xb106ed7587365a16b6691a3D4B2A734f4E8268a2](https://gnosis-chiado.blockscout.com/address/0xb106ed7587365a16b6691a3D4B2A734f4E8268a2) | these were deployed by the monerium team |

On chiado, the platform cold wallet is a simple EOA with this address: 0x99b686F27413fd41F338aDD3Bce2eb60bBa7885E.
3 changes: 2 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ gas_reports = ["AllowList", "Crowdinvesting", "FeeSettings", "PrivateOffer", "Pr

[rpc_endpoints]
goerli = "${GOERLI_RPC_URL}"
chiado = "${CHIADO_RPC_URL}"
chiado = "${CHIADO_RPC_URL}"
gnosis = "${GNOSIS_RPC_URL}"
7 changes: 6 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ const config: HardhatUserConfig = {
url: 'http://localhost:8545',
},
chiado: {
url: process.env.ROPSTEN_URL || '',
url: process.env.CHIADO_RPC_URL || '',
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
gnosis: {
url: process.env.GNOSIS_RPC_URL || '',
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
Expand Down
71 changes: 36 additions & 35 deletions script/DeployPlatform.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,16 @@ contract DeployPlatform is Script {
// trustedCurrencies[1] = address(0x86f488C7CC923d987b246994a0E5e20B3364fd92); // tUSDC

// Gnosis Chiado
address platformColdWallet = 0x99b686F27413fd41F338aDD3Bce2eb60bBa7885E;
address trustedForwarder = 0x2659B6c5121049626363dBc1d22f267e79a0BFDE;
address[] memory trustedCurrencies = new address[](6);
trustedCurrencies[0] = address(0xb106ed7587365a16b6691a3D4B2A734f4E8268a2); // Monerium
// address platformColdWallet = 0x99b686F27413fd41F338aDD3Bce2eb60bBa7885E;
// address trustedForwarder = 0x2659B6c5121049626363dBc1d22f267e79a0BFDE;
// address[] memory trustedCurrencies = new address[](6);
// trustedCurrencies[0] = address(0xb106ed7587365a16b6691a3D4B2A734f4E8268a2); // Monerium

// Gnosis Mainnet
// address trustedForwarder = 0x7eEae829DF28F9Ce522274D5771A6Be91d00E5ED;
// address[] memory trustedCurrencies = new address[](6);
// trustedCurrencies[0] = address(0xcB444e90D8198415266c6a2724b7900fb12FC56E); // Monerium
address platformColdWallet = 0x9E23f8AA17B2721cf69D157b8a15bd7b64ac881C;
address trustedForwarder = 0x7eEae829DF28F9Ce522274D5771A6Be91d00E5ED;
address[] memory trustedCurrencies = new address[](6);
trustedCurrencies[0] = address(0xcB444e90D8198415266c6a2724b7900fb12FC56E); // Monerium

/*
* execution
Expand Down Expand Up @@ -127,34 +128,34 @@ contract DeployPlatform is Script {
TokenProxyFactory tokenProxyFactory = new TokenProxyFactory(address(tokenImplementation));
console.log("TokenProxyFactory deployed at: ", address(tokenProxyFactory));

console.log("Deploying Tokens to use as currrency on testnet...");
Token tUSDC = Token(
tokenProxyFactory.createTokenProxy(
bytes32(0),
trustedForwarder,
feeSettings,
platformColdWallet,
allowList,
0,
"tokenize.it_USDC",
"tUSDC"
)
);
console.log("tUSDC deployed at: ", address(tUSDC));
Token tEUROC = Token(
tokenProxyFactory.createTokenProxy(
bytes32(0),
trustedForwarder,
feeSettings,
platformColdWallet,
allowList,
0,
"tokenize.it_EUROC",
"tEUROC"
)
);
console.log("tEUROC deployed at: ", address(tEUROC));
console.log("Remember to add the tokens to the AllowList with attribute TRUSTED_CURRENCY: ", TRUSTED_CURRENCY);
// console.log("Deploying Tokens to use as currrency on testnet...");
// Token tUSDC = Token(
// tokenProxyFactory.createTokenProxy(
// bytes32(0),
// trustedForwarder,
// feeSettings,
// platformColdWallet,
// allowList,
// 0,
// "tokenize.it_USDC",
// "tUSDC"
// )
// );
// console.log("tUSDC deployed at: ", address(tUSDC));
// Token tEUROC = Token(
// tokenProxyFactory.createTokenProxy(
// bytes32(0),
// trustedForwarder,
// feeSettings,
// platformColdWallet,
// allowList,
// 0,
// "tokenize.it_EUROC",
// "tEUROC"
// )
// );
// console.log("tEUROC deployed at: ", address(tEUROC));
// console.log("Remember to add the tokens to the AllowList with attribute TRUSTED_CURRENCY: ", TRUSTED_CURRENCY);

// deploy crowdinvesting factory
console.log("Deploying CrowdinvestingFactory contract...");
Expand Down

0 comments on commit 2e333b2

Please sign in to comment.