Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CU-86dthh0nm - Update NeoToken native contract #1256

Merged
merged 1 commit into from
May 24, 2024
Merged

Conversation

luc10921
Copy link
Contributor

Summary or solution description
Added get_committee_address and get_register_price to the NeoToken native contract interface at boa3.sc.contracts

How to Reproduce

from boa3.sc.compiletime import public
from boa3.sc.contracts import NeoToken


@public
def main() -> int:
    return NeoToken.get_register_price()

Tests

async def test_get_committee_address(self):
expected_output = (
Opcode.CALLT + b'\x00\x00'
+ Opcode.RET
)
output, _ = self.assertCompile('GetCommitteeAddress.py')
self.assertEqual(expected_output, output)
async def test_get_register_price(self):
await self.set_up_contract('GetRegisterPrice.py')
register_price = await self.get_register_price()
result, _ = await self.call('main', [], return_type=int)
self.assertEqual(register_price, result)

Platform:

  • OS: Windows 11 x64
  • Python version: Python 3.11

(Optional) Additional context
Couldn't test the get_committee_address method with the current neo-go config, so it's just checking the opcode and it was invoked on the testnet.

@luc10921 luc10921 requested a review from meevee98 May 23, 2024 14:35
@luc10921 luc10921 self-assigned this May 23, 2024
@melanke
Copy link
Contributor

melanke commented May 23, 2024

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 91.216% (+0.001%) from 91.215%
when pulling 570584a on CU-86dthh0nm
into 49731b6 on development.

@meevee98 meevee98 merged commit 0c64fcc into development May 24, 2024
5 checks passed
@meevee98 meevee98 deleted the CU-86dthh0nm branch May 24, 2024 15:35
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants