Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
Fix deployContract to work with latest nearlib
Browse files Browse the repository at this point in the history
  • Loading branch information
vgrichina committed Jul 19, 2019
1 parent 1c8f604 commit 8e10c0b
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,7 @@ exports.deploy = async function(options) {
`Starting deployment. Account id: ${options.accountId}, node: ${options.nodeUrl}, helper: ${options.helperUrl}, file: ${options.wasmFile}`);
const near = await connect(options);
const contractData = [...fs.readFileSync(options.wasmFile)];
const res = await near.waitForTransactionResult(
await near.deployContract(options.accountId, contractData));
if (res.status == "Completed") {
console.log("Deployment succeeded.");
} else {
console.log("Deployment transaction did not succeed: ", res);
process.exit(1);
}
await near.deployContract(options.accountId, contractData);
};

exports.scheduleFunctionCall = async function(options) {
Expand Down

0 comments on commit 8e10c0b

Please sign in to comment.