Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Commit

Permalink
Publish ABI and bytecode to npm (#34)
Browse files Browse the repository at this point in the history
* Add datagen script

* Bump version

* Fix exported data

* Update contract address
  • Loading branch information
ilanolkies authored Jun 15, 2021
1 parent d5dfe57 commit 7fb4a3f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 182 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ coverage
.DS_Store
coverage.json
.openzeppelin/unknown-*.json
OneShotSchedule*.json
13 changes: 13 additions & 0 deletions datagen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const fs = require('fs');
const OneShotSchedule = require('./build/contracts/OneShotSchedule');

fs.writeFileSync('./OneShotSchedule.json', JSON.stringify({
abi: OneShotSchedule.abi,
bytecode: OneShotSchedule.bytecode
}));

fs.writeFileSync('./OneShotScheduleAddresses.json', JSON.stringify({
address: {
31: '0xff349c2df8ca32771153b5868b02bc812fb0172d'
}
}));
177 changes: 0 additions & 177 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
{
"name": "@rsksmart/rif-scheduler-contracts",
"version": "1.0.0",
"version": "0.0.1-beta.2",
"description": "RIF Scheduler contracts",
"files": [
"/contracts",
"!/contracts/Migrations.sol"
"/contracts/OneShotSchedule.sol",
"OneShotSchedule*.json"
],
"scripts": {
"test": "npx truffle compile --all && npx truffle test",
"compile": "npx truffle compile --all",
"test": "npm run compile && npx truffle test",
"coverage": "npx truffle run coverage",
"lint": "npx prettier --list-different 'contracts/**/*.sol' 'test/**/*.js' 'migrations/**/*.js'",
"lint:fix": "npx prettier --write 'contracts/**/*.sol' 'test/**/*.js' 'migrations/**/*.js'",
"deploy:ganache": "npx truffle migrate --network ganache",
"deploy:rsk-testnet": "npx truffle migrate --network rskTestnet"
"deploy:rsk-testnet": "npx truffle migrate --network rskTestnet",
"prepublish": "npm run compile && node datagen.js"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 7fb4a3f

Please sign in to comment.