Skip to content

Commit

Permalink
Merge pull request #1085 from JoinColony/develop-copy
Browse files Browse the repository at this point in the history
Merge master in to develop
  • Loading branch information
kronosapiens authored Aug 30, 2022
2 parents bd192cb + db14ac3 commit 6410f71
Show file tree
Hide file tree
Showing 18 changed files with 2,361 additions and 79 deletions.
21 changes: 21 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,24 @@ jobs:
root: ./
paths:
- coverage-contracts
test-upgrade-coverage:
<<: *job_common
steps:
- checkout
- <<: *step_restore_cache
- setup_remote_docker:
version: 19.03.13
- <<: *step_pull_solc_docker
- <<: *step_setup_global_packages
- run:
name: "Running upgrade tests with coverage"
command: yarn run test:contracts:upgrade:coverage
environment:
NODE_OPTIONS: --max_old_space_size=4096
- persist_to_workspace:
root: ./
paths:
- coverage-upgrade
test-contracts-extensions-coverage:
<<: *job_common
steps:
Expand Down Expand Up @@ -311,13 +329,16 @@ workflows:
context: dockerhub-credentials
- test-chainid-coverage:
context: dockerhub-credentials
- test-upgrade-coverage:
context: dockerhub-credentials
- check-coverage:
context: dockerhub-credentials
requires:
- test-contracts-coverage
- test-contracts-extensions-coverage
- test-reputation-coverage
- test-chainid-coverage
- test-upgrade-coverage
# nightly:
# triggers:
# - schedule:
Expand Down
39 changes: 39 additions & 0 deletions .solcover.upgrade.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
const { execSync } = require("child_process");
const log = console.log;

// Copies pre-built token artifacts to .coverage_artifacts/contracts
function provisionTokenContracts(config){
let output;
const provisionColonyToken = `bash ./scripts/provision-token-contracts.sh`;

log('Provisioning ColonyToken contracts...')
output = execSync(provisionColonyToken);
log(output.toString())
}

function getFilesToSkip(){
const array = [
'Migrations.sol',
'common/EtherRouter.sol',
'patriciaTree',
'testHelpers',
];

const output = execSync("ls ./**/*Updated*", {cwd: "./contracts/"});

return array.concat(output.toString().split('\n').slice(0,-1))
}

module.exports = {
skipFiles: getFilesToSkip(),
providerOptions: {
port: 8555,
network_id: 1999,
account_keys_path: "./ganache-accounts.json",
vmErrorsOnRPCResponse: false,
total_accounts: 18
},
onCompileComplete: provisionTokenContracts,
istanbulFolder: "./coverage-upgrade"
}

37 changes: 37 additions & 0 deletions contracts/extensions/IColonyExtension.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
This file is part of The Colony Network.
The Colony Network is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The Colony Network is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with The Colony Network. If not, see <http://www.gnu.org/licenses/>.
*/

pragma solidity 0.7.3;
pragma experimental ABIEncoderV2;
import "./../common/IBasicMetaTransaction.sol";

interface IColonyExtension is IBasicMetaTransaction {

function identifier() external pure returns (bytes32);
function version() external pure virtual returns (uint256);
function install(address _colony) external virtual;
function finishUpgrade() external virtual;
function deprecate(bool _deprecated) external virtual;
function uninstall() external virtual;

function getCapabilityRoles(bytes4 _sig) external view virtual returns (bytes32);

function getDeprecated() external view returns (bool);

function getColony() external view returns(address);

}
Loading

0 comments on commit 6410f71

Please sign in to comment.