Comments (2)
@derekchiang , you're correct -- the config.json
at the moment isn't very useful. prior to our recent factory/proxy refactoring, we were using the config file during migrations. lately i've been using a custom external script to deploy proxies, but have yet to merge it into this repo. here's the snippet:
command: truffle exec --network [network] ./scripts/deploy_proxies.js
/scripts/deploy_proxies.js
/* global artifacts */
const fs = require('fs');
const RegistryFactory = artifacts.require('./RegistryFactory.sol');
const config = JSON.parse(fs.readFileSync('../conf/config.json'));
const paramConfig = config.paramDefaults;
module.exports = (callback) => {
async function deployRegistry() {
const registryFactory = await RegistryFactory.at('0xcc0df91b86795f21c3d43dbeb3ede0dfcf8dccaf'); // address of registry factory for current network
const registryReceipt = await registryFactory.newRegistryWithToken(
config.token.supply,
config.token.name,
config.token.decimals,
config.token.symbol,
[
paramConfig.minDeposit,
paramConfig.pMinDeposit,
paramConfig.applyStageLength,
paramConfig.pApplyStageLength,
paramConfig.commitStageLength,
paramConfig.pCommitStageLength,
paramConfig.revealStageLength,
paramConfig.pRevealStageLength,
paramConfig.dispensationPct,
paramConfig.pDispensationPct,
paramConfig.voteQuorum,
paramConfig.pVoteQuorum,
],
config.name,
);
const {
token,
plcr,
parameterizer,
registry,
} = registryReceipt.logs[0].args;
console.log('\n');
console.log('token:', token);
console.log('voting:', plcr);
console.log('parameterizer', parameterizer);
console.log('registry:', registry);
console.log('\n');
return true;
}
deployRegistry().then(() => callback());
}
from tcr.
more info here: https://truffleframework.com/docs/getting_started/scripts
from tcr.
Related Issues (20)
- Increase test coverage to at least 85% for branches and 95% for statements HOT 1
- While a listing is locked in a challenge, tokens cannot be withdrawn if the withdrawal would leave the listing with < minDeposit unstakedDeposit HOT 1
- Document how tokens are supported modularly HOT 1
- Publish package to ethpm
- semantic improvements: determineReward / claimReward / tokenClaims HOT 2
- Deprecation warnings when compiling Registry and Parameterizer HOT 1
- Save gas by using a ParameterizerInterface in Registry HOT 2
- Factory/proxy - new token HOT 1
- Has this project been audited? HOT 7
- PLCRFactory fails to deploy - can't deploy TCR HOT 8
- Debug error with factory pattern HOT 1
- Error: Invalid JSON RPC response: "" HOT 1
- Make exitTimeDelay and exitPeriodLen a single value
- Update owners manual to cover new stuff in the develop branch
- Node 10 npm install failure HOT 1
- error deploying proxy script deploy_proxies.js HOT 1
- Update isWhitelisted to return false if a listing is inside its own init or finalize exit windows
- Running migration: 4_parameterizer_factory.js Error encountered, bailing. Network state unknown. Review successful transactions manually. Error: The contract code couldn't be stored, please check your gas amount
- Require check in challenge function has unnecessary part of conditional
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tcr.