Skip to content

Commit

Permalink
Add deposit/withdrawal test with mainnet enabled
Browse files Browse the repository at this point in the history
closes #824

Signed-off-by: Evgeniy Zayats <[email protected]>
  • Loading branch information
Evgeniy Zayats committed Jul 16, 2024
1 parent f2b1ef5 commit 3e6a889
Show file tree
Hide file tree
Showing 12 changed files with 440 additions and 31 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ neofs-node
neofs-rest-gw
neofs-s3-authmate
neofs-s3-gw
neofs-contract
neofs_env_*.zip
temp_files.zip
14 changes: 11 additions & 3 deletions neofs-testlib/neofs_testlib/cli/neogo/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ def contract_compile(

def deploy(
self,
address: str,
input_file: str,
manifest: str,
rpc_endpoint: str,
address: Optional[str] = None,
sysgas: Optional[float] = None,
wallet: Optional[str] = None,
wallet_config: Optional[str] = None,
Expand All @@ -51,6 +51,7 @@ def deploy(
out: Optional[str] = None,
force: bool = False,
timeout: int = 10,
post_data: Optional[str] = None,
) -> CommandResult:
"""Deploy a smart contract (.nef with description)
Expand All @@ -76,8 +77,11 @@ def deploy(
"""
assert bool(wallet) ^ bool(wallet_config), self.WALLET_SOURCE_ERROR_MSG
exec_param = {
param: param_value for param, param_value in locals().items() if param not in ["self", "wallet_password"]
param: param_value
for param, param_value in locals().items()
if param not in ["self", "wallet_password", "input_file"]
}
exec_param["in"] = input_file
exec_param["timeout"] = f"{timeout}s"

if wallet_password is not None:
Expand Down Expand Up @@ -323,9 +327,13 @@ def calc_hash(
Returns:
Command's result.
"""
exec_param = {
param: param_value for param, param_value in locals().items() if param not in ["self", "input_file"]
}
exec_param["in"] = input_file
return self._execute(
"contract calc-hash",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
**exec_param,
)

def add_group(
Expand Down
3 changes: 3 additions & 0 deletions neofs-testlib/neofs_testlib/cli/neogo/go.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from neofs_testlib.cli.neogo.nep17 import NeoGoNep17
from neofs_testlib.cli.neogo.node import NeoGoNode
from neofs_testlib.cli.neogo.query import NeoGoQuery
from neofs_testlib.cli.neogo.util import NeoGoUtil
from neofs_testlib.cli.neogo.version import NeoGoVersion
from neofs_testlib.cli.neogo.wallet import NeoGoWallet
from neofs_testlib.shell import Shell
Expand All @@ -20,6 +21,7 @@ class NeoGo:
query: Optional[NeoGoQuery] = None
version: Optional[NeoGoVersion] = None
wallet: Optional[NeoGoWallet] = None
util: Optional[NeoGoUtil] = None

def __init__(
self,
Expand All @@ -35,3 +37,4 @@ def __init__(
self.query = NeoGoQuery(shell, neo_go_exec_path, config_path=config_path)
self.version = NeoGoVersion(shell, neo_go_exec_path, config_path=config_path)
self.wallet = NeoGoWallet(shell, neo_go_exec_path, config_path=config_path)
self.util = NeoGoUtil(shell, neo_go_exec_path, config_path=config_path)
15 changes: 15 additions & 0 deletions neofs-testlib/neofs_testlib/cli/neogo/util.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult


class NeoGoUtil(CliCommand):
def convert(self, post_data: str) -> CommandResult:
"""Application version.
Returns:
Command's result.
"""
return self._execute(
"util convert",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)
Loading

0 comments on commit 3e6a889

Please sign in to comment.