-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CU-3cr16nu - Add a new field on each type-value object on JSON manife…
…st file generation to better describe the specific type/format of that field.
- Loading branch information
luc10921
committed
Jan 23, 2023
1 parent
c954603
commit d43c0a3
Showing
32 changed files
with
758 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
__all__ = [ | ||
'AddressType', | ||
'BlockHashType', | ||
'OpcodeType', | ||
'PublicKeyType', | ||
'ScriptHashLittleEndianType', | ||
'ScriptHashType', | ||
'TransactionIdType', | ||
] | ||
|
||
from boa3.model.type.neo.addresstype import AddressType | ||
from boa3.model.type.neo.blockhashtype import BlockHashType | ||
from boa3.model.type.neo.opcodetype import OpcodeType | ||
from boa3.model.type.neo.publickeytype import PublicKeyType | ||
from boa3.model.type.neo.scripthashlittleendiantype import ScriptHashLittleEndianType | ||
from boa3.model.type.neo.scripthashtype import ScriptHashType | ||
from boa3.model.type.neo.transactionidtype import TransactionIdType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from typing import Any | ||
|
||
from boa3.model.type.itype import IType | ||
from boa3.model.type.primitive.strtype import StrType | ||
|
||
|
||
class AddressType(StrType): | ||
""" | ||
A class used to indicate that a parameter or return on the manifest is an Address. It's a subclass of StrType. | ||
""" | ||
|
||
def __init__(self): | ||
super().__init__() | ||
self._identifier = 'Address' | ||
|
||
@classmethod | ||
def build(cls, value: Any = None) -> IType: | ||
return _Address | ||
|
||
|
||
_Address = AddressType() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from typing import Any | ||
|
||
from boa3.model.type.collection.sequence.uint256type import UInt256Type | ||
from boa3.model.type.itype import IType | ||
|
||
|
||
class BlockHashType(UInt256Type): | ||
""" | ||
A class used to indicate that a parameter or return on the manifest is a BlockHash. It's a subclass of UInt256Type. | ||
""" | ||
|
||
def __init__(self): | ||
super().__init__() | ||
self._identifier = 'BlockHash' | ||
|
||
@classmethod | ||
def build(cls, value: Any = None) -> IType: | ||
return _BlockHash | ||
|
||
|
||
_BlockHash = BlockHashType() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from typing import Any | ||
|
||
from boa3.model.type.collection.sequence.ecpointtype import ECPointType | ||
from boa3.model.type.itype import IType | ||
|
||
|
||
class PublicKeyType(ECPointType): | ||
""" | ||
A class used to indicate that a parameter or return on the manifest is a PublicKey. It's a subclass of ECPointType. | ||
""" | ||
|
||
def __init__(self): | ||
super().__init__() | ||
self._identifier = 'PublicKey' | ||
|
||
@classmethod | ||
def build(cls, value: Any = None) -> IType: | ||
return _PublicKey | ||
|
||
|
||
_PublicKey = PublicKeyType() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from typing import Any | ||
|
||
from boa3.model.type.collection.sequence.uint160type import UInt160Type | ||
from boa3.model.type.itype import IType | ||
|
||
|
||
class ScriptHashLittleEndianType(UInt160Type): | ||
""" | ||
A class used to indicate that a parameter or return on the manifest is a ScripthashLittleEndian. | ||
It's a subclass of UInt160Type. | ||
""" | ||
|
||
def __init__(self): | ||
super().__init__() | ||
self._identifier = 'ScriptHashLittleEndian' | ||
|
||
@classmethod | ||
def build(cls, value: Any = None) -> IType: | ||
return _ScriptHashLittleEndian | ||
|
||
|
||
_ScriptHashLittleEndian = ScriptHashLittleEndianType() |
Oops, something went wrong.