Add seeds script

Allows to seed the smart contract with development data specified in
config/seeds.js

Usage:

truffle exec scripts/seeds.js

or

npm run bootstrap which runs them all:
* truffle migrate --reset
* truffle exec scripts/seeds.js
* npm run build-json
This commit is contained in:
2018-04-02 13:25:03 +02:00
parent 8f8582be69
commit 78b6b2e14f
4 changed files with 134 additions and 2 deletions

View File

@@ -8,6 +8,7 @@
},
"scripts": {
"build-json": "truffle compile && node ./scripts/build-json.js",
"bootstrap": "truffle migrate --reset && truffle exec scripts/seeds.js && npm run build-json",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
@@ -21,8 +22,9 @@
},
"homepage": "https://github.com/67P/truffle-kredits#readme",
"devDependencies": {
"zeppelin-solidity": "^1.7.0",
"ganache-cli": "^6.0.3",
"ipfs-api": "^19.0.0",
"truffle": "^4.1.3",
"ganache-cli": "^6.0.3"
"zeppelin-solidity": "^1.7.0"
}
}