Closed t1lde closed 1 year ago
our workaround so far (from @newton-migosi).
the withdrawal & register cases both fail currently - due to missing redeemers (logs attached). I think this just needs to copy more of what MustMintValue does.
registration is tricky, as it would seem that the balancing needs to account for the registration deposit in the total transaction balance.
Thank you @t1lde ! This sketch as well ass as an example code would probably be enough for us to start working on it right away! Your help is highly appreciated
A comment to keep track of functionality we want.
mustRegisterStakePubKey :: forall i o. StakePubKeyHash -> TxConstraints i o
mustDelegateStakePubKey :: forall i o. StakePubKeyHash -> PoolPubKeyHash -> TxConstraints i o
mustWithdrawStakePubKey :: forall i o. StakePubKeyHash -> TxConstraints i o
mustDeregisterStakePubKey :: forall i o. StakePubKeyHash -> TxConstraints i o
mustRegisterStakeScript :: forall i o. StakeValidatorHash -> TxConstraints i o
mustDeregisterStakePlutusScript :: forall i o. PlutusScriptStakeValidator -> Redeemer -> TxConstraints i o
mustDelegateStakePlutusScript :: forall i o . PlutusScriptStakeValidator -> Redeemer -> PoolPubKeyHash -> TxConstraints i o
mustWithdrawStakePlutusScript :: forall i o. PlutusScriptStakeValidator -> Redeemer -> TxConstraints i o
- blocked by OgmiosDo we need these?
mustDeregisterStakeNativeScript :: forall i o. NativeScriptStakeValidator -> TxConstraints i o
mustDelegateStakeNativeScript :: forall i o . NaitveScriptStakeValidator -> PoolPubKeyHash -> TxConstraints i o
mustWithdrawStakeNativeScript :: forall i o. NativeScriptStakeValidator -> TxConstraints i o
- blocked by OgmiosmustRegisterPool :: forall i o. PoolRegistrationParams -> TxConstraints i o
mustRetirePool :: forall i o. PoolPubKeyHash -> Epoch -> TxConstraints i o
will we also get the accompanying query functions? something like cardano-cli query --stake-address-info
which gets the current delegations and reward accounts by stake address
@newton-migosi yes.
I plan to implement delegationsAndRewards
, poolIds
and poolParameters
queries from ogmios:
We need support for StakeValidators to implement a delegated-to StakeValidator that is used with the withdrawing-zero case. Currently, the
TxConstraints
APIs don't have any support for transactions which use StakeValidators (only the staking addresses).Possible Workaround by setting fields in UnattachedUnbalancedTx
It seems like we would be able to manually set the withdrawals, redeemers & scripts fields in the UnattachedUnbalancedTx, and Ogmios would handle the heavy-lifting in balancing afterwards? Is there anything else required to make StakeValidators work with
balanceTx
?APIs needed for withdrawing-zero StakeValidator
MustWithdraw
or similar constraint (+ ScriptLookups)Certificates
, as we can submit the other necessary transactions once with cardano-cliAPIs needed for other uses of StakeValidator
MustUseCertificate
, or similar constraint