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

Owner attribute in instantiate response should be address #63

Open
jasny opened this issue Apr 18, 2023 · 0 comments
Open

Owner attribute in instantiate response should be address #63

jasny opened this issue Apr 18, 2023 · 0 comments

Comments

@jasny
Copy link
Member

jasny commented Apr 18, 2023

Tested it with the potion package, but this probably applies to all packages.

The 'owner' attribute when instantiating the contract is the public key. When getting the information using get_query we get the address.

it('instantiates the smart contract', async () => {
  const result = await contract.instantiate(
    {
      ownable_id: '88pDRu52FpsU3kKHwdvPV21RMkBqVqNnthjfdCesTHQhLnUpanw49n6b2PzGnEy',
      package: 'bafybeie4ts4mbcw4pswzh45bj32ulcyztup2dr7zbbjv3y2ym3q3uuejba',
      network_id: 'T',
    },
    { sender: account.publicKey, funds: [] },
  );

  assert.equal(result.attributes.owner, account.address);
});
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