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

dev: chg: node upgrade #454

Open
wants to merge 8 commits into
base: jc/v0.3.1-backport
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
push:
branches:
branches:
- develop
- master
- release-0.3-3
Expand All @@ -12,14 +12,14 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v2-beta
uses: actions/setup-node@v3
with:
node-version: '10.x'
node-version: '16'
registry-url: 'https://registry.npmjs.org'
- name: Cache npm dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ test-blockchain/data
coverage/

coverage.json

.idea
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11.1.0
16.17.1
69 changes: 4 additions & 65 deletions contracts/common/gnosis/GnosisSafe.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

pragma solidity >=0.5.0 <0.7.0;


import {SafeMath} from "openzeppelin-solidity/contracts/math/SafeMath.sol";


/// @title SelfAuthorized - authorizes current contract to perform actions
/// @author Richard Meissner - <[email protected]>
contract SelfAuthorized {
Expand Down Expand Up @@ -607,71 +611,6 @@ contract ISignatureValidator is ISignatureValidatorConstants {
}


/**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
* TODO: remove once open zeppelin update to solc 0.5.0
*/
library SafeMath {

/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
}

uint256 c = a * b;
require(c / a == b);

return c;
}

/**
* @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0); // Solidity only automatically asserts when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold

return c;
}

/**
* @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a);
uint256 c = a - b;

return c;
}

/**
* @dev Adds two numbers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a);

return c;
}

/**
* @dev Divides two numbers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0);
return a % b;
}
}

/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.
/// @author Stefan George - <[email protected]>
/// @author Richard Meissner - <[email protected]>
Expand Down
71 changes: 37 additions & 34 deletions migrations/2_deploy_root_contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,15 @@ module.exports = async function(deployer, network, accounts) {
}

deployer.then(async() => {
await bluebird.map(libDeps, async e => {
// await bluebird.map(libDeps, async e => {
// await deployer.deploy(e.lib)
// deployer.link(e.lib, e.contracts)
// })
// sequential running
for (let e of libDeps) {
await deployer.deploy(e.lib)
deployer.link(e.lib, e.contracts)
})
}

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

await deployer.deploy(MaticWeth)

await Promise.all([
deployer.deploy(
ERC20Predicate,
WithdrawManagerProxy.address,
DepositManagerProxy.address,
Registry.address
),
deployer.deploy(
ERC721Predicate,
WithdrawManagerProxy.address,
DepositManagerProxy.address
),
deployer.deploy(
MintableERC721Predicate,
WithdrawManagerProxy.address,
DepositManagerProxy.address
),
deployer.deploy(Marketplace),
deployer.deploy(MarketplacePredicateTest),
deployer.deploy(
MarketplacePredicate,
RootChain.address,
WithdrawManagerProxy.address,
Registry.address
),
deployer.deploy(
TransferWithSigPredicate,
RootChain.address,
WithdrawManagerProxy.address,
Registry.address
)
])
await deployer.deploy(
ERC20Predicate,
WithdrawManagerProxy.address,
DepositManagerProxy.address,
Registry.address
)
await deployer.deploy(
ERC721Predicate,
WithdrawManagerProxy.address,
DepositManagerProxy.address
)
await deployer.deploy(
MintableERC721Predicate,
WithdrawManagerProxy.address,
DepositManagerProxy.address
)
await deployer.deploy(Marketplace);
await deployer.deploy(MarketplacePredicateTest);
await deployer.deploy(
MarketplacePredicate,
RootChain.address,
WithdrawManagerProxy.address,
Registry.address
);
await deployer.deploy(
TransferWithSigPredicate,
RootChain.address,
WithdrawManagerProxy.address,
Registry.address
)

const contractAddresses = {
root: {
Expand Down
Loading
Loading