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

QA Changes #567

Open
wants to merge 118 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 106 commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
f5c750c
Update README.md
EvgeniyZZ May 7, 2024
294847c
Update README.md
EvgeniyZZ May 13, 2024
f4bdf1a
initial commit
EvgeniyZZ May 13, 2024
a193ef6
upd
EvgeniyZZ May 13, 2024
8791df5
upd
EvgeniyZZ May 13, 2024
48abc0d
Create README.md
EvgeniyZZ May 13, 2024
ac1c3b6
update gitignore
EvgeniyZZ May 13, 2024
27aaa17
add
EvgeniyZZ May 13, 2024
249fb73
Update .gitignore
EvgeniyZZ May 13, 2024
4c6fc99
update test
EvgeniyZZ May 13, 2024
16db80b
add community locker
EvgeniyZZ May 13, 2024
703993a
add community pool
EvgeniyZZ May 16, 2024
106e16c
speling fix
EvgeniyZZ May 19, 2024
cfbbc4a
add token manager erc721
EvgeniyZZ May 28, 2024
27b790f
add token manager erc20
EvgeniyZZ May 30, 2024
61bbc9d
update token managers
EvgeniyZZ Jun 2, 2024
6619ee1
fix fn naming
EvgeniyZZ Jun 3, 2024
dc7ed71
refactor
EvgeniyZZ Jun 6, 2024
b900012
upd
EvgeniyZZ Jun 6, 2024
04888cc
add contracts info
EvgeniyZZ Jun 6, 2024
91a448d
update contracts structure
EvgeniyZZ Jun 7, 2024
8c1e8d8
Fix import
EvgeniyZZ Jun 8, 2024
71b5b04
addERC1155
EvgeniyZZ Jun 10, 2024
481d597
add community pool additional requests
EvgeniyZZ Jun 11, 2024
d9cae77
upd
EvgeniyZZ Jun 12, 2024
18863ae
test
EvgeniyZZ Jun 13, 2024
07e9931
fix contracts info
EvgeniyZZ Jun 13, 2024
7c6f0dc
update erc721
EvgeniyZZ Jun 14, 2024
cbc2dbb
add erc721withmetadate
EvgeniyZZ Jun 17, 2024
9645303
update imports
EvgeniyZZ Jun 17, 2024
23de61c
update imoprt
EvgeniyZZ Jun 17, 2024
2acb440
update erc1155
EvgeniyZZ Jun 17, 2024
0d44a62
update erc1155 token
EvgeniyZZ Jun 17, 2024
ee0c22e
update erc721wmd
EvgeniyZZ Jun 18, 2024
d6d2ed5
add import
EvgeniyZZ Jun 18, 2024
3042933
update erc721wmd
EvgeniyZZ Jun 18, 2024
db4996c
add call to map
EvgeniyZZ Jul 2, 2024
ead1097
restructure, added tm_linker on schian
EvgeniyZZ Jul 3, 2024
e9f4989
update contracts info, dependencies, spelling fixes
EvgeniyZZ Jul 3, 2024
9c6f4bd
upd
EvgeniyZZ Jul 3, 2024
1d97846
fix call
EvgeniyZZ Jul 11, 2024
1eda476
upd
EvgeniyZZ Jul 11, 2024
f197a26
update locker
EvgeniyZZ Jul 14, 2024
d849c89
update ERC721
EvgeniyZZ Aug 5, 2024
812b605
add exit function for erc721
EvgeniyZZ Aug 5, 2024
e620085
Update token_manager_linker.py
EvgeniyZZ Aug 11, 2024
29bc554
Update token_manager_erc721_wmt.py
EvgeniyZZ Aug 14, 2024
94b1411
Update token_manager_erc721.py
EvgeniyZZ Aug 14, 2024
2817b04
Update token_manager_erc1155.py
EvgeniyZZ Aug 16, 2024
c562f19
Update deposit_box_erc721.py
EvgeniyZZ Sep 3, 2024
4c0f03e
add direct deposit for erc1155
EvgeniyZZ Sep 4, 2024
bbc5fc1
tiny fix
EvgeniyZZ Sep 4, 2024
49b17e4
spelling fix
EvgeniyZZ Sep 6, 2024
bdb2806
remove unsused imports
EvgeniyZZ Sep 23, 2024
f3a95fe
pep8
EvgeniyZZ Sep 23, 2024
0664ea1
remove unused imports
EvgeniyZZ Sep 23, 2024
e7aea33
fix E231
EvgeniyZZ Sep 23, 2024
92f577a
update skale-contracts
EvgeniyZZ Sep 23, 2024
f11f2f7
add paymaster
EvgeniyZZ Sep 23, 2024
4901a78
fix naming
EvgeniyZZ Sep 23, 2024
18989a5
update skale-contracts version
EvgeniyZZ Sep 24, 2024
f5a168f
add paymaster
EvgeniyZZ Sep 30, 2024
cb10c46
add paymaster
EvgeniyZZ Oct 3, 2024
274264e
update workflow test
EvgeniyZZ Oct 7, 2024
87df965
fix flake8 test paymaster
EvgeniyZZ Oct 7, 2024
dcfcbb1
add new functions, fix bugs
yatsunastya Oct 7, 2024
a2184a1
added skipTime and effectiveTimestamp
yatsunastya Oct 7, 2024
785e0c2
Pull changes from develop
yatsunastya Oct 7, 2024
a69b3c3
fixed flake8 issues
yatsunastya Oct 7, 2024
5ed0eca
Merge pull request #2 from EvgeniyZZ/paymaster-fix
yatsunastya Oct 7, 2024
01b7080
update version
EvgeniyZZ Oct 9, 2024
5a886c4
Merge branch 'develop' of github.com:EvgeniyZZ/skale.py into develop
EvgeniyZZ Oct 9, 2024
ae16b20
rollback global version
EvgeniyZZ Oct 9, 2024
031210c
add revoke role
EvgeniyZZ Oct 14, 2024
874a395
fix flake
EvgeniyZZ Oct 14, 2024
9507ffa
added debug contracts option
yatsunastya Oct 15, 2024
c6aa9eb
Merge pull request #3 from EvgeniyZZ/paymaster-fix
yatsunastya Oct 16, 2024
9b2b35d
added debts calls
yatsunastya Oct 16, 2024
473058a
Merge pull request #4 from EvgeniyZZ/paymaster-fix
yatsunastya Oct 16, 2024
ea80c90
add full config controller support
OleksanderSalamatov Nov 14, 2024
0cf5e6a
add newline
OleksanderSalamatov Nov 14, 2024
da0786b
fix linter errors
OleksanderSalamatov Nov 14, 2024
04b7aad
remove trailing whitespace
OleksanderSalamatov Nov 14, 2024
eb0c4b4
chang str output to bytes, change ContractFunction to TxRes
OleksanderSalamatov Nov 15, 2024
2482b97
add etherbase predeployed full functionality
OleksanderSalamatov Nov 15, 2024
bc05596
Fix linter warning
OleksanderSalamatov Nov 15, 2024
7f3dfd3
add context contract full functionality
OleksanderSalamatov Nov 18, 2024
a9c1a00
fix linter errors
OleksanderSalamatov Nov 18, 2024
033e362
fix contract fn
EvgeniyZZ Dec 4, 2024
4a86d45
Merge pull request #5 from EvgeniyZZ/add-config-controller
EvgeniyZZ Dec 4, 2024
d1701e6
Merge pull request #7 from EvgeniyZZ/add-context
EvgeniyZZ Dec 4, 2024
f72eae6
Merge branch 'develop' into add-etherbase
EvgeniyZZ Dec 4, 2024
474170b
Merge pull request #6 from EvgeniyZZ/add-etherbase
EvgeniyZZ Dec 4, 2024
b47c746
clean up gitignore
EvgeniyZZ Dec 4, 2024
2776736
restore workflow
EvgeniyZZ Dec 4, 2024
c0cf2b3
fix
EvgeniyZZ Dec 4, 2024
d3dfe83
fix
EvgeniyZZ Dec 4, 2024
00e9b8c
fix typo and formatting
OleksanderSalamatov Dec 6, 2024
dc9365c
Merge pull request #8 from EvgeniyZZ/fix-typo
EvgeniyZZ Dec 6, 2024
813bebc
fix type
EvgeniyZZ Dec 13, 2024
88022c9
Merge branch 'develop' into develop
EvgeniyZZ Dec 13, 2024
261fffe
add license
EvgeniyZZ Dec 13, 2024
7536fc5
Merge pull request #566 from EvgeniyZZ/develop
dmytrotkk Dec 23, 2024
60ea73e
Fix linter in config controller
dmytrotkk Dec 23, 2024
6b93a35
Update docker compose command
dmytrotkk Dec 23, 2024
ee10941
qa-changes: add transfer_to_schain_hash_erc20_direct function
oleksandrSydorenkoJ Feb 7, 2025
91bcbf1
qa-changes: add transferToSchainERC20Direct function
oleksandrSydorenkoJ Feb 10, 2025
a5f6633
qa-changes: Fix transferToSchainERC20Direct function
oleksandrSydorenkoJ Feb 10, 2025
85e6cdb
add strict version of eth_typing to setup.py
OleksanderSalamatov Feb 10, 2025
6b0edcd
fix comma
OleksanderSalamatov Feb 10, 2025
1fae05c
update eth_typing version to match qa-automation repo req-s
OleksanderSalamatov Feb 10, 2025
15bf489
Merge latest changes from develop
dmytrotkk Mar 19, 2025
37d2bca
Merge latest changes from develop
dmytrotkk Mar 19, 2025
0b345f2
Update typing and variable names:
Masterix0 Apr 1, 2025
a212c6d
Update test runner to 22.04
Masterix0 Apr 1, 2025
5200967
Update test_allocator runner to 22.04
Masterix0 Apr 2, 2025
61c2d77
Changed `schain_name: str` to `schain_name: SchainName` in whole code…
Masterix0 Apr 2, 2025
d35f331
Merge branch 'develop' into qa-changes
dmytrotkk Apr 2, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Launch hardhat node
working-directory: hardhat-node
run: |
docker-compose up -d && sleep 20
docker compose up -d && sleep 20

- name: Deploy manager
run: |
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Launch hardhat node
working-directory: hardhat-node
run: |
docker-compose up -d && sleep 20
docker compose up -d && sleep 20

- name: Deploy manager contracts
run: |
Expand Down
11 changes: 11 additions & 0 deletions scripts/run_ima_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

set -e

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
PROJECT_DIR=$(dirname $DIR)
export ENDPOINT=${ENDPOINT:-http://localhost:8545}
export ENV=test


py.test $PROJECT_DIR/tests/ima $@
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"pyyaml==6.0",
"redis==5.0.3",
"sgx.py==0.9dev2",
"skale-contracts==1.0.1a5",
"skale-contracts==1.0.2a6",
"typing-extensions==4.9.0",
"web3==6.13.0"
],
Expand Down
1 change: 1 addition & 0 deletions skale/contracts/allocator_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with SKALE.py. If not, see <https://www.gnu.org/licenses/>.

from skale.contracts.base_contract import BaseContract
from skale.skale_allocator import SkaleAllocator

Expand Down
1 change: 1 addition & 0 deletions skale/contracts/base_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with SKALE.py. If not, see <https://www.gnu.org/licenses/>.

""" SKALE base contract class """
from __future__ import annotations
import logging
Expand Down
7 changes: 7 additions & 0 deletions skale/contracts/config_controller/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# flake8: noqa
from skale.contracts.base_contract import BaseContract, transaction_method
from skale.contracts.config_controller.config_controller import ConfigController

__all__ = [
'ConfigController'
]
141 changes: 141 additions & 0 deletions skale/contracts/config_controller/config_controller.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# -*- coding: utf-8 -*-
#
# This file is part of SKALE.py
#
# Copyright (C) 2019-Present SKALE Labs
#
# SKALE.py is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SKALE.py is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with SKALE.py. If not, see <https://www.gnu.org/licenses/>.

from skale.contracts.base_contract import BaseContract, transaction_method
from eth_typing import ChecksumAddress
from skale.transactions.result import TxRes


class ConfigController(BaseContract):
"""Config controller contract"""

def default_admin_role(self) -> bytes:
return self.contract.functions.DEFAULT_ADMIN_ROLE().call()

def deployer_admin_role(self) -> bytes:
return self.contract.functions.DEPLOYER_ADMIN_ROLE().call()

def deployer_role(self) -> bytes:
return self.contract.functions.DEPLOYER_ROLE().call()

def mtm_admin_role(self) -> bytes:
return self.contract.functions.MTM_ADMIN_ROLE().call()

def allowed_origin_role(self, deployer: ChecksumAddress) -> bytes:
return self.contract.functions.allowedOriginRole(deployer).call()

def allowed_origin_role_admin(self, deployer: ChecksumAddress) -> bytes:
return self.contract.functions.allowedOriginRoleAdmin(deployer).call()

def has_role(self, role: bytes, address: ChecksumAddress) -> bool:
return bool(self.contract.functions.hasRole(role, address).call())

def get_role_admin(self, role: bytes) -> bytes:
return self.contract.functions.getRoleAdmin(role).call()

def get_role_member(self, role: bytes, index: int) -> bytes:
return self.contract.functions.getRoleMember(role, index).call()

def get_role_member_count(self, role: bytes) -> int:
return self.contract.functions.getRoleMemberCount(role).call()

def is_address_whitelisted(self, address: ChecksumAddress) -> bool:
return bool(self.contract.functions.isAddressWhitelisted(address).call())

def is_deployment_allowed(
self, transaction_origin: ChecksumAddress, deployer: ChecksumAddress
) -> bool:
return bool(
self.contract.functions.isDeploymentAllowed(
transaction_origin, deployer
).call()
)

@transaction_method
def grant_role(self, role: bytes, address: ChecksumAddress) -> TxRes:
return self.contract.functions.grantRole(role, address)

@transaction_method
def add_allowed_origin_role_admin(
self, role: bytes, address: ChecksumAddress
) -> TxRes:
return self.contract.functions.addAllowedOriginRoleAdmin(role, address)

@transaction_method
def allow_origin(
self, transaction_origin: ChecksumAddress, deployer: ChecksumAddress
) -> TxRes:
return self.contract.functions.allowOrigin(transaction_origin, deployer)

@transaction_method
def add_to_whitelist(self, address: ChecksumAddress) -> TxRes:
return self.contract.functions.addToWhitelist(address)

@transaction_method
def revoke_role(self, role: bytes, address: ChecksumAddress) -> TxRes:
return self.contract.functions.revokeRole(role, address)

@transaction_method
def renounce_role(self, role: bytes, address: ChecksumAddress) -> TxRes:
return self.contract.functions.renounceRole(role, address)

@transaction_method
def remove_allowed_origin_role_admin(
self, role: bytes, address: ChecksumAddress
) -> TxRes:
return self.contract.functions.removeAllowedOriginRoleAdmin(role, address)

@transaction_method
def forbid_origin(
self, transaction_origin: ChecksumAddress, deployer: ChecksumAddress
) -> TxRes:
return self.contract.functions.forbidOrigin(transaction_origin, deployer)

@transaction_method
def remove_from_whitelist(self, address: ChecksumAddress) -> TxRes:
return self.contract.functions.removeFromWhitelist(address)

@transaction_method
def enable_free_contract_deployment(self) -> TxRes:
return self.contract.functions.enableFreeContractDeployment()

@transaction_method
def disable_free_contract_deployment(self) -> TxRes:
return self.contract.functions.disableFreeContractDeployment()

def is_fcd_enabled(self) -> str:
return self.contract.functions.isFCDEnabled().call()

@transaction_method
def enable_mtm(self) -> TxRes:
return self.contract.functions.enableMTM()

@transaction_method
def disable_mtm(self) -> TxRes:
return self.contract.functions.disableMTM()

def is_mtm_enabled(self) -> str:
return self.contract.functions.isMTMEnabled().call()

def get_version(self) -> str:
return self.contract.functions.version().call()

@transaction_method
def set_version(self, new_version) -> TxRes:
return self.contract.functions.setVersion(new_version)
25 changes: 25 additions & 0 deletions skale/contracts/config_controller_contract.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
#
# This file is part of SKALE.py
#
# Copyright (C) 2019-Present SKALE Labs
#
# SKALE.py is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SKALE.py is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with SKALE.py. If not, see <https://www.gnu.org/licenses/>.

from skale.contracts.base_contract import BaseContract
from skale.skale_config_controller import SkaleConfigController


class ConfigControllerContract(BaseContract[SkaleConfigController]):
pass
7 changes: 7 additions & 0 deletions skale/contracts/context/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# flake8: noqa
from skale.contracts.base_contract import BaseContract, transaction_method
from skale.contracts.context.context import Context

__all__ = [
'Context'
]
39 changes: 39 additions & 0 deletions skale/contracts/context/context.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
#
# This file is part of SKALE.py
#
# Copyright (C) 2019-Present SKALE Labs
#
# SKALE.py is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SKALE.py is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with SKALE.py. If not, see <https://www.gnu.org/licenses/>.

from skale.contracts.base_contract import BaseContract, transaction_method
from eth_typing import ChecksumAddress
from skale.transactions.result import TxRes


class Context(BaseContract):
"""Context contract"""

def get_schain_name(self) -> str:
return self.contract.functions.getSchainName().call()

def get_schain_owner_address(self) -> bytes:
return self.contract.functions.getSchainOwnerAddress().call()

@transaction_method
def set_schain_owner_address(self, newOwner: ChecksumAddress) -> TxRes:
return self.contract.functions.setSchainOwnerAddress(newOwner)

def get_version(self) -> str:
return self.contract.functions.version().call()
25 changes: 25 additions & 0 deletions skale/contracts/context_contract.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
#
# This file is part of SKALE.py
#
# Copyright (C) 2019-Present SKALE Labs
#
# SKALE.py is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SKALE.py is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with SKALE.py. If not, see <https://www.gnu.org/licenses/>.

from skale.contracts.base_contract import BaseContract
from skale.skale_context import SkaleContext


class ContextContract(BaseContract[SkaleContext]):
pass
7 changes: 7 additions & 0 deletions skale/contracts/etherbase/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# flake8: noqa
from skale.contracts.base_contract import BaseContract, transaction_method
from skale.contracts.etherbase.etherbase import Etherbase

__all__ = [
'Etherbase'
]
75 changes: 75 additions & 0 deletions skale/contracts/etherbase/etherbase.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# -*- coding: utf-8 -*-
#
# This file is part of SKALE.py
#
# Copyright (C) 2019-Present SKALE Labs
#
# SKALE.py is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SKALE.py is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with SKALE.py. If not, see <https://www.gnu.org/licenses/>.

from skale.contracts.base_contract import BaseContract, transaction_method
from eth_typing import ChecksumAddress
from skale.transactions.result import TxRes


class Etherbase(BaseContract):
"""Etherbase contract"""

def default_admin_role(self) -> bytes:
return self.contract.functions.DEFAULT_ADMIN_ROLE().call()

def ether_manager_role(self) -> bytes:
return self.contract.functions.ETHER_MANAGER_ROLE().call()

@transaction_method
def retrieve(self, address: ChecksumAddress) -> TxRes:
return self.contract.functions.retrieve(address)

@transaction_method
def partially_retrieve(self, address: ChecksumAddress, amount: int) -> TxRes:
return self.contract.functions.partiallyRetrieve(address, amount)

def has_role(self, role: bytes, address: ChecksumAddress) -> bool:
return bool(self.contract.functions.hasRole(role, address).call())

def get_role_admin(self, role: bytes) -> bytes:
return self.contract.functions.getRoleAdmin(role).call()

def get_role_member(self, role: bytes, index: int) -> bytes:
return self.contract.functions.getRoleMember(role, index).call()

def get_role_member_count(self, role: bytes) -> int:
return self.contract.functions.getRoleMemberCount(role).call()

@transaction_method
def grant_role(
self,
role: bytes,
address: ChecksumAddress
) -> TxRes:
return self.contract.functions.grantRole(role, address)

@transaction_method
def revoke_role(self, role: bytes, address: ChecksumAddress) -> TxRes:
return self.contract.functions.revokeRole(role, address)

@transaction_method
def renounce_role(self, role: bytes, address: ChecksumAddress) -> TxRes:
return self.contract.functions.renounceRole(role, address)

def get_version(self) -> str:
return self.contract.functions.version().call()

@transaction_method
def set_version(self, new_version) -> TxRes:
return self.contract.functions.setVersion(new_version)
Loading
Loading