Skip to content

Commit

Permalink
CU-86dt9vq5z - Implement a new import structure
Browse files Browse the repository at this point in the history
  • Loading branch information
luc10921 committed May 13, 2024
1 parent cae3cdf commit 341cf0c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
2 changes: 0 additions & 2 deletions boa3/internal/model/builtin/interop/contract/callflagstype.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ def get_value(self, symbol_id) -> Any:
:return: the value if this type has this symbol. None otherwise.
"""
from boa3.sc.types import CallFlags

if symbol_id in self.symbols and symbol_id in CallFlags.__members__:
return CallFlags.__members__[symbol_id]

Expand Down
31 changes: 15 additions & 16 deletions boa3/internal/model/builtin/native/nativecontract.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,6 @@ class NativeContract:
oracle_name = 'Oracle'
policy_name = 'Policy'

GAS_ = GAS.clone()
GAS_._identifier = gas_name
Ledger_ = Ledger.clone()
Ledger_._identifier = ledger_name
NEO_ = NEO.clone()
NEO_._identifier = neo_name
Oracle_ = Oracle.clone()
Oracle_._identifier = oracle_name
Policy_ = Policy.clone()
Policy_._identifier = policy_name

# region Packages

ContractManagementModule = Package(deprecated=True,
Expand All @@ -54,31 +43,41 @@ class NativeContract:
GasModule = Package(deprecated=True,
new_location='boa3.sc.contracts',
identifier=gas_name.lower(),
types=[GAS_]
other_symbols={
gas_name: GAS
}
)

LedgerModule = Package(deprecated=True,
new_location='boa3.sc.contracts',
identifier=ledger_name.lower(),
types=[Ledger_]
other_symbols={
ledger_name: Ledger
}
)

NeoModule = Package(deprecated=True,
new_location='boa3.sc.contracts',
identifier=neo_name.lower(),
types=[NEO_]
other_symbols={
neo_name: NEO
}
)

OracleModule = Package(deprecated=True,
new_location='boa3.sc.contracts',
identifier=oracle_name.lower(),
types=[Oracle_]
other_symbols={
oracle_name: Oracle
}
)

PolicyModule = Package(deprecated=True,
new_location='boa3.sc.contracts',
identifier=policy_name.lower(),
types=[Policy_]
other_symbols={
policy_name: Policy
}
)

RoleManagementModule = Package(deprecated=True,
Expand Down

0 comments on commit 341cf0c

Please sign in to comment.