Cleanup aragon contract leftovers
and use hardhat localhost as default network
This commit is contained in:
parent
936115afb9
commit
687040791c
@ -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.
|
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
|
### repl.js
|
||||||
|
|
||||||
Similar to cli.js but only provides a REPL with an initialized `kredits`
|
Similar to cli.js but only provides a REPL with an initialized `kredits`
|
||||||
|
@ -61,7 +61,7 @@ task("create-wallet", "Creates a new wallet json", async () => {
|
|||||||
*/
|
*/
|
||||||
module.exports = {
|
module.exports = {
|
||||||
solidity: "0.8.2",
|
solidity: "0.8.2",
|
||||||
// defaultNetwork: 'localhost',
|
defaultNetwork: "localhost",
|
||||||
networks: {
|
networks: {
|
||||||
hardhat: {
|
hardhat: {
|
||||||
chainId: 1337,
|
chainId: 1337,
|
||||||
|
@ -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;
|
|
@ -4,6 +4,4 @@ module.exports = {
|
|||||||
Proposal: require('./proposal'),
|
Proposal: require('./proposal'),
|
||||||
Token: require('./token'),
|
Token: require('./token'),
|
||||||
Reimbursement: require('./reimbursement'),
|
Reimbursement: require('./reimbursement'),
|
||||||
Kernel: require('./kernel'),
|
|
||||||
Acl: require('./acl'),
|
|
||||||
};
|
};
|
||||||
|
@ -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;
|
|
@ -9,15 +9,15 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"wallet:create": "hardhat create-wallet",
|
"wallet:create": "hardhat create-wallet",
|
||||||
"devchain": "hardhat node --network hardhat",
|
"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",
|
"postshrinkwrap": "node scripts/fix-package-lock.js &>/dev/null || true",
|
||||||
"build": "npm run build:contracts && npm run build:json",
|
"build": "npm run build:contracts && npm run build:json",
|
||||||
"build:contracts": "hardhat compile --force",
|
"build:contracts": "hardhat compile --force",
|
||||||
"build:json": "node ./scripts/build-json.js",
|
"build:json": "node ./scripts/build-json.js",
|
||||||
"seeds": "hardhat run scripts/seeds.js --network localhost",
|
"seeds": "hardhat run scripts/seeds.js",
|
||||||
"fund": "hardhat fund --network localhost",
|
"fund": "hardhat fund",
|
||||||
"bootstrap": "npm run build && npm run deploy:dao && npm run seeds",
|
"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:contracts": "solhint \"contracts/**/*.sol\" \"apps/*/contracts/**/*.sol\"",
|
||||||
"lint:contract-tests": "eslint apps/*/test",
|
"lint:contract-tests": "eslint apps/*/test",
|
||||||
"lint:wrapper": "eslint lib/",
|
"lint:wrapper": "eslint lib/",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user