Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

Commit 73ed598

Browse files
committed
dev: chg: node upgrade
1 parent 7f1148d commit 73ed598

File tree

9 files changed

+31816
-2013
lines changed

9 files changed

+31816
-2013
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI
22

33
on:
44
push:
5-
branches:
5+
branches:
66
- develop
77
- master
88
- release-0.3-3
@@ -12,14 +12,14 @@ jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1616
- name: Setup Node.js environment
17-
uses: actions/setup-node@v2-beta
17+
uses: actions/setup-node@v3
1818
with:
19-
node-version: '10.x'
19+
node-version: '16'
2020
registry-url: 'https://registry.npmjs.org'
2121
- name: Cache npm dependencies
22-
uses: actions/cache@v1
22+
uses: actions/cache@v3
2323
with:
2424
path: ~/.npm
2525
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ test-blockchain/data
2222
coverage/
2323

2424
coverage.json
25+
26+
.idea

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
11.1.0
1+
16.17.1

contracts/common/gnosis/GnosisSafe.sol

Lines changed: 4 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
pragma solidity >=0.5.0 <0.7.0;
66

7+
8+
import {SafeMath} from "openzeppelin-solidity/contracts/math/SafeMath.sol";
9+
10+
711
/// @title SelfAuthorized - authorizes current contract to perform actions
812
/// @author Richard Meissner - <richard@gnosis.pm>
913
contract SelfAuthorized {
@@ -607,71 +611,6 @@ contract ISignatureValidator is ISignatureValidatorConstants {
607611
}
608612

609613

610-
/**
611-
* @title SafeMath
612-
* @dev Math operations with safety checks that revert on error
613-
* TODO: remove once open zeppelin update to solc 0.5.0
614-
*/
615-
library SafeMath {
616-
617-
/**
618-
* @dev Multiplies two numbers, reverts on overflow.
619-
*/
620-
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
621-
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
622-
// benefit is lost if 'b' is also tested.
623-
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
624-
if (a == 0) {
625-
return 0;
626-
}
627-
628-
uint256 c = a * b;
629-
require(c / a == b);
630-
631-
return c;
632-
}
633-
634-
/**
635-
* @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
636-
*/
637-
function div(uint256 a, uint256 b) internal pure returns (uint256) {
638-
require(b > 0); // Solidity only automatically asserts when dividing by 0
639-
uint256 c = a / b;
640-
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
641-
642-
return c;
643-
}
644-
645-
/**
646-
* @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
647-
*/
648-
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
649-
require(b <= a);
650-
uint256 c = a - b;
651-
652-
return c;
653-
}
654-
655-
/**
656-
* @dev Adds two numbers, reverts on overflow.
657-
*/
658-
function add(uint256 a, uint256 b) internal pure returns (uint256) {
659-
uint256 c = a + b;
660-
require(c >= a);
661-
662-
return c;
663-
}
664-
665-
/**
666-
* @dev Divides two numbers and returns the remainder (unsigned integer modulo),
667-
* reverts when dividing by zero.
668-
*/
669-
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
670-
require(b != 0);
671-
return a % b;
672-
}
673-
}
674-
675614
/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.
676615
/// @author Stefan George - <stefan@gnosis.io>
677616
/// @author Richard Meissner - <richard@gnosis.io>

migrations/2_deploy_root_contracts.js

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,15 @@ module.exports = async function(deployer, network, accounts) {
166166
}
167167

168168
deployer.then(async() => {
169-
await bluebird.map(libDeps, async e => {
169+
// await bluebird.map(libDeps, async e => {
170+
// await deployer.deploy(e.lib)
171+
// deployer.link(e.lib, e.contracts)
172+
// })
173+
// sequential running
174+
for (let e of libDeps) {
170175
await deployer.deploy(e.lib)
171176
deployer.link(e.lib, e.contracts)
172-
})
177+
}
173178

174179
await deployer.deploy(Governance)
175180
await deployer.deploy(GovernanceProxy, Governance.address)
@@ -239,38 +244,36 @@ module.exports = async function(deployer, network, accounts) {
239244

240245
await deployer.deploy(MaticWeth)
241246

242-
await Promise.all([
243-
deployer.deploy(
244-
ERC20Predicate,
245-
WithdrawManagerProxy.address,
246-
DepositManagerProxy.address,
247-
Registry.address
248-
),
249-
deployer.deploy(
250-
ERC721Predicate,
251-
WithdrawManagerProxy.address,
252-
DepositManagerProxy.address
253-
),
254-
deployer.deploy(
255-
MintableERC721Predicate,
256-
WithdrawManagerProxy.address,
257-
DepositManagerProxy.address
258-
),
259-
deployer.deploy(Marketplace),
260-
deployer.deploy(MarketplacePredicateTest),
261-
deployer.deploy(
262-
MarketplacePredicate,
263-
RootChain.address,
264-
WithdrawManagerProxy.address,
265-
Registry.address
266-
),
267-
deployer.deploy(
268-
TransferWithSigPredicate,
269-
RootChain.address,
270-
WithdrawManagerProxy.address,
271-
Registry.address
272-
)
273-
])
247+
await deployer.deploy(
248+
ERC20Predicate,
249+
WithdrawManagerProxy.address,
250+
DepositManagerProxy.address,
251+
Registry.address
252+
)
253+
await deployer.deploy(
254+
ERC721Predicate,
255+
WithdrawManagerProxy.address,
256+
DepositManagerProxy.address
257+
)
258+
await deployer.deploy(
259+
MintableERC721Predicate,
260+
WithdrawManagerProxy.address,
261+
DepositManagerProxy.address
262+
)
263+
await deployer.deploy(Marketplace);
264+
await deployer.deploy(MarketplacePredicateTest);
265+
await deployer.deploy(
266+
MarketplacePredicate,
267+
RootChain.address,
268+
WithdrawManagerProxy.address,
269+
Registry.address
270+
);
271+
await deployer.deploy(
272+
TransferWithSigPredicate,
273+
RootChain.address,
274+
WithdrawManagerProxy.address,
275+
Registry.address
276+
)
274277

275278
const contractAddresses = {
276279
root: {

0 commit comments

Comments
 (0)