setStakes -> authorizationIncreased

pull/3213/head
Kieran Prasch 2023-09-07 22:10:40 +02:00 committed by derekpierre
parent 56486f74df
commit 92278352f3
5 changed files with 15 additions and 11 deletions

View File

@ -48,8 +48,8 @@ def test_ursula_operator_confirmation(
# make an staking_providers and some stakes # make an staking_providers and some stakes
tx = threshold_staking.functions.setRoles(staking_provider).transact() tx = threshold_staking.functions.setRoles(staking_provider).transact()
testerchain.wait_for_receipt(tx) testerchain.wait_for_receipt(tx)
tx = threshold_staking.functions.setStakes( tx = threshold_staking.functions.authorizationIncreased(
staking_provider, min_authorization, 0, 0 staking_provider, 0, min_authorization
).transact() ).transact()
testerchain.wait_for_receipt(tx) testerchain.wait_for_receipt(tx)
@ -112,8 +112,8 @@ def test_ursula_operator_confirmation_autopilot(
# make an staking_providers and some stakes # make an staking_providers and some stakes
tx = threshold_staking.functions.setRoles(staking_provider2).transact() tx = threshold_staking.functions.setRoles(staking_provider2).transact()
testerchain.wait_for_receipt(tx) testerchain.wait_for_receipt(tx)
tx = threshold_staking.functions.setStakes( tx = threshold_staking.functions.authorizationIncreased(
staking_provider2, min_authorization, 0, 0 staking_provider2, 0, min_authorization
).transact() ).transact()
testerchain.wait_for_receipt(tx) testerchain.wait_for_receipt(tx)
@ -212,8 +212,8 @@ def test_work_tracker(
# make an staking_providers and some stakes # make an staking_providers and some stakes
tx = threshold_staking.functions.setRoles(staking_provider3).transact() tx = threshold_staking.functions.setRoles(staking_provider3).transact()
testerchain.wait_for_receipt(tx) testerchain.wait_for_receipt(tx)
tx = threshold_staking.functions.setStakes( tx = threshold_staking.functions.authorizationIncreased(
staking_provider3, min_authorization, 0, 0 staking_provider3, 0, min_authorization
).transact() ).transact()
testerchain.wait_for_receipt(tx) testerchain.wait_for_receipt(tx)

View File

@ -58,7 +58,9 @@ def test_staking_providers_and_operators_relationships(
staking_provider_account, operator_account, *other = testerchain.unassigned_accounts staking_provider_account, operator_account, *other = testerchain.unassigned_accounts
tx = threshold_staking.functions.setRoles(staking_provider_account).transact() tx = threshold_staking.functions.setRoles(staking_provider_account).transact()
testerchain.wait_for_receipt(tx) testerchain.wait_for_receipt(tx)
tx = threshold_staking.functions.setStakes(staking_provider_account, application_economics.min_authorization, 0, 0).transact() tx = threshold_staking.functions.authorizationIncreased(
staking_provider_account, 0, application_economics.min_authorization
).transact()
testerchain.wait_for_receipt(tx) testerchain.wait_for_receipt(tx)
# The staking provider hasn't bond an operator yet # The staking provider hasn't bond an operator yet

View File

@ -33,7 +33,9 @@ def test_sampling_distribution(testerchain, test_registry, threshold_staking, ap
# initialize threshold stake # initialize threshold stake
tx = threshold_staking.functions.setRoles(provider_address).transact() tx = threshold_staking.functions.setRoles(provider_address).transact()
testerchain.wait_for_receipt(tx) testerchain.wait_for_receipt(tx)
tx = threshold_staking.functions.setStakes(provider_address, amount, 0, 0).transact() tx = threshold_staking.functions.authorizationIncreased(
provider_address, 0, amount
).transact()
testerchain.wait_for_receipt(tx) testerchain.wait_for_receipt(tx)
power = TransactingPower(account=provider_address, signer=Web3Signer(testerchain.client)) power = TransactingPower(account=provider_address, signer=Web3Signer(testerchain.client))

View File

@ -112,8 +112,8 @@ def test_invalid_operators_tolerance(
min_authorization = application_economics.min_authorization min_authorization = application_economics.min_authorization
tx = threshold_staking.functions.setRoles(_staking_provider).transact() tx = threshold_staking.functions.setRoles(_staking_provider).transact()
testerchain.wait_for_receipt(tx) testerchain.wait_for_receipt(tx)
tx = threshold_staking.functions.setStakes( tx = threshold_staking.functions.authorizationIncreased(
_staking_provider, min_authorization, 0, 0 _staking_provider, 0, min_authorization
).transact() ).transact()
testerchain.wait_for_receipt(tx) testerchain.wait_for_receipt(tx)

View File

@ -59,7 +59,7 @@ def mock_funded_account_password_keystore(
tx = threshold_staking.functions.setRoles(provider_address).transact() tx = threshold_staking.functions.setRoles(provider_address).transact()
testerchain.wait_for_receipt(tx) testerchain.wait_for_receipt(tx)
tx = threshold_staking.functions.setStakes( tx = threshold_staking.functions.setStakes(
provider_address, application_economics.min_authorization, 0, 0 provider_address, 0, application_economics.min_authorization
).transact() ).transact()
testerchain.wait_for_receipt(tx) testerchain.wait_for_receipt(tx)