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

how to increase contract balance? #15

Open
qiluge opened this issue Apr 15, 2023 · 0 comments
Open

how to increase contract balance? #15

qiluge opened this issue Apr 15, 2023 · 0 comments

Comments

@qiluge
Copy link

qiluge commented Apr 15, 2023

this test case run failed:

    const balanceDataBefore = await contract.invokeGetMethod("my_balance", []);
    const balanceBefore = balanceDataBefore .result[0] as bigint;
contract.sendInternalMessage(
      internalMessage({ from: account1, value: BigInt(100000) })
    );
const balanceData= await contract.invokeGetMethod("my_balance", []);
    const balance = balanceData.result[0] as bigint;
    expect(balance - balanceBefore ).to.be.eq(BigInt(100000));

contract code here:

() recv_internal(int my_balance, int msg_value, cell in_msg_full, slice in_msg_body) impure {
}

int my_balance() method_id {
  [int res, cell a] = get_balance();
  return res;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant