From d9e9da857b62d8bfc553f2ce173a61bdf00889b1 Mon Sep 17 00:00:00 2001 From: Alan Lu Date: Wed, 21 Oct 2020 17:08:39 -0500 Subject: [PATCH 1/7] Fix migration --- migrations-ts/1-deploy-contracts.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/migrations-ts/1-deploy-contracts.ts b/migrations-ts/1-deploy-contracts.ts index 605c3975..25c7c3fe 100644 --- a/migrations-ts/1-deploy-contracts.ts +++ b/migrations-ts/1-deploy-contracts.ts @@ -1,12 +1,10 @@ -module.exports = function(deployer: Truffle.Deployer, network: string) { - const deploy = ( - name: string - ): Truffle.Deployer => deployer.deploy(artifacts.require(name as any)); +module.exports = function (deployer: Truffle.Deployer, network: string) { + const deploy = (name: any): Truffle.Deployer => deployer.deploy(artifacts.require(name)) - ['Migrations', 'CPKFactory'].forEach(deploy); + deploy('CPKFactory') if (network === 'test' || network === 'local') { - [ + ;[ 'GnosisSafe', 'ProxyFactory', 'MultiSend', @@ -15,8 +13,8 @@ module.exports = function(deployer: Truffle.Deployer, network: string) { 'DailyLimitModule', 'ERC20Mintable', 'ConditionalTokens' - ].forEach(deploy); + ].forEach(deploy) } -} as Truffle.Migration; +} as Truffle.Migration -export {}; +export {} From 02478befe1bf17c4422beeea0d6374dc50e60520 Mon Sep 17 00:00:00 2001 From: Alan Lu Date: Wed, 21 Oct 2020 17:56:31 -0500 Subject: [PATCH 2/7] Remove typechain migration build output from git index --- migrations/1-deploy-contracts.js | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 migrations/1-deploy-contracts.js diff --git a/migrations/1-deploy-contracts.js b/migrations/1-deploy-contracts.js deleted file mode 100644 index d8b634f2..00000000 --- a/migrations/1-deploy-contracts.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -module.exports = function (deployer, network) { - var deploy = function (name) { return deployer.deploy(artifacts.require(name)); }; - ['Migrations', 'CPKFactory'].forEach(deploy); - if (network === 'test' || network === 'local') { - [ - 'GnosisSafe', - 'ProxyFactory', - 'MultiSend', - 'DefaultCallbackHandler', - 'Multistep', - 'DailyLimitModule', - 'ERC20Mintable', - 'ConditionalTokens' - ].forEach(deploy); - } -}; -//# sourceMappingURL=1-deploy-contracts.js.map \ No newline at end of file From 45823c7a438129fb5073327773ac6a67227a7774 Mon Sep 17 00:00:00 2001 From: Alan Lu Date: Wed, 21 Oct 2020 17:56:43 -0500 Subject: [PATCH 3/7] Remove unused Migrations.sol --- contracts/Migrations.sol | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 contracts/Migrations.sol diff --git a/contracts/Migrations.sol b/contracts/Migrations.sol deleted file mode 100644 index 9ffe9a1d..00000000 --- a/contracts/Migrations.sol +++ /dev/null @@ -1,31 +0,0 @@ -pragma solidity >=0.5.0 <0.7.0; - -contract Migrations { - address public owner; - uint public last_completed_migration; - - modifier restricted() { - if (msg.sender == owner) _; - } - - constructor() - public - { - owner = msg.sender; - } - - function setCompleted(uint completed) - public - restricted - { - last_completed_migration = completed; - } - - function upgrade(address new_address) - public - restricted - { - Migrations upgraded = Migrations(new_address); - upgraded.setCompleted(last_completed_migration); - } -} From a83e9cd0b2256beb53a7fa17fedee330349bfc92 Mon Sep 17 00:00:00 2001 From: Alan Lu Date: Wed, 21 Oct 2020 17:57:16 -0500 Subject: [PATCH 4/7] Add POA networks to Truffle config --- truffle-config.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/truffle-config.js b/truffle-config.js index 6dcdb47b..87975345 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -10,13 +10,15 @@ const networks = Object.assign(...[ [4, 'rinkeby'], [5, 'goerli', `${2e9}`], [42, 'kovan'], -].map(([networkId, network, gasPrice]) => ({ + [77, 'sokol',, true], + [100, 'dai',, true], +].map(([networkId, network, gasPrice, isPoa]) => ({ [network]: { network_id: networkId, gasPrice, provider: () => new HDWalletProvider( seed, - `https://${network}.infura.io/v3/17d5bb5953564f589d48d535f573e486`, + isPoa ? `https://${network}.poa.network` : `https://${network}.infura.io/v3/17d5bb5953564f589d48d535f573e486`, ), }, })), { From 3b71bb976e1e977e80343d37ae49b2d6415e8e7b Mon Sep 17 00:00:00 2001 From: Alan Lu Date: Wed, 21 Oct 2020 17:57:32 -0500 Subject: [PATCH 5/7] Add xDai config --- src/config/networks.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/config/networks.ts b/src/config/networks.ts index 2ae42ec3..9fd545c9 100644 --- a/src/config/networks.ts +++ b/src/config/networks.ts @@ -37,5 +37,12 @@ export const defaultNetworks: NetworksConfig = { proxyFactoryAddress: '0xfC7577774887aAE7bAcdf0Fc8ce041DA0b3200f7', multiSendAddress: '0x8D29bE29923b68abfDD21e541b9374737B49cdAD', fallbackHandlerAddress: '0x40A930851BD2e590Bd5A5C981b436de25742E980' + }, + // xdai + 100: { + masterCopyAddress: '0x6851D6fDFAfD08c0295C392436245E5bc78B0185', + proxyFactoryAddress: '0xfC7577774887aAE7bAcdf0Fc8ce041DA0b3200f7', + multiSendAddress: '0x8D29bE29923b68abfDD21e541b9374737B49cdAD', + fallbackHandlerAddress: '0xd5D82B6aDDc9027B22dCA772Aa68D5d74cdBdF44' } } From a874562a7d8dd984f2b5d9f9cce0e7a344f47397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Thu, 5 Nov 2020 14:44:18 +0100 Subject: [PATCH 6/7] Remove Sokol network --- truffle-config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/truffle-config.js b/truffle-config.js index 87975345..9955a3d5 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -10,7 +10,6 @@ const networks = Object.assign(...[ [4, 'rinkeby'], [5, 'goerli', `${2e9}`], [42, 'kovan'], - [77, 'sokol',, true], [100, 'dai',, true], ].map(([networkId, network, gasPrice, isPoa]) => ({ [network]: { From c5e158ccc3bd355fd84725b500a4387e077f9a3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Thu, 5 Nov 2020 14:47:33 +0100 Subject: [PATCH 7/7] Update fallback handlers to v1.1.1 --- src/config/networks.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config/networks.ts b/src/config/networks.ts index 9fd545c9..cebae4b9 100644 --- a/src/config/networks.ts +++ b/src/config/networks.ts @@ -15,28 +15,28 @@ export const defaultNetworks: NetworksConfig = { masterCopyAddress: '0x34CfAC646f301356fAa8B21e94227e3583Fe3F5F', proxyFactoryAddress: '0x0fB4340432e56c014fa96286de17222822a9281b', multiSendAddress: '0x8D29bE29923b68abfDD21e541b9374737B49cdAD', - fallbackHandlerAddress: '0x40A930851BD2e590Bd5A5C981b436de25742E980' + fallbackHandlerAddress: '0xd5D82B6aDDc9027B22dCA772Aa68D5d74cdBdF44' }, // rinkeby 4: { masterCopyAddress: '0x34CfAC646f301356fAa8B21e94227e3583Fe3F5F', proxyFactoryAddress: '0x336c19296d3989e9e0c2561ef21c964068657c38', multiSendAddress: '0x8D29bE29923b68abfDD21e541b9374737B49cdAD', - fallbackHandlerAddress: '0x40A930851BD2e590Bd5A5C981b436de25742E980' + fallbackHandlerAddress: '0xd5D82B6aDDc9027B22dCA772Aa68D5d74cdBdF44' }, // goerli 5: { masterCopyAddress: '0x34CfAC646f301356fAa8B21e94227e3583Fe3F5F', proxyFactoryAddress: '0xfC7577774887aAE7bAcdf0Fc8ce041DA0b3200f7', multiSendAddress: '0x8D29bE29923b68abfDD21e541b9374737B49cdAD', - fallbackHandlerAddress: '0x40A930851BD2e590Bd5A5C981b436de25742E980' + fallbackHandlerAddress: '0xd5D82B6aDDc9027B22dCA772Aa68D5d74cdBdF44' }, // kovan 42: { masterCopyAddress: '0x34CfAC646f301356fAa8B21e94227e3583Fe3F5F', proxyFactoryAddress: '0xfC7577774887aAE7bAcdf0Fc8ce041DA0b3200f7', multiSendAddress: '0x8D29bE29923b68abfDD21e541b9374737B49cdAD', - fallbackHandlerAddress: '0x40A930851BD2e590Bd5A5C981b436de25742E980' + fallbackHandlerAddress: '0xd5D82B6aDDc9027B22dCA772Aa68D5d74cdBdF44' }, // xdai 100: {