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

Remove duplicated smart contract used to test manifest generation #1121

Merged
merged 1 commit into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ def decimals() -> int:
pass

@staticmethod
@display_name('totalSupply')
def total_supply() -> int:
def totalSupply() -> int:
pass

@staticmethod
@display_name('balanceOf')
def balance_of(account: UInt160) -> int:
def balanceOf(account: UInt160) -> int:
pass

@staticmethod
Expand All @@ -42,12 +40,12 @@ def nep17_decimals() -> int:

@public
def nep17_total_supply() -> int:
return Nep17.total_supply()
return Nep17.totalSupply()


@public
def nep17_balance_of(account: UInt160) -> int:
return Nep17.balance_of(account)
return Nep17.balanceOf(account)


@public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ def main() -> int:
@metadata
def permissions_manifest() -> NeoMetadata:
meta = NeoMetadata()

return meta
13 changes: 0 additions & 13 deletions boa3_test/test_sc/metadata_test/MetadataInfoNameDefault.py

This file was deleted.

12 changes: 0 additions & 12 deletions boa3_test/test_sc/metadata_test/MetadataInfoPermissionsDefault.py

This file was deleted.

13 changes: 0 additions & 13 deletions boa3_test/test_sc/metadata_test/MetadataInfoSourceDefault.py

This file was deleted.

12 changes: 0 additions & 12 deletions boa3_test/test_sc/metadata_test/MetadataInfoTrustsDefault.py

This file was deleted.

12 changes: 6 additions & 6 deletions boa3_test/tests/compiler_tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def test_metadata_info_trusts_mismatched_types(self):
self.assertEqual(len(manifest['trusts']), 0)

def test_metadata_info_trusts_default(self):
path = self.get_contract_path('MetadataInfoTrustsDefault.py')
path = self.get_contract_path('MetadataInfoDefault.py')
output, manifest = self.compile_and_save(path)

self.assertIn('trusts', manifest)
Expand Down Expand Up @@ -443,7 +443,7 @@ def test_metadata_info_permissions_mismatched_type(self):
self.assertEqual(len(manifest['permissions']), 0)

def test_metadata_info_permissions_default(self):
path = self.get_contract_path('MetadataInfoPermissionsDefault.py')
path = self.get_contract_path('MetadataInfoDefault.py')
output, manifest = self.compile_and_save(path)

self.assertIn('permissions', manifest)
Expand Down Expand Up @@ -513,13 +513,13 @@ def test_metadata_info_name(self):
self.assertEqual((manifest['name']), "SmartContractCustomName")

def test_metadata_info_name_default(self):
path = self.get_contract_path('MetadataInfoNameDefault.py')
path = self.get_contract_path('MetadataInfoDefault.py')
output, manifest = self.compile_and_save(path)

self.assertIn('name', manifest)
self.assertIsInstance(manifest['name'], str)
self.assertGreater(len(manifest['name']), 0)
self.assertEqual((manifest['name']), "MetadataInfoNameDefault")
self.assertEqual((manifest['name']), "MetadataInfoDefault")

def test_metadata_info_name_mismatched_type(self):
path = self.get_contract_path('MetadataInfoNameMismatchedType.py')
Expand Down Expand Up @@ -565,7 +565,7 @@ def test_metadata_info_groups(self):
self.assertEqual(manifest_struct_groups, result_groups)

def test_metadata_info_groups_default(self):
path = self.get_contract_path('MetadataInfoGroupsDefault.py')
path = self.get_contract_path('MetadataInfoDefault.py')
output, manifest = self.compile_and_save(path)

self.assertIn('groups', manifest)
Expand All @@ -584,7 +584,7 @@ def test_metadata_info_source(self):
self.assertEqual(generated_source, 'https://github.com/CityOfZion/neo3-boa')

def test_metadata_info_source_default(self):
path = self.get_contract_path('MetadataInfoSourceDefault.py')
path = self.get_contract_path('MetadataInfoDefault.py')
self.compile_and_save(path)

nef_path, _ = self.get_deploy_file_paths_without_compiling(path)
Expand Down