Use liqwid-script-export
commit ec70bfd539fe2e27fd48f5f76395400287ac72d7
Author: Seungheon Oh <seungheon.ooh@gmail.com>
Date: Tue Oct 18 18:58:59 2022 -0500
use LSE
commit 25fff9b3ad1f2dde4cd7cf36977530b06a87d23c
Merge: 01cd3aa a5567ea
Author: Seungheon Oh <seungheon.ooh@gmail.com>
Date: Tue Oct 18 18:17:45 2022 -0500
Merge branch 'staging' into seungheonoh/ply
commit 01cd3aa7a235e6fe6658246ca1026fa26dc71a83
Author: Hongrui Fang <chfanghr@gmail.com>
Date: Tue Oct 11 12:02:03 2022 +0800
update benchmark
commit a8513244892ce33cfdc9edf8cd501c4985ae8008
Author: Hongrui Fang <chfanghr@gmail.com>
Date: Tue Oct 11 11:59:22 2022 +0800
fix tests
commit 20ca40823485c2e2f78253643cf4453ac7b7ddd5
Author: Hongrui Fang <chfanghr@gmail.com>
Date: Tue Oct 11 11:57:37 2022 +0800
better import
commit a19fe49424210891bd03db71e4083fc1e0edfd98
Author: Hongrui Fang <chfanghr@gmail.com>
Date: Tue Oct 11 11:08:20 2022 +0800
update flake inputs
commit c93b21f1f9441e5c6f54525bf7c6a54757ec36cc
Author: Seungheon Oh <seungheon.ooh@gmail.com>
Date: Mon Oct 10 12:54:12 2022 -0500
tried to make tests pass
commit 1046ae1237299a33c58b48661bdb6d325a22147e
Merge: 2bf4e36 e2bd48b
Author: Seungheon Oh <seungheon.ooh@gmail.com>
Date: Mon Oct 10 12:18:48 2022 -0500
Merge branch 'staging' into seungheonoh/ply
commit 2bf4e3627c1b229f58078695082da85c80efd560
Author: Seungheon Oh <seungheon.ooh@gmail.com>
Date: Mon Oct 10 10:48:36 2022 -0500
remove junkpile
commit a1dbc9ad9e531fe0d0a0480c4aef9cf9ffa90f1d
Author: Seungheon Oh <seungheon.ooh@gmail.com>
Date: Mon Oct 10 10:47:25 2022 -0500
versions
commit 4542a06ac733858297d3a48c53368fad19dedc43
Author: Seungheon Oh <seungheon.ooh@gmail.com>
Date: Thu Oct 6 22:57:48 2022 -0500
script exporting interface
commit 6bd8c1a1d57e4bf9dc25c3068a9c8eae6bf6a19d
Author: Seungheon Oh <seungheon.ooh@gmail.com>
Date: Thu Oct 6 22:58:41 2022 -0500
fixed tests
commit d3ce2cf95633d336f3e621833677bd5bf10ee2c8
Author: Seungheon Oh <seungheon.ooh@gmail.com>
Date: Sun Oct 2 00:55:18 2022 -0500
fixed tests
commit 1ae64c9f692652b77b0506013853b2ba44267c65
Author: Seungheon Oh <seungheon.ooh@gmail.com>
Date: Sat Oct 1 13:28:20 2022 -0500
linker
commit db88cb75c7b74843141ad8ab4e6522b66d0dcfbc
Author: Seungheon Oh <seungheon.ooh@gmail.com>
Date: Sat Oct 1 01:03:50 2022 -0500
exporting scripts
commit 6389fce28e885a8a7f8669629c266f59c0edb51f
Author: Seungheon Oh <seungheon.ooh@gmail.com>
Date: Sat Oct 1 00:51:49 2022 -0500
made scripts parameterized on the script level
commit aea1e518a8890550bdebd0e5251da11d915c53a9
Author: Seungheon Oh <seungheon.ooh@gmail.com>
Date: Wed Sep 28 19:53:29 2022 -0500
Use `TypedScriptEnvelope` for `Agora.Bootstrap`
This commit is contained in:
parent
a5567eaa5e
commit
275d3a5b69
38 changed files with 8614 additions and 2330 deletions
|
|
@ -1,20 +1,19 @@
|
|||
module Spec.Effect.GovernorMutation (specs) where
|
||||
|
||||
import Agora.Effect.GovernorMutation (mutateGovernorValidator)
|
||||
import Agora.Governor (GovernorDatum (..), GovernorRedeemer (MutateGovernor))
|
||||
import Agora.Proposal (ProposalId (..))
|
||||
import Agora.Scripts (AgoraScripts (..))
|
||||
import Data.Default.Class (Default (def))
|
||||
import PlutusLedgerApi.V2 (ScriptContext (ScriptContext), ScriptPurpose (Spending))
|
||||
import Sample.Effect.GovernorMutation (
|
||||
effectRef,
|
||||
effectValidator,
|
||||
govRef,
|
||||
invalidNewGovernorDatum,
|
||||
mkEffectDatum,
|
||||
mkEffectTxInfo,
|
||||
validNewGovernorDatum,
|
||||
)
|
||||
import Sample.Shared (agoraScripts, mkEffect)
|
||||
import Sample.Shared (govValidator)
|
||||
import Test.Specification (
|
||||
SpecificationTree,
|
||||
effectFailsWith,
|
||||
|
|
@ -32,7 +31,7 @@ specs =
|
|||
"valid new governor datum"
|
||||
[ validatorSucceedsWith
|
||||
"governor validator should pass"
|
||||
agoraScripts.compiledGovernorValidator
|
||||
govValidator
|
||||
( GovernorDatum
|
||||
def
|
||||
(ProposalId 0)
|
||||
|
|
@ -47,7 +46,7 @@ specs =
|
|||
)
|
||||
, effectSucceedsWith
|
||||
"effect validator should pass"
|
||||
(mkEffect $ mutateGovernorValidator agoraScripts)
|
||||
effectValidator
|
||||
(mkEffectDatum validNewGovernorDatum)
|
||||
(ScriptContext (mkEffectTxInfo validNewGovernorDatum) (Spending effectRef))
|
||||
]
|
||||
|
|
@ -55,7 +54,7 @@ specs =
|
|||
"invalid new governor datum"
|
||||
[ validatorFailsWith
|
||||
"governor validator should fail"
|
||||
agoraScripts.compiledGovernorValidator
|
||||
govValidator
|
||||
( GovernorDatum
|
||||
def
|
||||
(ProposalId 0)
|
||||
|
|
@ -70,7 +69,7 @@ specs =
|
|||
)
|
||||
, effectFailsWith
|
||||
"effect validator should fail"
|
||||
(mkEffect $ mutateGovernorValidator agoraScripts)
|
||||
effectValidator
|
||||
(mkEffectDatum validNewGovernorDatum)
|
||||
(ScriptContext (mkEffectTxInfo invalidNewGovernorDatum) (Spending effectRef))
|
||||
]
|
||||
|
|
|
|||
|
|
@ -9,13 +9,11 @@ module Spec.Effect.TreasuryWithdrawal (specs) where
|
|||
|
||||
import Agora.Effect.TreasuryWithdrawal (
|
||||
TreasuryWithdrawalDatum (TreasuryWithdrawalDatum),
|
||||
treasuryWithdrawalValidator,
|
||||
)
|
||||
import PlutusLedgerApi.V1.Value qualified as Value
|
||||
import Sample.Effect.TreasuryWithdrawal (
|
||||
buildReceiversOutputFromDatum,
|
||||
buildScriptContext,
|
||||
currSymbol,
|
||||
inputCollateral,
|
||||
inputGAT,
|
||||
inputTreasury,
|
||||
|
|
@ -24,8 +22,8 @@ import Sample.Effect.TreasuryWithdrawal (
|
|||
outputUser,
|
||||
treasuries,
|
||||
users,
|
||||
validator,
|
||||
)
|
||||
import Sample.Shared (mkEffect)
|
||||
import Test.Specification (
|
||||
SpecificationTree,
|
||||
effectFailsWith,
|
||||
|
|
@ -40,7 +38,7 @@ specs =
|
|||
"effect"
|
||||
[ effectSucceedsWith
|
||||
"Simple"
|
||||
(mkEffect $ treasuryWithdrawalValidator currSymbol)
|
||||
validator
|
||||
datum1
|
||||
( buildScriptContext
|
||||
[ inputGAT
|
||||
|
|
@ -52,7 +50,7 @@ specs =
|
|||
)
|
||||
, effectSucceedsWith
|
||||
"Simple with multiple treasuries "
|
||||
(mkEffect $ treasuryWithdrawalValidator currSymbol)
|
||||
validator
|
||||
datum1
|
||||
( buildScriptContext
|
||||
[ inputGAT
|
||||
|
|
@ -69,7 +67,7 @@ specs =
|
|||
)
|
||||
, effectSucceedsWith
|
||||
"Mixed Assets"
|
||||
(mkEffect $ treasuryWithdrawalValidator currSymbol)
|
||||
validator
|
||||
datum2
|
||||
( buildScriptContext
|
||||
[ inputGAT
|
||||
|
|
@ -84,7 +82,7 @@ specs =
|
|||
)
|
||||
, effectFailsWith
|
||||
"Pay to uknown 3rd party"
|
||||
(mkEffect $ treasuryWithdrawalValidator currSymbol)
|
||||
validator
|
||||
datum2
|
||||
( buildScriptContext
|
||||
[ inputGAT
|
||||
|
|
@ -100,7 +98,7 @@ specs =
|
|||
)
|
||||
, effectFailsWith
|
||||
"Missing receiver"
|
||||
(mkEffect $ treasuryWithdrawalValidator currSymbol)
|
||||
validator
|
||||
datum2
|
||||
( buildScriptContext
|
||||
[ inputGAT
|
||||
|
|
@ -115,7 +113,7 @@ specs =
|
|||
)
|
||||
, effectFailsWith
|
||||
"Unauthorized treasury"
|
||||
(mkEffect $ treasuryWithdrawalValidator currSymbol)
|
||||
validator
|
||||
datum3
|
||||
( buildScriptContext
|
||||
[ inputGAT
|
||||
|
|
@ -127,7 +125,7 @@ specs =
|
|||
)
|
||||
, effectFailsWith
|
||||
"Prevent transactions besides the withdrawal"
|
||||
(mkEffect $ treasuryWithdrawalValidator currSymbol)
|
||||
validator
|
||||
datum3
|
||||
( buildScriptContext
|
||||
[ inputGAT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue