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

It's necessary to add notify event names on the manifest #1252

Merged
merged 1 commit into from
May 24, 2024

Conversation

luc10921
Copy link
Collaborator

Summary or solution description
You can't emit an event that is not on the manifest.

How to Reproduce

from boa3.sc.compiletime import public
from boa3.sc.runtime import notify
@public
def Main():
notify(10, 'unit_test')

Tests

async def test_notify_with_name_run(self):
await self.set_up_contract('NotifyWithName.py')
event_name = 'unit_test'
result, notifications = await self.call('Main', [], return_type=None)
self.assertIsNone(result)
event_notifications = self.filter_events(notifications,
event_name=event_name,
notification_type=boatestcase.BoaTestEvent
)
self.assertEqual(1, len(event_notifications))
self.assertEqual((10,), event_notifications[0].state)

Platform:

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

@luc10921 luc10921 requested a review from meevee98 May 16, 2024 14:23
@melanke
Copy link
Collaborator

melanke commented May 16, 2024

@coveralls
Copy link
Collaborator

coveralls commented May 16, 2024

Coverage Status

coverage: 91.218% (+0.003%) from 91.215%
when pulling 3912663 on CU-86dtd9az1
into 49731b6 on development.

@meevee98 meevee98 merged commit 3014495 into development May 24, 2024
5 checks passed
@meevee98 meevee98 deleted the CU-86dtd9az1 branch May 24, 2024 15:57
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

Successfully merging this pull request may close these issues.

None yet

4 participants