use liqwid-nix 2.0
This commit is contained in:
parent
b6ab3762ce
commit
7e628328da
35 changed files with 458 additions and 564 deletions
|
|
@ -6,7 +6,7 @@ module Sample.AuthorityToken.UnauthorizedMintingExploit (
|
|||
|
||||
import Control.Exception (assert)
|
||||
import Plutarch.Context (input, mint, normalizeValue, output, script, withValue)
|
||||
import Plutarch.Extra.ScriptContext (validatorHashToTokenName)
|
||||
import Plutarch.Extra.ScriptContext (scriptHashToTokenName)
|
||||
import PlutusLedgerApi.V1.Value qualified as Value
|
||||
import Sample.Shared (authorityTokenPolicy, authorityTokenSymbol, minAda)
|
||||
import Test.Specification (SpecificationTree, testPolicy)
|
||||
|
|
@ -32,7 +32,7 @@ exploit (Parameters burntGAT mintedGAT) =
|
|||
gatValue hash =
|
||||
Value.singleton
|
||||
authorityTokenSymbol
|
||||
(validatorHashToTokenName hash)
|
||||
(scriptHashToTokenName hash)
|
||||
|
||||
mkGATUTxO hash =
|
||||
mconcat
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ module Sample.Effect.GovernorMutation (
|
|||
mkEffectTxInfo,
|
||||
effectValidator,
|
||||
effectValidatorAddress,
|
||||
effectValidatorHash,
|
||||
effectScriptHash,
|
||||
atAssetClass,
|
||||
govRef,
|
||||
effectRef,
|
||||
|
|
@ -20,9 +20,10 @@ import Agora.SafeMoney (AuthorityTokenTag)
|
|||
import Data.Default.Class (Default (def))
|
||||
import Data.Map ((!))
|
||||
import Data.Tagged (Tagged (..))
|
||||
import Plutarch.Api.V2 (validatorHash)
|
||||
import Plutarch.Api.V2 (scriptHash)
|
||||
import Plutarch.Extra.AssetClass (AssetClass (AssetClass), assetClassValue)
|
||||
import Plutarch.Extra.ScriptContext (validatorHashToTokenName)
|
||||
import Plutarch.Extra.ScriptContext (scriptHashToTokenName)
|
||||
import Plutarch.Script (Script)
|
||||
import PlutusLedgerApi.V1 qualified as Interval (always)
|
||||
import PlutusLedgerApi.V1.Address (scriptHashAddress)
|
||||
import PlutusLedgerApi.V1.Value qualified as Value (
|
||||
|
|
@ -32,14 +33,13 @@ import PlutusLedgerApi.V2 (
|
|||
Address,
|
||||
Datum (..),
|
||||
OutputDatum (OutputDatumHash),
|
||||
ScriptHash,
|
||||
ScriptPurpose (Spending),
|
||||
ToData (..),
|
||||
TxInInfo (..),
|
||||
TxInfo (..),
|
||||
TxOut (..),
|
||||
TxOutRef (TxOutRef),
|
||||
Validator (Validator),
|
||||
ValidatorHash (..),
|
||||
)
|
||||
import PlutusTx.AssocMap qualified as AssocMap
|
||||
import Sample.Shared (
|
||||
|
|
@ -54,22 +54,22 @@ import Sample.Shared (
|
|||
import Test.Util (datumPair, toDatumHash)
|
||||
|
||||
-- | The effect validator instance.
|
||||
effectValidator :: Validator
|
||||
effectValidator = Validator $ agoraScripts ! "agora:mutateGovernorValidator"
|
||||
effectValidator :: Script
|
||||
effectValidator = agoraScripts ! "agora:mutateGovernorValidator"
|
||||
|
||||
-- | The hash of the validator instance.
|
||||
effectValidatorHash :: ValidatorHash
|
||||
effectValidatorHash = validatorHash effectValidator
|
||||
effectScriptHash :: ScriptHash
|
||||
effectScriptHash = scriptHash effectValidator
|
||||
|
||||
-- | The address of the validator.
|
||||
effectValidatorAddress :: Address
|
||||
effectValidatorAddress = scriptHashAddress effectValidatorHash
|
||||
effectValidatorAddress = scriptHashAddress effectScriptHash
|
||||
|
||||
-- | The assetclass of the authority token.
|
||||
atAssetClass :: Tagged AuthorityTokenTag AssetClass
|
||||
atAssetClass = Tagged $ AssetClass authorityTokenSymbol tokenName
|
||||
where
|
||||
tokenName = validatorHashToTokenName effectValidatorHash
|
||||
tokenName = scriptHashToTokenName effectScriptHash
|
||||
|
||||
-- | The mock reference of the governor state UTXO.
|
||||
govRef :: TxOutRef
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ import Agora.Effect.TreasuryWithdrawal (
|
|||
TreasuryWithdrawalDatum (TreasuryWithdrawalDatum),
|
||||
)
|
||||
import Data.Map ((!))
|
||||
import Plutarch.Api.V2 (validatorHash)
|
||||
import Plutarch.Api.V2 (scriptHash)
|
||||
import Plutarch.Script (Script)
|
||||
import PlutusLedgerApi.V1.Interval qualified as Interval (always)
|
||||
import PlutusLedgerApi.V1.Value qualified as Value (singleton)
|
||||
import PlutusLedgerApi.V2 (
|
||||
|
|
@ -36,14 +37,13 @@ import PlutusLedgerApi.V2 (
|
|||
PubKeyHash,
|
||||
Redeemer (Redeemer),
|
||||
ScriptContext (..),
|
||||
ScriptHash (ScriptHash),
|
||||
ScriptPurpose (Spending),
|
||||
TokenName (TokenName),
|
||||
TxInInfo (TxInInfo),
|
||||
TxInfo (..),
|
||||
TxOut (..),
|
||||
TxOutRef (TxOutRef),
|
||||
Validator (Validator),
|
||||
ValidatorHash (ValidatorHash),
|
||||
Value,
|
||||
toBuiltinData,
|
||||
)
|
||||
|
|
@ -72,7 +72,7 @@ inputGAT =
|
|||
TxInInfo
|
||||
(TxOutRef "0b2086cbf8b6900f8cb65e012de4516cb66b5cb08a9aaba12a8b88be" 1)
|
||||
TxOut
|
||||
{ txOutAddress = Address (ScriptCredential $ validatorHash validator) Nothing
|
||||
{ txOutAddress = Address (ScriptCredential $ scriptHash validator) Nothing
|
||||
, txOutValue = Value.singleton currSymbol validatorHashTN 1 -- Stake ST
|
||||
, txOutDatum = OutputDatumHash (DatumHash "")
|
||||
, txOutReferenceScript = Nothing
|
||||
|
|
@ -147,12 +147,12 @@ buildReceiversOutputFromDatum (TreasuryWithdrawalDatum xs _) = f <$> xs
|
|||
}
|
||||
|
||||
-- | Effect validator instance.
|
||||
validator :: Validator
|
||||
validator = Validator $ agoraScripts ! "agora:treasuryWithdrawalValidator"
|
||||
validator :: Script
|
||||
validator = agoraScripts ! "agora:treasuryWithdrawalValidator"
|
||||
|
||||
-- | 'TokenName' that represents the hash of the 'Agora.Stake.Stake' validator.
|
||||
validatorHashTN :: TokenName
|
||||
validatorHashTN = let ValidatorHash vh = validatorHash validator in TokenName vh
|
||||
validatorHashTN = let ScriptHash hash = scriptHash validator in TokenName hash
|
||||
|
||||
buildScriptContext :: [TxInInfo] -> [TxOut] -> ScriptContext
|
||||
buildScriptContext inputs outputs =
|
||||
|
|
|
|||
|
|
@ -31,10 +31,8 @@ import Data.Default (Default (..))
|
|||
import Data.Map (Map, (!))
|
||||
import Data.Text (Text)
|
||||
import Optics (view)
|
||||
import Plutarch.Api.V2 (
|
||||
mintingPolicySymbol,
|
||||
validatorHash,
|
||||
)
|
||||
import Plutarch (Script)
|
||||
import Plutarch.Api.V2 (scriptHash)
|
||||
import Plutarch.Context (
|
||||
input,
|
||||
mint,
|
||||
|
|
@ -50,12 +48,10 @@ import Plutarch.Context (
|
|||
import PlutusLedgerApi.V1.Value (AssetClass (..))
|
||||
import PlutusLedgerApi.V1.Value qualified as Value
|
||||
import PlutusLedgerApi.V2 (
|
||||
CurrencySymbol,
|
||||
MintingPolicy (MintingPolicy),
|
||||
Script,
|
||||
CurrencySymbol (CurrencySymbol),
|
||||
ScriptHash,
|
||||
TxOutRef (TxOutRef),
|
||||
Validator (Validator),
|
||||
ValidatorHash,
|
||||
getScriptHash,
|
||||
)
|
||||
import Sample.Shared (
|
||||
deterministicTracingConfig,
|
||||
|
|
@ -128,20 +124,20 @@ scripts =
|
|||
governor
|
||||
)
|
||||
|
||||
govPolicy :: MintingPolicy
|
||||
govPolicy = MintingPolicy $ scripts ! "agora:governorPolicy"
|
||||
govPolicy :: Script
|
||||
govPolicy = scripts ! "agora:governorPolicy"
|
||||
|
||||
govValidator :: Validator
|
||||
govValidator = Validator $ scripts ! "agora:governorValidator"
|
||||
govValidator :: Script
|
||||
govValidator = scripts ! "agora:governorValidator"
|
||||
|
||||
govSymbol :: CurrencySymbol
|
||||
govSymbol = mintingPolicySymbol govPolicy
|
||||
govSymbol = CurrencySymbol . getScriptHash $ scriptHash govPolicy
|
||||
|
||||
govAssetClass :: AssetClass
|
||||
govAssetClass = AssetClass (govSymbol, "")
|
||||
|
||||
govValidatorHash :: ValidatorHash
|
||||
govValidatorHash = validatorHash govValidator
|
||||
govScriptHash :: ScriptHash
|
||||
govScriptHash = scriptHash govValidator
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -215,7 +211,7 @@ mintGST ps = builder
|
|||
else mempty
|
||||
in output $
|
||||
mconcat
|
||||
[ script govValidatorHash
|
||||
[ script govScriptHash
|
||||
, withValue governorValue
|
||||
, datum
|
||||
]
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@ import Agora.Governor (GovernorDatum (..), GovernorRedeemer (MutateGovernor))
|
|||
import Agora.Proposal (ProposalId (ProposalId), ProposalThresholds (..))
|
||||
import Data.Default (def)
|
||||
import Data.Map ((!))
|
||||
import Plutarch.Api.V2 (PMintingPolicy, mintingPolicySymbol, mkMintingPolicy, validatorHash)
|
||||
import Data.Text qualified as T
|
||||
import Plutarch (Script)
|
||||
import Plutarch.Api.V2 (PMintingPolicy, scriptHash)
|
||||
import Plutarch.Context (
|
||||
input,
|
||||
mint,
|
||||
|
|
@ -35,12 +37,9 @@ import Plutarch.Extra.AssetClass (assetClassValue)
|
|||
import Plutarch.Extra.ScriptContext (scriptHashToTokenName)
|
||||
import PlutusLedgerApi.V1.Value qualified as Value
|
||||
import PlutusLedgerApi.V2 (
|
||||
CurrencySymbol (CurrencySymbol),
|
||||
Data,
|
||||
ScriptHash (ScriptHash),
|
||||
ScriptHash,
|
||||
TxOutRef (TxOutRef),
|
||||
Validator (Validator),
|
||||
ValidatorHash,
|
||||
Value,
|
||||
toData,
|
||||
)
|
||||
|
|
@ -48,8 +47,8 @@ import Sample.Shared (
|
|||
agoraScripts,
|
||||
authorityTokenSymbol,
|
||||
governorAssetClass,
|
||||
governorScriptHash,
|
||||
governorValidator,
|
||||
governorValidatorHash,
|
||||
minAda,
|
||||
)
|
||||
import Test.Specification (SpecificationTree, testValidator)
|
||||
|
|
@ -151,14 +150,14 @@ mkGovernorBuilder ps =
|
|||
gstOutput =
|
||||
if ps.stealGST
|
||||
then pubKey $ head pubKeyHashes
|
||||
else script governorValidatorHash
|
||||
else script governorScriptHash
|
||||
withGSTDatum =
|
||||
maybe mempty withDatum $
|
||||
mkGovernorOutputDatum ps.governorOutputDatumValidity
|
||||
in mconcat
|
||||
[ input $
|
||||
mconcat
|
||||
[ script governorValidatorHash
|
||||
[ script governorScriptHash
|
||||
, withDatum governorInputDatum
|
||||
, withValue value
|
||||
, withRef governorRef
|
||||
|
|
@ -173,19 +172,18 @@ mkGovernorBuilder ps =
|
|||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
mockEffectValidator :: Validator
|
||||
mockEffectValidator = Validator $ agoraScripts ! "agora:noOpValidator"
|
||||
mockEffectValidator :: Script
|
||||
mockEffectValidator = agoraScripts ! "agora:noOpValidator"
|
||||
|
||||
mockEffectValidatorHash :: ValidatorHash
|
||||
mockEffectValidatorHash = validatorHash mockEffectValidator
|
||||
mockEffectScriptHash :: ScriptHash
|
||||
mockEffectScriptHash = scriptHash mockEffectValidator
|
||||
|
||||
mockAuthScript :: ClosedTerm PMintingPolicy
|
||||
mockAuthScript = plam $ \_ _ -> popaque $ pcon PUnit
|
||||
|
||||
mockAuthScriptHash :: ScriptHash
|
||||
mockAuthScriptHash =
|
||||
let CurrencySymbol h = mintingPolicySymbol $ mkMintingPolicy def mockAuthScript
|
||||
in ScriptHash h
|
||||
scriptHash . either (error . T.unpack) id $ compile def mockAuthScript
|
||||
|
||||
mkGATValue :: GATValidity -> Integer -> Value
|
||||
mkGATValue NoGAT _ = mempty
|
||||
|
|
@ -211,12 +209,12 @@ mkMockEffectBuilder ps =
|
|||
[ mint burnt
|
||||
, input $
|
||||
mconcat
|
||||
[ script mockEffectValidatorHash
|
||||
[ script mockEffectScriptHash
|
||||
, withValue inputValue
|
||||
]
|
||||
, output $
|
||||
mconcat
|
||||
[ script mockEffectValidatorHash
|
||||
[ script mockEffectScriptHash
|
||||
, withValue outputValue
|
||||
]
|
||||
]
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ import PlutusLedgerApi.V2 (
|
|||
PubKeyHash,
|
||||
ScriptHash,
|
||||
TxOutRef (TxOutRef),
|
||||
ValidatorHash,
|
||||
)
|
||||
import PlutusTx qualified
|
||||
import Sample.Proposal.Shared (
|
||||
|
|
@ -114,15 +113,15 @@ import Sample.Shared (
|
|||
authorityTokenSymbol,
|
||||
governor,
|
||||
governorAssetClass,
|
||||
governorScriptHash,
|
||||
governorValidator,
|
||||
governorValidatorHash,
|
||||
minAda,
|
||||
proposalAssetClass,
|
||||
proposalScriptHash,
|
||||
proposalValidator,
|
||||
proposalValidatorHash,
|
||||
signer,
|
||||
stakeAssetClass,
|
||||
stakeValidatorHash,
|
||||
stakeScriptHash,
|
||||
)
|
||||
import Test.Specification (
|
||||
SpecificationTree,
|
||||
|
|
@ -191,7 +190,7 @@ data AuthorityTokenParameters = forall
|
|||
, PIsData pdatum
|
||||
) =>
|
||||
AuthorityTokenParameters
|
||||
{ mintGATsFor :: ValidatorHash
|
||||
{ mintGATsFor :: ScriptHash
|
||||
-- ^ GATs will be minted and sent to the given group of effects.
|
||||
, carryDatum :: Maybe datum
|
||||
-- ^ The datum that GAT UTxOs will be carrying.
|
||||
|
|
@ -337,14 +336,14 @@ mkProposalBuilder ps =
|
|||
in mconcat
|
||||
[ input $
|
||||
mconcat
|
||||
[ script proposalValidatorHash
|
||||
[ script proposalScriptHash
|
||||
, withRef proposalRef
|
||||
, withDatum (mkProposalInputDatum ps)
|
||||
, withValue value
|
||||
]
|
||||
, output $
|
||||
mconcat
|
||||
[ script proposalValidatorHash
|
||||
[ script proposalScriptHash
|
||||
, withDatum (mkProposalOutputDatum ps)
|
||||
, withValue value
|
||||
]
|
||||
|
|
@ -402,7 +401,7 @@ mkStakeBuilder ps =
|
|||
[ withSig
|
||||
, referenceInput $
|
||||
mconcat
|
||||
[ script stakeValidatorHash
|
||||
[ script stakeScriptHash
|
||||
, withRef (mkStakeRef idx)
|
||||
, withValue perStakeValue
|
||||
, withInlineDatum i
|
||||
|
|
@ -450,7 +449,7 @@ mkGovernorBuilder ps@(GovernorParameters _ redeemer) =
|
|||
in mconcat
|
||||
[ input $
|
||||
mconcat
|
||||
[ script governorValidatorHash
|
||||
[ script governorScriptHash
|
||||
, withValue value
|
||||
, withRef governorRef
|
||||
, withDatum governorInputDatum
|
||||
|
|
@ -458,7 +457,7 @@ mkGovernorBuilder ps@(GovernorParameters _ redeemer) =
|
|||
]
|
||||
, output $
|
||||
mconcat
|
||||
[ script governorValidatorHash
|
||||
[ script governorScriptHash
|
||||
, withValue value
|
||||
, withRef governorRef
|
||||
, withDatum (mkGovernorOutputDatum ps)
|
||||
|
|
|
|||
|
|
@ -76,11 +76,11 @@ import Sample.Shared (
|
|||
governor,
|
||||
minAda,
|
||||
proposalAssetClass,
|
||||
proposalScriptHash,
|
||||
proposalValidator,
|
||||
proposalValidatorHash,
|
||||
stakeAssetClass,
|
||||
stakeScriptHash,
|
||||
stakeValidator,
|
||||
stakeValidatorHash,
|
||||
)
|
||||
import Test.Specification (
|
||||
SpecificationTree,
|
||||
|
|
@ -248,7 +248,7 @@ cosign ps = builder
|
|||
mconcat
|
||||
[ input $
|
||||
mconcat
|
||||
[ script stakeValidatorHash
|
||||
[ script stakeScriptHash
|
||||
, withValue stakeValue
|
||||
, withInlineDatum stakeInputDatum
|
||||
, withRef stakeRef
|
||||
|
|
@ -256,7 +256,7 @@ cosign ps = builder
|
|||
]
|
||||
, output $
|
||||
mconcat
|
||||
[ script stakeValidatorHash
|
||||
[ script stakeScriptHash
|
||||
, withValue stakeValue
|
||||
, withInlineDatum stakeOutputDatum
|
||||
]
|
||||
|
|
@ -275,7 +275,7 @@ cosign ps = builder
|
|||
mconcat
|
||||
[ input $
|
||||
mconcat
|
||||
[ script proposalValidatorHash
|
||||
[ script proposalScriptHash
|
||||
, withValue proposalValue
|
||||
, withDatum proposalInputDatum
|
||||
, withRef proposalRef
|
||||
|
|
@ -283,7 +283,7 @@ cosign ps = builder
|
|||
]
|
||||
, output $
|
||||
mconcat
|
||||
[ script proposalValidatorHash
|
||||
[ script proposalScriptHash
|
||||
, withValue proposalValue
|
||||
, withDatum proposalOutputDatum
|
||||
]
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ import Plutarch.Context (
|
|||
withValue,
|
||||
)
|
||||
import Plutarch.Extra.AssetClass (assetClassValue)
|
||||
import Plutarch.Extra.ScriptContext (validatorHashToTokenName)
|
||||
import Plutarch.Extra.ScriptContext (scriptHashToTokenName)
|
||||
import PlutusLedgerApi.V1.Value qualified as Value
|
||||
import PlutusLedgerApi.V2 (
|
||||
Credential (PubKeyCredential),
|
||||
|
|
@ -86,20 +86,20 @@ import Sample.Proposal.Shared (stakeTxRef)
|
|||
import Sample.Shared (
|
||||
governor,
|
||||
governorAssetClass,
|
||||
governorScriptHash,
|
||||
governorValidator,
|
||||
governorValidatorHash,
|
||||
minAda,
|
||||
proposalAssetClass,
|
||||
proposalPolicy,
|
||||
proposalPolicySymbol,
|
||||
proposalScriptHash,
|
||||
proposalStartingTimeFromTimeRange,
|
||||
proposalValidatorHash,
|
||||
signer,
|
||||
signer2,
|
||||
stakeAssetClass,
|
||||
stakeScriptHash,
|
||||
stakeSymbol,
|
||||
stakeValidator,
|
||||
stakeValidatorHash,
|
||||
)
|
||||
import Test.Specification (SpecificationTree, group, testPolicy, testValidator)
|
||||
import Test.Util (
|
||||
|
|
@ -319,7 +319,7 @@ createProposal ps = builder
|
|||
, withValue $
|
||||
Value.singleton
|
||||
stakeSymbol
|
||||
(validatorHashToTokenName attacker)
|
||||
(scriptHashToTokenName attacker)
|
||||
1
|
||||
, withDatum $
|
||||
(mkStakeInputDatum ps)
|
||||
|
|
@ -363,7 +363,7 @@ createProposal ps = builder
|
|||
timeRange $ mkTimeRange ps
|
||||
, input $
|
||||
mconcat
|
||||
[ script governorValidatorHash
|
||||
[ script governorScriptHash
|
||||
, withValue governorValue
|
||||
, withDatum governorInputDatum
|
||||
, withRedeemer ps.governorRedeemer
|
||||
|
|
@ -371,7 +371,7 @@ createProposal ps = builder
|
|||
]
|
||||
, output $
|
||||
mconcat
|
||||
[ script governorValidatorHash
|
||||
[ script governorScriptHash
|
||||
, withValue governorValue
|
||||
, withDatum (mkGovernorOutputDatum ps)
|
||||
]
|
||||
|
|
@ -385,7 +385,7 @@ createProposal ps = builder
|
|||
, withValue $
|
||||
Value.singleton
|
||||
stakeSymbol
|
||||
(validatorHashToTokenName attacker)
|
||||
(scriptHashToTokenName attacker)
|
||||
1
|
||||
, withDatum $
|
||||
(mkStakeInputDatum ps)
|
||||
|
|
@ -397,14 +397,14 @@ createProposal ps = builder
|
|||
mconcat
|
||||
[ input $
|
||||
mconcat
|
||||
[ script stakeValidatorHash
|
||||
[ script stakeScriptHash
|
||||
, withValue stakeValue
|
||||
, withDatum (mkStakeInputDatum ps)
|
||||
, withRef stakeRef
|
||||
]
|
||||
, output $
|
||||
mconcat
|
||||
[ script stakeValidatorHash
|
||||
[ script stakeScriptHash
|
||||
, withValue stakeValue
|
||||
, withDatum (mkStakeOutputDatum ps)
|
||||
]
|
||||
|
|
@ -412,7 +412,7 @@ createProposal ps = builder
|
|||
, ---
|
||||
output $
|
||||
mconcat
|
||||
[ script proposalValidatorHash
|
||||
[ script proposalScriptHash
|
||||
, withValue proposalValue
|
||||
, withDatum (mkProposalOutputDatum ps)
|
||||
]
|
||||
|
|
|
|||
|
|
@ -49,11 +49,11 @@ import Sample.Proposal.Shared (proposalTxRef, stakeTxRef)
|
|||
import Sample.Shared (
|
||||
minAda,
|
||||
proposalAssetClass,
|
||||
proposalScriptHash,
|
||||
proposalValidator,
|
||||
proposalValidatorHash,
|
||||
stakeAssetClass,
|
||||
stakeScriptHash,
|
||||
stakeValidator,
|
||||
stakeValidatorHash,
|
||||
)
|
||||
import Test.Specification (SpecificationTree, group, testValidator)
|
||||
import Test.Util (CombinableBuilder, closedBoundedInterval, mkSpending, pubKeyHashes)
|
||||
|
|
@ -166,7 +166,7 @@ privilegeEscalate op =
|
|||
mconcat @b
|
||||
[ input $
|
||||
mconcat
|
||||
[ script stakeValidatorHash
|
||||
[ script stakeScriptHash
|
||||
, withDatum stakeInput
|
||||
, withValue stakeValue
|
||||
, withRef $ mkStakeRef index
|
||||
|
|
@ -174,7 +174,7 @@ privilegeEscalate op =
|
|||
]
|
||||
, output $
|
||||
mconcat
|
||||
[ script stakeValidatorHash
|
||||
[ script stakeScriptHash
|
||||
, withDatum stakeOutput
|
||||
, withValue stakeValue
|
||||
]
|
||||
|
|
@ -196,7 +196,7 @@ privilegeEscalate op =
|
|||
mconcat @b
|
||||
[ input $
|
||||
mconcat
|
||||
[ script proposalValidatorHash
|
||||
[ script proposalScriptHash
|
||||
, withDatum proposalInput
|
||||
, withRedeemer $ mkProposalRedeemer op
|
||||
, withValue proposalValue
|
||||
|
|
@ -204,7 +204,7 @@ privilegeEscalate op =
|
|||
]
|
||||
, output $
|
||||
mconcat
|
||||
[ script proposalValidatorHash
|
||||
[ script proposalScriptHash
|
||||
, withDatum proposalOutput
|
||||
, withValue proposalValue
|
||||
]
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ import Plutarch.Context (
|
|||
withValue,
|
||||
)
|
||||
import Plutarch.Extra.AssetClass (assetClassValue)
|
||||
import Plutarch.Extra.ScriptContext (validatorHashToTokenName)
|
||||
import Plutarch.Extra.ScriptContext (scriptHashToTokenName)
|
||||
import PlutusLedgerApi.V1.Value qualified as Value
|
||||
import PlutusLedgerApi.V2 (
|
||||
Credential (PubKeyCredential),
|
||||
|
|
@ -85,11 +85,11 @@ import Sample.Shared (
|
|||
governor,
|
||||
minAda,
|
||||
proposalAssetClass,
|
||||
proposalScriptHash,
|
||||
proposalValidator,
|
||||
proposalValidatorHash,
|
||||
stakeScriptHash,
|
||||
stakeSymbol,
|
||||
stakeValidator,
|
||||
stakeValidatorHash,
|
||||
)
|
||||
import Test.Specification (SpecificationTree, group, testValidator)
|
||||
import Test.Util (CombinableBuilder, closedBoundedInterval, mkSpending, pubKeyHashes)
|
||||
|
|
@ -282,7 +282,7 @@ unlock ps = builder
|
|||
mconcat
|
||||
[ input $
|
||||
mconcat
|
||||
[ script proposalValidatorHash
|
||||
[ script proposalScriptHash
|
||||
, withValue proposalValue
|
||||
, withDatum proposalInputDatum
|
||||
, withRef proposalRef
|
||||
|
|
@ -290,7 +290,7 @@ unlock ps = builder
|
|||
]
|
||||
, output $
|
||||
mconcat
|
||||
[ script proposalValidatorHash
|
||||
[ script proposalScriptHash
|
||||
, withValue proposalValue
|
||||
, withDatum proposalOutputDatum
|
||||
]
|
||||
|
|
@ -299,7 +299,7 @@ unlock ps = builder
|
|||
---
|
||||
|
||||
sstName = case ps.stakeParameters.sstOwner of
|
||||
StakeValidator -> validatorHashToTokenName stakeValidatorHash
|
||||
StakeValidator -> scriptHashToTokenName stakeScriptHash
|
||||
_ -> ""
|
||||
|
||||
sst = Value.singleton stakeSymbol sstName 1
|
||||
|
|
@ -350,14 +350,14 @@ unlock ps = builder
|
|||
mconcat
|
||||
[ input $
|
||||
mconcat
|
||||
[ script stakeValidatorHash
|
||||
[ script stakeScriptHash
|
||||
, withValue stakeInputValue
|
||||
, withDatum stakeInputDatum
|
||||
, withRef $ mkStakeRef i
|
||||
]
|
||||
, output $
|
||||
mconcat
|
||||
[ script stakeValidatorHash
|
||||
[ script stakeScriptHash
|
||||
, withValue stakeOutputValue
|
||||
, withDatum stakeOutputDatum
|
||||
]
|
||||
|
|
|
|||
|
|
@ -76,11 +76,11 @@ import Sample.Shared (
|
|||
governor,
|
||||
minAda,
|
||||
proposalAssetClass,
|
||||
proposalScriptHash,
|
||||
proposalValidator,
|
||||
proposalValidatorHash,
|
||||
stakeAssetClass,
|
||||
stakeScriptHash,
|
||||
stakeValidator,
|
||||
stakeValidatorHash,
|
||||
)
|
||||
import Test.Specification (SpecificationTree, group, testValidator)
|
||||
import Test.Util (
|
||||
|
|
@ -297,7 +297,7 @@ vote params =
|
|||
mconcat
|
||||
[ input $
|
||||
mconcat
|
||||
[ script stakeValidatorHash
|
||||
[ script stakeScriptHash
|
||||
, withValue stakeInputValue
|
||||
, withInlineDatum $ mixOwner i stakeInputDatum
|
||||
, withRedeemer stakeRedeemer
|
||||
|
|
@ -308,7 +308,7 @@ vote params =
|
|||
else
|
||||
output $
|
||||
mconcat
|
||||
[ script stakeValidatorHash
|
||||
[ script stakeScriptHash
|
||||
, withValue stakeOutputValue
|
||||
, withInlineDatum $ mixOwner i stakeOutputDatum
|
||||
]
|
||||
|
|
@ -353,7 +353,7 @@ vote params =
|
|||
mconcat
|
||||
[ input $
|
||||
mconcat
|
||||
[ script proposalValidatorHash
|
||||
[ script proposalScriptHash
|
||||
, withValue proposalValue
|
||||
, withRedeemer proposalRedeemer
|
||||
, withInlineDatum proposalInputDatum
|
||||
|
|
@ -361,7 +361,7 @@ vote params =
|
|||
]
|
||||
, output $
|
||||
mconcat
|
||||
[ script proposalValidatorHash
|
||||
[ script proposalScriptHash
|
||||
, withValue proposalValue
|
||||
, withInlineDatum proposalOutputDatum
|
||||
]
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ module Sample.Shared (
|
|||
stakeAssetClass,
|
||||
stakePolicy,
|
||||
stakeValidator,
|
||||
stakeValidatorHash,
|
||||
stakeScriptHash,
|
||||
stakeAddress,
|
||||
stakeSymbol,
|
||||
|
||||
|
|
@ -35,14 +35,14 @@ module Sample.Shared (
|
|||
governorSymbol,
|
||||
governorAssetClass,
|
||||
governorValidatorAddress,
|
||||
governorValidatorHash,
|
||||
governorScriptHash,
|
||||
gstUTXORef,
|
||||
|
||||
-- ** Proposal
|
||||
proposalPolicy,
|
||||
proposalPolicySymbol,
|
||||
proposalValidator,
|
||||
proposalValidatorHash,
|
||||
proposalScriptHash,
|
||||
proposalValidatorAddress,
|
||||
proposalStartingTimeFromTimeRange,
|
||||
proposalAssetClass,
|
||||
|
|
@ -77,13 +77,10 @@ import Data.Map (Map, (!))
|
|||
import Data.Tagged (Tagged (..))
|
||||
import Data.Text (Text)
|
||||
import Optics (view)
|
||||
import Plutarch (Config (..), TracingMode (DetTracing))
|
||||
import Plutarch.Api.V2 (
|
||||
mintingPolicySymbol,
|
||||
validatorHash,
|
||||
)
|
||||
import Plutarch (Config (..), Script, TracingMode (DetTracing))
|
||||
import Plutarch.Api.V1 (scriptHash)
|
||||
import Plutarch.Extra.AssetClass (AssetClass (AssetClass))
|
||||
import Plutarch.Extra.ScriptContext (validatorHashToTokenName)
|
||||
import Plutarch.Extra.ScriptContext (scriptHashToTokenName)
|
||||
import PlutusLedgerApi.V1.Address (scriptHashAddress)
|
||||
import PlutusLedgerApi.V1.Value (TokenName, Value)
|
||||
import PlutusLedgerApi.V1.Value qualified as Value (
|
||||
|
|
@ -92,16 +89,15 @@ import PlutusLedgerApi.V1.Value qualified as Value (
|
|||
import PlutusLedgerApi.V2 (
|
||||
Address (Address),
|
||||
Credential (ScriptCredential),
|
||||
CurrencySymbol,
|
||||
CurrencySymbol (CurrencySymbol),
|
||||
Extended (..),
|
||||
Interval (..),
|
||||
LowerBound (..),
|
||||
MintingPolicy (..),
|
||||
OutputDatum (NoOutputDatum),
|
||||
POSIXTimeRange,
|
||||
PubKeyHash,
|
||||
Redeemer (..),
|
||||
Script,
|
||||
ScriptHash (getScriptHash),
|
||||
ToData (toBuiltinData),
|
||||
TxOut (
|
||||
TxOut,
|
||||
|
|
@ -112,8 +108,6 @@ import PlutusLedgerApi.V2 (
|
|||
),
|
||||
TxOutRef (TxOutRef),
|
||||
UpperBound (..),
|
||||
Validator (Validator),
|
||||
ValidatorHash (ValidatorHash),
|
||||
)
|
||||
import PlutusTx qualified
|
||||
import ScriptExport.ScriptInfo (runLinker)
|
||||
|
|
@ -146,50 +140,50 @@ agoraScripts =
|
|||
governor
|
||||
)
|
||||
|
||||
stakePolicy :: MintingPolicy
|
||||
stakePolicy = MintingPolicy $ agoraScripts ! "agora:stakePolicy"
|
||||
stakePolicy :: Script
|
||||
stakePolicy = agoraScripts ! "agora:stakePolicy"
|
||||
|
||||
stakeSymbol :: CurrencySymbol
|
||||
stakeSymbol = mintingPolicySymbol stakePolicy
|
||||
stakeSymbol = CurrencySymbol . getScriptHash $ scriptHash stakePolicy
|
||||
|
||||
stakeAssetClass :: Tagged StakeSTTag AssetClass
|
||||
stakeAssetClass = Tagged $ AssetClass stakeSymbol (validatorHashToTokenName stakeValidatorHash)
|
||||
stakeAssetClass = Tagged $ AssetClass stakeSymbol (scriptHashToTokenName stakeScriptHash)
|
||||
|
||||
stakeValidator :: Validator
|
||||
stakeValidator = Validator $ agoraScripts ! "agora:stakeValidator"
|
||||
stakeValidator :: Script
|
||||
stakeValidator = agoraScripts ! "agora:stakeValidator"
|
||||
|
||||
stakeValidatorHash :: ValidatorHash
|
||||
stakeValidatorHash = validatorHash stakeValidator
|
||||
stakeScriptHash :: ScriptHash
|
||||
stakeScriptHash = scriptHash stakeValidator
|
||||
|
||||
stakeAddress :: Address
|
||||
stakeAddress = Address (ScriptCredential stakeValidatorHash) Nothing
|
||||
stakeAddress = Address (ScriptCredential stakeScriptHash) Nothing
|
||||
|
||||
gstUTXORef :: TxOutRef
|
||||
gstUTXORef = TxOutRef "f28cd7145c24e66fd5bcd2796837aeb19a48a2656e7833c88c62a2d0450bd00d" 0
|
||||
|
||||
governorPolicy :: MintingPolicy
|
||||
governorPolicy = MintingPolicy $ agoraScripts ! "agora:governorPolicy"
|
||||
governorPolicy :: Script
|
||||
governorPolicy = agoraScripts ! "agora:governorPolicy"
|
||||
|
||||
governorValidator :: Validator
|
||||
governorValidator = Validator $ agoraScripts ! "agora:governorValidator"
|
||||
governorValidator :: Script
|
||||
governorValidator = agoraScripts ! "agora:governorValidator"
|
||||
|
||||
governorSymbol :: CurrencySymbol
|
||||
governorSymbol = mintingPolicySymbol governorPolicy
|
||||
governorSymbol = CurrencySymbol . getScriptHash $ scriptHash governorPolicy
|
||||
|
||||
governorAssetClass :: Tagged GovernorSTTag AssetClass
|
||||
governorAssetClass = Tagged $ AssetClass governorSymbol ""
|
||||
|
||||
governorValidatorHash :: ValidatorHash
|
||||
governorValidatorHash = validatorHash governorValidator
|
||||
governorScriptHash :: ScriptHash
|
||||
governorScriptHash = scriptHash governorValidator
|
||||
|
||||
governorValidatorAddress :: Address
|
||||
governorValidatorAddress = scriptHashAddress governorValidatorHash
|
||||
governorValidatorAddress = scriptHashAddress governorScriptHash
|
||||
|
||||
proposalPolicy :: MintingPolicy
|
||||
proposalPolicy = MintingPolicy $ agoraScripts ! "agora:proposalPolicy"
|
||||
proposalPolicy :: Script
|
||||
proposalPolicy = agoraScripts ! "agora:proposalPolicy"
|
||||
|
||||
proposalPolicySymbol :: CurrencySymbol
|
||||
proposalPolicySymbol = mintingPolicySymbol proposalPolicy
|
||||
proposalPolicySymbol = CurrencySymbol . getScriptHash $ scriptHash proposalPolicy
|
||||
|
||||
proposalAssetClass :: Tagged ProposalSTTag AssetClass
|
||||
proposalAssetClass = Tagged $ AssetClass proposalPolicySymbol ""
|
||||
|
|
@ -202,14 +196,14 @@ signer = "8a30896c4fd5e79843e4ca1bd2cdbaa36f8c0bc3be7401214142019c"
|
|||
signer2 :: PubKeyHash
|
||||
signer2 = "8a30896c4fd5e79843e4ca1bd2cdbaa36f8c0bc3be74012141420192"
|
||||
|
||||
proposalValidator :: Validator
|
||||
proposalValidator = Validator $ agoraScripts ! "agora:proposalValidator"
|
||||
proposalValidator :: Script
|
||||
proposalValidator = agoraScripts ! "agora:proposalValidator"
|
||||
|
||||
proposalValidatorHash :: ValidatorHash
|
||||
proposalValidatorHash = validatorHash proposalValidator
|
||||
proposalScriptHash :: ScriptHash
|
||||
proposalScriptHash = scriptHash proposalValidator
|
||||
|
||||
proposalValidatorAddress :: Address
|
||||
proposalValidatorAddress = scriptHashAddress proposalValidatorHash
|
||||
proposalValidatorAddress = scriptHashAddress proposalScriptHash
|
||||
|
||||
{- | Default value of 'Agora.Proposal.ProposalThresholds'.
|
||||
For testing purpose only.
|
||||
|
|
@ -224,11 +218,11 @@ instance Default ProposalThresholds where
|
|||
, cosign = Tagged 100
|
||||
}
|
||||
|
||||
authorityTokenPolicy :: MintingPolicy
|
||||
authorityTokenPolicy = MintingPolicy $ agoraScripts ! "agora:authorityTokenPolicy"
|
||||
authorityTokenPolicy :: Script
|
||||
authorityTokenPolicy = agoraScripts ! "agora:authorityTokenPolicy"
|
||||
|
||||
authorityTokenSymbol :: CurrencySymbol
|
||||
authorityTokenSymbol = mintingPolicySymbol authorityTokenPolicy
|
||||
authorityTokenSymbol = CurrencySymbol . getScriptHash $ scriptHash authorityTokenPolicy
|
||||
|
||||
{- | Default value of 'Agora.Governor.GovernorDatum.proposalTimings'.
|
||||
For testing purpose only.
|
||||
|
|
@ -279,32 +273,30 @@ treasuryOut =
|
|||
gatCs :: CurrencySymbol
|
||||
gatCs = authorityTokenSymbol
|
||||
|
||||
trValidator :: Validator
|
||||
trValidator = Validator $ agoraScripts ! "agora:treasuryValidator"
|
||||
trValidator :: Script
|
||||
trValidator = agoraScripts ! "agora:treasuryValidator"
|
||||
|
||||
-- | `ScriptCredential` used for the dummy treasury validator.
|
||||
trCredential :: Credential
|
||||
trCredential = ScriptCredential $ validatorHash trValidator
|
||||
trCredential = ScriptCredential $ scriptHash trValidator
|
||||
|
||||
-- | `TokenName` for GAT generated from address of `mockTrEffect`.
|
||||
gatTn :: TokenName
|
||||
gatTn = validatorHashToTokenName $ validatorHash mockTrEffect
|
||||
gatTn = scriptHashToTokenName $ scriptHash mockTrEffect
|
||||
|
||||
-- | Mock treasury effect script, used for testing.
|
||||
mockTrEffect :: Validator
|
||||
mockTrEffect = Validator $ agoraScripts ! "agora:noOpValidator"
|
||||
mockTrEffect :: Script
|
||||
mockTrEffect = agoraScripts ! "agora:noOpValidator"
|
||||
|
||||
-- | Mock treasury effect validator hash
|
||||
mockTrEffectHash :: ValidatorHash
|
||||
mockTrEffectHash = validatorHash mockTrEffect
|
||||
mockTrEffectHash :: ScriptHash
|
||||
mockTrEffectHash = scriptHash mockTrEffect
|
||||
|
||||
{- | A SHA-256 hash which (in all certainty) should not match the
|
||||
hash of the dummy effect script.
|
||||
-}
|
||||
wrongEffHash :: ValidatorHash
|
||||
wrongEffHash =
|
||||
ValidatorHash
|
||||
"a21bc4a1d95600f9fa0a00b97ed0fa49a152a72de76253cb706f90b4b40f837b"
|
||||
wrongEffHash :: ScriptHash
|
||||
wrongEffHash = "a21bc4a1d95600f9fa0a00b97ed0fa49a152a72de76253cb706f90b4b40f837b"
|
||||
|
||||
------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ import Sample.Shared (
|
|||
governor,
|
||||
signer,
|
||||
stakeAssetClass,
|
||||
stakeScriptHash,
|
||||
stakeSymbol,
|
||||
stakeValidatorHash,
|
||||
)
|
||||
import Test.Util (sortValue)
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ stakeDepositWithdraw config =
|
|||
, signedWith signer
|
||||
, input $
|
||||
mconcat
|
||||
[ script stakeValidatorHash
|
||||
[ script stakeScriptHash
|
||||
, withValue
|
||||
( sortValue $
|
||||
st
|
||||
|
|
@ -88,7 +88,7 @@ stakeDepositWithdraw config =
|
|||
]
|
||||
, output $
|
||||
mconcat
|
||||
[ script stakeValidatorHash
|
||||
[ script stakeScriptHash
|
||||
, withValue
|
||||
( sortValue $
|
||||
st
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import Plutarch.Context (
|
|||
withValue,
|
||||
)
|
||||
import Plutarch.Extra.AssetClass (assetClassValue)
|
||||
import Plutarch.Extra.ScriptContext (validatorHashToTokenName)
|
||||
import Plutarch.Extra.ScriptContext (scriptHashToTokenName)
|
||||
import Plutarch.Lift (PUnsafeLiftDecl (PLifted))
|
||||
import PlutusLedgerApi.V1.Value qualified as Value
|
||||
import PlutusLedgerApi.V2 (
|
||||
|
|
@ -49,8 +49,8 @@ import Sample.Shared (
|
|||
signer,
|
||||
signer2,
|
||||
stakePolicy,
|
||||
stakeScriptHash,
|
||||
stakeSymbol,
|
||||
stakeValidatorHash,
|
||||
)
|
||||
import Test.Specification (SpecificationTree, testPolicy)
|
||||
import Test.Util (CombinableBuilder, mkMinting, validatorHashes)
|
||||
|
|
@ -93,7 +93,7 @@ create ps@Parameters {stakeDatum} =
|
|||
sstName =
|
||||
if ps.invalidSSTName
|
||||
then "114514"
|
||||
else validatorHashToTokenName stakeValidatorHash
|
||||
else scriptHashToTokenName stakeScriptHash
|
||||
|
||||
sst = Value.singleton stakeSymbol sstName 1
|
||||
|
||||
|
|
@ -105,7 +105,7 @@ create ps@Parameters {stakeDatum} =
|
|||
|
||||
stakeBuilder =
|
||||
mconcat
|
||||
[ script stakeValidatorHash
|
||||
[ script stakeScriptHash
|
||||
, withValue $ normalizeValue $ sst <> perStakeGTs
|
||||
, withStakeDatum
|
||||
]
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ import Sample.Shared (
|
|||
signer2,
|
||||
stakeAssetClass,
|
||||
stakePolicy,
|
||||
stakeScriptHash,
|
||||
stakeSymbol,
|
||||
stakeValidator,
|
||||
stakeValidatorHash,
|
||||
)
|
||||
import Test.Specification (
|
||||
SpecificationTree,
|
||||
|
|
@ -125,7 +125,7 @@ destroy ps =
|
|||
|
||||
stakeUTxOTemplate =
|
||||
mconcat
|
||||
[ script stakeValidatorHash
|
||||
[ script stakeScriptHash
|
||||
, withDatum stakeInputDatum
|
||||
, withValue $ normalizeValue $ sst <> minAda
|
||||
]
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ import Sample.Shared (
|
|||
signer,
|
||||
signer2,
|
||||
stakeAssetClass,
|
||||
stakeScriptHash,
|
||||
stakeValidator,
|
||||
stakeValidatorHash,
|
||||
)
|
||||
import Test.Specification (SpecificationTree, testValidator)
|
||||
import Test.Util (pubKeyHashes, sortValue)
|
||||
|
|
@ -132,14 +132,14 @@ setDelegate ps = buildSpending' builder
|
|||
, signedWith signer
|
||||
, input $
|
||||
mconcat
|
||||
[ script stakeValidatorHash
|
||||
[ script stakeScriptHash
|
||||
, withValue stakeValue
|
||||
, withDatum stakeInput
|
||||
, withRef stakeRef
|
||||
]
|
||||
, output $
|
||||
mconcat
|
||||
[ script stakeValidatorHash
|
||||
[ script stakeScriptHash
|
||||
, withValue stakeValue
|
||||
, withDatum stakeOutput
|
||||
]
|
||||
|
|
|
|||
|
|
@ -13,14 +13,14 @@ import Plutarch.Context (
|
|||
withValue,
|
||||
)
|
||||
import Plutarch.Extra.AssetClass (assetClassValue)
|
||||
import Plutarch.Extra.ScriptContext (validatorHashToTokenName)
|
||||
import Plutarch.Extra.ScriptContext (scriptHashToTokenName)
|
||||
import PlutusLedgerApi.V1.Value qualified as Value
|
||||
import Sample.Shared (
|
||||
minAda,
|
||||
stakeAssetClass,
|
||||
stakePolicy,
|
||||
stakeScriptHash,
|
||||
stakeSymbol,
|
||||
stakeValidatorHash,
|
||||
)
|
||||
import Test.Specification (SpecificationTree, testPolicy)
|
||||
import Test.Util (
|
||||
|
|
@ -51,7 +51,7 @@ exploit (Parameters inputSST) =
|
|||
, mint sst
|
||||
, output $
|
||||
mconcat
|
||||
[ script stakeValidatorHash
|
||||
[ script stakeScriptHash
|
||||
, withValue $
|
||||
normalizeValue $
|
||||
minAda <> sst
|
||||
|
|
@ -63,7 +63,7 @@ exploit (Parameters inputSST) =
|
|||
fakeSSTValue =
|
||||
Value.singleton
|
||||
stakeSymbol
|
||||
(validatorHashToTokenName attacker)
|
||||
(scriptHashToTokenName attacker)
|
||||
. fromIntegral
|
||||
|
||||
sst = assetClassValue stakeAssetClass 1
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ import PlutusLedgerApi.V2 (
|
|||
Credential (PubKeyCredential),
|
||||
OutputDatum (NoOutputDatum),
|
||||
PubKeyHash (PubKeyHash),
|
||||
ValidatorHash (ValidatorHash),
|
||||
ScriptHash (ScriptHash),
|
||||
)
|
||||
import PlutusLedgerApi.V2.Contexts (
|
||||
ScriptContext (..),
|
||||
|
|
@ -101,7 +101,7 @@ treasuryRef =
|
|||
-}
|
||||
walletIn :: TxInInfo
|
||||
walletIn =
|
||||
let (ValidatorHash addressBs) = mockTrEffectHash
|
||||
let (ScriptHash addressBs) = mockTrEffectHash
|
||||
in TxInInfo
|
||||
{ txInInfoOutRef =
|
||||
TxOutRef
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue