Skip to content

Commit

Permalink
17.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fabcotech committed May 11, 2022
1 parent 3a78911 commit 6be21b7
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 79 deletions.
14 changes: 9 additions & 5 deletions cli/api/createPurse.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports.createPurse = async (args) => {
masterRegistryUri,
validatorHost,
privateKey,
shardId,
contractId,
purses,
pursesData,
Expand All @@ -20,11 +21,14 @@ module.exports.createPurse = async (args) => {

const response = await rchainToolkit.http.easyDeploy(
validatorHost,
term,
privateKey,
1,
10000000,
10 * 60 * 1000
{
term,
privateKey,
shardId,
phloPrice: 1,
phloLimit: 10000000,
timeout: 10 * 60 * 1000
}
);

const data = rchainToolkit.utils.rhoValToJs(
Expand Down
14 changes: 9 additions & 5 deletions cli/api/updatePursePrice.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports.updatePursePrice = async ({
validatorHost,
privateKey,
contractId,
shardId,
boxId,
purseId,
price,
Expand All @@ -30,11 +31,14 @@ module.exports.updatePursePrice = async ({

const response = await rchainToolkit.http.easyDeploy(
validatorHost,
term,
privateKey,
1,
10000000,
10 * 60 * 1000
{
term,
privateKey,
shardId,
phloPrice: 1,
phloLimit: 10000000,
timeout: 10 * 60 * 1000,
}
);

const data = rchainToolkit.utils.rhoValToJs(
Expand Down
48 changes: 1 addition & 47 deletions cli/createPurse.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const getPursesAndData = () => {
return [purses, pursesData];
}

<<<<<<< HEAD
const quantity = getQuantity();

if (!quantity) {
Expand All @@ -56,21 +55,6 @@ const getPursesAndData = () => {
},
{
[`purse1`]: null,
=======
let payload = {
masterRegistryUri: masterRegistryUri,
contractId: contractId,
purses: {
[newId || 'auto']: {
id: newId || 'auto',
price: null,
boxId: boxId,
quantity: quantity,
},
},
data: {
[newId || 'auto']: null,
>>>>>>> 3e91e12 (rchain-toolkit -> @fabcotech/rchain-toolkit@2.0.0)
},
];
};
Expand All @@ -84,11 +68,11 @@ const execCreatePurse = async () => {

const [purses, pursesData] = getPursesAndData();

<<<<<<< HEAD
const rPurseId = await createPurse({
masterRegistryUri,
validatorHost: process.env.VALIDATOR_HOST,
privateKey: process.env.PRIVATE_KEY,
shardId: process.env.SHARD_ID,
contractId,
purses,
pursesData,
Expand All @@ -99,34 +83,4 @@ const execCreatePurse = async () => {

module.exports = {
execCreatePurse,
=======
let dataAtNameResponse;
try {
dataAtNameResponse = await rchainToolkit.http.easyDeploy(
process.env.VALIDATOR_HOST,
{
term,
shardId: process.env.SHARD_ID,
privateKey: process.env.PRIVATE_KEY,
phloPrice: 'auto',
phloLimit: 10000000,
timeout: 10 * 60 * 1000
}
);
} catch (err) {
console.log(err);
throw new Error(err);
}
log(' deploy');

const data = rchainToolkit.utils.rhoValToJs(
JSON.parse(dataAtNameResponse).exprs[0].expr
);

if (data.status !== 'completed') {
throw new Error(`Error, status: ${data.status}, message: ${data.message}`);
}

console.log(JSON.stringify(data.results, null, 2));
>>>>>>> 3e91e12 (rchain-toolkit -> @fabcotech/rchain-toolkit@2.0.0)
};
1 change: 1 addition & 0 deletions cli/updatePursePrice.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const execUpdatePursePrice= async () => {
masterRegistryUri,
validatorHost: process.env.VALIDATOR_HOST,
privateKey: process.env.PRIVATE_KEY,
shardId: process.env.SHARD_ID,
contractId,
boxId,
purseId,
Expand Down
2 changes: 1 addition & 1 deletion constants.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports.VERSION = '17.0.0';
module.exports.VERSION = '17.0.1';
12 changes: 2 additions & 10 deletions package-lock.json

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

13 changes: 2 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
{
<<<<<<< HEAD
"name": "@fabcotech/rchain-token",
"version": "16.0.2",
=======
"name": "rchain-token",
"version": "17.0.0",
>>>>>>> 280e0d9 (17.0.0)
"version": "17.0.1",
"description": "Fungibles and non-fungibles tokens on the RChain blockchain",
"main": "src/index.js",
"scripts": {
Expand All @@ -15,11 +10,7 @@
"test:ft": "node tests-ft/index",
"test:nft": "node tests-nft/index",
"test:credit": "node tests-credit/index",
<<<<<<< HEAD
"dappy:namesystem": "node cli deploy --fungible false --contract-id dappynamesystem && node cli create-purse --new-id 0 --quantity 100000000 && node cli update-purse-price --price rev,50000000 --purse-id 0",
=======
"dappy:namesystem": "node cli deploy --fungible false --contract-id dappynamesystem && node cli create-purse --new-id 0 --quantity 100000000 && node cli update-purse-price --price [\\\"prefixrev\\\",50000000] --purse-id 0",
>>>>>>> 280e0d9 (17.0.0)
"dappy:namesystem": "node cli deploy --fungible false --contract-id dappynamesystem && node cli create-purse --new-id 0 --quantity 100000000 && node cli update-purse-price --price n9drev,50000000 --purse-id 0",
"dappy:namesystemanddefaults": "npm run dappy:namesystem && node cli create-purse --purses-file name-purses.json"
},
"repository": {
Expand Down

0 comments on commit 6be21b7

Please sign in to comment.