diff --git a/README.md b/README.md index 9115cde..a8a738b 100644 --- a/README.md +++ b/README.md @@ -71,12 +71,6 @@ To run these scripts use `hardhat run`. For example: `hardhat run scripts/list-c Some scripts are also defined as npm script, see package.json. -### cli.js - -Call any function on any contract: - - $ hardhat run scripts/cli.js - ### repl.js Similar to cli.js but only provides a REPL with an initialized `kredits` diff --git a/hardhat.config.js b/hardhat.config.js index 0524c0d..f7c4002 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -61,7 +61,7 @@ task("create-wallet", "Creates a new wallet json", async () => { */ module.exports = { solidity: "0.8.2", - // defaultNetwork: 'localhost', + defaultNetwork: "localhost", networks: { hardhat: { chainId: 1337, diff --git a/lib/contracts/acl.js b/lib/contracts/acl.js deleted file mode 100644 index 254e7a2..0000000 --- a/lib/contracts/acl.js +++ /dev/null @@ -1,17 +0,0 @@ -const Base = require('./base'); -const EthersUtils = require('ethers').utils; - -class Acl extends Base { - hasPermission (fromAddress, contractAddress, roleID, params = null) { - let roleHash = EthersUtils.keccak256(EthersUtils.toUtf8Bytes(roleID)); - - return this.hasPermission( - fromAddress, - contractAddress, - roleHash, - params - ); - } -} - -module.exports = Acl; diff --git a/lib/contracts/index.js b/lib/contracts/index.js index 619b800..d9003d2 100644 --- a/lib/contracts/index.js +++ b/lib/contracts/index.js @@ -4,6 +4,4 @@ module.exports = { Proposal: require('./proposal'), Token: require('./token'), Reimbursement: require('./reimbursement'), - Kernel: require('./kernel'), - Acl: require('./acl'), }; diff --git a/lib/contracts/kernel.js b/lib/contracts/kernel.js deleted file mode 100644 index 90d6e0b..0000000 --- a/lib/contracts/kernel.js +++ /dev/null @@ -1,24 +0,0 @@ -const namehash = require('ethers').utils.namehash; -const Base = require('./base'); - -const KERNEL_APP_ADDR_NAMESPACE = '0xd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb'; - -class Kernel extends Base { - constructor (contract) { - super(contract); - this.apm = 'open.aragonpm.eth'; // can be overwritten if needed - } - - getApp (appName) { - if (appName === 'Acl') { - return this.contract.acl(); - } - return this.contract.getApp(KERNEL_APP_ADDR_NAMESPACE, this.appNamehash(appName)); - } - - appNamehash (appName) { - return namehash(`kredits-${appName.toLowerCase()}.${this.apm}`); - } -} - -module.exports = Kernel; diff --git a/package.json b/package.json index 0a1c936..cc919ed 100644 --- a/package.json +++ b/package.json @@ -9,15 +9,15 @@ "scripts": { "wallet:create": "hardhat create-wallet", "devchain": "hardhat node --network hardhat", - "deploy:dao": "hardhat run scripts/create-proxy.js --network localhost", + "deploy:dao": "hardhat run scripts/create-proxy.js", "postshrinkwrap": "node scripts/fix-package-lock.js &>/dev/null || true", "build": "npm run build:contracts && npm run build:json", "build:contracts": "hardhat compile --force", "build:json": "node ./scripts/build-json.js", - "seeds": "hardhat run scripts/seeds.js --network localhost", - "fund": "hardhat fund --network localhost", + "seeds": "hardhat run scripts/seeds.js", + "fund": "hardhat fund", "bootstrap": "npm run build && npm run deploy:dao && npm run seeds", - "repl": "hardhat console --network localhost", + "repl": "hardhat console", "lint:contracts": "solhint \"contracts/**/*.sol\" \"apps/*/contracts/**/*.sol\"", "lint:contract-tests": "eslint apps/*/test", "lint:wrapper": "eslint lib/",