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

Garden inventory #327

Merged
merged 7 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
60 changes: 11 additions & 49 deletions cli/web3cli/GOFPFacet.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Code generated by moonworm : https://github.com/bugout-dev/moonworm
# Moonworm version : 0.6.2
# Code generated by moonworm : https://github.com/moonstream-to/moonworm
# Moonworm version : 0.7.1

import argparse
import json
Expand Down Expand Up @@ -361,20 +361,12 @@ def set_path_rewards(
session_id: int,
stages: List,
paths: List,
terminus_addresses: List,
terminus_pool_ids: List,
reward_amounts: List,
rewards: List,
transaction_config,
) -> Any:
self.assert_contract_is_instantiated()
return self.contract.setPathRewards(
session_id,
stages,
paths,
terminus_addresses,
terminus_pool_ids,
reward_amounts,
transaction_config,
session_id, stages, paths, rewards, transaction_config
)

def set_session_active(
Expand Down Expand Up @@ -413,22 +405,11 @@ def set_session_uri(self, session_id: int, uri: str, transaction_config) -> Any:
return self.contract.setSessionUri(session_id, uri, transaction_config)

def set_stage_rewards(
self,
session_id: int,
stages: List,
terminus_addresses: List,
terminus_pool_ids: List,
reward_amounts: List,
transaction_config,
self, session_id: int, stages: List, rewards: List, transaction_config
) -> Any:
self.assert_contract_is_instantiated()
return self.contract.setStageRewards(
session_id,
stages,
terminus_addresses,
terminus_pool_ids,
reward_amounts,
transaction_config,
session_id, stages, rewards, transaction_config
)

def stake_tokens_into_session(
Expand Down Expand Up @@ -720,11 +701,8 @@ def handle_get_staked_token_info(args: argparse.Namespace) -> None:
def handle_gofp_version(args: argparse.Namespace) -> None:
network.connect(args.network)
contract = GOFPFacet(args.address)
transaction_config = get_transaction_config(args)
result = contract.gofp_version(transaction_config=transaction_config)
result = contract.gofp_version(block_number=args.block_number)
print(result)
if args.verbose:
print(result.info())


def handle_init(args: argparse.Namespace) -> None:
Expand Down Expand Up @@ -847,9 +825,7 @@ def handle_set_path_rewards(args: argparse.Namespace) -> None:
session_id=args.session_id,
stages=args.stages,
paths=args.paths,
terminus_addresses=args.terminus_addresses,
terminus_pool_ids=args.terminus_pool_ids,
reward_amounts=args.reward_amounts,
rewards=args.rewards,
transaction_config=transaction_config,
)
print(result)
Expand Down Expand Up @@ -920,9 +896,7 @@ def handle_set_stage_rewards(args: argparse.Namespace) -> None:
result = contract.set_stage_rewards(
session_id=args.session_id,
stages=args.stages,
terminus_addresses=args.terminus_addresses,
terminus_pool_ids=args.terminus_pool_ids,
reward_amounts=args.reward_amounts,
rewards=args.rewards,
transaction_config=transaction_config,
)
print(result)
Expand Down Expand Up @@ -1327,13 +1301,7 @@ def generate_cli() -> argparse.ArgumentParser:
"--paths", required=True, help="Type: uint256[]", nargs="+"
)
set_path_rewards_parser.add_argument(
"--terminus-addresses", required=True, help="Type: address[]", nargs="+"
)
set_path_rewards_parser.add_argument(
"--terminus-pool-ids", required=True, help="Type: uint256[]", nargs="+"
)
set_path_rewards_parser.add_argument(
"--reward-amounts", required=True, help="Type: uint256[]", nargs="+"
"--rewards", required=True, help="Type: tuple[]", nargs="+"
)
set_path_rewards_parser.set_defaults(func=handle_set_path_rewards)

Expand Down Expand Up @@ -1409,13 +1377,7 @@ def generate_cli() -> argparse.ArgumentParser:
"--stages", required=True, help="Type: uint256[]", nargs="+"
)
set_stage_rewards_parser.add_argument(
"--terminus-addresses", required=True, help="Type: address[]", nargs="+"
)
set_stage_rewards_parser.add_argument(
"--terminus-pool-ids", required=True, help="Type: uint256[]", nargs="+"
)
set_stage_rewards_parser.add_argument(
"--reward-amounts", required=True, help="Type: uint256[]", nargs="+"
"--rewards", required=True, help="Type: tuple[]", nargs="+"
)
set_stage_rewards_parser.set_defaults(func=handle_set_stage_rewards)

Expand Down
Loading
Loading