Skip to content

Commit

Permalink
Merge branch 'develop' into nested-example
Browse files Browse the repository at this point in the history
  • Loading branch information
ailisp authored Sep 30, 2022
2 parents a725921 + 71f8b4f commit 68360d3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/post-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ await executeCommand(`rm ${BINARYEN_TAR_NAME}`);

console.log("Installing QuickJS...");

const QUICK_JS_VERSION = `0.1.1`;
const QUICK_JS_VERSION = `0.1.2`;
const QUICK_JS_VERSION_TAG = `v${QUICK_JS_VERSION}`;
const QUICK_JS_SYSTEM_NAME =
OS === "Linux" ? "Linux" : OS === "Darwin" ? "macOS" : "other";
Expand Down
13 changes: 12 additions & 1 deletion tests/__tests__/test_context_api.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,18 @@ test("get attached deposit", async (t) => {
let r = await carl.call(contextApiContract, "get_attached_deposit", "", {
attachedDeposit: 3,
});
t.is(r, 3);
t.is(r, "3");

for (let i = 1; i <= 10; i++) {
// 1 NEAR, 2 NEAR, ..., 10 NEAR
let r = await carl.call(
contextApiContract,
"get_attached_deposit",
{},
{ attachedDeposit: i.toString() + "000000000000000000000000" }
);
t.is(r, i.toString() + "000000000000000000000000");
}
});

test("get prepaid gas", async (t) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/src/context_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function get_epoch_height() {
}

export function get_attached_deposit() {
near.valueReturn(near.attachedDeposit());
near.valueReturn(JSON.stringify(near.attachedDeposit().toString()));
}

export function get_prepaid_gas() {
Expand Down

0 comments on commit 68360d3

Please sign in to comment.