Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contract/subscriptions #42

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
19 changes: 19 additions & 0 deletions contracts/bootstrap/Bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,25 @@ class Bootstrap {

This conversation was marked as resolved.
Show resolved Hide resolved
transactions.push(new Transaction(genesisSteemBlock, 0, 'null', 'contract', 'deploy', JSON.stringify(contractPayload)));

/**
* Bootstrapping the subscriptions contract
*/
contractCode = await fs.readFileSync('./contracts/bootstrap/subscriptions.js');
contractCode = contractCode.toString();

contractCode = contractCode.replace(/'\$\{FORK_BLOCK_NUMBER_TWO\}\$'/g, CONSTANTS.FORK_BLOCK_NUMBER_TWO);
contractCode = contractCode.replace(/'\$\{FORK_BLOCK_NUMBER_THREE\}\$'/g, CONSTANTS.FORK_BLOCK_NUMBER_THREE);

base64ContractCode = Base64.encode(contractCode);

contractPayload = {
name: 'subscriptions',
params: '',
code: base64ContractCode,
};

transactions.push(new Transaction(genesisSteemBlock, 0, 'null', 'contract', 'deploy', JSON.stringify(contractPayload)));

// dice contract
/* contractCode = await fs.readFileSync('./contracts/bootstrap/dice.js');
contractCode = contractCode.toString();
Expand Down
Loading