-
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-86dthh0nm - Update NeoToken native contract
- Loading branch information
luc10921
committed
May 23, 2024
1 parent
49731b6
commit 570584a
Showing
8 changed files
with
101 additions
and
6 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
13 changes: 13 additions & 0 deletions
13
boa3/internal/model/builtin/native/neo_contract_methods/getcommitteeaddressmethod.py
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,13 @@ | ||
from boa3.internal.model.builtin.interop.nativecontract import NeoContractMethod | ||
from boa3.internal.model.variable import Variable | ||
|
||
|
||
class GetCommitteeAddressMethod(NeoContractMethod): | ||
|
||
def __init__(self): | ||
from boa3.internal.model.type.collection.sequence.uint160type import UInt160Type | ||
|
||
identifier = 'get_committee_address' | ||
native_identifier = 'getCommitteeAddress' | ||
args: dict[str, Variable] = {} | ||
super().__init__(identifier, native_identifier, args, return_type=UInt160Type.build()) |
13 changes: 13 additions & 0 deletions
13
boa3/internal/model/builtin/native/neo_contract_methods/getregisterpricemethod.py
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,13 @@ | ||
from boa3.internal.model.builtin.interop.nativecontract import NeoContractMethod | ||
from boa3.internal.model.variable import Variable | ||
|
||
|
||
class GetRegisterPriceMethod(NeoContractMethod): | ||
|
||
def __init__(self): | ||
from boa3.internal.model.type.type import Type | ||
|
||
identifier = 'get_register_price' | ||
native_identifier = 'getRegisterPrice' | ||
args: dict[str, Variable] = {} | ||
super().__init__(identifier, native_identifier, args, return_type=Type.int) |
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,8 @@ | ||
from boa3.sc.compiletime import public | ||
from boa3.sc.contracts import NeoToken | ||
from boa3.sc.types import UInt160 | ||
|
||
|
||
@public | ||
def main() -> UInt160: | ||
return NeoToken.get_committee_address() |
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,7 @@ | ||
from boa3.sc.compiletime import public | ||
from boa3.sc.contracts import NeoToken | ||
|
||
|
||
@public | ||
def main() -> int: | ||
return NeoToken.get_register_price() |
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