Merge pull request #198 from Liqwid-Labs/seungheonoh/lse
Use `liqwid-script-export`
This commit is contained in:
commit
24bbdec349
40 changed files with 8698 additions and 2500 deletions
|
|
@ -11,7 +11,6 @@ import Language.PureScript.Bridge (
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
import Agora.AuthorityToken qualified as AuthorityToken
|
|
||||||
import Agora.Effect.GovernorMutation qualified as GovernorMutation
|
import Agora.Effect.GovernorMutation qualified as GovernorMutation
|
||||||
import Agora.Effect.TreasuryWithdrawal qualified as TreasuryWithdrawalEffect
|
import Agora.Effect.TreasuryWithdrawal qualified as TreasuryWithdrawalEffect
|
||||||
import Agora.Governor qualified as Governor
|
import Agora.Governor qualified as Governor
|
||||||
|
|
@ -38,8 +37,6 @@ agoraTypes =
|
||||||
mkSumType (Proxy @Stake.ProposalLock)
|
mkSumType (Proxy @Stake.ProposalLock)
|
||||||
, mkSumType (Proxy @Stake.StakeRedeemer)
|
, mkSumType (Proxy @Stake.StakeRedeemer)
|
||||||
, mkSumType (Proxy @Stake.StakeDatum)
|
, mkSumType (Proxy @Stake.StakeDatum)
|
||||||
, -- AuthorityToken
|
|
||||||
mkSumType (Proxy @AuthorityToken.AuthorityToken)
|
|
||||||
, -- Effects
|
, -- Effects
|
||||||
mkSumType (Proxy @TreasuryWithdrawalEffect.TreasuryWithdrawalDatum)
|
mkSumType (Proxy @TreasuryWithdrawalEffect.TreasuryWithdrawalDatum)
|
||||||
, mkSumType (Proxy @GovernorMutation.MutateGovernorDatum)
|
, mkSumType (Proxy @GovernorMutation.MutateGovernorDatum)
|
||||||
|
|
|
||||||
|
|
@ -9,153 +9,16 @@
|
||||||
module Main (main) where
|
module Main (main) where
|
||||||
|
|
||||||
import Agora.Bootstrap qualified as Bootstrap
|
import Agora.Bootstrap qualified as Bootstrap
|
||||||
import Agora.Governor (Governor (Governor))
|
import Agora.Linker
|
||||||
import Agora.SafeMoney (GTTag)
|
|
||||||
import Agora.Scripts qualified as Scripts
|
|
||||||
import Agora.Utils (CompiledMintingPolicy (getCompiledMintingPolicy), CompiledValidator (getCompiledValidator))
|
|
||||||
import Data.Aeson qualified as Aeson
|
|
||||||
import Data.Default (def)
|
import Data.Default (def)
|
||||||
import Data.Function ((&))
|
import ScriptExport.Export
|
||||||
import Data.Tagged (Tagged)
|
import ScriptExport.Types
|
||||||
import Data.Text (Text)
|
|
||||||
import Development.GitRev (gitBranch, gitHash)
|
|
||||||
import GHC.Generics qualified as GHC
|
|
||||||
import Plutarch (Config (Config, tracingMode), TracingMode (DoTracing, NoTracing))
|
|
||||||
import PlutusLedgerApi.V1 (
|
|
||||||
MintingPolicy (getMintingPolicy),
|
|
||||||
TxOutRef,
|
|
||||||
Validator (getValidator),
|
|
||||||
)
|
|
||||||
import PlutusLedgerApi.V1.Value (AssetClass)
|
|
||||||
import ScriptExport.API (runServer)
|
|
||||||
import ScriptExport.Options (parseOptions)
|
|
||||||
import ScriptExport.ScriptInfo (ScriptInfo, mkPolicyInfo, mkScriptInfo, mkValidatorInfo)
|
|
||||||
import ScriptExport.Types (Builders, insertBuilder)
|
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main =
|
main = exportMain builders
|
||||||
parseOptions >>= runServer revision builders
|
|
||||||
where
|
|
||||||
-- This encodes the git revision of the server. It's useful for the caller
|
|
||||||
-- to be able to ensure they are compatible with it.
|
|
||||||
revision :: Text
|
|
||||||
revision = $(gitBranch) <> "@" <> $(gitHash)
|
|
||||||
|
|
||||||
{- | Builders for Agora scripts.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
builders :: Builders
|
builders :: Builders
|
||||||
builders =
|
builders =
|
||||||
def
|
mconcat
|
||||||
-- Agora scripts
|
[ insertScriptExportWithLinker "agora" (Bootstrap.agoraScripts def) linker
|
||||||
& insertBuilder "governorPolicy" ((.governorPolicyInfo) . agoraScripts)
|
]
|
||||||
& insertBuilder "governorValidator" ((.governorValidatorInfo) . agoraScripts)
|
|
||||||
& insertBuilder "stakePolicy" ((.stakePolicyInfo) . agoraScripts)
|
|
||||||
& insertBuilder "stakeValidator" ((.stakeValidatorInfo) . agoraScripts)
|
|
||||||
& insertBuilder "proposalPolicy" ((.proposalPolicyInfo) . agoraScripts)
|
|
||||||
& insertBuilder "proposalValidator" ((.proposalValidatorInfo) . agoraScripts)
|
|
||||||
& insertBuilder "treasuryValidator" ((.treasuryValidatorInfo) . agoraScripts)
|
|
||||||
& insertBuilder "authorityTokenPolicy" ((.authorityTokenPolicyInfo) . agoraScripts)
|
|
||||||
-- Trivial scripts. These are useful for testing, but they likely aren't useful
|
|
||||||
-- to you if you are actually interested in deploying to mainnet.
|
|
||||||
& insertBuilder
|
|
||||||
"alwaysSucceedsPolicy"
|
|
||||||
(\() -> mkPolicyInfo $ plam $ \_ _ -> popaque (pconstant ()))
|
|
||||||
& insertBuilder
|
|
||||||
"alwaysSucceedsValidator"
|
|
||||||
(\() -> mkValidatorInfo $ plam $ \_ _ _ -> popaque (pconstant ()))
|
|
||||||
& insertBuilder
|
|
||||||
"neverSucceedsPolicy"
|
|
||||||
(\() -> mkPolicyInfo $ plam $ \_ _ -> perror)
|
|
||||||
& insertBuilder
|
|
||||||
"neverSucceedsValidator"
|
|
||||||
(\() -> mkValidatorInfo $ plam $ \_ _ _ -> perror)
|
|
||||||
-- Provided Effect scripts
|
|
||||||
& insertBuilder "treasuryWithdrawalEffect" ((.treasuryWithdrawalEffectInfo) . agoraScripts)
|
|
||||||
|
|
||||||
{- | Create scripts from params.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
agoraScripts :: ScriptParams -> AgoraScripts
|
|
||||||
agoraScripts params =
|
|
||||||
AgoraScripts
|
|
||||||
{ governorPolicyInfo = mkPolicyInfo' scripts.compiledGovernorPolicy
|
|
||||||
, governorValidatorInfo = mkValidatorInfo' scripts.compiledGovernorValidator
|
|
||||||
, stakePolicyInfo = mkPolicyInfo' scripts.compiledStakePolicy
|
|
||||||
, stakeValidatorInfo = mkValidatorInfo' scripts.compiledStakeValidator
|
|
||||||
, proposalPolicyInfo = mkPolicyInfo' scripts.compiledProposalPolicy
|
|
||||||
, proposalValidatorInfo = mkValidatorInfo' scripts.compiledProposalValidator
|
|
||||||
, treasuryValidatorInfo = mkValidatorInfo' scripts.compiledTreasuryValidator
|
|
||||||
, authorityTokenPolicyInfo = mkPolicyInfo' scripts.compiledAuthorityTokenPolicy
|
|
||||||
, treasuryWithdrawalEffectInfo = mkValidatorInfo' scripts.compiledTreasuryWithdrawalEffect
|
|
||||||
}
|
|
||||||
where
|
|
||||||
governor =
|
|
||||||
Agora.Governor.Governor
|
|
||||||
params.governorInitialSpend
|
|
||||||
params.gtClassRef
|
|
||||||
params.maximumCosigners
|
|
||||||
|
|
||||||
scripts = Bootstrap.agoraScripts plutarchConfig governor
|
|
||||||
|
|
||||||
plutarchConfig :: Config
|
|
||||||
plutarchConfig = Config {tracingMode = if params.tracing then DoTracing else NoTracing}
|
|
||||||
|
|
||||||
{- | Params required for creating script export.
|
|
||||||
|
|
||||||
@since 1.0.0
|
|
||||||
-}
|
|
||||||
data ScriptParams = ScriptParams
|
|
||||||
{ governorInitialSpend :: TxOutRef
|
|
||||||
, gtClassRef :: Tagged GTTag AssetClass
|
|
||||||
, maximumCosigners :: Integer
|
|
||||||
, tracing :: Bool
|
|
||||||
}
|
|
||||||
deriving anyclass (Aeson.ToJSON, Aeson.FromJSON)
|
|
||||||
deriving stock (Show, Eq, GHC.Generic, Ord)
|
|
||||||
|
|
||||||
{- | Scripts that get exported.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
data AgoraScripts = AgoraScripts
|
|
||||||
{ governorPolicyInfo :: ScriptInfo
|
|
||||||
, governorValidatorInfo :: ScriptInfo
|
|
||||||
, stakePolicyInfo :: ScriptInfo
|
|
||||||
, stakeValidatorInfo :: ScriptInfo
|
|
||||||
, proposalPolicyInfo :: ScriptInfo
|
|
||||||
, proposalValidatorInfo :: ScriptInfo
|
|
||||||
, treasuryValidatorInfo :: ScriptInfo
|
|
||||||
, authorityTokenPolicyInfo :: ScriptInfo
|
|
||||||
, treasuryWithdrawalEffectInfo :: ScriptInfo
|
|
||||||
}
|
|
||||||
deriving anyclass
|
|
||||||
( -- | @since 0.2.0
|
|
||||||
Aeson.ToJSON
|
|
||||||
, -- | @since 0.2.0
|
|
||||||
Aeson.FromJSON
|
|
||||||
)
|
|
||||||
deriving stock
|
|
||||||
( -- | @since 0.2.0
|
|
||||||
Show
|
|
||||||
, -- | @since 0.2.0
|
|
||||||
Eq
|
|
||||||
, -- | @since 0.2.0
|
|
||||||
GHC.Generic
|
|
||||||
)
|
|
||||||
|
|
||||||
{- | Turn a precompiled minting policy to a 'ScriptInfo'.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
mkPolicyInfo' :: forall redeemer. CompiledMintingPolicy redeemer -> ScriptInfo
|
|
||||||
mkPolicyInfo' = mkScriptInfo . getMintingPolicy . (.getCompiledMintingPolicy)
|
|
||||||
|
|
||||||
{- | Turn a precompiled validator to a 'ScriptInfo'.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
mkValidatorInfo' :: forall redeemer datum. CompiledValidator datum redeemer -> ScriptInfo
|
|
||||||
mkValidatorInfo' = mkScriptInfo . getValidator . (.getCompiledValidator)
|
|
||||||
|
|
|
||||||
7
agora-scripts/sampleGov.json
Normal file
7
agora-scripts/sampleGov.json
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ "gstOutRef":
|
||||||
|
{"txOutRefId":"f28cd7145c24e66fd5bcd2796837aeb19a48a2656e7833c88c62a2d0450bd00d"
|
||||||
|
,"txOutRefIdx":0
|
||||||
|
}
|
||||||
|
,"gtClassRef":["da8c30857834c6ae7203935b89278c532b3995245295456f993e1d24","4c51"]
|
||||||
|
,"maximumCosigners":20
|
||||||
|
}
|
||||||
|
|
@ -43,10 +43,10 @@ import PlutusLedgerApi.V2 (
|
||||||
)
|
)
|
||||||
import Property.Generator (genInput, genOutput)
|
import Property.Generator (genInput, genOutput)
|
||||||
import Sample.Shared (
|
import Sample.Shared (
|
||||||
govAssetClass,
|
|
||||||
govSymbol,
|
|
||||||
govValidatorHash,
|
|
||||||
governor,
|
governor,
|
||||||
|
governorAssetClass,
|
||||||
|
governorSymbol,
|
||||||
|
governorValidatorHash,
|
||||||
gstUTXORef,
|
gstUTXORef,
|
||||||
)
|
)
|
||||||
import Test.Tasty (TestTree)
|
import Test.Tasty (TestTree)
|
||||||
|
|
@ -171,12 +171,12 @@ governorMintingProperty =
|
||||||
{- Note:
|
{- Note:
|
||||||
I don't think it's easily possible to randomize orefs. We can't really pass pass `Governor` type to `actual` function.
|
I don't think it's easily possible to randomize orefs. We can't really pass pass `Governor` type to `actual` function.
|
||||||
-}
|
-}
|
||||||
gst = assetClassValue govAssetClass 1
|
gst = assetClassValue governorAssetClass 1
|
||||||
mintAmount x = mint . mconcat $ replicate x gst
|
mintAmount x = mint . mconcat $ replicate x gst
|
||||||
outputToGov =
|
outputToGov =
|
||||||
output $
|
output $
|
||||||
mconcat
|
mconcat
|
||||||
[ script govValidatorHash
|
[ script governorValidatorHash
|
||||||
, withValue gst
|
, withValue gst
|
||||||
, withDatum govDatum
|
, withDatum govDatum
|
||||||
]
|
]
|
||||||
|
|
@ -205,7 +205,7 @@ governorMintingProperty =
|
||||||
GovernorOutputNotFound -> referencedInput <> mintAmount 1
|
GovernorOutputNotFound -> referencedInput <> mintAmount 1
|
||||||
GovernorPolicyCorrect -> referencedInput <> outputToGov <> mintAmount 1
|
GovernorPolicyCorrect -> referencedInput <> outputToGov <> mintAmount 1
|
||||||
|
|
||||||
return . buildMinting' $ inputs <> outputs <> comp <> withMinting govSymbol
|
return . buildMinting' $ inputs <> outputs <> comp <> withMinting governorSymbol
|
||||||
|
|
||||||
expected :: ScriptContext -> Maybe ()
|
expected :: ScriptContext -> Maybe ()
|
||||||
expected sc =
|
expected sc =
|
||||||
|
|
@ -217,7 +217,7 @@ governorMintingProperty =
|
||||||
opaqueToUnit = plam $ \_ -> pconstant ()
|
opaqueToUnit = plam $ \_ -> pconstant ()
|
||||||
|
|
||||||
actual :: Term s (PScriptContext :--> PUnit)
|
actual :: Term s (PScriptContext :--> PUnit)
|
||||||
actual = plam $ \sc -> opaqueToUnit #$ governorPolicy governor.gstOutRef # pforgetData (pconstantData ()) # sc
|
actual = plam $ \sc -> opaqueToUnit #$ governorPolicy # pconstant governor.gstOutRef # pforgetData (pconstantData ()) # sc
|
||||||
|
|
||||||
classifier :: ScriptContext -> GovernorPolicyCases
|
classifier :: ScriptContext -> GovernorPolicyCases
|
||||||
classifier sc
|
classifier sc
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,14 @@ module Sample.Effect.GovernorMutation (
|
||||||
|
|
||||||
import Agora.Effect.GovernorMutation (
|
import Agora.Effect.GovernorMutation (
|
||||||
MutateGovernorDatum (..),
|
MutateGovernorDatum (..),
|
||||||
mutateGovernorValidator,
|
|
||||||
)
|
)
|
||||||
import Agora.Governor (GovernorDatum (..), GovernorRedeemer (MutateGovernor))
|
import Agora.Governor (GovernorDatum (..), GovernorRedeemer (MutateGovernor))
|
||||||
import Agora.Proposal (ProposalId (..), ProposalThresholds (..))
|
import Agora.Proposal (ProposalId (..), ProposalThresholds (..))
|
||||||
import Agora.Utils (validatorHashToTokenName)
|
import Agora.Utils (validatorHashToTokenName)
|
||||||
import Data.Default.Class (Default (def))
|
import Data.Default.Class (Default (def))
|
||||||
|
import Data.Map
|
||||||
import Data.Tagged (Tagged (..))
|
import Data.Tagged (Tagged (..))
|
||||||
import Plutarch.Api.V2 (mkValidator, validatorHash)
|
import Plutarch.Api.V2 (validatorHash)
|
||||||
import PlutusLedgerApi.V1 qualified as Interval (always)
|
import PlutusLedgerApi.V1 qualified as Interval (always)
|
||||||
import PlutusLedgerApi.V1.Address (scriptHashAddress)
|
import PlutusLedgerApi.V1.Address (scriptHashAddress)
|
||||||
import PlutusLedgerApi.V1.Value (AssetClass, assetClass)
|
import PlutusLedgerApi.V1.Value (AssetClass, assetClass)
|
||||||
|
|
@ -38,16 +38,15 @@ import PlutusLedgerApi.V2 (
|
||||||
TxInfo (..),
|
TxInfo (..),
|
||||||
TxOut (..),
|
TxOut (..),
|
||||||
TxOutRef (TxOutRef),
|
TxOutRef (TxOutRef),
|
||||||
Validator,
|
Validator (Validator),
|
||||||
ValidatorHash (..),
|
ValidatorHash (..),
|
||||||
)
|
)
|
||||||
import PlutusTx.AssocMap qualified as AssocMap
|
import PlutusTx.AssocMap qualified as AssocMap
|
||||||
import Sample.Shared (
|
import Sample.Shared (
|
||||||
agoraScripts,
|
agoraScripts,
|
||||||
authorityTokenSymbol,
|
authorityTokenSymbol,
|
||||||
deterministicTracingConfing,
|
governorAssetClass,
|
||||||
govAssetClass,
|
governorValidatorAddress,
|
||||||
govValidatorAddress,
|
|
||||||
minAda,
|
minAda,
|
||||||
mkRedeemer,
|
mkRedeemer,
|
||||||
signer,
|
signer,
|
||||||
|
|
@ -56,7 +55,7 @@ import Test.Util (datumPair, toDatumHash)
|
||||||
|
|
||||||
-- | The effect validator instance.
|
-- | The effect validator instance.
|
||||||
effectValidator :: Validator
|
effectValidator :: Validator
|
||||||
effectValidator = mkValidator deterministicTracingConfing $ mutateGovernorValidator agoraScripts
|
effectValidator = Validator $ agoraScripts ! "agora:mutateGovernorValidator"
|
||||||
|
|
||||||
-- | The hash of the validator instance.
|
-- | The hash of the validator instance.
|
||||||
effectValidatorHash :: ValidatorHash
|
effectValidatorHash :: ValidatorHash
|
||||||
|
|
@ -100,7 +99,7 @@ mkEffectDatum newGovDatum =
|
||||||
-}
|
-}
|
||||||
mkEffectTxInfo :: GovernorDatum -> TxInfo
|
mkEffectTxInfo :: GovernorDatum -> TxInfo
|
||||||
mkEffectTxInfo newGovDatum =
|
mkEffectTxInfo newGovDatum =
|
||||||
let gst = Value.assetClassValue govAssetClass 1
|
let gst = Value.assetClassValue governorAssetClass 1
|
||||||
at = Value.assetClassValue atAssetClass 1
|
at = Value.assetClassValue atAssetClass 1
|
||||||
|
|
||||||
-- One authority token is burnt in the process.
|
-- One authority token is burnt in the process.
|
||||||
|
|
@ -122,7 +121,7 @@ mkEffectTxInfo newGovDatum =
|
||||||
governorInput :: TxOut
|
governorInput :: TxOut
|
||||||
governorInput =
|
governorInput =
|
||||||
TxOut
|
TxOut
|
||||||
{ txOutAddress = govValidatorAddress
|
{ txOutAddress = governorValidatorAddress
|
||||||
, txOutValue = gst
|
, txOutValue = gst
|
||||||
, txOutDatum = OutputDatumHash $ toDatumHash governorInputDatum
|
, txOutDatum = OutputDatumHash $ toDatumHash governorInputDatum
|
||||||
, txOutReferenceScript = Nothing
|
, txOutReferenceScript = Nothing
|
||||||
|
|
@ -153,7 +152,7 @@ mkEffectTxInfo newGovDatum =
|
||||||
governorOutput :: TxOut
|
governorOutput :: TxOut
|
||||||
governorOutput =
|
governorOutput =
|
||||||
TxOut
|
TxOut
|
||||||
{ txOutAddress = govValidatorAddress
|
{ txOutAddress = governorValidatorAddress
|
||||||
, txOutValue = mconcat [gst, minAda]
|
, txOutValue = mconcat [gst, minAda]
|
||||||
, txOutDatum = OutputDatumHash $ toDatumHash governorOutputDatum
|
, txOutDatum = OutputDatumHash $ toDatumHash governorOutputDatum
|
||||||
, txOutReferenceScript = Nothing
|
, txOutReferenceScript = Nothing
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ Description: Sample based testing for Treasury Withdrawal Effect
|
||||||
This module provides samples for Treasury Withdrawal Effect tests.
|
This module provides samples for Treasury Withdrawal Effect tests.
|
||||||
-}
|
-}
|
||||||
module Sample.Effect.TreasuryWithdrawal (
|
module Sample.Effect.TreasuryWithdrawal (
|
||||||
|
validator,
|
||||||
inputTreasury,
|
inputTreasury,
|
||||||
inputUser,
|
inputUser,
|
||||||
inputGAT,
|
inputGAT,
|
||||||
|
|
@ -21,9 +22,9 @@ module Sample.Effect.TreasuryWithdrawal (
|
||||||
|
|
||||||
import Agora.Effect.TreasuryWithdrawal (
|
import Agora.Effect.TreasuryWithdrawal (
|
||||||
TreasuryWithdrawalDatum (TreasuryWithdrawalDatum),
|
TreasuryWithdrawalDatum (TreasuryWithdrawalDatum),
|
||||||
treasuryWithdrawalValidator,
|
|
||||||
)
|
)
|
||||||
import Plutarch.Api.V2 (mkValidator, validatorHash)
|
import Data.Map ((!))
|
||||||
|
import Plutarch.Api.V2 (validatorHash)
|
||||||
import PlutusLedgerApi.V1.Interval qualified as Interval (always)
|
import PlutusLedgerApi.V1.Interval qualified as Interval (always)
|
||||||
import PlutusLedgerApi.V1.Value qualified as Value (singleton)
|
import PlutusLedgerApi.V1.Value qualified as Value (singleton)
|
||||||
import PlutusLedgerApi.V2 (
|
import PlutusLedgerApi.V2 (
|
||||||
|
|
@ -41,18 +42,18 @@ import PlutusLedgerApi.V2 (
|
||||||
TxInfo (..),
|
TxInfo (..),
|
||||||
TxOut (..),
|
TxOut (..),
|
||||||
TxOutRef (TxOutRef),
|
TxOutRef (TxOutRef),
|
||||||
Validator,
|
Validator (Validator),
|
||||||
ValidatorHash (ValidatorHash),
|
ValidatorHash (ValidatorHash),
|
||||||
Value,
|
Value,
|
||||||
toBuiltinData,
|
toBuiltinData,
|
||||||
)
|
)
|
||||||
import PlutusTx.AssocMap qualified as AssocMap
|
import PlutusTx.AssocMap qualified as AssocMap
|
||||||
import Sample.Shared (deterministicTracingConfing)
|
import Sample.Shared (agoraScripts, authorityTokenSymbol)
|
||||||
import Test.Util (scriptCredentials, userCredentials)
|
import Test.Util (scriptCredentials, userCredentials)
|
||||||
|
|
||||||
-- | A sample Currency Symbol.
|
-- | A sample Currency Symbol.
|
||||||
currSymbol :: CurrencySymbol
|
currSymbol :: CurrencySymbol
|
||||||
currSymbol = "9c04a69c7133e26061fe5a15adaf4f79cd51e47ef22a2e3c91a36f04"
|
currSymbol = authorityTokenSymbol
|
||||||
|
|
||||||
-- | A sample 'PubKeyHash'.
|
-- | A sample 'PubKeyHash'.
|
||||||
signer :: PubKeyHash
|
signer :: PubKeyHash
|
||||||
|
|
@ -147,7 +148,7 @@ buildReceiversOutputFromDatum (TreasuryWithdrawalDatum xs _) = f <$> xs
|
||||||
|
|
||||||
-- | Effect validator instance.
|
-- | Effect validator instance.
|
||||||
validator :: Validator
|
validator :: Validator
|
||||||
validator = mkValidator deterministicTracingConfing $ treasuryWithdrawalValidator currSymbol
|
validator = Validator $ agoraScripts ! "agora:treasuryWithdrawalValidator"
|
||||||
|
|
||||||
-- | 'TokenName' that represents the hash of the 'Agora.Stake.Stake' validator.
|
-- | 'TokenName' that represents the hash of the 'Agora.Stake.Stake' validator.
|
||||||
validatorHashTN :: TokenName
|
validatorHashTN :: TokenName
|
||||||
|
|
|
||||||
|
|
@ -21,18 +21,20 @@ module Sample.Governor.Initialize (
|
||||||
|
|
||||||
import Agora.Bootstrap (agoraScripts)
|
import Agora.Bootstrap (agoraScripts)
|
||||||
import Agora.Governor (Governor (..), GovernorDatum (..))
|
import Agora.Governor (Governor (..), GovernorDatum (..))
|
||||||
|
import Agora.Linker (linker)
|
||||||
import Agora.Proposal (ProposalId (..), ProposalThresholds (..))
|
import Agora.Proposal (ProposalId (..), ProposalThresholds (..))
|
||||||
import Agora.Proposal.Time (
|
import Agora.Proposal.Time (
|
||||||
MaxTimeRangeWidth (MaxTimeRangeWidth),
|
MaxTimeRangeWidth (MaxTimeRangeWidth),
|
||||||
ProposalTimingConfig (ProposalTimingConfig),
|
ProposalTimingConfig (ProposalTimingConfig),
|
||||||
)
|
)
|
||||||
import Agora.Scripts (
|
|
||||||
AgoraScripts (compiledGovernorPolicy),
|
|
||||||
governorSTAssetClass,
|
|
||||||
governorSTSymbol,
|
|
||||||
governorValidatorHash,
|
|
||||||
)
|
|
||||||
import Data.Default (Default (..))
|
import Data.Default (Default (..))
|
||||||
|
import Data.Map (Map, (!))
|
||||||
|
import Data.Text (Text)
|
||||||
|
import Optics (view)
|
||||||
|
import Plutarch.Api.V2 (
|
||||||
|
mintingPolicySymbol,
|
||||||
|
validatorHash,
|
||||||
|
)
|
||||||
import Plutarch.Context (
|
import Plutarch.Context (
|
||||||
input,
|
input,
|
||||||
mint,
|
mint,
|
||||||
|
|
@ -49,13 +51,18 @@ import PlutusLedgerApi.V1.Value (AssetClass (..))
|
||||||
import PlutusLedgerApi.V1.Value qualified as Value
|
import PlutusLedgerApi.V1.Value qualified as Value
|
||||||
import PlutusLedgerApi.V2 (
|
import PlutusLedgerApi.V2 (
|
||||||
CurrencySymbol,
|
CurrencySymbol,
|
||||||
|
MintingPolicy (MintingPolicy),
|
||||||
|
Script,
|
||||||
TxOutRef (TxOutRef),
|
TxOutRef (TxOutRef),
|
||||||
|
Validator (Validator),
|
||||||
ValidatorHash,
|
ValidatorHash,
|
||||||
)
|
)
|
||||||
import Sample.Shared (
|
import Sample.Shared (
|
||||||
|
deterministicTracingConfing,
|
||||||
minAda,
|
minAda,
|
||||||
)
|
)
|
||||||
import Sample.Shared qualified as Shared
|
import Sample.Shared qualified as Shared
|
||||||
|
import ScriptExport.ScriptInfo (runLinker)
|
||||||
import Test.Specification (SpecificationTree, testPolicy)
|
import Test.Specification (SpecificationTree, testPolicy)
|
||||||
import Test.Util (CombinableBuilder, mkMinting, pubKeyHashes, sortValue)
|
import Test.Util (CombinableBuilder, mkMinting, pubKeyHashes, sortValue)
|
||||||
|
|
||||||
|
|
@ -110,17 +117,31 @@ governor =
|
||||||
{ gstOutRef = witnessRef
|
{ gstOutRef = witnessRef
|
||||||
}
|
}
|
||||||
|
|
||||||
scripts :: AgoraScripts
|
scripts :: Map Text Script
|
||||||
scripts = agoraScripts Shared.deterministicTracingConfing governor
|
scripts =
|
||||||
|
either
|
||||||
|
(error . show)
|
||||||
|
(view #scripts)
|
||||||
|
( runLinker
|
||||||
|
linker
|
||||||
|
(agoraScripts deterministicTracingConfing)
|
||||||
|
governor
|
||||||
|
)
|
||||||
|
|
||||||
govAssetClass :: AssetClass
|
govPolicy :: MintingPolicy
|
||||||
govAssetClass = governorSTAssetClass scripts
|
govPolicy = MintingPolicy $ scripts ! "agora:governorPolicy"
|
||||||
|
|
||||||
govValidatorHash :: ValidatorHash
|
govValidator :: Validator
|
||||||
govValidatorHash = governorValidatorHash scripts
|
govValidator = Validator $ scripts ! "agora:governorValidator"
|
||||||
|
|
||||||
govSymbol :: CurrencySymbol
|
govSymbol :: CurrencySymbol
|
||||||
govSymbol = governorSTSymbol scripts
|
govSymbol = mintingPolicySymbol govPolicy
|
||||||
|
|
||||||
|
govAssetClass :: AssetClass
|
||||||
|
govAssetClass = AssetClass (govSymbol, "")
|
||||||
|
|
||||||
|
govValidatorHash :: ValidatorHash
|
||||||
|
govValidatorHash = validatorHash govValidator
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -274,6 +295,6 @@ mkTestCase name ps valid =
|
||||||
testPolicy
|
testPolicy
|
||||||
valid
|
valid
|
||||||
name
|
name
|
||||||
scripts.compiledGovernorPolicy
|
govPolicy
|
||||||
()
|
()
|
||||||
(mkMinting mintGST ps govSymbol)
|
(mkMinting mintGST ps govSymbol)
|
||||||
|
|
|
||||||
|
|
@ -16,13 +16,12 @@ module Sample.Governor.Mutate (
|
||||||
invalidBundles,
|
invalidBundles,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Agora.Effect.NoOp (noOpValidator)
|
|
||||||
import Agora.Governor (GovernorDatum (..), GovernorRedeemer (MutateGovernor))
|
import Agora.Governor (GovernorDatum (..), GovernorRedeemer (MutateGovernor))
|
||||||
import Agora.Proposal (ProposalId (ProposalId), ProposalThresholds (..))
|
import Agora.Proposal (ProposalId (ProposalId), ProposalThresholds (..))
|
||||||
import Agora.Scripts (AgoraScripts (..))
|
|
||||||
import Agora.Utils (scriptHashToTokenName)
|
import Agora.Utils (scriptHashToTokenName)
|
||||||
import Data.Default (def)
|
import Data.Default (def)
|
||||||
import Plutarch.Api.V2 (PMintingPolicy, PValidator, mintingPolicySymbol, mkMintingPolicy, mkValidator, validatorHash)
|
import Data.Map ((!))
|
||||||
|
import Plutarch.Api.V2 (PMintingPolicy, mintingPolicySymbol, mkMintingPolicy, validatorHash)
|
||||||
import Plutarch.Context (
|
import Plutarch.Context (
|
||||||
input,
|
input,
|
||||||
mint,
|
mint,
|
||||||
|
|
@ -39,6 +38,7 @@ import PlutusLedgerApi.V2 (
|
||||||
Data,
|
Data,
|
||||||
ScriptHash (ScriptHash),
|
ScriptHash (ScriptHash),
|
||||||
TxOutRef (TxOutRef),
|
TxOutRef (TxOutRef),
|
||||||
|
Validator (Validator),
|
||||||
ValidatorHash,
|
ValidatorHash,
|
||||||
Value,
|
Value,
|
||||||
toData,
|
toData,
|
||||||
|
|
@ -46,8 +46,9 @@ import PlutusLedgerApi.V2 (
|
||||||
import Sample.Shared (
|
import Sample.Shared (
|
||||||
agoraScripts,
|
agoraScripts,
|
||||||
authorityTokenSymbol,
|
authorityTokenSymbol,
|
||||||
govAssetClass,
|
governorAssetClass,
|
||||||
govValidatorHash,
|
governorValidator,
|
||||||
|
governorValidatorHash,
|
||||||
minAda,
|
minAda,
|
||||||
)
|
)
|
||||||
import Test.Specification (SpecificationTree, testValidator)
|
import Test.Specification (SpecificationTree, testValidator)
|
||||||
|
|
@ -144,19 +145,19 @@ governorRedeemer = MutateGovernor
|
||||||
|
|
||||||
mkGovernorBuilder :: forall b. CombinableBuilder b => GovernorParameters -> b
|
mkGovernorBuilder :: forall b. CombinableBuilder b => GovernorParameters -> b
|
||||||
mkGovernorBuilder ps =
|
mkGovernorBuilder ps =
|
||||||
let gst = Value.assetClassValue govAssetClass 1
|
let gst = Value.assetClassValue governorAssetClass 1
|
||||||
value = sortValue $ gst <> minAda
|
value = sortValue $ gst <> minAda
|
||||||
gstOutput =
|
gstOutput =
|
||||||
if ps.stealGST
|
if ps.stealGST
|
||||||
then pubKey $ head pubKeyHashes
|
then pubKey $ head pubKeyHashes
|
||||||
else script govValidatorHash
|
else script governorValidatorHash
|
||||||
withGSTDatum =
|
withGSTDatum =
|
||||||
maybe mempty withDatum $
|
maybe mempty withDatum $
|
||||||
mkGovernorOutputDatum ps.governorOutputDatumValidity
|
mkGovernorOutputDatum ps.governorOutputDatumValidity
|
||||||
in mconcat
|
in mconcat
|
||||||
[ input $
|
[ input $
|
||||||
mconcat
|
mconcat
|
||||||
[ script govValidatorHash
|
[ script governorValidatorHash
|
||||||
, withDatum governorInputDatum
|
, withDatum governorInputDatum
|
||||||
, withValue value
|
, withValue value
|
||||||
, withRef governorRef
|
, withRef governorRef
|
||||||
|
|
@ -171,11 +172,11 @@ mkGovernorBuilder ps =
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
mockEffectValidator :: ClosedTerm PValidator
|
mockEffectValidator :: Validator
|
||||||
mockEffectValidator = noOpValidator authorityTokenSymbol
|
mockEffectValidator = Validator $ agoraScripts ! "agora:noOpValidator"
|
||||||
|
|
||||||
mockEffectValidatorHash :: ValidatorHash
|
mockEffectValidatorHash :: ValidatorHash
|
||||||
mockEffectValidatorHash = validatorHash $ mkValidator def mockEffectValidator
|
mockEffectValidatorHash = validatorHash mockEffectValidator
|
||||||
|
|
||||||
mockAuthScript :: ClosedTerm PMintingPolicy
|
mockAuthScript :: ClosedTerm PMintingPolicy
|
||||||
mockAuthScript = plam $ \_ _ -> popaque $ pcon PUnit
|
mockAuthScript = plam $ \_ _ -> popaque $ pcon PUnit
|
||||||
|
|
@ -236,7 +237,7 @@ mkTestCase name pb (Validity forGov) =
|
||||||
testValidator
|
testValidator
|
||||||
forGov
|
forGov
|
||||||
name
|
name
|
||||||
agoraScripts.compiledGovernorValidator
|
governorValidator
|
||||||
governorInputDatum
|
governorInputDatum
|
||||||
governorRedeemer
|
governorRedeemer
|
||||||
(mkSpending mutate pb governorRef)
|
(mkSpending mutate pb governorRef)
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,6 @@ import Agora.Proposal.Time (
|
||||||
votingTime
|
votingTime
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
import Agora.Scripts (AgoraScripts (..))
|
|
||||||
import Agora.Stake (
|
import Agora.Stake (
|
||||||
StakeDatum (..),
|
StakeDatum (..),
|
||||||
)
|
)
|
||||||
|
|
@ -107,13 +106,15 @@ import Sample.Proposal.Shared (
|
||||||
stakeTxRef,
|
stakeTxRef,
|
||||||
)
|
)
|
||||||
import Sample.Shared (
|
import Sample.Shared (
|
||||||
agoraScripts,
|
authorityTokenPolicy,
|
||||||
authorityTokenSymbol,
|
authorityTokenSymbol,
|
||||||
govAssetClass,
|
|
||||||
govValidatorHash,
|
|
||||||
governor,
|
governor,
|
||||||
|
governorAssetClass,
|
||||||
|
governorValidator,
|
||||||
|
governorValidatorHash,
|
||||||
minAda,
|
minAda,
|
||||||
proposalPolicySymbol,
|
proposalPolicySymbol,
|
||||||
|
proposalValidator,
|
||||||
proposalValidatorHash,
|
proposalValidatorHash,
|
||||||
signer,
|
signer,
|
||||||
stakeAssetClass,
|
stakeAssetClass,
|
||||||
|
|
@ -431,19 +432,19 @@ governorRef = TxOutRef governorTxRef 2
|
||||||
-}
|
-}
|
||||||
mkGovernorBuilder :: forall b. CombinableBuilder b => GovernorParameters -> b
|
mkGovernorBuilder :: forall b. CombinableBuilder b => GovernorParameters -> b
|
||||||
mkGovernorBuilder ps =
|
mkGovernorBuilder ps =
|
||||||
let gst = Value.assetClassValue govAssetClass 1
|
let gst = Value.assetClassValue governorAssetClass 1
|
||||||
value = sortValue $ gst <> minAda
|
value = sortValue $ gst <> minAda
|
||||||
in mconcat
|
in mconcat
|
||||||
[ input $
|
[ input $
|
||||||
mconcat
|
mconcat
|
||||||
[ script govValidatorHash
|
[ script governorValidatorHash
|
||||||
, withValue value
|
, withValue value
|
||||||
, withRef governorRef
|
, withRef governorRef
|
||||||
, withDatum governorInputDatum
|
, withDatum governorInputDatum
|
||||||
]
|
]
|
||||||
, output $
|
, output $
|
||||||
mconcat
|
mconcat
|
||||||
[ script govValidatorHash
|
[ script governorValidatorHash
|
||||||
, withValue value
|
, withValue value
|
||||||
, withRef governorRef
|
, withRef governorRef
|
||||||
, withDatum (mkGovernorOutputDatum ps)
|
, withDatum (mkGovernorOutputDatum ps)
|
||||||
|
|
@ -532,7 +533,7 @@ mkTestTree name pb val =
|
||||||
testValidator
|
testValidator
|
||||||
val.forProposalValidator
|
val.forProposalValidator
|
||||||
"proposal"
|
"proposal"
|
||||||
agoraScripts.compiledProposalValidator
|
proposalValidator
|
||||||
proposalInputDatum
|
proposalInputDatum
|
||||||
proposalRedeemer
|
proposalRedeemer
|
||||||
(spend proposalRef)
|
(spend proposalRef)
|
||||||
|
|
@ -541,7 +542,7 @@ mkTestTree name pb val =
|
||||||
testValidator
|
testValidator
|
||||||
(fromJust val.forGovernorValidator)
|
(fromJust val.forGovernorValidator)
|
||||||
"governor"
|
"governor"
|
||||||
agoraScripts.compiledGovernorValidator
|
governorValidator
|
||||||
governorInputDatum
|
governorInputDatum
|
||||||
governorRedeemer
|
governorRedeemer
|
||||||
(spend governorRef)
|
(spend governorRef)
|
||||||
|
|
@ -554,7 +555,7 @@ mkTestTree name pb val =
|
||||||
( testPolicy
|
( testPolicy
|
||||||
(fromJust val.forAuthorityTokenPolicy)
|
(fromJust val.forAuthorityTokenPolicy)
|
||||||
"authority"
|
"authority"
|
||||||
agoraScripts.compiledAuthorityTokenPolicy
|
authorityTokenPolicy
|
||||||
authorityTokenRedeemer
|
authorityTokenRedeemer
|
||||||
(mkMinting advance pb authorityTokenSymbol)
|
(mkMinting advance pb authorityTokenSymbol)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ import Agora.Proposal.Time (
|
||||||
ProposalTimingConfig (draftTime),
|
ProposalTimingConfig (draftTime),
|
||||||
)
|
)
|
||||||
import Agora.SafeMoney (GTTag)
|
import Agora.SafeMoney (GTTag)
|
||||||
import Agora.Scripts (AgoraScripts (..))
|
|
||||||
import Agora.Stake (
|
import Agora.Stake (
|
||||||
ProposalLock (Cosigned, Created),
|
ProposalLock (Cosigned, Created),
|
||||||
StakeDatum (..),
|
StakeDatum (..),
|
||||||
|
|
@ -74,13 +73,14 @@ import PlutusLedgerApi.V2 (
|
||||||
)
|
)
|
||||||
import Sample.Proposal.Shared (proposalTxRef, stakeTxRef)
|
import Sample.Proposal.Shared (proposalTxRef, stakeTxRef)
|
||||||
import Sample.Shared (
|
import Sample.Shared (
|
||||||
agoraScripts,
|
|
||||||
fromDiscrete,
|
fromDiscrete,
|
||||||
governor,
|
governor,
|
||||||
minAda,
|
minAda,
|
||||||
proposalPolicySymbol,
|
proposalPolicySymbol,
|
||||||
|
proposalValidator,
|
||||||
proposalValidatorHash,
|
proposalValidatorHash,
|
||||||
stakeAssetClass,
|
stakeAssetClass,
|
||||||
|
stakeValidator,
|
||||||
stakeValidatorHash,
|
stakeValidatorHash,
|
||||||
)
|
)
|
||||||
import Test.Specification (
|
import Test.Specification (
|
||||||
|
|
@ -333,7 +333,7 @@ mkTestTree name ps val =
|
||||||
testValidator
|
testValidator
|
||||||
val.forProposalValidator
|
val.forProposalValidator
|
||||||
"proposal"
|
"proposal"
|
||||||
agoraScripts.compiledProposalValidator
|
proposalValidator
|
||||||
(mkProposalInputDatum ps)
|
(mkProposalInputDatum ps)
|
||||||
proposalRedeemer
|
proposalRedeemer
|
||||||
(spend proposalRef)
|
(spend proposalRef)
|
||||||
|
|
@ -342,7 +342,7 @@ mkTestTree name ps val =
|
||||||
testValidator
|
testValidator
|
||||||
val.forStakeValidator
|
val.forStakeValidator
|
||||||
"stake"
|
"stake"
|
||||||
agoraScripts.compiledStakeValidator
|
stakeValidator
|
||||||
(mkStakeInputDatum ps)
|
(mkStakeInputDatum ps)
|
||||||
stakeRedeemer
|
stakeRedeemer
|
||||||
(spend stakeRef)
|
(spend stakeRef)
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ import Agora.Proposal.Time (
|
||||||
ProposalStartingTime (..),
|
ProposalStartingTime (..),
|
||||||
)
|
)
|
||||||
import Agora.SafeMoney (GTTag)
|
import Agora.SafeMoney (GTTag)
|
||||||
import Agora.Scripts (AgoraScripts (..))
|
|
||||||
import Agora.Stake (
|
import Agora.Stake (
|
||||||
ProposalLock (..),
|
ProposalLock (..),
|
||||||
StakeDatum (..),
|
StakeDatum (..),
|
||||||
|
|
@ -72,18 +71,20 @@ import PlutusLedgerApi.V2 (
|
||||||
)
|
)
|
||||||
import Sample.Proposal.Shared (stakeTxRef)
|
import Sample.Proposal.Shared (stakeTxRef)
|
||||||
import Sample.Shared (
|
import Sample.Shared (
|
||||||
agoraScripts,
|
|
||||||
fromDiscrete,
|
fromDiscrete,
|
||||||
govAssetClass,
|
|
||||||
govValidatorHash,
|
|
||||||
governor,
|
governor,
|
||||||
|
governorAssetClass,
|
||||||
|
governorValidator,
|
||||||
|
governorValidatorHash,
|
||||||
minAda,
|
minAda,
|
||||||
|
proposalPolicy,
|
||||||
proposalPolicySymbol,
|
proposalPolicySymbol,
|
||||||
proposalStartingTimeFromTimeRange,
|
proposalStartingTimeFromTimeRange,
|
||||||
proposalValidatorHash,
|
proposalValidatorHash,
|
||||||
signer,
|
signer,
|
||||||
signer2,
|
signer2,
|
||||||
stakeAssetClass,
|
stakeAssetClass,
|
||||||
|
stakeValidator,
|
||||||
stakeValidatorHash,
|
stakeValidatorHash,
|
||||||
)
|
)
|
||||||
import Test.Specification (SpecificationTree, group, testPolicy, testValidator)
|
import Test.Specification (SpecificationTree, group, testPolicy, testValidator)
|
||||||
|
|
@ -283,7 +284,7 @@ createProposal ps = builder
|
||||||
where
|
where
|
||||||
pst = Value.singleton proposalPolicySymbol "" 1
|
pst = Value.singleton proposalPolicySymbol "" 1
|
||||||
sst = Value.assetClassValue stakeAssetClass 1
|
sst = Value.assetClassValue stakeAssetClass 1
|
||||||
gst = Value.assetClassValue govAssetClass 1
|
gst = Value.assetClassValue governorAssetClass 1
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -322,14 +323,14 @@ createProposal ps = builder
|
||||||
timeRange $ mkTimeRange ps
|
timeRange $ mkTimeRange ps
|
||||||
, input $
|
, input $
|
||||||
mconcat
|
mconcat
|
||||||
[ script govValidatorHash
|
[ script governorValidatorHash
|
||||||
, withValue governorValue
|
, withValue governorValue
|
||||||
, withDatum governorInputDatum
|
, withDatum governorInputDatum
|
||||||
, withRef governorRef
|
, withRef governorRef
|
||||||
]
|
]
|
||||||
, output $
|
, output $
|
||||||
mconcat
|
mconcat
|
||||||
[ script govValidatorHash
|
[ script governorValidatorHash
|
||||||
, withValue governorValue
|
, withValue governorValue
|
||||||
, withDatum (mkGovernorOutputDatum ps)
|
, withDatum (mkGovernorOutputDatum ps)
|
||||||
]
|
]
|
||||||
|
|
@ -457,7 +458,7 @@ mkTestTree
|
||||||
testPolicy
|
testPolicy
|
||||||
validForProposalPolicy
|
validForProposalPolicy
|
||||||
"proposal"
|
"proposal"
|
||||||
agoraScripts.compiledProposalPolicy
|
proposalPolicy
|
||||||
proposalPolicyRedeemer
|
proposalPolicyRedeemer
|
||||||
(mint proposalPolicySymbol)
|
(mint proposalPolicySymbol)
|
||||||
|
|
||||||
|
|
@ -465,7 +466,7 @@ mkTestTree
|
||||||
testValidator
|
testValidator
|
||||||
validForGovernorValidator
|
validForGovernorValidator
|
||||||
"governor"
|
"governor"
|
||||||
agoraScripts.compiledGovernorValidator
|
governorValidator
|
||||||
governorInputDatum
|
governorInputDatum
|
||||||
governorRedeemer
|
governorRedeemer
|
||||||
(spend governorRef)
|
(spend governorRef)
|
||||||
|
|
@ -474,7 +475,7 @@ mkTestTree
|
||||||
testValidator
|
testValidator
|
||||||
validForStakeValidator
|
validForStakeValidator
|
||||||
"stake"
|
"stake"
|
||||||
agoraScripts.compiledStakeValidator
|
stakeValidator
|
||||||
(mkStakeInputDatum ps)
|
(mkStakeInputDatum ps)
|
||||||
stakeRedeemer
|
stakeRedeemer
|
||||||
(spend stakeRef)
|
(spend stakeRef)
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,6 @@ import Agora.Proposal (
|
||||||
ResultTag (..),
|
ResultTag (..),
|
||||||
)
|
)
|
||||||
import Agora.Proposal.Time (ProposalStartingTime (ProposalStartingTime), ProposalTimingConfig (..))
|
import Agora.Proposal.Time (ProposalStartingTime (ProposalStartingTime), ProposalTimingConfig (..))
|
||||||
import Agora.Scripts (AgoraScripts (..))
|
|
||||||
import Agora.Stake (
|
import Agora.Stake (
|
||||||
ProposalLock (..),
|
ProposalLock (..),
|
||||||
StakeDatum (..),
|
StakeDatum (..),
|
||||||
|
|
@ -72,12 +71,13 @@ import PlutusLedgerApi.V2 (
|
||||||
)
|
)
|
||||||
import Sample.Proposal.Shared (stakeTxRef)
|
import Sample.Proposal.Shared (stakeTxRef)
|
||||||
import Sample.Shared (
|
import Sample.Shared (
|
||||||
agoraScripts,
|
|
||||||
governor,
|
governor,
|
||||||
minAda,
|
minAda,
|
||||||
proposalPolicySymbol,
|
proposalPolicySymbol,
|
||||||
|
proposalValidator,
|
||||||
proposalValidatorHash,
|
proposalValidatorHash,
|
||||||
stakeAssetClass,
|
stakeAssetClass,
|
||||||
|
stakeValidator,
|
||||||
stakeValidatorHash,
|
stakeValidatorHash,
|
||||||
)
|
)
|
||||||
import Test.Specification (SpecificationTree, group, testValidator)
|
import Test.Specification (SpecificationTree, group, testValidator)
|
||||||
|
|
@ -379,7 +379,7 @@ mkTestTree name ps val = group name [stake, proposal]
|
||||||
testValidator
|
testValidator
|
||||||
val.forStakeValidator
|
val.forStakeValidator
|
||||||
"stake"
|
"stake"
|
||||||
agoraScripts.compiledStakeValidator
|
stakeValidator
|
||||||
(mkStakeInputDatum ps.stakeParameters)
|
(mkStakeInputDatum ps.stakeParameters)
|
||||||
stakeRedeemer
|
stakeRedeemer
|
||||||
(spend $ mkStakeRef 1)
|
(spend $ mkStakeRef 1)
|
||||||
|
|
@ -388,7 +388,7 @@ mkTestTree name ps val = group name [stake, proposal]
|
||||||
testValidator
|
testValidator
|
||||||
val.forProposalValidator
|
val.forProposalValidator
|
||||||
"proposal"
|
"proposal"
|
||||||
agoraScripts.compiledProposalValidator
|
proposalValidator
|
||||||
(mkProposalInputDatum ps.stakeParameters ps.proposalParameters)
|
(mkProposalInputDatum ps.stakeParameters ps.proposalParameters)
|
||||||
proposalRedeemer
|
proposalRedeemer
|
||||||
(spend proposalRef)
|
(spend proposalRef)
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ import Agora.Proposal.Time (
|
||||||
ProposalStartingTime (ProposalStartingTime),
|
ProposalStartingTime (ProposalStartingTime),
|
||||||
ProposalTimingConfig (draftTime, votingTime),
|
ProposalTimingConfig (draftTime, votingTime),
|
||||||
)
|
)
|
||||||
import Agora.Scripts (AgoraScripts (..))
|
|
||||||
import Agora.Stake (
|
import Agora.Stake (
|
||||||
ProposalLock (Voted),
|
ProposalLock (Voted),
|
||||||
StakeDatum (..),
|
StakeDatum (..),
|
||||||
|
|
@ -70,12 +69,13 @@ import PlutusLedgerApi.V2 (Credential (PubKeyCredential), PubKeyHash)
|
||||||
import PlutusLedgerApi.V2.Contexts (TxOutRef (TxOutRef))
|
import PlutusLedgerApi.V2.Contexts (TxOutRef (TxOutRef))
|
||||||
import Sample.Proposal.Shared (proposalTxRef)
|
import Sample.Proposal.Shared (proposalTxRef)
|
||||||
import Sample.Shared (
|
import Sample.Shared (
|
||||||
agoraScripts,
|
|
||||||
governor,
|
governor,
|
||||||
minAda,
|
minAda,
|
||||||
proposalPolicySymbol,
|
proposalPolicySymbol,
|
||||||
|
proposalValidator,
|
||||||
proposalValidatorHash,
|
proposalValidatorHash,
|
||||||
stakeAssetClass,
|
stakeAssetClass,
|
||||||
|
stakeValidator,
|
||||||
stakeValidatorHash,
|
stakeValidatorHash,
|
||||||
)
|
)
|
||||||
import Test.Specification (SpecificationTree, group, testValidator)
|
import Test.Specification (SpecificationTree, group, testValidator)
|
||||||
|
|
@ -385,7 +385,7 @@ mkTestTree name ps val = group name $ catMaybes [proposal, stake]
|
||||||
testValidator
|
testValidator
|
||||||
val.forProposalValidator
|
val.forProposalValidator
|
||||||
"proposal"
|
"proposal"
|
||||||
agoraScripts.compiledProposalValidator
|
proposalValidator
|
||||||
proposalInputDatum
|
proposalInputDatum
|
||||||
(mkProposalRedeemer ps.voteParameters)
|
(mkProposalRedeemer ps.voteParameters)
|
||||||
(spend $ mkProposalRef 1)
|
(spend $ mkProposalRef 1)
|
||||||
|
|
@ -399,7 +399,7 @@ mkTestTree name ps val = group name $ catMaybes [proposal, stake]
|
||||||
testValidator
|
testValidator
|
||||||
val.forStakeValidator
|
val.forStakeValidator
|
||||||
"stake"
|
"stake"
|
||||||
agoraScripts.compiledStakeValidator
|
stakeValidator
|
||||||
(mkStakeInputDatum ps.stakeParameters.stakeInputParameters)
|
(mkStakeInputDatum ps.stakeParameters.stakeInputParameters)
|
||||||
(mkStakeRedeemer ps.stakeParameters.stakeOutputParameters)
|
(mkStakeRedeemer ps.stakeParameters.stakeOutputParameters)
|
||||||
(spend stakeRef)
|
(spend stakeRef)
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ module Sample.Shared (
|
||||||
signer2,
|
signer2,
|
||||||
minAda,
|
minAda,
|
||||||
deterministicTracingConfing,
|
deterministicTracingConfing,
|
||||||
mkEffect,
|
|
||||||
mkRedeemer,
|
mkRedeemer,
|
||||||
fromDiscrete,
|
fromDiscrete,
|
||||||
|
|
||||||
|
|
@ -24,27 +23,32 @@ module Sample.Shared (
|
||||||
|
|
||||||
-- ** Stake
|
-- ** Stake
|
||||||
stakeAssetClass,
|
stakeAssetClass,
|
||||||
|
stakePolicy,
|
||||||
|
stakeValidator,
|
||||||
stakeValidatorHash,
|
stakeValidatorHash,
|
||||||
stakeAddress,
|
stakeAddress,
|
||||||
stakeSymbol,
|
stakeSymbol,
|
||||||
|
|
||||||
-- ** Governor
|
-- ** Governor
|
||||||
governor,
|
governor,
|
||||||
govPolicy,
|
governorPolicy,
|
||||||
govValidator,
|
governorValidator,
|
||||||
govSymbol,
|
governorSymbol,
|
||||||
govAssetClass,
|
governorAssetClass,
|
||||||
govValidatorAddress,
|
governorValidatorAddress,
|
||||||
govValidatorHash,
|
governorValidatorHash,
|
||||||
gstUTXORef,
|
gstUTXORef,
|
||||||
|
|
||||||
-- ** Proposal
|
-- ** Proposal
|
||||||
|
proposalPolicy,
|
||||||
proposalPolicySymbol,
|
proposalPolicySymbol,
|
||||||
|
proposalValidator,
|
||||||
proposalValidatorHash,
|
proposalValidatorHash,
|
||||||
proposalValidatorAddress,
|
proposalValidatorAddress,
|
||||||
proposalStartingTimeFromTimeRange,
|
proposalStartingTimeFromTimeRange,
|
||||||
|
|
||||||
-- ** Authority
|
-- ** Authority
|
||||||
|
authorityTokenPolicy,
|
||||||
authorityTokenSymbol,
|
authorityTokenSymbol,
|
||||||
|
|
||||||
-- ** Treasury
|
-- ** Treasury
|
||||||
|
|
@ -53,42 +57,37 @@ module Sample.Shared (
|
||||||
gatCs,
|
gatCs,
|
||||||
mockTrEffect,
|
mockTrEffect,
|
||||||
mockTrEffectHash,
|
mockTrEffectHash,
|
||||||
|
trValidator,
|
||||||
trCredential,
|
trCredential,
|
||||||
wrongEffHash,
|
wrongEffHash,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Agora.Bootstrap qualified as Bootstrap
|
import Agora.Bootstrap qualified as Bootstrap
|
||||||
import Agora.Effect.NoOp (noOpValidator)
|
|
||||||
import Agora.Governor (Governor (Governor))
|
import Agora.Governor (Governor (Governor))
|
||||||
|
import Agora.Linker (linker)
|
||||||
import Agora.Proposal (ProposalThresholds (..))
|
import Agora.Proposal (ProposalThresholds (..))
|
||||||
import Agora.Proposal.Time (
|
import Agora.Proposal.Time (
|
||||||
MaxTimeRangeWidth (..),
|
MaxTimeRangeWidth (..),
|
||||||
ProposalStartingTime (ProposalStartingTime),
|
ProposalStartingTime (ProposalStartingTime),
|
||||||
ProposalTimingConfig (..),
|
ProposalTimingConfig (..),
|
||||||
)
|
)
|
||||||
import Agora.Scripts qualified as Scripts
|
|
||||||
import Agora.Treasury (treasuryValidator)
|
|
||||||
import Agora.Utils (
|
import Agora.Utils (
|
||||||
CompiledEffect (CompiledEffect),
|
|
||||||
CompiledMintingPolicy (getCompiledMintingPolicy),
|
|
||||||
CompiledValidator (getCompiledValidator),
|
|
||||||
validatorHashToTokenName,
|
validatorHashToTokenName,
|
||||||
)
|
)
|
||||||
import Data.Coerce (coerce)
|
import Data.Coerce (coerce)
|
||||||
import Data.Default.Class (Default (..))
|
import Data.Default.Class (Default (..))
|
||||||
|
import Data.Map (Map, (!))
|
||||||
import Data.Tagged (Tagged (..))
|
import Data.Tagged (Tagged (..))
|
||||||
|
import Data.Text (Text)
|
||||||
|
import Optics (view)
|
||||||
import Plutarch (Config (..), TracingMode (DetTracing))
|
import Plutarch (Config (..), TracingMode (DetTracing))
|
||||||
import Plutarch.Api.V2 (
|
import Plutarch.Api.V2 (
|
||||||
PValidator,
|
|
||||||
mintingPolicySymbol,
|
mintingPolicySymbol,
|
||||||
mkValidator,
|
|
||||||
validatorHash,
|
validatorHash,
|
||||||
)
|
)
|
||||||
import Plutarch.SafeMoney (Discrete (Discrete))
|
import Plutarch.SafeMoney (Discrete (Discrete))
|
||||||
import PlutusLedgerApi.V1.Address (scriptHashAddress)
|
import PlutusLedgerApi.V1.Address (scriptHashAddress)
|
||||||
import PlutusLedgerApi.V1.Contexts (TxOut (..))
|
import PlutusLedgerApi.V1.Value (AssetClass (AssetClass), TokenName, Value)
|
||||||
import PlutusLedgerApi.V1.Scripts (Validator, ValidatorHash (..))
|
|
||||||
import PlutusLedgerApi.V1.Value (AssetClass, TokenName)
|
|
||||||
import PlutusLedgerApi.V1.Value qualified as Value (
|
import PlutusLedgerApi.V1.Value qualified as Value (
|
||||||
assetClass,
|
assetClass,
|
||||||
singleton,
|
singleton,
|
||||||
|
|
@ -101,15 +100,26 @@ import PlutusLedgerApi.V2 (
|
||||||
Interval (..),
|
Interval (..),
|
||||||
LowerBound (..),
|
LowerBound (..),
|
||||||
MintingPolicy (..),
|
MintingPolicy (..),
|
||||||
|
OutputDatum (NoOutputDatum),
|
||||||
POSIXTimeRange,
|
POSIXTimeRange,
|
||||||
PubKeyHash,
|
PubKeyHash,
|
||||||
Redeemer (..),
|
Redeemer (..),
|
||||||
|
Script,
|
||||||
ToData (toBuiltinData),
|
ToData (toBuiltinData),
|
||||||
|
TxOut (
|
||||||
|
TxOut,
|
||||||
|
txOutAddress,
|
||||||
|
txOutDatum,
|
||||||
|
txOutReferenceScript,
|
||||||
|
txOutValue
|
||||||
|
),
|
||||||
TxOutRef (TxOutRef),
|
TxOutRef (TxOutRef),
|
||||||
UpperBound (..),
|
UpperBound (..),
|
||||||
Value,
|
Validator (Validator),
|
||||||
|
ValidatorHash (ValidatorHash),
|
||||||
)
|
)
|
||||||
import PlutusTx qualified
|
import PlutusTx qualified
|
||||||
|
import ScriptExport.ScriptInfo (runLinker)
|
||||||
|
|
||||||
-- Plutarch compiler configauration.
|
-- Plutarch compiler configauration.
|
||||||
-- TODO: add the ability to change this value. Maybe wrap everything in a
|
-- TODO: add the ability to change this value. Maybe wrap everything in a
|
||||||
|
|
@ -128,17 +138,31 @@ governor = Governor oref gt mc
|
||||||
"LQ"
|
"LQ"
|
||||||
mc = 20
|
mc = 20
|
||||||
|
|
||||||
agoraScripts :: Scripts.AgoraScripts
|
agoraScripts :: Map Text Script
|
||||||
agoraScripts = Bootstrap.agoraScripts deterministicTracingConfing governor
|
agoraScripts =
|
||||||
|
either
|
||||||
|
(error . show)
|
||||||
|
(view #scripts)
|
||||||
|
( runLinker
|
||||||
|
linker
|
||||||
|
(Bootstrap.agoraScripts deterministicTracingConfing)
|
||||||
|
governor
|
||||||
|
)
|
||||||
|
|
||||||
|
stakePolicy :: MintingPolicy
|
||||||
|
stakePolicy = MintingPolicy $ agoraScripts ! "agora:stakePolicy"
|
||||||
|
|
||||||
stakeSymbol :: CurrencySymbol
|
stakeSymbol :: CurrencySymbol
|
||||||
stakeSymbol = Scripts.stakeSTSymbol agoraScripts
|
stakeSymbol = mintingPolicySymbol stakePolicy
|
||||||
|
|
||||||
stakeAssetClass :: AssetClass
|
stakeAssetClass :: AssetClass
|
||||||
stakeAssetClass = Scripts.stakeSTAssetClass agoraScripts
|
stakeAssetClass = AssetClass (stakeSymbol, validatorHashToTokenName stakeValidatorHash)
|
||||||
|
|
||||||
|
stakeValidator :: Validator
|
||||||
|
stakeValidator = Validator $ agoraScripts ! "agora:stakeValidator"
|
||||||
|
|
||||||
stakeValidatorHash :: ValidatorHash
|
stakeValidatorHash :: ValidatorHash
|
||||||
stakeValidatorHash = Scripts.stakeValidatorHash agoraScripts
|
stakeValidatorHash = validatorHash stakeValidator
|
||||||
|
|
||||||
stakeAddress :: Address
|
stakeAddress :: Address
|
||||||
stakeAddress = Address (ScriptCredential stakeValidatorHash) Nothing
|
stakeAddress = Address (ScriptCredential stakeValidatorHash) Nothing
|
||||||
|
|
@ -146,26 +170,29 @@ stakeAddress = Address (ScriptCredential stakeValidatorHash) Nothing
|
||||||
gstUTXORef :: TxOutRef
|
gstUTXORef :: TxOutRef
|
||||||
gstUTXORef = TxOutRef "f28cd7145c24e66fd5bcd2796837aeb19a48a2656e7833c88c62a2d0450bd00d" 0
|
gstUTXORef = TxOutRef "f28cd7145c24e66fd5bcd2796837aeb19a48a2656e7833c88c62a2d0450bd00d" 0
|
||||||
|
|
||||||
govPolicy :: MintingPolicy
|
governorPolicy :: MintingPolicy
|
||||||
govPolicy = agoraScripts.compiledGovernorPolicy.getCompiledMintingPolicy
|
governorPolicy = MintingPolicy $ agoraScripts ! "agora:governorPolicy"
|
||||||
|
|
||||||
govValidator :: Validator
|
governorValidator :: Validator
|
||||||
govValidator = agoraScripts.compiledGovernorValidator.getCompiledValidator
|
governorValidator = Validator $ agoraScripts ! "agora:governorValidator"
|
||||||
|
|
||||||
govSymbol :: CurrencySymbol
|
governorSymbol :: CurrencySymbol
|
||||||
govSymbol = mintingPolicySymbol govPolicy
|
governorSymbol = mintingPolicySymbol governorPolicy
|
||||||
|
|
||||||
govAssetClass :: AssetClass
|
governorAssetClass :: AssetClass
|
||||||
govAssetClass = Scripts.governorSTAssetClass agoraScripts
|
governorAssetClass = AssetClass (governorSymbol, "")
|
||||||
|
|
||||||
govValidatorHash :: ValidatorHash
|
governorValidatorHash :: ValidatorHash
|
||||||
govValidatorHash = Scripts.governorValidatorHash agoraScripts
|
governorValidatorHash = validatorHash governorValidator
|
||||||
|
|
||||||
govValidatorAddress :: Address
|
governorValidatorAddress :: Address
|
||||||
govValidatorAddress = scriptHashAddress govValidatorHash
|
governorValidatorAddress = scriptHashAddress governorValidatorHash
|
||||||
|
|
||||||
|
proposalPolicy :: MintingPolicy
|
||||||
|
proposalPolicy = MintingPolicy $ agoraScripts ! "agora:proposalPolicy"
|
||||||
|
|
||||||
proposalPolicySymbol :: CurrencySymbol
|
proposalPolicySymbol :: CurrencySymbol
|
||||||
proposalPolicySymbol = Scripts.proposalSTSymbol agoraScripts
|
proposalPolicySymbol = mintingPolicySymbol proposalPolicy
|
||||||
|
|
||||||
-- | A sample 'PubKeyHash'.
|
-- | A sample 'PubKeyHash'.
|
||||||
signer :: PubKeyHash
|
signer :: PubKeyHash
|
||||||
|
|
@ -175,8 +202,11 @@ signer = "8a30896c4fd5e79843e4ca1bd2cdbaa36f8c0bc3be7401214142019c"
|
||||||
signer2 :: PubKeyHash
|
signer2 :: PubKeyHash
|
||||||
signer2 = "8a30896c4fd5e79843e4ca1bd2cdbaa36f8c0bc3be74012141420192"
|
signer2 = "8a30896c4fd5e79843e4ca1bd2cdbaa36f8c0bc3be74012141420192"
|
||||||
|
|
||||||
|
proposalValidator :: Validator
|
||||||
|
proposalValidator = Validator $ agoraScripts ! "agora:proposalValidator"
|
||||||
|
|
||||||
proposalValidatorHash :: ValidatorHash
|
proposalValidatorHash :: ValidatorHash
|
||||||
proposalValidatorHash = Scripts.proposalValidatoHash agoraScripts
|
proposalValidatorHash = validatorHash proposalValidator
|
||||||
|
|
||||||
proposalValidatorAddress :: Address
|
proposalValidatorAddress :: Address
|
||||||
proposalValidatorAddress = scriptHashAddress proposalValidatorHash
|
proposalValidatorAddress = scriptHashAddress proposalValidatorHash
|
||||||
|
|
@ -194,8 +224,11 @@ instance Default ProposalThresholds where
|
||||||
, cosign = Tagged 100
|
, cosign = Tagged 100
|
||||||
}
|
}
|
||||||
|
|
||||||
|
authorityTokenPolicy :: MintingPolicy
|
||||||
|
authorityTokenPolicy = MintingPolicy $ agoraScripts ! "agora:authorityTokenPolicy"
|
||||||
|
|
||||||
authorityTokenSymbol :: CurrencySymbol
|
authorityTokenSymbol :: CurrencySymbol
|
||||||
authorityTokenSymbol = Scripts.authorityTokenSymbol agoraScripts
|
authorityTokenSymbol = mintingPolicySymbol authorityTokenPolicy
|
||||||
|
|
||||||
{- | Default value of 'Agora.Governor.GovernorDatum.proposalTimings'.
|
{- | Default value of 'Agora.Governor.GovernorDatum.proposalTimings'.
|
||||||
For testing purpose only.
|
For testing purpose only.
|
||||||
|
|
@ -224,9 +257,6 @@ proposalStartingTimeFromTimeRange
|
||||||
ProposalStartingTime $ (l + u) `div` 2
|
ProposalStartingTime $ (l + u) `div` 2
|
||||||
proposalStartingTimeFromTimeRange _ = error "Given time range should be finite and closed"
|
proposalStartingTimeFromTimeRange _ = error "Given time range should be finite and closed"
|
||||||
|
|
||||||
mkEffect :: (PlutusTx.ToData datum) => ClosedTerm PValidator -> CompiledEffect datum
|
|
||||||
mkEffect v = CompiledEffect $ mkValidator deterministicTracingConfing v
|
|
||||||
|
|
||||||
mkRedeemer :: forall redeemer. PlutusTx.ToData redeemer => redeemer -> Redeemer
|
mkRedeemer :: forall redeemer. PlutusTx.ToData redeemer => redeemer -> Redeemer
|
||||||
mkRedeemer = Redeemer . toBuiltinData
|
mkRedeemer = Redeemer . toBuiltinData
|
||||||
|
|
||||||
|
|
@ -240,17 +270,18 @@ treasuryOut =
|
||||||
TxOut
|
TxOut
|
||||||
{ txOutAddress = Address trCredential Nothing
|
{ txOutAddress = Address trCredential Nothing
|
||||||
, txOutValue = minAda
|
, txOutValue = minAda
|
||||||
, txOutDatumHash = Nothing
|
, txOutDatum = NoOutputDatum
|
||||||
|
, txOutReferenceScript = Nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
{- | Arbitrary 'CurrencySymbol', representing the 'CurrencySymbol'
|
{- | Arbitrary 'CurrencySymbol', representing the 'CurrencySymbol'
|
||||||
of a valid governance authority token (GAT).
|
of a valid governance authority token (GAT).
|
||||||
-}
|
-}
|
||||||
gatCs :: CurrencySymbol
|
gatCs :: CurrencySymbol
|
||||||
gatCs = "73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049"
|
gatCs = authorityTokenSymbol
|
||||||
|
|
||||||
trValidator :: Validator
|
trValidator :: Validator
|
||||||
trValidator = mkValidator def (treasuryValidator gatCs)
|
trValidator = Validator $ agoraScripts ! "agora:treasuryValidator"
|
||||||
|
|
||||||
-- | `ScriptCredential` used for the dummy treasury validator.
|
-- | `ScriptCredential` used for the dummy treasury validator.
|
||||||
trCredential :: Credential
|
trCredential :: Credential
|
||||||
|
|
@ -262,7 +293,7 @@ gatTn = validatorHashToTokenName $ validatorHash mockTrEffect
|
||||||
|
|
||||||
-- | Mock treasury effect script, used for testing.
|
-- | Mock treasury effect script, used for testing.
|
||||||
mockTrEffect :: Validator
|
mockTrEffect :: Validator
|
||||||
mockTrEffect = mkValidator def $ noOpValidator gatCs
|
mockTrEffect = Validator $ agoraScripts ! "agora:noOpValidator"
|
||||||
|
|
||||||
-- | Mock treasury effect validator hash
|
-- | Mock treasury effect validator hash
|
||||||
mockTrEffectHash :: ValidatorHash
|
mockTrEffectHash :: ValidatorHash
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ module Sample.Stake.SetDelegate (
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Agora.Governor (Governor (gtClassRef))
|
import Agora.Governor (Governor (gtClassRef))
|
||||||
import Agora.Scripts (AgoraScripts (..))
|
|
||||||
import Agora.Stake (
|
import Agora.Stake (
|
||||||
StakeDatum (..),
|
StakeDatum (..),
|
||||||
StakeRedeemer (ClearDelegate, DelegateTo),
|
StakeRedeemer (ClearDelegate, DelegateTo),
|
||||||
|
|
@ -47,13 +46,13 @@ import PlutusLedgerApi.V2 (
|
||||||
TxOutRef (TxOutRef),
|
TxOutRef (TxOutRef),
|
||||||
)
|
)
|
||||||
import Sample.Shared (
|
import Sample.Shared (
|
||||||
agoraScripts,
|
|
||||||
fromDiscrete,
|
fromDiscrete,
|
||||||
governor,
|
governor,
|
||||||
minAda,
|
minAda,
|
||||||
signer,
|
signer,
|
||||||
signer2,
|
signer2,
|
||||||
stakeAssetClass,
|
stakeAssetClass,
|
||||||
|
stakeValidator,
|
||||||
stakeValidatorHash,
|
stakeValidatorHash,
|
||||||
)
|
)
|
||||||
import Test.Specification (SpecificationTree, testValidator)
|
import Test.Specification (SpecificationTree, testValidator)
|
||||||
|
|
@ -159,7 +158,7 @@ mkTestCase name ps valid =
|
||||||
testValidator
|
testValidator
|
||||||
valid
|
valid
|
||||||
name
|
name
|
||||||
agoraScripts.compiledStakeValidator
|
stakeValidator
|
||||||
(mkStakeInputDatum ps)
|
(mkStakeInputDatum ps)
|
||||||
(mkStakeRedeemer ps)
|
(mkStakeRedeemer ps)
|
||||||
(setDelegate ps)
|
(setDelegate ps)
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,19 @@
|
||||||
module Spec.Effect.GovernorMutation (specs) where
|
module Spec.Effect.GovernorMutation (specs) where
|
||||||
|
|
||||||
import Agora.Effect.GovernorMutation (mutateGovernorValidator)
|
|
||||||
import Agora.Governor (GovernorDatum (..), GovernorRedeemer (MutateGovernor))
|
import Agora.Governor (GovernorDatum (..), GovernorRedeemer (MutateGovernor))
|
||||||
import Agora.Proposal (ProposalId (..))
|
import Agora.Proposal (ProposalId (..))
|
||||||
import Agora.Scripts (AgoraScripts (..))
|
|
||||||
import Data.Default.Class (Default (def))
|
import Data.Default.Class (Default (def))
|
||||||
import PlutusLedgerApi.V2 (ScriptContext (ScriptContext), ScriptPurpose (Spending))
|
import PlutusLedgerApi.V2 (ScriptContext (ScriptContext), ScriptPurpose (Spending))
|
||||||
import Sample.Effect.GovernorMutation (
|
import Sample.Effect.GovernorMutation (
|
||||||
effectRef,
|
effectRef,
|
||||||
|
effectValidator,
|
||||||
govRef,
|
govRef,
|
||||||
invalidNewGovernorDatum,
|
invalidNewGovernorDatum,
|
||||||
mkEffectDatum,
|
mkEffectDatum,
|
||||||
mkEffectTxInfo,
|
mkEffectTxInfo,
|
||||||
validNewGovernorDatum,
|
validNewGovernorDatum,
|
||||||
)
|
)
|
||||||
import Sample.Shared (agoraScripts, mkEffect)
|
import Sample.Shared (governorValidator)
|
||||||
import Test.Specification (
|
import Test.Specification (
|
||||||
SpecificationTree,
|
SpecificationTree,
|
||||||
effectFailsWith,
|
effectFailsWith,
|
||||||
|
|
@ -32,7 +31,7 @@ specs =
|
||||||
"valid new governor datum"
|
"valid new governor datum"
|
||||||
[ validatorSucceedsWith
|
[ validatorSucceedsWith
|
||||||
"governor validator should pass"
|
"governor validator should pass"
|
||||||
agoraScripts.compiledGovernorValidator
|
governorValidator
|
||||||
( GovernorDatum
|
( GovernorDatum
|
||||||
def
|
def
|
||||||
(ProposalId 0)
|
(ProposalId 0)
|
||||||
|
|
@ -47,7 +46,7 @@ specs =
|
||||||
)
|
)
|
||||||
, effectSucceedsWith
|
, effectSucceedsWith
|
||||||
"effect validator should pass"
|
"effect validator should pass"
|
||||||
(mkEffect $ mutateGovernorValidator agoraScripts)
|
effectValidator
|
||||||
(mkEffectDatum validNewGovernorDatum)
|
(mkEffectDatum validNewGovernorDatum)
|
||||||
(ScriptContext (mkEffectTxInfo validNewGovernorDatum) (Spending effectRef))
|
(ScriptContext (mkEffectTxInfo validNewGovernorDatum) (Spending effectRef))
|
||||||
]
|
]
|
||||||
|
|
@ -55,7 +54,7 @@ specs =
|
||||||
"invalid new governor datum"
|
"invalid new governor datum"
|
||||||
[ validatorFailsWith
|
[ validatorFailsWith
|
||||||
"governor validator should fail"
|
"governor validator should fail"
|
||||||
agoraScripts.compiledGovernorValidator
|
governorValidator
|
||||||
( GovernorDatum
|
( GovernorDatum
|
||||||
def
|
def
|
||||||
(ProposalId 0)
|
(ProposalId 0)
|
||||||
|
|
@ -70,7 +69,7 @@ specs =
|
||||||
)
|
)
|
||||||
, effectFailsWith
|
, effectFailsWith
|
||||||
"effect validator should fail"
|
"effect validator should fail"
|
||||||
(mkEffect $ mutateGovernorValidator agoraScripts)
|
effectValidator
|
||||||
(mkEffectDatum validNewGovernorDatum)
|
(mkEffectDatum validNewGovernorDatum)
|
||||||
(ScriptContext (mkEffectTxInfo invalidNewGovernorDatum) (Spending effectRef))
|
(ScriptContext (mkEffectTxInfo invalidNewGovernorDatum) (Spending effectRef))
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,11 @@ module Spec.Effect.TreasuryWithdrawal (specs) where
|
||||||
|
|
||||||
import Agora.Effect.TreasuryWithdrawal (
|
import Agora.Effect.TreasuryWithdrawal (
|
||||||
TreasuryWithdrawalDatum (TreasuryWithdrawalDatum),
|
TreasuryWithdrawalDatum (TreasuryWithdrawalDatum),
|
||||||
treasuryWithdrawalValidator,
|
|
||||||
)
|
)
|
||||||
import PlutusLedgerApi.V1.Value qualified as Value
|
import PlutusLedgerApi.V1.Value qualified as Value
|
||||||
import Sample.Effect.TreasuryWithdrawal (
|
import Sample.Effect.TreasuryWithdrawal (
|
||||||
buildReceiversOutputFromDatum,
|
buildReceiversOutputFromDatum,
|
||||||
buildScriptContext,
|
buildScriptContext,
|
||||||
currSymbol,
|
|
||||||
inputCollateral,
|
inputCollateral,
|
||||||
inputGAT,
|
inputGAT,
|
||||||
inputTreasury,
|
inputTreasury,
|
||||||
|
|
@ -24,8 +22,8 @@ import Sample.Effect.TreasuryWithdrawal (
|
||||||
outputUser,
|
outputUser,
|
||||||
treasuries,
|
treasuries,
|
||||||
users,
|
users,
|
||||||
|
validator,
|
||||||
)
|
)
|
||||||
import Sample.Shared (mkEffect)
|
|
||||||
import Test.Specification (
|
import Test.Specification (
|
||||||
SpecificationTree,
|
SpecificationTree,
|
||||||
effectFailsWith,
|
effectFailsWith,
|
||||||
|
|
@ -40,7 +38,7 @@ specs =
|
||||||
"effect"
|
"effect"
|
||||||
[ effectSucceedsWith
|
[ effectSucceedsWith
|
||||||
"Simple"
|
"Simple"
|
||||||
(mkEffect $ treasuryWithdrawalValidator currSymbol)
|
validator
|
||||||
datum1
|
datum1
|
||||||
( buildScriptContext
|
( buildScriptContext
|
||||||
[ inputGAT
|
[ inputGAT
|
||||||
|
|
@ -52,7 +50,7 @@ specs =
|
||||||
)
|
)
|
||||||
, effectSucceedsWith
|
, effectSucceedsWith
|
||||||
"Simple with multiple treasuries "
|
"Simple with multiple treasuries "
|
||||||
(mkEffect $ treasuryWithdrawalValidator currSymbol)
|
validator
|
||||||
datum1
|
datum1
|
||||||
( buildScriptContext
|
( buildScriptContext
|
||||||
[ inputGAT
|
[ inputGAT
|
||||||
|
|
@ -69,7 +67,7 @@ specs =
|
||||||
)
|
)
|
||||||
, effectSucceedsWith
|
, effectSucceedsWith
|
||||||
"Mixed Assets"
|
"Mixed Assets"
|
||||||
(mkEffect $ treasuryWithdrawalValidator currSymbol)
|
validator
|
||||||
datum2
|
datum2
|
||||||
( buildScriptContext
|
( buildScriptContext
|
||||||
[ inputGAT
|
[ inputGAT
|
||||||
|
|
@ -84,7 +82,7 @@ specs =
|
||||||
)
|
)
|
||||||
, effectFailsWith
|
, effectFailsWith
|
||||||
"Pay to uknown 3rd party"
|
"Pay to uknown 3rd party"
|
||||||
(mkEffect $ treasuryWithdrawalValidator currSymbol)
|
validator
|
||||||
datum2
|
datum2
|
||||||
( buildScriptContext
|
( buildScriptContext
|
||||||
[ inputGAT
|
[ inputGAT
|
||||||
|
|
@ -100,7 +98,7 @@ specs =
|
||||||
)
|
)
|
||||||
, effectFailsWith
|
, effectFailsWith
|
||||||
"Missing receiver"
|
"Missing receiver"
|
||||||
(mkEffect $ treasuryWithdrawalValidator currSymbol)
|
validator
|
||||||
datum2
|
datum2
|
||||||
( buildScriptContext
|
( buildScriptContext
|
||||||
[ inputGAT
|
[ inputGAT
|
||||||
|
|
@ -115,7 +113,7 @@ specs =
|
||||||
)
|
)
|
||||||
, effectFailsWith
|
, effectFailsWith
|
||||||
"Unauthorized treasury"
|
"Unauthorized treasury"
|
||||||
(mkEffect $ treasuryWithdrawalValidator currSymbol)
|
validator
|
||||||
datum3
|
datum3
|
||||||
( buildScriptContext
|
( buildScriptContext
|
||||||
[ inputGAT
|
[ inputGAT
|
||||||
|
|
@ -127,7 +125,7 @@ specs =
|
||||||
)
|
)
|
||||||
, effectFailsWith
|
, effectFailsWith
|
||||||
"Prevent transactions besides the withdrawal"
|
"Prevent transactions besides the withdrawal"
|
||||||
(mkEffect $ treasuryWithdrawalValidator currSymbol)
|
validator
|
||||||
datum3
|
datum3
|
||||||
( buildScriptContext
|
( buildScriptContext
|
||||||
[ inputGAT
|
[ inputGAT
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ Tests for Stake policy and validator
|
||||||
-}
|
-}
|
||||||
module Spec.Stake (specs) where
|
module Spec.Stake (specs) where
|
||||||
|
|
||||||
import Agora.Scripts (AgoraScripts (..))
|
|
||||||
import Agora.Stake (
|
import Agora.Stake (
|
||||||
StakeDatum (StakeDatum),
|
StakeDatum (StakeDatum),
|
||||||
StakeRedeemer (DepositWithdraw),
|
StakeRedeemer (DepositWithdraw),
|
||||||
|
|
@ -17,7 +16,7 @@ import Agora.Stake (
|
||||||
import Data.Bool (Bool (..))
|
import Data.Bool (Bool (..))
|
||||||
import Data.Maybe (Maybe (..))
|
import Data.Maybe (Maybe (..))
|
||||||
import PlutusLedgerApi.V1 (Credential (PubKeyCredential))
|
import PlutusLedgerApi.V1 (Credential (PubKeyCredential))
|
||||||
import Sample.Shared (agoraScripts)
|
import Sample.Shared (stakePolicy, stakeValidator)
|
||||||
import Sample.Stake (
|
import Sample.Stake (
|
||||||
DepositWithdrawExample (
|
DepositWithdrawExample (
|
||||||
DepositWithdrawExample,
|
DepositWithdrawExample,
|
||||||
|
|
@ -50,17 +49,17 @@ specs =
|
||||||
"policy"
|
"policy"
|
||||||
[ policySucceedsWith
|
[ policySucceedsWith
|
||||||
"stakeCreation"
|
"stakeCreation"
|
||||||
agoraScripts.compiledStakePolicy
|
stakePolicy
|
||||||
()
|
()
|
||||||
Stake.stakeCreation
|
Stake.stakeCreation
|
||||||
, policyFailsWith
|
, policyFailsWith
|
||||||
"stakeCreationWrongDatum"
|
"stakeCreationWrongDatum"
|
||||||
agoraScripts.compiledStakePolicy
|
stakePolicy
|
||||||
()
|
()
|
||||||
Stake.stakeCreationWrongDatum
|
Stake.stakeCreationWrongDatum
|
||||||
, policyFailsWith
|
, policyFailsWith
|
||||||
"stakeCreationUnsigned"
|
"stakeCreationUnsigned"
|
||||||
agoraScripts.compiledStakePolicy
|
stakePolicy
|
||||||
()
|
()
|
||||||
Stake.stakeCreationUnsigned
|
Stake.stakeCreationUnsigned
|
||||||
]
|
]
|
||||||
|
|
@ -68,19 +67,19 @@ specs =
|
||||||
"validator"
|
"validator"
|
||||||
[ validatorSucceedsWith
|
[ validatorSucceedsWith
|
||||||
"stakeDepositWithdraw deposit"
|
"stakeDepositWithdraw deposit"
|
||||||
agoraScripts.compiledStakeValidator
|
stakeValidator
|
||||||
(StakeDatum 100_000 (PubKeyCredential signer) Nothing [])
|
(StakeDatum 100_000 (PubKeyCredential signer) Nothing [])
|
||||||
(DepositWithdraw 100_000)
|
(DepositWithdraw 100_000)
|
||||||
(Stake.stakeDepositWithdraw $ DepositWithdrawExample {startAmount = 100_000, delta = 100_000})
|
(Stake.stakeDepositWithdraw $ DepositWithdrawExample {startAmount = 100_000, delta = 100_000})
|
||||||
, validatorSucceedsWith
|
, validatorSucceedsWith
|
||||||
"stakeDepositWithdraw withdraw"
|
"stakeDepositWithdraw withdraw"
|
||||||
agoraScripts.compiledStakeValidator
|
stakeValidator
|
||||||
(StakeDatum 100_000 (PubKeyCredential signer) Nothing [])
|
(StakeDatum 100_000 (PubKeyCredential signer) Nothing [])
|
||||||
(DepositWithdraw $ negate 100_000)
|
(DepositWithdraw $ negate 100_000)
|
||||||
(Stake.stakeDepositWithdraw $ DepositWithdrawExample {startAmount = 100_000, delta = negate 100_000})
|
(Stake.stakeDepositWithdraw $ DepositWithdrawExample {startAmount = 100_000, delta = negate 100_000})
|
||||||
, validatorFailsWith
|
, validatorFailsWith
|
||||||
"stakeDepositWithdraw negative GT"
|
"stakeDepositWithdraw negative GT"
|
||||||
agoraScripts.compiledStakeValidator
|
stakeValidator
|
||||||
(StakeDatum 100_000 (PubKeyCredential signer) Nothing [])
|
(StakeDatum 100_000 (PubKeyCredential signer) Nothing [])
|
||||||
(DepositWithdraw 1_000_000)
|
(DepositWithdraw 1_000_000)
|
||||||
(Stake.stakeDepositWithdraw $ DepositWithdrawExample {startAmount = 100_000, delta = negate 1_000_000})
|
(Stake.stakeDepositWithdraw $ DepositWithdrawExample {startAmount = 100_000, delta = negate 1_000_000})
|
||||||
|
|
|
||||||
|
|
@ -21,22 +21,17 @@ Tests need to fail when:
|
||||||
-}
|
-}
|
||||||
module Spec.Treasury (specs) where
|
module Spec.Treasury (specs) where
|
||||||
|
|
||||||
import Agora.Treasury (
|
|
||||||
treasuryValidator,
|
|
||||||
)
|
|
||||||
import Agora.Utils (CompiledValidator (CompiledValidator))
|
|
||||||
import Plutarch.Api.V2 (mkValidator)
|
|
||||||
import PlutusLedgerApi.V1.Credential (
|
import PlutusLedgerApi.V1.Credential (
|
||||||
StakingCredential (StakingHash),
|
StakingCredential (StakingHash),
|
||||||
)
|
)
|
||||||
import PlutusLedgerApi.V1.Value qualified as Value (singleton)
|
import PlutusLedgerApi.V1.Value qualified as Value (singleton)
|
||||||
import PlutusLedgerApi.V2 (DCert (DCertDelegRegKey))
|
import PlutusLedgerApi.V2 (DCert (DCertDelegRegKey), Validator)
|
||||||
import PlutusLedgerApi.V2.Contexts (
|
import PlutusLedgerApi.V2.Contexts (
|
||||||
ScriptContext (scriptContextPurpose, scriptContextTxInfo),
|
ScriptContext (scriptContextPurpose, scriptContextTxInfo),
|
||||||
ScriptPurpose (Certifying, Minting, Rewarding),
|
ScriptPurpose (Certifying, Minting, Rewarding),
|
||||||
TxInfo (txInfoInputs, txInfoMint),
|
TxInfo (txInfoInputs, txInfoMint),
|
||||||
)
|
)
|
||||||
import Sample.Shared (deterministicTracingConfing, trCredential)
|
import Sample.Shared (trCredential, trValidator)
|
||||||
import Sample.Treasury (
|
import Sample.Treasury (
|
||||||
gatCs,
|
gatCs,
|
||||||
gatTn,
|
gatTn,
|
||||||
|
|
@ -51,11 +46,8 @@ import Test.Specification (
|
||||||
validatorSucceedsWith,
|
validatorSucceedsWith,
|
||||||
)
|
)
|
||||||
|
|
||||||
compiledTreasuryValidator :: CompiledValidator () ()
|
compiledTreasuryValidator :: Validator
|
||||||
compiledTreasuryValidator =
|
compiledTreasuryValidator = trValidator
|
||||||
CompiledValidator $
|
|
||||||
mkValidator deterministicTracingConfing $
|
|
||||||
treasuryValidator gatCs
|
|
||||||
|
|
||||||
specs :: [SpecificationTree]
|
specs :: [SpecificationTree]
|
||||||
specs =
|
specs =
|
||||||
|
|
|
||||||
|
|
@ -49,26 +49,23 @@ module Test.Specification (
|
||||||
toTestTree,
|
toTestTree,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Agora.Utils (
|
|
||||||
CompiledEffect (..),
|
|
||||||
CompiledMintingPolicy (..),
|
|
||||||
CompiledValidator (..),
|
|
||||||
)
|
|
||||||
import Control.Composition ((.**), (.***))
|
import Control.Composition ((.**), (.***))
|
||||||
import Data.Coerce (coerce)
|
import Data.Coerce (coerce)
|
||||||
import Data.Text qualified as Text
|
import Data.Text qualified as Text
|
||||||
import Plutarch.Evaluate (evalScript)
|
import Plutarch.Evaluate (evalScript)
|
||||||
import PlutusLedgerApi.V1.Scripts (
|
import PlutusLedgerApi.V1.Scripts (
|
||||||
Context (..),
|
Context (Context),
|
||||||
applyMintingPolicyScript,
|
applyMintingPolicyScript,
|
||||||
applyValidator,
|
applyValidator,
|
||||||
)
|
)
|
||||||
import PlutusLedgerApi.V2 (
|
import PlutusLedgerApi.V2 (
|
||||||
Datum (..),
|
Datum (..),
|
||||||
|
MintingPolicy,
|
||||||
Redeemer (Redeemer),
|
Redeemer (Redeemer),
|
||||||
Script,
|
Script,
|
||||||
ScriptContext,
|
ScriptContext,
|
||||||
ToData (toBuiltinData),
|
ToData (toBuiltinData),
|
||||||
|
Validator,
|
||||||
)
|
)
|
||||||
import PlutusTx.IsData qualified as PlutusTx (ToData)
|
import PlutusTx.IsData qualified as PlutusTx (ToData)
|
||||||
import Test.Tasty (TestTree, testGroup)
|
import Test.Tasty (TestTree, testGroup)
|
||||||
|
|
@ -191,21 +188,21 @@ mkDatum = Datum . toBuiltinData
|
||||||
|
|
||||||
applyMintingPolicy' ::
|
applyMintingPolicy' ::
|
||||||
(PlutusTx.ToData redeemer) =>
|
(PlutusTx.ToData redeemer) =>
|
||||||
CompiledMintingPolicy redeemer ->
|
MintingPolicy ->
|
||||||
redeemer ->
|
redeemer ->
|
||||||
ScriptContext ->
|
ScriptContext ->
|
||||||
Script
|
Script
|
||||||
applyMintingPolicy' policy redeemer scriptContext =
|
applyMintingPolicy' policy redeemer scriptContext =
|
||||||
applyMintingPolicyScript
|
applyMintingPolicyScript
|
||||||
(mkContext scriptContext)
|
(mkContext scriptContext)
|
||||||
policy.getCompiledMintingPolicy
|
policy
|
||||||
(mkRedeemer redeemer)
|
(mkRedeemer redeemer)
|
||||||
|
|
||||||
applyValidator' ::
|
applyValidator' ::
|
||||||
( PlutusTx.ToData datum
|
( PlutusTx.ToData datum
|
||||||
, PlutusTx.ToData redeemer
|
, PlutusTx.ToData redeemer
|
||||||
) =>
|
) =>
|
||||||
CompiledValidator datum redeemer ->
|
Validator ->
|
||||||
datum ->
|
datum ->
|
||||||
redeemer ->
|
redeemer ->
|
||||||
ScriptContext ->
|
ScriptContext ->
|
||||||
|
|
@ -213,7 +210,7 @@ applyValidator' ::
|
||||||
applyValidator' validator datum redeemer scriptContext =
|
applyValidator' validator datum redeemer scriptContext =
|
||||||
applyValidator
|
applyValidator
|
||||||
(mkContext scriptContext)
|
(mkContext scriptContext)
|
||||||
validator.getCompiledValidator
|
validator
|
||||||
(mkDatum datum)
|
(mkDatum datum)
|
||||||
(mkRedeemer redeemer)
|
(mkRedeemer redeemer)
|
||||||
|
|
||||||
|
|
@ -221,7 +218,7 @@ applyValidator' validator datum redeemer scriptContext =
|
||||||
policySucceedsWith ::
|
policySucceedsWith ::
|
||||||
(PlutusTx.ToData redeemer) =>
|
(PlutusTx.ToData redeemer) =>
|
||||||
String ->
|
String ->
|
||||||
CompiledMintingPolicy redeemer ->
|
MintingPolicy ->
|
||||||
redeemer ->
|
redeemer ->
|
||||||
ScriptContext ->
|
ScriptContext ->
|
||||||
SpecificationTree
|
SpecificationTree
|
||||||
|
|
@ -232,7 +229,7 @@ policySucceedsWith tag =
|
||||||
policyFailsWith ::
|
policyFailsWith ::
|
||||||
(PlutusTx.ToData redeemer) =>
|
(PlutusTx.ToData redeemer) =>
|
||||||
String ->
|
String ->
|
||||||
CompiledMintingPolicy redeemer ->
|
MintingPolicy ->
|
||||||
redeemer ->
|
redeemer ->
|
||||||
ScriptContext ->
|
ScriptContext ->
|
||||||
SpecificationTree
|
SpecificationTree
|
||||||
|
|
@ -245,7 +242,7 @@ validatorSucceedsWith ::
|
||||||
, PlutusTx.ToData redeemer
|
, PlutusTx.ToData redeemer
|
||||||
) =>
|
) =>
|
||||||
String ->
|
String ->
|
||||||
CompiledValidator datum redeemer ->
|
Validator ->
|
||||||
datum ->
|
datum ->
|
||||||
redeemer ->
|
redeemer ->
|
||||||
ScriptContext ->
|
ScriptContext ->
|
||||||
|
|
@ -259,7 +256,7 @@ validatorFailsWith ::
|
||||||
, PlutusTx.ToData redeemer
|
, PlutusTx.ToData redeemer
|
||||||
) =>
|
) =>
|
||||||
String ->
|
String ->
|
||||||
CompiledValidator datum redeemer ->
|
Validator ->
|
||||||
datum ->
|
datum ->
|
||||||
redeemer ->
|
redeemer ->
|
||||||
ScriptContext ->
|
ScriptContext ->
|
||||||
|
|
@ -272,7 +269,7 @@ effectSucceedsWith ::
|
||||||
( PlutusTx.ToData datum
|
( PlutusTx.ToData datum
|
||||||
) =>
|
) =>
|
||||||
String ->
|
String ->
|
||||||
CompiledEffect datum ->
|
Validator ->
|
||||||
datum ->
|
datum ->
|
||||||
ScriptContext ->
|
ScriptContext ->
|
||||||
SpecificationTree
|
SpecificationTree
|
||||||
|
|
@ -283,7 +280,7 @@ effectFailsWith ::
|
||||||
( PlutusTx.ToData datum
|
( PlutusTx.ToData datum
|
||||||
) =>
|
) =>
|
||||||
String ->
|
String ->
|
||||||
CompiledEffect datum ->
|
Validator ->
|
||||||
datum ->
|
datum ->
|
||||||
ScriptContext ->
|
ScriptContext ->
|
||||||
SpecificationTree
|
SpecificationTree
|
||||||
|
|
@ -296,7 +293,7 @@ testValidator ::
|
||||||
-- | Is this test case expected to succeed?
|
-- | Is this test case expected to succeed?
|
||||||
Bool ->
|
Bool ->
|
||||||
String ->
|
String ->
|
||||||
CompiledValidator datum redeemer ->
|
Validator ->
|
||||||
datum ->
|
datum ->
|
||||||
redeemer ->
|
redeemer ->
|
||||||
ScriptContext ->
|
ScriptContext ->
|
||||||
|
|
@ -313,7 +310,7 @@ testPolicy ::
|
||||||
-- | Is this test case expected to succeed?
|
-- | Is this test case expected to succeed?
|
||||||
Bool ->
|
Bool ->
|
||||||
String ->
|
String ->
|
||||||
CompiledMintingPolicy redeemer ->
|
MintingPolicy ->
|
||||||
redeemer ->
|
redeemer ->
|
||||||
ScriptContext ->
|
ScriptContext ->
|
||||||
SpecificationTree
|
SpecificationTree
|
||||||
|
|
|
||||||
32
agora.cabal
32
agora.cabal
|
|
@ -18,10 +18,6 @@ common lang
|
||||||
-Wmissing-deriving-strategies -Wno-name-shadowing -Wunused-foralls
|
-Wmissing-deriving-strategies -Wno-name-shadowing -Wunused-foralls
|
||||||
-fprint-explicit-foralls -fprint-explicit-kinds -Wunused-do-bind
|
-fprint-explicit-foralls -fprint-explicit-kinds -Wunused-do-bind
|
||||||
|
|
||||||
mixins:
|
|
||||||
base hiding (Prelude),
|
|
||||||
pprelude (PPrelude as Prelude)
|
|
||||||
|
|
||||||
default-extensions:
|
default-extensions:
|
||||||
NoStarIsType
|
NoStarIsType
|
||||||
BangPatterns
|
BangPatterns
|
||||||
|
|
@ -90,7 +86,7 @@ common deps
|
||||||
build-depends:
|
build-depends:
|
||||||
, aeson
|
, aeson
|
||||||
, ansi-terminal
|
, ansi-terminal
|
||||||
, base >=4.14 && <5
|
, base >=4.14 && <5
|
||||||
, base-compat
|
, base-compat
|
||||||
, base16
|
, base16
|
||||||
, bytestring
|
, bytestring
|
||||||
|
|
@ -100,16 +96,20 @@ common deps
|
||||||
, containers
|
, containers
|
||||||
, data-default
|
, data-default
|
||||||
, data-default-class
|
, data-default-class
|
||||||
|
, filepath
|
||||||
, generics-sop
|
, generics-sop
|
||||||
, liqwid-plutarch-extra
|
, liqwid-plutarch-extra
|
||||||
|
, liqwid-script-export
|
||||||
|
, optics
|
||||||
, plutarch
|
, plutarch
|
||||||
, plutarch-extra
|
, plutarch-extra
|
||||||
, plutarch-numeric
|
, plutarch-numeric
|
||||||
, plutarch-safe-money
|
, plutarch-safe-money
|
||||||
, plutarch-script-export
|
|
||||||
, plutus-core
|
, plutus-core
|
||||||
, plutus-ledger-api
|
, plutus-ledger-api
|
||||||
, plutus-tx
|
, plutus-tx
|
||||||
|
, ply-core
|
||||||
|
, ply-plutarch
|
||||||
, pprelude
|
, pprelude
|
||||||
, prettyprinter
|
, prettyprinter
|
||||||
, recursion-schemes
|
, recursion-schemes
|
||||||
|
|
@ -118,7 +118,10 @@ common deps
|
||||||
, template-haskell
|
, template-haskell
|
||||||
, text
|
, text
|
||||||
|
|
||||||
|
common plutarch-prelude
|
||||||
mixins:
|
mixins:
|
||||||
|
base hiding (Prelude),
|
||||||
|
pprelude (PPrelude as Prelude)
|
||||||
|
|
||||||
common test-deps
|
common test-deps
|
||||||
build-depends:
|
build-depends:
|
||||||
|
|
@ -142,7 +145,7 @@ common exe-opts
|
||||||
ghc-options: -threaded -rtsopts -with-rtsopts=-N -O0
|
ghc-options: -threaded -rtsopts -with-rtsopts=-N -O0
|
||||||
|
|
||||||
library
|
library
|
||||||
import: lang, deps
|
import: lang, deps, plutarch-prelude
|
||||||
exposed-modules:
|
exposed-modules:
|
||||||
Agora.Aeson.Orphans
|
Agora.Aeson.Orphans
|
||||||
Agora.AuthorityToken
|
Agora.AuthorityToken
|
||||||
|
|
@ -154,12 +157,12 @@ library
|
||||||
Agora.Effect.TreasuryWithdrawal
|
Agora.Effect.TreasuryWithdrawal
|
||||||
Agora.Governor
|
Agora.Governor
|
||||||
Agora.Governor.Scripts
|
Agora.Governor.Scripts
|
||||||
|
Agora.Linker
|
||||||
Agora.Plutarch.Orphans
|
Agora.Plutarch.Orphans
|
||||||
Agora.Proposal
|
Agora.Proposal
|
||||||
Agora.Proposal.Scripts
|
Agora.Proposal.Scripts
|
||||||
Agora.Proposal.Time
|
Agora.Proposal.Time
|
||||||
Agora.SafeMoney
|
Agora.SafeMoney
|
||||||
Agora.Scripts
|
|
||||||
Agora.Stake
|
Agora.Stake
|
||||||
Agora.Stake.Redeemers
|
Agora.Stake.Redeemers
|
||||||
Agora.Stake.Scripts
|
Agora.Stake.Scripts
|
||||||
|
|
@ -178,7 +181,7 @@ library pprelude
|
||||||
, plutarch
|
, plutarch
|
||||||
|
|
||||||
library agora-testlib
|
library agora-testlib
|
||||||
import: lang, deps, test-deps
|
import: lang, deps, plutarch-prelude, test-deps
|
||||||
exposed-modules:
|
exposed-modules:
|
||||||
Test.Specification
|
Test.Specification
|
||||||
Test.Util
|
Test.Util
|
||||||
|
|
@ -186,7 +189,7 @@ library agora-testlib
|
||||||
hs-source-dirs: agora-testlib
|
hs-source-dirs: agora-testlib
|
||||||
|
|
||||||
library agora-specs
|
library agora-specs
|
||||||
import: lang, deps, test-deps
|
import: lang, deps, plutarch-prelude, test-deps
|
||||||
exposed-modules:
|
exposed-modules:
|
||||||
Property.Generator
|
Property.Generator
|
||||||
Property.Governor
|
Property.Governor
|
||||||
|
|
@ -217,7 +220,7 @@ library agora-specs
|
||||||
build-depends: agora-testlib
|
build-depends: agora-testlib
|
||||||
|
|
||||||
test-suite agora-test
|
test-suite agora-test
|
||||||
import: lang, deps, test-deps
|
import: lang, deps, plutarch-prelude, test-deps
|
||||||
type: exitcode-stdio-1.0
|
type: exitcode-stdio-1.0
|
||||||
main-is: Spec.hs
|
main-is: Spec.hs
|
||||||
hs-source-dirs: agora-test
|
hs-source-dirs: agora-test
|
||||||
|
|
@ -226,7 +229,7 @@ test-suite agora-test
|
||||||
, agora-testlib
|
, agora-testlib
|
||||||
|
|
||||||
benchmark agora-bench
|
benchmark agora-bench
|
||||||
import: lang, deps
|
import: lang, deps, plutarch-prelude
|
||||||
hs-source-dirs: agora-bench
|
hs-source-dirs: agora-bench
|
||||||
main-is: Main.hs
|
main-is: Main.hs
|
||||||
other-modules:
|
other-modules:
|
||||||
|
|
@ -248,11 +251,14 @@ executable agora-scripts
|
||||||
hs-source-dirs: agora-scripts
|
hs-source-dirs: agora-scripts
|
||||||
other-modules:
|
other-modules:
|
||||||
build-depends:
|
build-depends:
|
||||||
|
, aeson-pretty
|
||||||
, agora
|
, agora
|
||||||
, gitrev
|
, gitrev
|
||||||
|
|
||||||
|
mixins: base
|
||||||
|
|
||||||
executable agora-purescript-bridge
|
executable agora-purescript-bridge
|
||||||
import: lang, deps, exe-opts
|
import: lang, deps, plutarch-prelude, exe-opts
|
||||||
main-is: Bridge.hs
|
main-is: Bridge.hs
|
||||||
hs-source-dirs: agora-purescript-bridge
|
hs-source-dirs: agora-purescript-bridge
|
||||||
other-modules:
|
other-modules:
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ module Agora.Aeson.Orphans (AsBase16Bytes (..)) where
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
import Data.Coerce (Coercible, coerce)
|
import Data.Coerce (Coercible, coerce)
|
||||||
|
import Plutarch.Orphans ()
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -19,7 +20,6 @@ import Data.Text.Encoding qualified as T
|
||||||
|
|
||||||
import PlutusLedgerApi.V1 qualified as Plutus
|
import PlutusLedgerApi.V1 qualified as Plutus
|
||||||
import PlutusLedgerApi.V1.Bytes qualified as Plutus
|
import PlutusLedgerApi.V1.Bytes qualified as Plutus
|
||||||
import PlutusLedgerApi.V1.Scripts qualified as Plutus
|
|
||||||
import PlutusLedgerApi.V1.Value qualified as Plutus
|
import PlutusLedgerApi.V1.Value qualified as Plutus
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
@ -37,16 +37,6 @@ deriving via
|
||||||
instance
|
instance
|
||||||
Aeson.FromJSON Plutus.AssetClass
|
Aeson.FromJSON Plutus.AssetClass
|
||||||
|
|
||||||
deriving via
|
|
||||||
AsBase16Bytes Plutus.TxId
|
|
||||||
instance
|
|
||||||
Aeson.FromJSON Plutus.TxId
|
|
||||||
|
|
||||||
deriving via
|
|
||||||
AsBase16Bytes Plutus.TxId
|
|
||||||
instance
|
|
||||||
Aeson.ToJSON Plutus.TxId
|
|
||||||
|
|
||||||
instance (Coercible a Plutus.LedgerBytes) => Aeson.ToJSON (AsBase16Bytes a) where
|
instance (Coercible a Plutus.LedgerBytes) => Aeson.ToJSON (AsBase16Bytes a) where
|
||||||
toJSON =
|
toJSON =
|
||||||
Aeson.String
|
Aeson.String
|
||||||
|
|
@ -76,86 +66,3 @@ instance (Codec.Serialise a) => Aeson.FromJSON (AsBase16Codec a) where
|
||||||
. Codec.deserialiseOrFail
|
. Codec.deserialiseOrFail
|
||||||
. Lazy.fromStrict
|
. Lazy.fromStrict
|
||||||
. T.encodeUtf8
|
. T.encodeUtf8
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
deriving via
|
|
||||||
(AsBase16Bytes Plutus.CurrencySymbol)
|
|
||||||
instance
|
|
||||||
(Aeson.ToJSON Plutus.CurrencySymbol)
|
|
||||||
deriving via
|
|
||||||
(AsBase16Bytes Plutus.CurrencySymbol)
|
|
||||||
instance
|
|
||||||
(Aeson.FromJSON Plutus.CurrencySymbol)
|
|
||||||
|
|
||||||
deriving via
|
|
||||||
(AsBase16Bytes Plutus.TokenName)
|
|
||||||
instance
|
|
||||||
(Aeson.ToJSON Plutus.TokenName)
|
|
||||||
deriving via
|
|
||||||
(AsBase16Bytes Plutus.TokenName)
|
|
||||||
instance
|
|
||||||
(Aeson.FromJSON Plutus.TokenName)
|
|
||||||
|
|
||||||
deriving via
|
|
||||||
(AsBase16Bytes Plutus.ValidatorHash)
|
|
||||||
instance
|
|
||||||
(Aeson.ToJSON Plutus.ValidatorHash)
|
|
||||||
deriving via
|
|
||||||
(AsBase16Bytes Plutus.ValidatorHash)
|
|
||||||
instance
|
|
||||||
(Aeson.FromJSON Plutus.ValidatorHash)
|
|
||||||
|
|
||||||
deriving via
|
|
||||||
(AsBase16Bytes Plutus.ScriptHash)
|
|
||||||
instance
|
|
||||||
(Aeson.ToJSON Plutus.ScriptHash)
|
|
||||||
deriving via
|
|
||||||
(AsBase16Bytes Plutus.ScriptHash)
|
|
||||||
instance
|
|
||||||
(Aeson.FromJSON Plutus.ScriptHash)
|
|
||||||
|
|
||||||
deriving via
|
|
||||||
(AsBase16Bytes Plutus.BuiltinByteString)
|
|
||||||
instance
|
|
||||||
(Aeson.ToJSON Plutus.BuiltinByteString)
|
|
||||||
deriving via
|
|
||||||
(AsBase16Bytes Plutus.BuiltinByteString)
|
|
||||||
instance
|
|
||||||
(Aeson.FromJSON Plutus.BuiltinByteString)
|
|
||||||
|
|
||||||
deriving via
|
|
||||||
(AsBase16Codec Plutus.Validator)
|
|
||||||
instance
|
|
||||||
(Aeson.ToJSON Plutus.Validator)
|
|
||||||
deriving via
|
|
||||||
(AsBase16Codec Plutus.Validator)
|
|
||||||
instance
|
|
||||||
(Aeson.FromJSON Plutus.Validator)
|
|
||||||
|
|
||||||
deriving via
|
|
||||||
(AsBase16Codec Plutus.MintingPolicy)
|
|
||||||
instance
|
|
||||||
(Aeson.ToJSON Plutus.MintingPolicy)
|
|
||||||
deriving via
|
|
||||||
(AsBase16Codec Plutus.MintingPolicy)
|
|
||||||
instance
|
|
||||||
(Aeson.FromJSON Plutus.MintingPolicy)
|
|
||||||
|
|
||||||
deriving via
|
|
||||||
(AsBase16Codec Plutus.Script)
|
|
||||||
instance
|
|
||||||
(Aeson.ToJSON Plutus.Script)
|
|
||||||
deriving via
|
|
||||||
(AsBase16Codec Plutus.Script)
|
|
||||||
instance
|
|
||||||
(Aeson.FromJSON Plutus.Script)
|
|
||||||
|
|
||||||
deriving via
|
|
||||||
Integer
|
|
||||||
instance
|
|
||||||
(Aeson.ToJSON Plutus.POSIXTime)
|
|
||||||
deriving via
|
|
||||||
Integer
|
|
||||||
instance
|
|
||||||
(Aeson.FromJSON Plutus.POSIXTime)
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ module Agora.AuthorityToken (
|
||||||
authorityTokenPolicy,
|
authorityTokenPolicy,
|
||||||
authorityTokensValidIn,
|
authorityTokensValidIn,
|
||||||
singleAuthorityTokenBurned,
|
singleAuthorityTokenBurned,
|
||||||
AuthorityToken (..),
|
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Plutarch.Api.V1 (
|
import Plutarch.Api.V1 (
|
||||||
|
|
@ -29,34 +28,13 @@ import Plutarch.Api.V2 (
|
||||||
PTxInfo (PTxInfo),
|
PTxInfo (PTxInfo),
|
||||||
PTxOut (PTxOut),
|
PTxOut (PTxOut),
|
||||||
)
|
)
|
||||||
import Plutarch.Extra.AssetClass (passetClass, passetClassValueOf)
|
import Plutarch.Extra.AssetClass (PAssetClass, passetClass, passetClassValueOf)
|
||||||
import "liqwid-plutarch-extra" Plutarch.Extra.List (plookupAssoc)
|
import "liqwid-plutarch-extra" Plutarch.Extra.List (plookupAssoc)
|
||||||
import Plutarch.Extra.ScriptContext (pisTokenSpent)
|
import Plutarch.Extra.ScriptContext (pisTokenSpent)
|
||||||
import Plutarch.Extra.Sum (PSum (PSum))
|
import Plutarch.Extra.Sum (PSum (PSum))
|
||||||
import "liqwid-plutarch-extra" Plutarch.Extra.TermCont (pguardC, pletC, pletFieldsC, pmatchC)
|
import "liqwid-plutarch-extra" Plutarch.Extra.TermCont (pguardC, pletC, pletFieldsC, pmatchC)
|
||||||
import Plutarch.Extra.Traversable (pfoldMap)
|
import Plutarch.Extra.Traversable (pfoldMap)
|
||||||
import Plutarch.Extra.Value (psymbolValueOf)
|
import Plutarch.Extra.Value (psymbolValueOf)
|
||||||
import PlutusLedgerApi.V1.Value (AssetClass (AssetClass))
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
{- | An AuthorityToken represents a proof that a particular token
|
|
||||||
spent in the same transaction the AuthorityToken was minted.
|
|
||||||
In effect, this means that the validator that locked such a token
|
|
||||||
must have approved the transaction in which an AuthorityToken is minted.
|
|
||||||
Said validator should be made aware of an AuthorityToken token's existence
|
|
||||||
in order to prevent incorrect minting.
|
|
||||||
|
|
||||||
@since 0.1.0
|
|
||||||
-}
|
|
||||||
newtype AuthorityToken = AuthorityToken
|
|
||||||
{ authority :: AssetClass
|
|
||||||
-- ^ Token that must move in order for minting this to be valid.
|
|
||||||
}
|
|
||||||
deriving stock
|
|
||||||
( -- | @since 0.1.0
|
|
||||||
Generic
|
|
||||||
)
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -72,7 +50,7 @@ newtype AuthorityToken = AuthorityToken
|
||||||
As of version 1.0.0, this has been weakened in order to be compatible
|
As of version 1.0.0, this has been weakened in order to be compatible
|
||||||
with RATs.
|
with RATs.
|
||||||
|
|
||||||
@since 0.1.0
|
@since 1.0.0
|
||||||
-}
|
-}
|
||||||
authorityTokensValidIn :: forall (s :: S). Term s (PCurrencySymbol :--> PTxOut :--> PBool)
|
authorityTokensValidIn :: forall (s :: S). Term s (PCurrencySymbol :--> PTxOut :--> PBool)
|
||||||
authorityTokensValidIn = phoistAcyclic $
|
authorityTokensValidIn = phoistAcyclic $
|
||||||
|
|
@ -143,20 +121,27 @@ singleAuthorityTokenBurned gatCs inputs mint = unTermCont $ do
|
||||||
|
|
||||||
{- | Policy given 'AuthorityToken' params.
|
{- | Policy given 'AuthorityToken' params.
|
||||||
|
|
||||||
|
== Authority Token
|
||||||
|
|
||||||
|
An AuthorityToken represents a proof that a particular token
|
||||||
|
spent in the same transaction the AuthorityToken was minted.
|
||||||
|
In effect, this means that the validator that locked such a token
|
||||||
|
must have approved the transaction in which an AuthorityToken is minted.
|
||||||
|
Said validator should be made aware of an AuthorityToken token's existence
|
||||||
|
in order to prevent incorrect minting.
|
||||||
|
|
||||||
@since 0.1.0
|
@since 0.1.0
|
||||||
-}
|
-}
|
||||||
authorityTokenPolicy :: AuthorityToken -> ClosedTerm PMintingPolicy
|
authorityTokenPolicy :: ClosedTerm (PAssetClass :--> PMintingPolicy)
|
||||||
authorityTokenPolicy params =
|
authorityTokenPolicy =
|
||||||
plam $ \_redeemer ctx' ->
|
plam $ \atAssetClass _redeemer ctx' ->
|
||||||
pmatch ctx' $ \(PScriptContext ctx') -> unTermCont $ do
|
pmatch ctx' $ \(PScriptContext ctx') -> unTermCont $ do
|
||||||
ctx <- pletFieldsC @'["txInfo", "purpose"] ctx'
|
ctx <- pletFieldsC @'["txInfo", "purpose"] ctx'
|
||||||
PTxInfo txInfo' <- pmatchC $ pfromData ctx.txInfo
|
PTxInfo txInfo' <- pmatchC $ pfromData ctx.txInfo
|
||||||
txInfo <- pletFieldsC @'["inputs", "mint", "outputs"] txInfo'
|
txInfo <- pletFieldsC @'["inputs", "mint", "outputs"] txInfo'
|
||||||
let inputs = txInfo.inputs
|
let inputs = txInfo.inputs
|
||||||
mintedValue = pfromData txInfo.mint
|
mintedValue = pfromData txInfo.mint
|
||||||
AssetClass (govCs, govTn) = params.authority
|
govTokenSpent = pisTokenSpent # atAssetClass # inputs
|
||||||
govAc = passetClass # pconstant govCs # pconstant govTn
|
|
||||||
govTokenSpent = pisTokenSpent # govAc # inputs
|
|
||||||
|
|
||||||
PMinting ownSymbol' <- pmatchC $ pfromData ctx.purpose
|
PMinting ownSymbol' <- pmatchC $ pfromData ctx.purpose
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,66 +6,52 @@
|
||||||
-}
|
-}
|
||||||
module Agora.Bootstrap (agoraScripts) where
|
module Agora.Bootstrap (agoraScripts) where
|
||||||
|
|
||||||
import Agora.AuthorityToken (AuthorityToken (AuthorityToken), authorityTokenPolicy)
|
import Agora.AuthorityToken (authorityTokenPolicy)
|
||||||
|
import Agora.Effect.GovernorMutation (mutateGovernorValidator)
|
||||||
|
import Agora.Effect.NoOp (noOpValidator)
|
||||||
import Agora.Effect.TreasuryWithdrawal (treasuryWithdrawalValidator)
|
import Agora.Effect.TreasuryWithdrawal (treasuryWithdrawalValidator)
|
||||||
import Agora.Governor (Governor, gstOutRef, gtClassRef, maximumCosigners)
|
|
||||||
import Agora.Governor.Scripts (governorPolicy, governorValidator)
|
import Agora.Governor.Scripts (governorPolicy, governorValidator)
|
||||||
import Agora.Proposal.Scripts (proposalPolicy, proposalValidator)
|
import Agora.Proposal.Scripts (proposalPolicy, proposalValidator)
|
||||||
import Agora.Scripts (AgoraScripts (AgoraScripts))
|
|
||||||
import Agora.Scripts qualified as Scripts
|
|
||||||
import Agora.Stake.Scripts (stakePolicy, stakeValidator)
|
import Agora.Stake.Scripts (stakePolicy, stakeValidator)
|
||||||
import Agora.Treasury (treasuryValidator)
|
import Agora.Treasury (treasuryValidator)
|
||||||
import Agora.Utils (
|
import Data.Map (fromList)
|
||||||
CompiledMintingPolicy (CompiledMintingPolicy),
|
import Data.Text (Text, unpack)
|
||||||
CompiledValidator (CompiledValidator),
|
|
||||||
)
|
|
||||||
import Plutarch (Config)
|
import Plutarch (Config)
|
||||||
import Plutarch.Api.V2 (
|
import Plutarch.Extra.AssetClass (PAssetClass)
|
||||||
mintingPolicySymbol,
|
import PlutusLedgerApi.V1.Value (AssetClass)
|
||||||
mkMintingPolicy,
|
import Ply (TypedScriptEnvelope)
|
||||||
mkValidator,
|
import Ply.Plutarch.Class (PlyArgOf)
|
||||||
)
|
import Ply.Plutarch.TypedWriter (TypedWriter, mkEnvelope)
|
||||||
import PlutusLedgerApi.V1.Value (AssetClass (AssetClass))
|
import ScriptExport.ScriptInfo (RawScriptExport (..))
|
||||||
|
|
||||||
{- | Parameterize and precompiled core scripts, given the
|
type instance PlyArgOf PAssetClass = AssetClass
|
||||||
'Agora.Governor.Governor' parameters and plutarch configurations.
|
|
||||||
|
|
||||||
@since 0.2.0
|
{- | Parameterize core scripts, given the 'Agora.Governor.Governor'
|
||||||
|
parameters and plutarch configurations.
|
||||||
|
|
||||||
|
@since 1.0.0
|
||||||
-}
|
-}
|
||||||
agoraScripts :: Config -> Governor -> AgoraScripts
|
agoraScripts :: Config -> RawScriptExport
|
||||||
agoraScripts conf gov = scripts
|
agoraScripts conf =
|
||||||
|
RawScriptExport $
|
||||||
|
fromList
|
||||||
|
[ envelope "agora:governorPolicy" governorPolicy
|
||||||
|
, envelope "agora:governorValidator" governorValidator
|
||||||
|
, envelope "agora:stakePolicy" stakePolicy
|
||||||
|
, envelope "agora:stakeValidator" stakeValidator
|
||||||
|
, envelope "agora:proposalPolicy" proposalPolicy
|
||||||
|
, envelope "agora:proposalValidator" proposalValidator
|
||||||
|
, envelope "agora:treasuryValidator" treasuryValidator
|
||||||
|
, envelope "agora:authorityTokenPolicy" authorityTokenPolicy
|
||||||
|
, envelope "agora:noOpValidator" noOpValidator
|
||||||
|
, envelope "agora:treasuryWithdrawalValidator" treasuryWithdrawalValidator
|
||||||
|
, envelope "agora:mutateGovernorValidator" mutateGovernorValidator
|
||||||
|
]
|
||||||
where
|
where
|
||||||
mkMintingPolicy' = mkMintingPolicy conf
|
envelope ::
|
||||||
mkValidator' = mkValidator conf
|
forall (pt :: S -> Type).
|
||||||
|
TypedWriter pt =>
|
||||||
compiledGovernorPolicy = mkMintingPolicy' $ governorPolicy gov.gstOutRef
|
Text ->
|
||||||
compiledGovernorValidator = mkValidator' $ governorValidator scripts
|
ClosedTerm pt ->
|
||||||
governorSymbol = mintingPolicySymbol compiledGovernorPolicy
|
(Text, TypedScriptEnvelope)
|
||||||
governorAssetClass = AssetClass (governorSymbol, "")
|
envelope d t = (d, either (error . unpack) id $ mkEnvelope conf d t)
|
||||||
|
|
||||||
authority = AuthorityToken governorAssetClass
|
|
||||||
compiledAuthorityPolicy = mkMintingPolicy' $ authorityTokenPolicy authority
|
|
||||||
authorityTokenSymbol = mintingPolicySymbol compiledAuthorityPolicy
|
|
||||||
|
|
||||||
compiledProposalPolicy = mkMintingPolicy' $ proposalPolicy governorAssetClass
|
|
||||||
compiledProposalValidator = mkValidator' $ proposalValidator scripts gov.maximumCosigners
|
|
||||||
|
|
||||||
compiledStakePolicy = mkMintingPolicy' $ stakePolicy gov.gtClassRef
|
|
||||||
compiledStakeValidator = mkValidator' $ stakeValidator scripts gov.gtClassRef
|
|
||||||
|
|
||||||
compiledTreasuryValidator = mkValidator' $ treasuryValidator authorityTokenSymbol
|
|
||||||
|
|
||||||
compiledTreasuryWithdrawalEffect = mkValidator' $ treasuryWithdrawalValidator authorityTokenSymbol
|
|
||||||
|
|
||||||
scripts =
|
|
||||||
AgoraScripts
|
|
||||||
{ Scripts.compiledGovernorPolicy = CompiledMintingPolicy compiledGovernorPolicy
|
|
||||||
, Scripts.compiledGovernorValidator = CompiledValidator compiledGovernorValidator
|
|
||||||
, Scripts.compiledStakePolicy = CompiledMintingPolicy compiledStakePolicy
|
|
||||||
, Scripts.compiledStakeValidator = CompiledValidator compiledStakeValidator
|
|
||||||
, Scripts.compiledProposalPolicy = CompiledMintingPolicy compiledProposalPolicy
|
|
||||||
, Scripts.compiledProposalValidator = CompiledValidator compiledProposalValidator
|
|
||||||
, Scripts.compiledTreasuryValidator = CompiledValidator compiledTreasuryValidator
|
|
||||||
, Scripts.compiledAuthorityTokenPolicy = CompiledMintingPolicy compiledAuthorityPolicy
|
|
||||||
, Scripts.compiledTreasuryWithdrawalEffect = CompiledValidator compiledTreasuryWithdrawalEffect
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,6 @@ import Plutarch.Api.V2 (
|
||||||
PValidator,
|
PValidator,
|
||||||
)
|
)
|
||||||
import "liqwid-plutarch-extra" Plutarch.Extra.TermCont (pguardC, pletC, pletFieldsC, pmatchC, ptryFromC)
|
import "liqwid-plutarch-extra" Plutarch.Extra.TermCont (pguardC, pletC, pletFieldsC, pmatchC, ptryFromC)
|
||||||
import Plutarch.TryFrom ()
|
|
||||||
import PlutusLedgerApi.V1.Value (CurrencySymbol)
|
|
||||||
|
|
||||||
{- | Helper "template" for creating effect validator.
|
{- | Helper "template" for creating effect validator.
|
||||||
|
|
||||||
|
|
@ -27,21 +25,20 @@ import PlutusLedgerApi.V1.Value (CurrencySymbol)
|
||||||
an effect is implemented. In such situations, it's okay to not use this
|
an effect is implemented. In such situations, it's okay to not use this
|
||||||
helper.
|
helper.
|
||||||
|
|
||||||
@since 0.1.0
|
@since 1.0.0
|
||||||
-}
|
-}
|
||||||
makeEffect ::
|
makeEffect ::
|
||||||
forall (datum :: PType).
|
forall (datum :: PType) (s :: S).
|
||||||
(PTryFrom PData datum, PIsData datum) =>
|
(PTryFrom PData datum, PIsData datum) =>
|
||||||
CurrencySymbol ->
|
( Term s PCurrencySymbol ->
|
||||||
( forall (s :: S).
|
|
||||||
Term s PCurrencySymbol ->
|
|
||||||
Term s datum ->
|
Term s datum ->
|
||||||
Term s PTxOutRef ->
|
Term s PTxOutRef ->
|
||||||
Term s (PAsData PTxInfo) ->
|
Term s (PAsData PTxInfo) ->
|
||||||
Term s POpaque
|
Term s POpaque
|
||||||
) ->
|
) ->
|
||||||
ClosedTerm PValidator
|
Term s PCurrencySymbol ->
|
||||||
makeEffect gatCs' f =
|
Term s PValidator
|
||||||
|
makeEffect f atSymbol =
|
||||||
plam $ \datum _redeemer ctx' -> unTermCont $ do
|
plam $ \datum _redeemer ctx' -> unTermCont $ do
|
||||||
ctx <- pletFieldsC @'["txInfo", "purpose"] ctx'
|
ctx <- pletFieldsC @'["txInfo", "purpose"] ctx'
|
||||||
|
|
||||||
|
|
@ -64,10 +61,9 @@ makeEffect gatCs' f =
|
||||||
txOutRef' <- pletC (pfield @"_0" # txOutRef)
|
txOutRef' <- pletC (pfield @"_0" # txOutRef)
|
||||||
|
|
||||||
txInfo <- pletFieldsC @'["mint", "inputs"] ctx.txInfo
|
txInfo <- pletFieldsC @'["mint", "inputs"] ctx.txInfo
|
||||||
gatCs <- pletC $ pconstant gatCs'
|
|
||||||
|
|
||||||
pguardC "A single authority token has been burned" $
|
pguardC "A single authority token has been burned" $
|
||||||
singleAuthorityTokenBurned gatCs txInfo.inputs txInfo.mint
|
singleAuthorityTokenBurned atSymbol txInfo.inputs txInfo.mint
|
||||||
|
|
||||||
-- run effect function
|
-- run effect function
|
||||||
pure $ f gatCs datum' txOutRef' ctx.txInfo
|
pure $ f atSymbol datum' txOutRef' ctx.txInfo
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,8 @@ import Agora.Governor (
|
||||||
PGovernorRedeemer,
|
PGovernorRedeemer,
|
||||||
)
|
)
|
||||||
import Agora.Plutarch.Orphans ()
|
import Agora.Plutarch.Orphans ()
|
||||||
import Agora.Scripts (AgoraScripts, authorityTokenSymbol, governorSTSymbol, governorValidatorHash)
|
|
||||||
import Agora.Utils (pfromSingleton, ptryFromRedeemer)
|
import Agora.Utils (pfromSingleton, ptryFromRedeemer)
|
||||||
|
import Plutarch.Api.V1 (PCurrencySymbol, PValidatorHash)
|
||||||
import Plutarch.Api.V2 (
|
import Plutarch.Api.V2 (
|
||||||
PScriptPurpose (PSpending),
|
PScriptPurpose (PSpending),
|
||||||
PTxOutRef,
|
PTxOutRef,
|
||||||
|
|
@ -140,85 +140,88 @@ deriving anyclass instance PTryFrom PData PMutateGovernorDatum
|
||||||
* It has valid governor state datum.
|
* It has valid governor state datum.
|
||||||
* The datum is exactly the same as the 'newDatum'.
|
* The datum is exactly the same as the 'newDatum'.
|
||||||
|
|
||||||
@since 0.1.0
|
@since 1.0.0
|
||||||
-}
|
-}
|
||||||
mutateGovernorValidator ::
|
mutateGovernorValidator ::
|
||||||
-- | Lazy precompiled scripts. This is beacuse we need the symbol of GST.
|
ClosedTerm
|
||||||
AgoraScripts ->
|
( PValidatorHash
|
||||||
ClosedTerm PValidator
|
:--> PCurrencySymbol
|
||||||
mutateGovernorValidator as = makeEffect (authorityTokenSymbol as) $
|
:--> PCurrencySymbol
|
||||||
\_gatCs (effectDatum :: Term _ PMutateGovernorDatum) _ txInfo -> unTermCont $ do
|
:--> PValidator
|
||||||
effectDatumF <- pletAllC effectDatum
|
)
|
||||||
txInfoF <- pletFieldsC @'["inputs", "outputs", "datums", "redeemers"] txInfo
|
mutateGovernorValidator =
|
||||||
|
plam $ \govValidatorHash gstSymbol -> makeEffect @PMutateGovernorDatum $
|
||||||
|
\_gatCs (effectDatum :: Term _ PMutateGovernorDatum) _ txInfo -> unTermCont $ do
|
||||||
|
effectDatumF <- pletAllC effectDatum
|
||||||
|
txInfoF <- pletFieldsC @'["inputs", "outputs", "datums", "redeemers"] txInfo
|
||||||
|
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
|
|
||||||
scriptInputs <-
|
scriptInputs <-
|
||||||
pletC $
|
pletC $
|
||||||
pfilter
|
pfilter
|
||||||
|
# plam
|
||||||
|
( \inInfo ->
|
||||||
|
pisScriptAddress
|
||||||
|
#$ pfield @"address"
|
||||||
|
#$ pfield @"resolved" # inInfo
|
||||||
|
)
|
||||||
|
# pfromData txInfoF.inputs
|
||||||
|
|
||||||
|
-- Only two script inputs are alloed: one from the effect script, another from the governor.
|
||||||
|
pguardC "Only self and governor script inputs are allowed" $
|
||||||
|
plength # scriptInputs #== 2
|
||||||
|
|
||||||
|
pguardC "Governor input should present" $
|
||||||
|
pany
|
||||||
# plam
|
# plam
|
||||||
( \inInfo ->
|
( flip pletAll $ \inputF ->
|
||||||
pisScriptAddress
|
let governorAddress =
|
||||||
#$ pfield @"address"
|
paddressFromValidatorHash
|
||||||
#$ pfield @"resolved" # inInfo
|
# govValidatorHash
|
||||||
|
# pdnothing
|
||||||
|
|
||||||
|
isGovernorInput =
|
||||||
|
foldl1
|
||||||
|
(#&&)
|
||||||
|
[ ptraceIfFalse "Can only modify the pinned governor" $
|
||||||
|
inputF.outRef #== effectDatumF.governorRef
|
||||||
|
, ptraceIfFalse "Governor UTxO should carry GST" $
|
||||||
|
psymbolValueOf
|
||||||
|
# gstSymbol
|
||||||
|
# (pfield @"value" # inputF.resolved)
|
||||||
|
#== 1
|
||||||
|
, ptraceIfFalse "Governor validator run" $
|
||||||
|
pfield @"address" # inputF.resolved
|
||||||
|
#== governorAddress
|
||||||
|
]
|
||||||
|
in isGovernorInput
|
||||||
)
|
)
|
||||||
# pfromData txInfoF.inputs
|
# scriptInputs
|
||||||
|
|
||||||
-- Only two script inputs are alloed: one from the effect script, another from the governor.
|
let governorRedeemer =
|
||||||
pguardC "Only self and governor script inputs are allowed" $
|
pfromData $
|
||||||
plength # scriptInputs #== 2
|
passertPJust # "Govenor redeemer should be resolved"
|
||||||
|
#$ ptryFromRedeemer @(PAsData PGovernorRedeemer)
|
||||||
|
# mkRecordConstr PSpending (#_0 .= effectDatumF.governorRef)
|
||||||
|
# txInfoF.redeemers
|
||||||
|
|
||||||
pguardC "Governor input should present" $
|
pguardC "Spend governor with redeemer MutateGovernor" $
|
||||||
pany
|
governorRedeemer #== pconstant MutateGovernor
|
||||||
# plam
|
|
||||||
( flip pletAll $ \inputF ->
|
|
||||||
let gstSymbol = pconstant $ governorSTSymbol as
|
|
||||||
governorAddress =
|
|
||||||
paddressFromValidatorHash
|
|
||||||
# pconstant (governorValidatorHash as)
|
|
||||||
# pdnothing
|
|
||||||
|
|
||||||
isGovernorInput =
|
----------------------------------------------------------------------------
|
||||||
foldl1
|
|
||||||
(#&&)
|
|
||||||
[ ptraceIfFalse "Can only modify the pinned governor" $
|
|
||||||
inputF.outRef #== effectDatumF.governorRef
|
|
||||||
, ptraceIfFalse "Governor UTxO should carry GST" $
|
|
||||||
psymbolValueOf
|
|
||||||
# gstSymbol
|
|
||||||
# (pfield @"value" # inputF.resolved)
|
|
||||||
#== 1
|
|
||||||
, ptraceIfFalse "Governor validator run" $
|
|
||||||
pfield @"address" # inputF.resolved
|
|
||||||
#== governorAddress
|
|
||||||
]
|
|
||||||
in isGovernorInput
|
|
||||||
)
|
|
||||||
# scriptInputs
|
|
||||||
|
|
||||||
let governorRedeemer =
|
let governorOutput =
|
||||||
pfromData $
|
ptrace "Only governor output is allowed" $
|
||||||
passertPJust # "Govenor redeemer should be resolved"
|
pfromSingleton # pfromData txInfoF.outputs
|
||||||
#$ ptryFromRedeemer @(PAsData PGovernorRedeemer)
|
|
||||||
# mkRecordConstr PSpending (#_0 .= effectDatumF.governorRef)
|
|
||||||
# txInfoF.redeemers
|
|
||||||
|
|
||||||
pguardC "Spend governor with redeemer MutateGovernor" $
|
governorOutputDatum =
|
||||||
governorRedeemer #== pconstant MutateGovernor
|
ptrace "Resolve governor outoput datum" $
|
||||||
|
pfromOutputDatum @PGovernorDatum
|
||||||
|
# (pfield @"datum" # governorOutput)
|
||||||
|
# txInfoF.datums
|
||||||
|
|
||||||
----------------------------------------------------------------------------
|
pguardC "New governor datum correct" $
|
||||||
|
governorOutputDatum #== effectDatumF.newDatum
|
||||||
|
|
||||||
let governorOutput =
|
return $ popaque $ pconstant ()
|
||||||
ptrace "Only governor output is allowed" $
|
|
||||||
pfromSingleton # pfromData txInfoF.outputs
|
|
||||||
|
|
||||||
governorOutputDatum =
|
|
||||||
ptrace "Resolve governor outoput datum" $
|
|
||||||
pfromOutputDatum @PGovernorDatum
|
|
||||||
# (pfield @"datum" # governorOutput)
|
|
||||||
# txInfoF.datums
|
|
||||||
|
|
||||||
pguardC "New governor datum correct" $
|
|
||||||
governorOutputDatum #== effectDatumF.newDatum
|
|
||||||
|
|
||||||
return $ popaque $ pconstant ()
|
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,9 @@ module Agora.Effect.NoOp (noOpValidator, PNoOp) where
|
||||||
|
|
||||||
import Agora.Effect (makeEffect)
|
import Agora.Effect (makeEffect)
|
||||||
import Agora.Plutarch.Orphans ()
|
import Agora.Plutarch.Orphans ()
|
||||||
|
import Plutarch.Api.V1 (PCurrencySymbol)
|
||||||
import Plutarch.Api.V2 (PValidator)
|
import Plutarch.Api.V2 (PValidator)
|
||||||
import Plutarch.Orphans ()
|
import Plutarch.Orphans ()
|
||||||
import PlutusLedgerApi.V1.Value (CurrencySymbol)
|
|
||||||
|
|
||||||
{- | Dummy datum for NoOp effect.
|
{- | Dummy datum for NoOp effect.
|
||||||
|
|
||||||
|
|
@ -38,8 +38,9 @@ instance PTryFrom PData (PAsData PNoOp)
|
||||||
|
|
||||||
{- | Dummy effect which can only burn its GAT.
|
{- | Dummy effect which can only burn its GAT.
|
||||||
|
|
||||||
@since 0.1.0
|
@since 1.0.0
|
||||||
-}
|
-}
|
||||||
noOpValidator :: CurrencySymbol -> ClosedTerm PValidator
|
noOpValidator :: ClosedTerm (PCurrencySymbol :--> PValidator)
|
||||||
noOpValidator curr = makeEffect curr $
|
noOpValidator = plam $
|
||||||
\_ (_datum :: Term s (PAsData PNoOp)) _ _ -> popaque (pconstant ())
|
makeEffect $
|
||||||
|
\_ (_datum :: Term s (PAsData PNoOp)) _ _ -> popaque (pconstant ())
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ import Agora.Plutarch.Orphans ()
|
||||||
import Agora.Utils (pdelete)
|
import Agora.Utils (pdelete)
|
||||||
import Plutarch.Api.V1 (
|
import Plutarch.Api.V1 (
|
||||||
PCredential,
|
PCredential,
|
||||||
|
PCurrencySymbol,
|
||||||
PValue,
|
PValue,
|
||||||
ptuple,
|
ptuple,
|
||||||
)
|
)
|
||||||
|
|
@ -38,7 +39,7 @@ import Plutarch.Extra.ScriptContext (pisPubKey)
|
||||||
import "liqwid-plutarch-extra" Plutarch.Extra.TermCont (pguardC, pletC, pletFieldsC)
|
import "liqwid-plutarch-extra" Plutarch.Extra.TermCont (pguardC, pletC, pletFieldsC)
|
||||||
import Plutarch.Lift (PConstantDecl, PUnsafeLiftDecl (PLifted))
|
import Plutarch.Lift (PConstantDecl, PUnsafeLiftDecl (PLifted))
|
||||||
import PlutusLedgerApi.V1.Credential (Credential)
|
import PlutusLedgerApi.V1.Credential (Credential)
|
||||||
import PlutusLedgerApi.V1.Value (CurrencySymbol, Value)
|
import PlutusLedgerApi.V1.Value (Value)
|
||||||
import PlutusTx qualified
|
import PlutusTx qualified
|
||||||
|
|
||||||
{- | Datum that encodes behavior of Treasury Withdrawal effect.
|
{- | Datum that encodes behavior of Treasury Withdrawal effect.
|
||||||
|
|
@ -128,61 +129,64 @@ instance PTryFrom PData PTreasuryWithdrawalDatum
|
||||||
|
|
||||||
- The number of outputs themselves
|
- The number of outputs themselves
|
||||||
|
|
||||||
@since 0.1.0
|
@since 1.0.0
|
||||||
-}
|
-}
|
||||||
treasuryWithdrawalValidator :: forall {s :: S}. CurrencySymbol -> Term s PValidator
|
treasuryWithdrawalValidator ::
|
||||||
treasuryWithdrawalValidator currSymbol = makeEffect currSymbol $
|
forall (s :: S).
|
||||||
\_cs (datum :: Term _ PTreasuryWithdrawalDatum) effectInputRef txInfo -> unTermCont $ do
|
Term s (PCurrencySymbol :--> PValidator)
|
||||||
datumF <- pletAllC datum
|
treasuryWithdrawalValidator = plam $
|
||||||
txInfoF <- pletFieldsC @'["outputs", "inputs"] txInfo
|
makeEffect $
|
||||||
|
\_cs (datum :: Term _ PTreasuryWithdrawalDatum) effectInputRef txInfo -> unTermCont $ do
|
||||||
|
datumF <- pletAllC datum
|
||||||
|
txInfoF <- pletFieldsC @'["outputs", "inputs"] txInfo
|
||||||
|
|
||||||
let validateInput :: Term _ (PTxInInfo :--> PBool)
|
let validateInput :: Term _ (PTxInInfo :--> PBool)
|
||||||
validateInput = plam $ \input -> unTermCont $ do
|
validateInput = plam $ \input -> unTermCont $ do
|
||||||
inputF <- pletAllC input
|
inputF <- pletAllC input
|
||||||
|
|
||||||
cred <-
|
cred <-
|
||||||
pletC $
|
pletC $
|
||||||
pfield @"credential"
|
pfield @"credential"
|
||||||
#$ pfield @"address" # inputF.resolved
|
#$ pfield @"address" # inputF.resolved
|
||||||
|
|
||||||
pure $
|
pure $
|
||||||
foldl1
|
foldl1
|
||||||
(#||)
|
(#||)
|
||||||
[ ptraceIfTrue "Effect input" $ inputF.outRef #== effectInputRef
|
[ ptraceIfTrue "Effect input" $ inputF.outRef #== effectInputRef
|
||||||
, ptraceIfTrue "Treasury input" $ pelem # cred # datumF.treasuries
|
, ptraceIfTrue "Treasury input" $ pelem # cred # datumF.treasuries
|
||||||
, ptraceIfTrue "Collateral input" $ pisPubKey # pfromData cred
|
, ptraceIfTrue "Collateral input" $ pisPubKey # pfromData cred
|
||||||
]
|
]
|
||||||
|
|
||||||
validateOutput ::
|
validateOutput ::
|
||||||
Term
|
Term
|
||||||
_
|
_
|
||||||
( PBuiltinList (PAsData (PTuple PCredential (PValue 'Sorted 'Positive)))
|
( PBuiltinList (PAsData (PTuple PCredential (PValue 'Sorted 'Positive)))
|
||||||
:--> PTxOut
|
:--> PTxOut
|
||||||
:--> PBuiltinList (PAsData (PTuple PCredential (PValue 'Sorted 'Positive)))
|
:--> PBuiltinList (PAsData (PTuple PCredential (PValue 'Sorted 'Positive)))
|
||||||
)
|
)
|
||||||
validateOutput = plam $ \receivers output -> unTermCont $ do
|
validateOutput = plam $ \receivers output -> unTermCont $ do
|
||||||
outputF <- pletFieldsC @'["address", "value"] output
|
outputF <- pletFieldsC @'["address", "value"] output
|
||||||
cred <- pletC $ pfield @"credential" # pfromData outputF.address
|
cred <- pletC $ pfield @"credential" # pfromData outputF.address
|
||||||
|
|
||||||
let credValue = pdata $ ptuple # cred # outputF.value
|
let credValue = pdata $ ptuple # cred # outputF.value
|
||||||
|
|
||||||
shouldSendToTreasury =
|
shouldSendToTreasury =
|
||||||
pif
|
pif
|
||||||
(pelem # cred # datumF.treasuries)
|
(pelem # cred # datumF.treasuries)
|
||||||
receivers
|
receivers
|
||||||
(ptraceError "Invalid receiver")
|
(ptraceError "Invalid receiver")
|
||||||
|
|
||||||
pure $
|
pure $
|
||||||
pmatch (pdelete # credValue # receivers) $ \case
|
pmatch (pdelete # credValue # receivers) $ \case
|
||||||
PJust updatedReceivers ->
|
PJust updatedReceivers ->
|
||||||
ptrace "Receiver output" updatedReceivers
|
ptrace "Receiver output" updatedReceivers
|
||||||
PNothing ->
|
PNothing ->
|
||||||
ptrace "Treasury output" shouldSendToTreasury
|
ptrace "Treasury output" shouldSendToTreasury
|
||||||
|
|
||||||
pguardC "All input are valid" $
|
pguardC "All input are valid" $
|
||||||
pall # validateInput # txInfoF.inputs
|
pall # validateInput # txInfoF.inputs
|
||||||
|
|
||||||
pguardC "All receiver get correct output" $
|
pguardC "All receiver get correct output" $
|
||||||
pnull #$ pfoldl # validateOutput # datumF.receivers # txInfoF.outputs
|
pnull #$ pfoldl # validateOutput # datumF.receivers # txInfoF.outputs
|
||||||
|
|
||||||
pure . popaque $ pconstant ()
|
pure . popaque $ pconstant ()
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ module Agora.Governor (
|
||||||
pisGovernorDatumValid,
|
pisGovernorDatumValid,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
|
import Agora.Aeson.Orphans ()
|
||||||
import Agora.Proposal (
|
import Agora.Proposal (
|
||||||
PProposalId (PProposalId),
|
PProposalId (PProposalId),
|
||||||
PProposalThresholds,
|
PProposalThresholds,
|
||||||
|
|
@ -39,6 +40,7 @@ import Agora.Proposal.Time (
|
||||||
pisProposalTimingConfigValid,
|
pisProposalTimingConfigValid,
|
||||||
)
|
)
|
||||||
import Agora.SafeMoney (GTTag)
|
import Agora.SafeMoney (GTTag)
|
||||||
|
import Data.Aeson qualified as Aeson
|
||||||
import Data.Tagged (Tagged)
|
import Data.Tagged (Tagged)
|
||||||
import Plutarch.DataRepr (
|
import Plutarch.DataRepr (
|
||||||
DerivePConstantViaData (DerivePConstantViaData),
|
DerivePConstantViaData (DerivePConstantViaData),
|
||||||
|
|
@ -140,6 +142,12 @@ data Governor = Governor
|
||||||
, -- | @since 0.2.0
|
, -- | @since 0.2.0
|
||||||
Show
|
Show
|
||||||
)
|
)
|
||||||
|
deriving anyclass
|
||||||
|
( -- | @since 1.0.0
|
||||||
|
Aeson.ToJSON
|
||||||
|
, -- | @since 1.0.0
|
||||||
|
Aeson.FromJSON
|
||||||
|
)
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,14 +36,6 @@ import Agora.Proposal (
|
||||||
pwinner,
|
pwinner,
|
||||||
)
|
)
|
||||||
import Agora.Proposal.Time (validateProposalStartingTime)
|
import Agora.Proposal.Time (validateProposalStartingTime)
|
||||||
import Agora.Scripts (
|
|
||||||
AgoraScripts,
|
|
||||||
authorityTokenSymbol,
|
|
||||||
governorSTSymbol,
|
|
||||||
proposalSTSymbol,
|
|
||||||
proposalValidatoHash,
|
|
||||||
stakeSTSymbol,
|
|
||||||
)
|
|
||||||
import Agora.Stake (
|
import Agora.Stake (
|
||||||
PStakeDatum (..),
|
PStakeDatum (..),
|
||||||
pnumCreatedProposals,
|
pnumCreatedProposals,
|
||||||
|
|
@ -51,14 +43,16 @@ import Agora.Stake (
|
||||||
import Agora.Utils (
|
import Agora.Utils (
|
||||||
plistEqualsBy,
|
plistEqualsBy,
|
||||||
pscriptHashToTokenName,
|
pscriptHashToTokenName,
|
||||||
validatorHashToAddress,
|
|
||||||
)
|
)
|
||||||
|
import Plutarch.Api.V1 (PCurrencySymbol)
|
||||||
import Plutarch.Api.V1.AssocMap (plookup)
|
import Plutarch.Api.V1.AssocMap (plookup)
|
||||||
import Plutarch.Api.V1.AssocMap qualified as AssocMap
|
import Plutarch.Api.V1.AssocMap qualified as AssocMap
|
||||||
import Plutarch.Api.V2 (
|
import Plutarch.Api.V2 (
|
||||||
|
PAddress,
|
||||||
PMintingPolicy,
|
PMintingPolicy,
|
||||||
PScriptPurpose (PMinting, PSpending),
|
PScriptPurpose (PMinting, PSpending),
|
||||||
PTxOut,
|
PTxOut,
|
||||||
|
PTxOutRef,
|
||||||
PValidator,
|
PValidator,
|
||||||
)
|
)
|
||||||
import Plutarch.Extra.AssetClass (passetClass, passetClassValueOf)
|
import Plutarch.Extra.AssetClass (passetClass, passetClassValueOf)
|
||||||
|
|
@ -84,7 +78,6 @@ import "liqwid-plutarch-extra" Plutarch.Extra.TermCont (
|
||||||
ptryFromC,
|
ptryFromC,
|
||||||
)
|
)
|
||||||
import Plutarch.Extra.Value (psymbolValueOf)
|
import Plutarch.Extra.Value (psymbolValueOf)
|
||||||
import PlutusLedgerApi.V1 (TxOutRef)
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -113,11 +106,11 @@ import PlutusLedgerApi.V1 (TxOutRef)
|
||||||
NOTE: It's user's responsibility to make sure the token is sent to the corresponding governor validator.
|
NOTE: It's user's responsibility to make sure the token is sent to the corresponding governor validator.
|
||||||
We /can't/ really check this in the policy, otherwise we create a cyclic reference issue.
|
We /can't/ really check this in the policy, otherwise we create a cyclic reference issue.
|
||||||
|
|
||||||
@since 0.1.0
|
@since 1.0.0
|
||||||
-}
|
-}
|
||||||
governorPolicy :: TxOutRef -> ClosedTerm PMintingPolicy
|
governorPolicy :: ClosedTerm (PTxOutRef :--> PMintingPolicy)
|
||||||
governorPolicy initialSpend =
|
governorPolicy =
|
||||||
plam $ \_ ctx -> unTermCont $ do
|
plam $ \initialSpend _ ctx -> unTermCont $ do
|
||||||
PMinting ((pfield @"_0" #) -> gstSymbol) <-
|
PMinting ((pfield @"_0" #) -> gstSymbol) <-
|
||||||
pmatchC (pfromData $ pfield @"purpose" # ctx)
|
pmatchC (pfromData $ pfield @"purpose" # ctx)
|
||||||
|
|
||||||
|
|
@ -134,7 +127,7 @@ governorPolicy initialSpend =
|
||||||
txInfo
|
txInfo
|
||||||
|
|
||||||
pguardC "Referenced utxo should be spent" $
|
pguardC "Referenced utxo should be spent" $
|
||||||
pisUTXOSpent # pconstant initialSpend # txInfoF.inputs
|
pisUTXOSpent # initialSpend # txInfoF.inputs
|
||||||
|
|
||||||
pguardC "Exactly one token should be minted" $
|
pguardC "Exactly one token should be minted" $
|
||||||
let vMap = pfromData $ pto txInfoF.mint
|
let vMap = pfromData $ pto txInfoF.mint
|
||||||
|
|
@ -249,19 +242,29 @@ governorPolicy initialSpend =
|
||||||
- Exactly one GAT is burnt in the transaction.
|
- Exactly one GAT is burnt in the transaction.
|
||||||
- Said GAT is tagged by the effect.
|
- Said GAT is tagged by the effect.
|
||||||
|
|
||||||
@since 0.1.0
|
== Arguments
|
||||||
|
|
||||||
|
Following arguments should be provided(in this order):
|
||||||
|
1. proposal validator address
|
||||||
|
2. state ST symbol
|
||||||
|
3. governor ST symbol
|
||||||
|
4. proposal ST symbol
|
||||||
|
5. authority token symbol.
|
||||||
|
|
||||||
|
@since 1.0.0
|
||||||
-}
|
-}
|
||||||
governorValidator ::
|
governorValidator ::
|
||||||
-- | Lazy precompiled scripts.
|
-- | Lazy precompiled scripts.
|
||||||
AgoraScripts ->
|
ClosedTerm
|
||||||
ClosedTerm PValidator
|
( PAddress
|
||||||
governorValidator as =
|
:--> PCurrencySymbol
|
||||||
plam $ \datum redeemer ctx -> unTermCont $ do
|
:--> PCurrencySymbol
|
||||||
pstSymbol <- pletC $ pconstant $ proposalSTSymbol as
|
:--> PCurrencySymbol
|
||||||
atSymbol <- pletC $ pconstant $ authorityTokenSymbol as
|
:--> PCurrencySymbol
|
||||||
|
:--> PValidator
|
||||||
----------------------------------------------------------------------------
|
)
|
||||||
|
governorValidator =
|
||||||
|
plam $ \proposalValidatorAddress sstSymbol gstSymbol pstSymbol atSymbol datum redeemer ctx -> unTermCont $ do
|
||||||
ctxF <- pletAllC ctx
|
ctxF <- pletAllC ctx
|
||||||
txInfo <- pletC $ pfromData ctxF.txInfo
|
txInfo <- pletC $ pfromData ctxF.txInfo
|
||||||
txInfoF <-
|
txInfoF <-
|
||||||
|
|
@ -301,9 +304,7 @@ governorValidator as =
|
||||||
#$ pfindJust
|
#$ pfindJust
|
||||||
# plam
|
# plam
|
||||||
( flip pletAll $ \outputF ->
|
( flip pletAll $ \outputF ->
|
||||||
let gstSymbol = pconstant $ governorSTSymbol as
|
let isGovernorUTxO =
|
||||||
|
|
||||||
isGovernorUTxO =
|
|
||||||
foldl1
|
foldl1
|
||||||
(#&&)
|
(#&&)
|
||||||
[ ptraceIfFalse "Own by governor validator" $
|
[ ptraceIfFalse "Own by governor validator" $
|
||||||
|
|
@ -330,9 +331,7 @@ governorValidator as =
|
||||||
pletC $
|
pletC $
|
||||||
plam $
|
plam $
|
||||||
flip (pletFields @'["value", "datum"]) $ \txOutF ->
|
flip (pletFields @'["value", "datum"]) $ \txOutF ->
|
||||||
let sstSymbol = pconstant $ stakeSTSymbol as
|
let isStakeUTxO =
|
||||||
|
|
||||||
isStakeUTxO =
|
|
||||||
psymbolValueOf
|
psymbolValueOf
|
||||||
# sstSymbol
|
# sstSymbol
|
||||||
# txOutF.value #== 1
|
# txOutF.value #== 1
|
||||||
|
|
@ -349,12 +348,7 @@ governorValidator as =
|
||||||
pletC $
|
pletC $
|
||||||
plam $
|
plam $
|
||||||
flip (pletFields @'["value", "datum", "address"]) $ \txOutF ->
|
flip (pletFields @'["value", "datum", "address"]) $ \txOutF ->
|
||||||
let proposalValidatorAddress =
|
let isProposalUTxO =
|
||||||
pconstant $
|
|
||||||
validatorHashToAddress $
|
|
||||||
proposalValidatoHash as
|
|
||||||
|
|
||||||
isProposalUTxO =
|
|
||||||
txOutF.address #== pdata proposalValidatorAddress
|
txOutF.address #== pdata proposalValidatorAddress
|
||||||
#&& psymbolValueOf # pstSymbol # txOutF.value #== 1
|
#&& psymbolValueOf # pstSymbol # txOutF.value #== 1
|
||||||
|
|
||||||
|
|
|
||||||
131
agora/Agora/Linker.hs
Normal file
131
agora/Agora/Linker.hs
Normal file
|
|
@ -0,0 +1,131 @@
|
||||||
|
{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
|
||||||
|
|
||||||
|
module Agora.Linker (linker, AgoraScriptInfo (..)) where
|
||||||
|
|
||||||
|
import Agora.Governor (Governor (gstOutRef, gtClassRef, maximumCosigners))
|
||||||
|
import Agora.Utils (validatorHashToAddress, validatorHashToTokenName)
|
||||||
|
import Data.Aeson qualified as Aeson
|
||||||
|
import Data.Map (fromList)
|
||||||
|
import Data.Tagged (untag)
|
||||||
|
import Plutarch.Api.V2 (mintingPolicySymbol, validatorHash)
|
||||||
|
import PlutusLedgerApi.V1 (Address, CurrencySymbol, TxOutRef, ValidatorHash)
|
||||||
|
import PlutusLedgerApi.V1.Value (AssetClass (AssetClass))
|
||||||
|
import Ply (
|
||||||
|
ScriptRole (MintingPolicyRole, ValidatorRole),
|
||||||
|
toMintingPolicy,
|
||||||
|
toScript,
|
||||||
|
toValidator,
|
||||||
|
(#),
|
||||||
|
)
|
||||||
|
import ScriptExport.ScriptInfo (
|
||||||
|
Linker,
|
||||||
|
ScriptExport (..),
|
||||||
|
fetchTS,
|
||||||
|
getParam,
|
||||||
|
)
|
||||||
|
import Prelude hiding ((#))
|
||||||
|
|
||||||
|
{- | Additional information provided after linking.
|
||||||
|
|
||||||
|
@since 1.0.0
|
||||||
|
-}
|
||||||
|
data AgoraScriptInfo = AgoraScriptInfo
|
||||||
|
{ governorAssetClass :: AssetClass
|
||||||
|
, authorityTokenSymbol :: CurrencySymbol
|
||||||
|
, proposalAssetClass :: AssetClass
|
||||||
|
, stakeAssetClass :: AssetClass
|
||||||
|
, governor :: Governor
|
||||||
|
}
|
||||||
|
deriving stock (Generic, Show)
|
||||||
|
deriving anyclass (Aeson.FromJSON, Aeson.ToJSON)
|
||||||
|
|
||||||
|
{- | Links parameterized Agora scripts given parameters.
|
||||||
|
|
||||||
|
@since 1.0.0
|
||||||
|
-}
|
||||||
|
linker :: Linker Governor (ScriptExport AgoraScriptInfo)
|
||||||
|
linker = do
|
||||||
|
govPol <- fetchTS @MintingPolicyRole @'[TxOutRef] "agora:governorPolicy"
|
||||||
|
govVal <- fetchTS @ValidatorRole @'[Address, CurrencySymbol, CurrencySymbol, CurrencySymbol, CurrencySymbol] "agora:governorValidator"
|
||||||
|
stkPol <- fetchTS @MintingPolicyRole @'[AssetClass] "agora:stakePolicy"
|
||||||
|
stkVal <- fetchTS @ValidatorRole @'[CurrencySymbol, AssetClass, AssetClass] "agora:stakeValidator"
|
||||||
|
prpPol <- fetchTS @MintingPolicyRole @'[AssetClass] "agora:proposalPolicy"
|
||||||
|
prpVal <- fetchTS @ValidatorRole @'[AssetClass, CurrencySymbol, CurrencySymbol, Integer] "agora:proposalValidator"
|
||||||
|
treVal <- fetchTS @ValidatorRole @'[CurrencySymbol] "agora:treasuryValidator"
|
||||||
|
atkPol <- fetchTS @MintingPolicyRole @'[AssetClass] "agora:authorityTokenPolicy"
|
||||||
|
noOpVal <- fetchTS @ValidatorRole @'[CurrencySymbol] "agora:noOpValidator"
|
||||||
|
treaWithdrawalVal <- fetchTS @ValidatorRole @'[CurrencySymbol] "agora:treasuryWithdrawalValidator"
|
||||||
|
mutateGovVal <- fetchTS @ValidatorRole @'[ValidatorHash, CurrencySymbol, CurrencySymbol] "agora:mutateGovernorValidator"
|
||||||
|
|
||||||
|
governor <- getParam
|
||||||
|
|
||||||
|
let govPol' = govPol # governor.gstOutRef
|
||||||
|
govVal' =
|
||||||
|
govVal
|
||||||
|
# propValAddress
|
||||||
|
# sstSymbol
|
||||||
|
# gstSymbol
|
||||||
|
# pstSymbol
|
||||||
|
# atSymbol
|
||||||
|
gstSymbol =
|
||||||
|
mintingPolicySymbol $
|
||||||
|
toMintingPolicy
|
||||||
|
govPol'
|
||||||
|
gstAssetClass =
|
||||||
|
AssetClass (gstSymbol, "")
|
||||||
|
govValHash = validatorHash $ toValidator govVal'
|
||||||
|
|
||||||
|
at = gstAssetClass
|
||||||
|
atPol' = atkPol # at
|
||||||
|
atSymbol = mintingPolicySymbol $ toMintingPolicy atPol'
|
||||||
|
|
||||||
|
propPol' = prpPol # gstAssetClass
|
||||||
|
propVal' =
|
||||||
|
prpVal
|
||||||
|
# sstAssetClass
|
||||||
|
# gstSymbol
|
||||||
|
# pstSymbol
|
||||||
|
# governor.maximumCosigners
|
||||||
|
propValAddress =
|
||||||
|
validatorHashToAddress $ validatorHash $ toValidator propVal'
|
||||||
|
pstSymbol = mintingPolicySymbol $ toMintingPolicy propPol'
|
||||||
|
pstAssetClass = AssetClass (pstSymbol, "")
|
||||||
|
|
||||||
|
stakPol' = stkPol # untag governor.gtClassRef
|
||||||
|
stakVal' = stkVal # sstSymbol # pstAssetClass # untag governor.gtClassRef
|
||||||
|
sstSymbol = mintingPolicySymbol $ toMintingPolicy stakPol'
|
||||||
|
stakValTokenName =
|
||||||
|
validatorHashToTokenName $ validatorHash $ toValidator stakVal'
|
||||||
|
sstAssetClass = AssetClass (sstSymbol, stakValTokenName)
|
||||||
|
|
||||||
|
treaVal' = treVal # atSymbol
|
||||||
|
|
||||||
|
noOpVal' = noOpVal # atSymbol
|
||||||
|
treaWithdrawalVal' = treaWithdrawalVal # atSymbol
|
||||||
|
mutateGovVal' = mutateGovVal # govValHash # gstSymbol # atSymbol
|
||||||
|
|
||||||
|
return $
|
||||||
|
ScriptExport
|
||||||
|
{ scripts =
|
||||||
|
fromList
|
||||||
|
[ ("agora:governorPolicy", toScript govPol')
|
||||||
|
, ("agora:governorValidator", toScript govVal')
|
||||||
|
, ("agora:stakePolicy", toScript stakPol')
|
||||||
|
, ("agora:stakeValidator", toScript stakVal')
|
||||||
|
, ("agora:proposalPolicy", toScript propPol')
|
||||||
|
, ("agora:proposalValidator", toScript propVal')
|
||||||
|
, ("agora:treasuryValidator", toScript treaVal')
|
||||||
|
, ("agora:authorityTokenPolicy", toScript atPol')
|
||||||
|
, ("agora:noOpValidator", toScript noOpVal')
|
||||||
|
, ("agora:treasuryWithdrawalValidator", toScript treaWithdrawalVal')
|
||||||
|
, ("agora:mutateGovernorValidator", toScript mutateGovVal')
|
||||||
|
]
|
||||||
|
, information =
|
||||||
|
AgoraScriptInfo
|
||||||
|
{ governorAssetClass = gstAssetClass
|
||||||
|
, authorityTokenSymbol = atSymbol
|
||||||
|
, proposalAssetClass = pstAssetClass
|
||||||
|
, stakeAssetClass = sstAssetClass
|
||||||
|
, governor = governor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -26,7 +26,6 @@ import Agora.Proposal.Time (
|
||||||
isLockingPeriod,
|
isLockingPeriod,
|
||||||
isVotingPeriod,
|
isVotingPeriod,
|
||||||
)
|
)
|
||||||
import Agora.Scripts (AgoraScripts, governorSTSymbol, proposalSTSymbol, stakeSTAssetClass)
|
|
||||||
import Agora.Stake (
|
import Agora.Stake (
|
||||||
PStakeDatum,
|
PStakeDatum,
|
||||||
pextractVoteOption,
|
pextractVoteOption,
|
||||||
|
|
@ -40,7 +39,7 @@ import Agora.Utils (
|
||||||
plistEqualsBy,
|
plistEqualsBy,
|
||||||
pmapMaybe,
|
pmapMaybe,
|
||||||
)
|
)
|
||||||
import Plutarch.Api.V1 (PCredential)
|
import Plutarch.Api.V1 (PCredential, PCurrencySymbol)
|
||||||
import Plutarch.Api.V1.AssocMap (plookup)
|
import Plutarch.Api.V1.AssocMap (plookup)
|
||||||
import Plutarch.Api.V2 (
|
import Plutarch.Api.V2 (
|
||||||
PMintingPolicy,
|
PMintingPolicy,
|
||||||
|
|
@ -51,7 +50,7 @@ import Plutarch.Api.V2 (
|
||||||
PTxOut,
|
PTxOut,
|
||||||
PValidator,
|
PValidator,
|
||||||
)
|
)
|
||||||
import Plutarch.Extra.AssetClass (passetClass, passetClassValueOf)
|
import Plutarch.Extra.AssetClass (PAssetClass, passetClass, passetClassValueOf)
|
||||||
import Plutarch.Extra.Category (PCategory (pidentity))
|
import Plutarch.Extra.Category (PCategory (pidentity))
|
||||||
import Plutarch.Extra.Comonad (pextract)
|
import Plutarch.Extra.Comonad (pextract)
|
||||||
import Plutarch.Extra.Field (pletAll, pletAllC)
|
import Plutarch.Extra.Field (pletAll, pletAllC)
|
||||||
|
|
@ -84,7 +83,6 @@ import Plutarch.Extra.Traversable (pfoldMap)
|
||||||
import Plutarch.Extra.Value (psymbolValueOf)
|
import Plutarch.Extra.Value (psymbolValueOf)
|
||||||
import Plutarch.SafeMoney (PDiscrete (PDiscrete))
|
import Plutarch.SafeMoney (PDiscrete (PDiscrete))
|
||||||
import Plutarch.Unsafe (punsafeCoerce)
|
import Plutarch.Unsafe (punsafeCoerce)
|
||||||
import PlutusLedgerApi.V1.Value (AssetClass (AssetClass))
|
|
||||||
|
|
||||||
{- | Policy for Proposals.
|
{- | Policy for Proposals.
|
||||||
|
|
||||||
|
|
@ -104,14 +102,16 @@ import PlutusLedgerApi.V1.Value (AssetClass (AssetClass))
|
||||||
|
|
||||||
- This policy cannot be burned.
|
- This policy cannot be burned.
|
||||||
|
|
||||||
@since 0.1.0
|
== Arguments
|
||||||
|
|
||||||
|
Following arguments should be provided(in this order):
|
||||||
|
1. The assetclass of GST, see 'Agora.Governor.Scripts.governorPolicy'.
|
||||||
|
|
||||||
|
@since 1.0.0
|
||||||
-}
|
-}
|
||||||
proposalPolicy ::
|
proposalPolicy :: ClosedTerm (PAssetClass :--> PMintingPolicy)
|
||||||
-- | The assetclass of GST, see 'Agora.Governor.Scripts.governorPolicy'.
|
proposalPolicy =
|
||||||
AssetClass ->
|
plam $ \gtAssetClass _redeemer ctx' -> unTermCont $ do
|
||||||
ClosedTerm PMintingPolicy
|
|
||||||
proposalPolicy (AssetClass (govCs, govTn)) =
|
|
||||||
plam $ \_redeemer ctx' -> unTermCont $ do
|
|
||||||
PScriptContext ctx' <- pmatchC ctx'
|
PScriptContext ctx' <- pmatchC ctx'
|
||||||
ctx <- pletAllC ctx'
|
ctx <- pletAllC ctx'
|
||||||
PTxInfo txInfo' <- pmatchC $ pfromData ctx.txInfo
|
PTxInfo txInfo' <- pmatchC $ pfromData ctx.txInfo
|
||||||
|
|
@ -125,7 +125,7 @@ proposalPolicy (AssetClass (govCs, govTn)) =
|
||||||
|
|
||||||
pguardC "Governance state-thread token must move" $
|
pguardC "Governance state-thread token must move" $
|
||||||
pisTokenSpent
|
pisTokenSpent
|
||||||
# (passetClass # pconstant govCs # pconstant govTn)
|
# gtAssetClass
|
||||||
# txInfo.inputs
|
# txInfo.inputs
|
||||||
|
|
||||||
pguardC "Minted exactly one proposal ST" $
|
pguardC "Minted exactly one proposal ST" $
|
||||||
|
|
@ -199,16 +199,26 @@ instance DerivePlutusType PStakeInputsContext where
|
||||||
(see 'Agora.Proposal.AdvanceProposal' docs).
|
(see 'Agora.Proposal.AdvanceProposal' docs).
|
||||||
- 'Agora.Proposal.Unlock' is always valid.
|
- 'Agora.Proposal.Unlock' is always valid.
|
||||||
|
|
||||||
@since 0.1.0
|
== Arguments
|
||||||
|
|
||||||
|
Following arguments should be provided(in this order):
|
||||||
|
1. stake ST assetclass
|
||||||
|
2. governor ST symbol
|
||||||
|
3. proposal ST symbol
|
||||||
|
4. maximum number of cosigners
|
||||||
|
|
||||||
|
@since 1.0.0
|
||||||
-}
|
-}
|
||||||
proposalValidator ::
|
proposalValidator ::
|
||||||
-- | Lazy precompiled scripts.
|
ClosedTerm
|
||||||
AgoraScripts ->
|
( PAssetClass
|
||||||
-- | See 'Agora.Governor.Governor.maximumCosigners'.
|
:--> PCurrencySymbol
|
||||||
Integer ->
|
:--> PCurrencySymbol
|
||||||
ClosedTerm PValidator
|
:--> PInteger
|
||||||
proposalValidator as maximumCosigners =
|
:--> PValidator
|
||||||
plam $ \datum redeemer ctx -> unTermCont $ do
|
)
|
||||||
|
proposalValidator =
|
||||||
|
plam $ \sstClass gstSymbol pstSymbol maximumCosigners datum redeemer ctx -> unTermCont $ do
|
||||||
ctxF <- pletAllC ctx
|
ctxF <- pletAllC ctx
|
||||||
|
|
||||||
txInfo <- pletC $ pfromData ctxF.txInfo
|
txInfo <- pletC $ pfromData ctxF.txInfo
|
||||||
|
|
@ -259,9 +269,7 @@ proposalValidator as maximumCosigners =
|
||||||
#$ pfindJust
|
#$ pfindJust
|
||||||
# plam
|
# plam
|
||||||
( flip pletAll $ \outputF ->
|
( flip pletAll $ \outputF ->
|
||||||
let pstSymbol = pconstant $ proposalSTSymbol as
|
let isProposalUTxO =
|
||||||
|
|
||||||
isProposalUTxO =
|
|
||||||
foldl1
|
foldl1
|
||||||
(#&&)
|
(#&&)
|
||||||
[ ptraceIfFalse "Own by proposal validator" $
|
[ ptraceIfFalse "Own by proposal validator" $
|
||||||
|
|
@ -285,13 +293,6 @@ proposalValidator as maximumCosigners =
|
||||||
# pfromData txInfoF.outputs
|
# pfromData txInfoF.outputs
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
||||||
let AssetClass (sstSymbol, sstName) = stakeSTAssetClass as
|
|
||||||
|
|
||||||
sstAssetClass <-
|
|
||||||
pletC $
|
|
||||||
passetClass
|
|
||||||
# pconstant sstSymbol
|
|
||||||
# pconstant sstName
|
|
||||||
|
|
||||||
-- Handle stake inputs/outputs.
|
-- Handle stake inputs/outputs.
|
||||||
|
|
||||||
|
|
@ -304,7 +305,7 @@ proposalValidator as maximumCosigners =
|
||||||
-- A stake UTxO is a UTxO that carries SST.
|
-- A stake UTxO is a UTxO that carries SST.
|
||||||
passetClassValueOf
|
passetClassValueOf
|
||||||
# txOutF.value
|
# txOutF.value
|
||||||
# sstAssetClass
|
# sstClass
|
||||||
#== 1
|
#== 1
|
||||||
|
|
||||||
stake =
|
stake =
|
||||||
|
|
@ -424,7 +425,7 @@ proposalValidator as maximumCosigners =
|
||||||
# proposalInputDatumF.cosigners
|
# proposalInputDatumF.cosigners
|
||||||
|
|
||||||
pguardC "Less cosigners than maximum limit" $
|
pguardC "Less cosigners than maximum limit" $
|
||||||
plength # updatedSigs #< pconstant maximumCosigners
|
plength # updatedSigs #< maximumCosigners
|
||||||
|
|
||||||
pguardC "Meet minimum GT requirement" $
|
pguardC "Meet minimum GT requirement" $
|
||||||
pfromData thresholdsF.cosign #<= stakeF.stakedAmount
|
pfromData thresholdsF.cosign #<= stakeF.stakedAmount
|
||||||
|
|
@ -701,8 +702,7 @@ proposalValidator as maximumCosigners =
|
||||||
pguardC "Proposal status set to Finished" $
|
pguardC "Proposal status set to Finished" $
|
||||||
proposalOutputStatus #== pconstant Finished
|
proposalOutputStatus #== pconstant Finished
|
||||||
|
|
||||||
let gstSymbol = pconstant $ governorSTSymbol as
|
let gstMoved =
|
||||||
gstMoved =
|
|
||||||
pany
|
pany
|
||||||
# plam
|
# plam
|
||||||
( \( (pfield @"value" #)
|
( \( (pfield @"value" #)
|
||||||
|
|
|
||||||
|
|
@ -1,142 +0,0 @@
|
||||||
{- | Module : Agora.Scripts
|
|
||||||
Maintainer : connor@mlabs.city
|
|
||||||
Description: Precompiled core scripts and utilities
|
|
||||||
|
|
||||||
Precompiled core scripts and utilities
|
|
||||||
-}
|
|
||||||
module Agora.Scripts (
|
|
||||||
AgoraScripts (..),
|
|
||||||
governorSTSymbol,
|
|
||||||
governorSTAssetClass,
|
|
||||||
governorValidatorHash,
|
|
||||||
proposalSTSymbol,
|
|
||||||
proposalSTAssetClass,
|
|
||||||
proposalValidatoHash,
|
|
||||||
stakeSTSymbol,
|
|
||||||
stakeSTAssetClass,
|
|
||||||
stakeValidatorHash,
|
|
||||||
authorityTokenSymbol,
|
|
||||||
treasuryValidatorHash,
|
|
||||||
) where
|
|
||||||
|
|
||||||
import Agora.Effect.TreasuryWithdrawal (TreasuryWithdrawalDatum)
|
|
||||||
import Agora.Governor (GovernorDatum, GovernorRedeemer)
|
|
||||||
import Agora.Proposal (ProposalDatum, ProposalRedeemer)
|
|
||||||
import Agora.Stake (StakeDatum, StakeRedeemer)
|
|
||||||
import Agora.Utils (
|
|
||||||
CompiledMintingPolicy (getCompiledMintingPolicy),
|
|
||||||
CompiledValidator (getCompiledValidator),
|
|
||||||
validatorHashToTokenName,
|
|
||||||
)
|
|
||||||
import Plutarch.Api.V2 (mintingPolicySymbol, validatorHash)
|
|
||||||
import PlutusLedgerApi.V1.Value (AssetClass (AssetClass))
|
|
||||||
import PlutusLedgerApi.V2 (CurrencySymbol, ValidatorHash)
|
|
||||||
|
|
||||||
{- | Precompiled core scripts.
|
|
||||||
|
|
||||||
Including:
|
|
||||||
|
|
||||||
- Governor policy
|
|
||||||
- Governor validator
|
|
||||||
- Proposal policy
|
|
||||||
- Proposal validator
|
|
||||||
- Stake policy
|
|
||||||
- Stake validator
|
|
||||||
- Treasury validator
|
|
||||||
- Authority token policy
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
data AgoraScripts = AgoraScripts
|
|
||||||
{ compiledGovernorPolicy :: CompiledMintingPolicy ()
|
|
||||||
, compiledGovernorValidator :: CompiledValidator GovernorDatum GovernorRedeemer
|
|
||||||
, compiledStakePolicy :: CompiledMintingPolicy ()
|
|
||||||
, compiledStakeValidator :: CompiledValidator StakeDatum StakeRedeemer
|
|
||||||
, compiledProposalPolicy :: CompiledMintingPolicy ()
|
|
||||||
, compiledProposalValidator :: CompiledValidator ProposalDatum ProposalRedeemer
|
|
||||||
, compiledTreasuryValidator :: CompiledValidator () ()
|
|
||||||
, compiledAuthorityTokenPolicy :: CompiledMintingPolicy ()
|
|
||||||
, compiledTreasuryWithdrawalEffect :: CompiledValidator () TreasuryWithdrawalDatum
|
|
||||||
}
|
|
||||||
|
|
||||||
{- | Get the currency symbol of the governor state token.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
governorSTSymbol :: AgoraScripts -> CurrencySymbol
|
|
||||||
governorSTSymbol = mintingPolicySymbol . (.getCompiledMintingPolicy) . (.compiledGovernorPolicy)
|
|
||||||
|
|
||||||
{- | Get the asset class of the governor state token.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
governorSTAssetClass :: AgoraScripts -> AssetClass
|
|
||||||
governorSTAssetClass as = AssetClass (governorSTSymbol as, "")
|
|
||||||
|
|
||||||
{- | Get the script hash of the governor validator.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
governorValidatorHash :: AgoraScripts -> ValidatorHash
|
|
||||||
governorValidatorHash = validatorHash . (.getCompiledValidator) . (.compiledGovernorValidator)
|
|
||||||
|
|
||||||
{- | Get the currency symbol of the propsoal state token.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
proposalSTSymbol :: AgoraScripts -> CurrencySymbol
|
|
||||||
proposalSTSymbol as = mintingPolicySymbol $ (.getCompiledMintingPolicy) as.compiledProposalPolicy
|
|
||||||
|
|
||||||
{- | Get the asset class of the governor state token.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
proposalSTAssetClass :: AgoraScripts -> AssetClass
|
|
||||||
proposalSTAssetClass as = AssetClass (proposalSTSymbol as, "")
|
|
||||||
|
|
||||||
{- | Get the script hash of the proposal validator.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
proposalValidatoHash :: AgoraScripts -> ValidatorHash
|
|
||||||
proposalValidatoHash = validatorHash . (.getCompiledValidator) . (.compiledProposalValidator)
|
|
||||||
|
|
||||||
{- | Get the script hash of the governor validator.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
stakeSTSymbol :: AgoraScripts -> CurrencySymbol
|
|
||||||
stakeSTSymbol = mintingPolicySymbol . (.getCompiledMintingPolicy) . (.compiledStakePolicy)
|
|
||||||
|
|
||||||
{- | Get the asset class of the stake state token.
|
|
||||||
|
|
||||||
Note that this token is tagged with the hash of the stake validator.
|
|
||||||
See 'Agora.Stake.Script.stakePolicy'.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
stakeSTAssetClass :: AgoraScripts -> AssetClass
|
|
||||||
stakeSTAssetClass as =
|
|
||||||
let tn = validatorHashToTokenName $ stakeValidatorHash as
|
|
||||||
in AssetClass (stakeSTSymbol as, tn)
|
|
||||||
|
|
||||||
{- | Get the script hash of the stake validator.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
stakeValidatorHash :: AgoraScripts -> ValidatorHash
|
|
||||||
stakeValidatorHash = validatorHash . (.getCompiledValidator) . (.compiledStakeValidator)
|
|
||||||
|
|
||||||
{- | Get the currency symbol of the authority token.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
authorityTokenSymbol :: AgoraScripts -> CurrencySymbol
|
|
||||||
authorityTokenSymbol = mintingPolicySymbol . (.getCompiledMintingPolicy) . (.compiledAuthorityTokenPolicy)
|
|
||||||
|
|
||||||
{- | Get the script hash of the treasury validator.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
treasuryValidatorHash :: AgoraScripts -> ValidatorHash
|
|
||||||
treasuryValidatorHash = validatorHash . (.getCompiledValidator) . (.compiledTreasuryValidator)
|
|
||||||
|
|
@ -27,7 +27,6 @@ module Agora.Stake (
|
||||||
PStakeRedeemerHandlerContext (..),
|
PStakeRedeemerHandlerContext (..),
|
||||||
PProposalContext (..),
|
PProposalContext (..),
|
||||||
PStakeRedeemerHandler,
|
PStakeRedeemerHandler,
|
||||||
PStakeRedeemerHandlerTerm (..),
|
|
||||||
StakeRedeemerImpl (..),
|
StakeRedeemerImpl (..),
|
||||||
|
|
||||||
-- * Utility functions
|
-- * Utility functions
|
||||||
|
|
@ -39,7 +38,6 @@ module Agora.Stake (
|
||||||
pisCreator,
|
pisCreator,
|
||||||
pisCosigner,
|
pisCosigner,
|
||||||
pisIrrelevant,
|
pisIrrelevant,
|
||||||
runStakeRedeemerHandler,
|
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Agora.Proposal (
|
import Agora.Proposal (
|
||||||
|
|
@ -574,37 +572,22 @@ instance DerivePlutusType PStakeRedeemerHandlerContext where
|
||||||
-}
|
-}
|
||||||
type PStakeRedeemerHandler = PStakeRedeemerHandlerContext :--> PUnit
|
type PStakeRedeemerHandler = PStakeRedeemerHandlerContext :--> PUnit
|
||||||
|
|
||||||
{- | Newtype wrapper around @'ClosedTerm' 'PStakeRedeemerHandler'@ to allow type
|
|
||||||
inference to work.
|
|
||||||
|
|
||||||
@since 1.0.0
|
|
||||||
-}
|
|
||||||
newtype PStakeRedeemerHandlerTerm
|
|
||||||
= PStakeRedeemerHandlerTerm
|
|
||||||
(ClosedTerm PStakeRedeemerHandler)
|
|
||||||
|
|
||||||
-- | @since 1.0.0
|
|
||||||
runStakeRedeemerHandler ::
|
|
||||||
PStakeRedeemerHandlerTerm ->
|
|
||||||
ClosedTerm PStakeRedeemerHandler
|
|
||||||
runStakeRedeemerHandler (PStakeRedeemerHandlerTerm t) = t
|
|
||||||
|
|
||||||
{- | A collection of stake redeemer handlers for each stake redeemers.
|
{- | A collection of stake redeemer handlers for each stake redeemers.
|
||||||
|
|
||||||
@since 1.0.0
|
@since 1.0.0
|
||||||
-}
|
-}
|
||||||
data StakeRedeemerImpl = StakeRedeemerImpl
|
data StakeRedeemerImpl (s :: S) = StakeRedeemerImpl
|
||||||
{ onDepositWithdraw :: PStakeRedeemerHandlerTerm
|
{ onDepositWithdraw :: Term s PStakeRedeemerHandler
|
||||||
-- ^ Handler for 'DepositWithdraw'.
|
-- ^ Handler for 'DepositWithdraw'.
|
||||||
, onDestroy :: PStakeRedeemerHandlerTerm
|
, onDestroy :: Term s PStakeRedeemerHandler
|
||||||
-- ^ Handler for 'Destroy'.
|
-- ^ Handler for 'Destroy'.
|
||||||
, onPermitVote :: PStakeRedeemerHandlerTerm
|
, onPermitVote :: Term s PStakeRedeemerHandler
|
||||||
-- ^ Handler for 'permitVotes'.
|
-- ^ Handler for 'permitVotes'.
|
||||||
, onRetractVote :: PStakeRedeemerHandlerTerm
|
, onRetractVote :: Term s PStakeRedeemerHandler
|
||||||
-- ^ Handler for 'RetractVotes'.
|
-- ^ Handler for 'RetractVotes'.
|
||||||
, onDelegateTo :: PStakeRedeemerHandlerTerm
|
, onDelegateTo :: Term s PStakeRedeemerHandler
|
||||||
-- ^ Handler for 'DelegateTo'.
|
-- ^ Handler for 'DelegateTo'.
|
||||||
, onClearDelegate :: PStakeRedeemerHandlerTerm
|
, onClearDelegate :: Term s PStakeRedeemerHandler
|
||||||
-- ^ handler for 'ClearDelegate'.
|
-- ^ handler for 'ClearDelegate'.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,6 @@ module Agora.Stake.Scripts (
|
||||||
|
|
||||||
import Agora.Credential (authorizationContext, pauthorizedBy)
|
import Agora.Credential (authorizationContext, pauthorizedBy)
|
||||||
import Agora.Proposal (PProposalDatum, PProposalRedeemer)
|
import Agora.Proposal (PProposalDatum, PProposalRedeemer)
|
||||||
import Agora.SafeMoney (GTTag)
|
|
||||||
import Agora.Scripts (
|
|
||||||
AgoraScripts,
|
|
||||||
proposalSTAssetClass,
|
|
||||||
stakeSTSymbol,
|
|
||||||
)
|
|
||||||
import Agora.Stake (
|
import Agora.Stake (
|
||||||
PProposalContext (
|
PProposalContext (
|
||||||
PNewProposal,
|
PNewProposal,
|
||||||
|
|
@ -48,10 +42,8 @@ import Agora.Stake (
|
||||||
PStakeRedeemerHandlerContext (
|
PStakeRedeemerHandlerContext (
|
||||||
PStakeRedeemerHandlerContext
|
PStakeRedeemerHandlerContext
|
||||||
),
|
),
|
||||||
PStakeRedeemerHandlerTerm (PStakeRedeemerHandlerTerm),
|
|
||||||
StakeRedeemerImpl (..),
|
StakeRedeemerImpl (..),
|
||||||
pstakeLocked,
|
pstakeLocked,
|
||||||
runStakeRedeemerHandler,
|
|
||||||
)
|
)
|
||||||
import Agora.Stake.Redeemers (
|
import Agora.Stake.Redeemers (
|
||||||
pclearDelegate,
|
pclearDelegate,
|
||||||
|
|
@ -62,16 +54,13 @@ import Agora.Stake.Redeemers (
|
||||||
pretractVote,
|
pretractVote,
|
||||||
)
|
)
|
||||||
import Agora.Utils (passert, pmapMaybe)
|
import Agora.Utils (passert, pmapMaybe)
|
||||||
import Data.Tagged (Tagged (Tagged))
|
|
||||||
import Plutarch.Api.V1 (
|
import Plutarch.Api.V1 (
|
||||||
KeyGuarantees (Sorted),
|
|
||||||
PCredential (PPubKeyCredential, PScriptCredential),
|
PCredential (PPubKeyCredential, PScriptCredential),
|
||||||
|
PCurrencySymbol,
|
||||||
PTokenName,
|
PTokenName,
|
||||||
)
|
)
|
||||||
import Plutarch.Api.V1.AssocMap (plookup)
|
import Plutarch.Api.V1.AssocMap (plookup)
|
||||||
import Plutarch.Api.V1.Value (PValue)
|
|
||||||
import Plutarch.Api.V2 (
|
import Plutarch.Api.V2 (
|
||||||
AmountGuarantees,
|
|
||||||
PMintingPolicy,
|
PMintingPolicy,
|
||||||
PScriptPurpose (PMinting, PSpending),
|
PScriptPurpose (PMinting, PSpending),
|
||||||
PTxInfo,
|
PTxInfo,
|
||||||
|
|
@ -79,7 +68,7 @@ import Plutarch.Api.V2 (
|
||||||
PValidator,
|
PValidator,
|
||||||
)
|
)
|
||||||
import Plutarch.Extra.AssetClass (
|
import Plutarch.Extra.AssetClass (
|
||||||
passetClass,
|
PAssetClass,
|
||||||
passetClassValueOf,
|
passetClassValueOf,
|
||||||
pvalueOf,
|
pvalueOf,
|
||||||
)
|
)
|
||||||
|
|
@ -114,10 +103,8 @@ import Plutarch.Extra.Value (
|
||||||
import Plutarch.Num (PNum (pnegate))
|
import Plutarch.Num (PNum (pnegate))
|
||||||
import Plutarch.SafeMoney (
|
import Plutarch.SafeMoney (
|
||||||
pvalueDiscrete,
|
pvalueDiscrete,
|
||||||
pvalueDiscrete',
|
|
||||||
)
|
)
|
||||||
import Plutarch.Unsafe (punsafeCoerce)
|
import Plutarch.Unsafe (punsafeCoerce)
|
||||||
import PlutusLedgerApi.V1.Value (AssetClass (AssetClass))
|
|
||||||
import Prelude hiding (Num ((+)))
|
import Prelude hiding (Num ((+)))
|
||||||
|
|
||||||
{- | Policy for Stake state threads.
|
{- | Policy for Stake state threads.
|
||||||
|
|
@ -137,14 +124,18 @@ import Prelude hiding (Num ((+)))
|
||||||
- Check that exactly one state thread is burned.
|
- Check that exactly one state thread is burned.
|
||||||
- Check that datum at state thread is valid and not locked.
|
- Check that datum at state thread is valid and not locked.
|
||||||
|
|
||||||
@since 0.1.0
|
== Arguments
|
||||||
|
|
||||||
|
Following arguments should be provided(in this order):
|
||||||
|
1. governor ST assetclass
|
||||||
|
|
||||||
|
@since 1.0.0
|
||||||
-}
|
-}
|
||||||
stakePolicy ::
|
stakePolicy ::
|
||||||
-- | The (governance) token that a Stake can store.
|
-- | The (governance) token that a Stake can store.
|
||||||
Tagged GTTag AssetClass ->
|
ClosedTerm (PAssetClass :--> PMintingPolicy)
|
||||||
ClosedTerm PMintingPolicy
|
stakePolicy =
|
||||||
stakePolicy gtClassRef =
|
plam $ \gstClass _redeemer ctx' -> unTermCont $ do
|
||||||
plam $ \_redeemer ctx' -> unTermCont $ do
|
|
||||||
ctx <- pletFieldsC @'["txInfo", "purpose"] ctx'
|
ctx <- pletFieldsC @'["txInfo", "purpose"] ctx'
|
||||||
txInfo <- pletC $ ctx.txInfo
|
txInfo <- pletC $ ctx.txInfo
|
||||||
let _a :: Term _ PTxInfo
|
let _a :: Term _ PTxInfo
|
||||||
|
|
@ -226,7 +217,7 @@ stakePolicy gtClassRef =
|
||||||
|
|
||||||
let hasExpectedStake =
|
let hasExpectedStake =
|
||||||
ptraceIfFalse "Stake ouput has expected amount of stake token" $
|
ptraceIfFalse "Stake ouput has expected amount of stake token" $
|
||||||
pvalueDiscrete' gtClassRef # outputF.value #== datumF.stakedAmount
|
pvalueDiscrete # gstClass # outputF.value #== datumF.stakedAmount
|
||||||
let ownerSignsTransaction =
|
let ownerSignsTransaction =
|
||||||
ptraceIfFalse "Stake Owner should sign the transaction" $
|
ptraceIfFalse "Stake Owner should sign the transaction" $
|
||||||
pauthorizedBy
|
pauthorizedBy
|
||||||
|
|
@ -243,338 +234,322 @@ stakePolicy gtClassRef =
|
||||||
|
|
||||||
{- | Create a stake validator, given the implementation of stake redeemers.
|
{- | Create a stake validator, given the implementation of stake redeemers.
|
||||||
|
|
||||||
|
== Arguments
|
||||||
|
|
||||||
|
Following arguments should be provided(in this order):
|
||||||
|
1. stake ST symbol
|
||||||
|
2. proposal ST assetclass
|
||||||
|
3. governor ST assetclass
|
||||||
|
|
||||||
@since 1.0.0
|
@since 1.0.0
|
||||||
-}
|
-}
|
||||||
mkStakeValidator ::
|
mkStakeValidator ::
|
||||||
StakeRedeemerImpl ->
|
StakeRedeemerImpl s ->
|
||||||
AgoraScripts ->
|
Term s PCurrencySymbol ->
|
||||||
Tagged GTTag AssetClass ->
|
Term s PAssetClass ->
|
||||||
ClosedTerm PValidator
|
Term s PAssetClass ->
|
||||||
mkStakeValidator
|
Term s PValidator
|
||||||
impl
|
mkStakeValidator impl sstSymbol pstClass gstClass =
|
||||||
as
|
plam $ \_datum redeemer ctx -> unTermCont $ do
|
||||||
(Tagged (AssetClass (gtSym, gtTn))) =
|
ctxF <- pletFieldsC @'["txInfo", "purpose"] ctx
|
||||||
plam $ \_datum redeemer ctx -> unTermCont $ do
|
txInfo <- pletC $ pfromData ctxF.txInfo
|
||||||
let sstValueOf ::
|
txInfoF <-
|
||||||
( forall (ag :: AmountGuarantees) (s :: S).
|
pletFieldsC
|
||||||
Term s (PValue 'Sorted ag :--> PInteger)
|
@'[ "inputs"
|
||||||
)
|
, "referenceInputs"
|
||||||
sstValueOf =
|
, "outputs"
|
||||||
phoistAcyclic $
|
, "mint"
|
||||||
psymbolValueOf # pconstant (stakeSTSymbol as)
|
, "validRange"
|
||||||
|
, "signatories"
|
||||||
--------------------------------------------------------------------------
|
, "redeemers"
|
||||||
|
, "datums"
|
||||||
ctxF <- pletFieldsC @'["txInfo", "purpose"] ctx
|
|
||||||
txInfo <- pletC $ pfromData ctxF.txInfo
|
|
||||||
txInfoF <-
|
|
||||||
pletFieldsC
|
|
||||||
@'[ "inputs"
|
|
||||||
, "referenceInputs"
|
|
||||||
, "outputs"
|
|
||||||
, "mint"
|
|
||||||
, "validRange"
|
|
||||||
, "signatories"
|
|
||||||
, "redeemers"
|
|
||||||
, "datums"
|
|
||||||
]
|
|
||||||
txInfo
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
|
|
||||||
PSpending stakeInputRef <- pmatchC $ pfromData ctxF.purpose
|
|
||||||
|
|
||||||
let validatedInput =
|
|
||||||
pfield @"resolved"
|
|
||||||
#$ passertPJust
|
|
||||||
# "Malformed script context: validated input not found"
|
|
||||||
#$ pfindTxInByTxOutRef
|
|
||||||
# (pfield @"_0" # stakeInputRef)
|
|
||||||
# txInfoF.inputs
|
|
||||||
|
|
||||||
stakeValidatorCredential =
|
|
||||||
pfield @"credential"
|
|
||||||
#$ pfield @"address" # validatedInput
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
|
|
||||||
-- Returns stake datum if the given UTxO is a stake UTxO.
|
|
||||||
getStakeDatum :: Term _ (PTxOut :--> PMaybe PStakeDatum) <-
|
|
||||||
pletC $
|
|
||||||
plam $
|
|
||||||
flip (pletFields @'["value", "datum", "address"]) $ \txOutF ->
|
|
||||||
pmatch
|
|
||||||
( pcompareBy # pfromOrd
|
|
||||||
# (sstValueOf # txOutF.value)
|
|
||||||
# 1
|
|
||||||
)
|
|
||||||
$ \case
|
|
||||||
-- > 1
|
|
||||||
PGT -> ptraceError "More than one SST in one UTxO"
|
|
||||||
-- 1
|
|
||||||
PEQ ->
|
|
||||||
let ownerCredential = pfield @"credential" # txOutF.address
|
|
||||||
|
|
||||||
isOwnedByStakeValidator =
|
|
||||||
ownerCredential #== stakeValidatorCredential
|
|
||||||
|
|
||||||
datum =
|
|
||||||
ptrace "Resolve stake datum" $
|
|
||||||
pfromData $
|
|
||||||
pfromOutputDatum @(PAsData PStakeDatum)
|
|
||||||
# txOutF.datum
|
|
||||||
# txInfoF.datums
|
|
||||||
in passert
|
|
||||||
"Should owned by stake validator"
|
|
||||||
isOwnedByStakeValidator
|
|
||||||
(pjust # datum)
|
|
||||||
-- 0
|
|
||||||
PLT -> pnothing
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
|
|
||||||
-- Find all stake inputs.
|
|
||||||
|
|
||||||
stakeInputDatums <-
|
|
||||||
pletC $
|
|
||||||
pmapMaybe
|
|
||||||
# plam ((getStakeDatum #) . (pfield @"resolved" #))
|
|
||||||
# pfromData txInfoF.inputs
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
|
|
||||||
-- Assemble the signature context.
|
|
||||||
|
|
||||||
firstStakeInputDatumF <-
|
|
||||||
pletFieldsC @'["owner", "delegatedTo"] $
|
|
||||||
phead # stakeInputDatums
|
|
||||||
|
|
||||||
restOfStakeInputDatums <- pletC $ ptail # stakeInputDatums
|
|
||||||
|
|
||||||
authorizedBy <- pletC $ pauthorizedBy # authorizationContext txInfoF
|
|
||||||
|
|
||||||
PPair allHaveSameOwner allHaveSameDelegatee <-
|
|
||||||
pmatchC $
|
|
||||||
pfoldr
|
|
||||||
# plam
|
|
||||||
( \d p -> unTermCont $ do
|
|
||||||
dF <- pletFieldsC @'["owner", "delegatedTo"] d
|
|
||||||
|
|
||||||
pure $
|
|
||||||
pmatch p $ \(PPair allHaveSameOwner allHaveSameDelegatee) ->
|
|
||||||
let allHaveSameOwner' =
|
|
||||||
allHaveSameOwner
|
|
||||||
#&& dF.owner #== firstStakeInputDatumF.owner
|
|
||||||
allHaveSameDelegatee' =
|
|
||||||
allHaveSameDelegatee
|
|
||||||
#&& dF.delegatedTo #== firstStakeInputDatumF.delegatedTo
|
|
||||||
in pcon $ PPair allHaveSameOwner' allHaveSameDelegatee'
|
|
||||||
)
|
|
||||||
# pcon (PPair (pconstant True) (pconstant True))
|
|
||||||
# restOfStakeInputDatums
|
|
||||||
|
|
||||||
let ownerSignsTransaction =
|
|
||||||
allHaveSameOwner
|
|
||||||
#&& authorizedBy # firstStakeInputDatumF.owner
|
|
||||||
|
|
||||||
delegateSignsTransaction =
|
|
||||||
allHaveSameDelegatee
|
|
||||||
#&& pmaybeData
|
|
||||||
# pconstant False
|
|
||||||
# plam ((authorizedBy #) . pfromData)
|
|
||||||
# pfromData firstStakeInputDatumF.delegatedTo
|
|
||||||
|
|
||||||
signedBy =
|
|
||||||
pif
|
|
||||||
ownerSignsTransaction
|
|
||||||
(pcon PSignedByOwner)
|
|
||||||
$ pif
|
|
||||||
delegateSignsTransaction
|
|
||||||
(pcon PSignedByDelegate)
|
|
||||||
$ pcon PUnknownSig
|
|
||||||
|
|
||||||
sigContext <-
|
|
||||||
pletC $
|
|
||||||
pcon $
|
|
||||||
PSigContext
|
|
||||||
firstStakeInputDatumF.owner
|
|
||||||
firstStakeInputDatumF.delegatedTo
|
|
||||||
signedBy
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
|
|
||||||
-- Find all stake outputs.
|
|
||||||
|
|
||||||
let gtAssetClass = passetClass # pconstant gtSym # pconstant gtTn
|
|
||||||
|
|
||||||
-- First step of validating stake outputs. We make sure that every stake
|
|
||||||
-- output UTxO carries correct amount of GTs specified by its datum.
|
|
||||||
--
|
|
||||||
-- Note that non-GT assets are treated transparently.
|
|
||||||
stakeOutputDatums <-
|
|
||||||
pletC $
|
|
||||||
pmapMaybe
|
|
||||||
# plam
|
|
||||||
( \output ->
|
|
||||||
let validateGT = plam $ \stakeDatum ->
|
|
||||||
let expected = pfield @"stakedAmount" # stakeDatum
|
|
||||||
|
|
||||||
actual =
|
|
||||||
pvalueDiscrete
|
|
||||||
# gtAssetClass
|
|
||||||
# (pfield @"value" # output)
|
|
||||||
in pif
|
|
||||||
(expected #== actual)
|
|
||||||
stakeDatum
|
|
||||||
(ptraceError "Unmatched GT value")
|
|
||||||
in pfmap
|
|
||||||
# validateGT
|
|
||||||
# (getStakeDatum # output)
|
|
||||||
)
|
|
||||||
# pfromData txInfoF.outputs
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
|
|
||||||
mintedST <- pletC $ sstValueOf # txInfoF.mint
|
|
||||||
|
|
||||||
pguardC "No new SST minted" $
|
|
||||||
foldl1
|
|
||||||
(#||)
|
|
||||||
[ ptraceIfTrue "All stakes burnt" $
|
|
||||||
mintedST #< 0 #&& pnull # stakeOutputDatums
|
|
||||||
, ptraceIfTrue "Nothing burnt" $
|
|
||||||
mintedST #== 0
|
|
||||||
]
|
]
|
||||||
|
txInfo
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
||||||
|
|
||||||
-- Assemble the proposal context.
|
PSpending stakeInputRef <- pmatchC $ pfromData ctxF.purpose
|
||||||
|
|
||||||
let AssetClass (propCs, propTn) = proposalSTAssetClass as
|
let validatedInput =
|
||||||
|
pfield @"resolved"
|
||||||
|
#$ passertPJust
|
||||||
|
# "Malformed script context: validated input not found"
|
||||||
|
#$ pfindTxInByTxOutRef
|
||||||
|
# (pfield @"_0" # stakeInputRef)
|
||||||
|
# txInfoF.inputs
|
||||||
|
|
||||||
proposalSTClass <-
|
stakeValidatorCredential =
|
||||||
pletC $
|
pfield @"credential"
|
||||||
passetClass
|
#$ pfield @"address" # validatedInput
|
||||||
# pconstant propCs
|
|
||||||
# pconstant propTn
|
|
||||||
|
|
||||||
getProposalDatum <- pletC $
|
--------------------------------------------------------------------------
|
||||||
|
|
||||||
|
-- Returns stake datum if the given UTxO is a stake UTxO.
|
||||||
|
getStakeDatum :: Term _ (PTxOut :--> PMaybe PStakeDatum) <-
|
||||||
|
pletC $
|
||||||
plam $
|
plam $
|
||||||
flip pletAll $ \txOutF ->
|
flip (pletFields @'["value", "datum", "address"]) $ \txOutF ->
|
||||||
let isProposalUTxO =
|
pmatch
|
||||||
passetClassValueOf
|
( pcompareBy # pfromOrd
|
||||||
# txOutF.value
|
# (psymbolValueOf # sstSymbol # txOutF.value)
|
||||||
# proposalSTClass #== 1
|
# 1
|
||||||
proposalDatum =
|
)
|
||||||
pfromData $
|
$ \case
|
||||||
pfromOutputDatum @(PAsData PProposalDatum)
|
-- > 1
|
||||||
# txOutF.datum
|
PGT -> ptraceError "More than one SST in one UTxO"
|
||||||
# txInfoF.datums
|
-- 1
|
||||||
in pif isProposalUTxO (pjust # proposalDatum) pnothing
|
PEQ ->
|
||||||
|
let ownerCredential = pfield @"credential" # txOutF.address
|
||||||
|
|
||||||
let pstMinted =
|
isOwnedByStakeValidator =
|
||||||
passetClassValueOf # txInfoF.mint # proposalSTClass #== 1
|
ownerCredential #== stakeValidatorCredential
|
||||||
|
|
||||||
newProposalContext =
|
datum =
|
||||||
pcon $
|
ptrace "Resolve stake datum" $
|
||||||
PNewProposal $
|
pfromData $
|
||||||
pfield @"proposalId"
|
pfromOutputDatum @(PAsData PStakeDatum)
|
||||||
#$ passertPJust # "Proposal output should present"
|
# txOutF.datum
|
||||||
#$ pfindJust # getProposalDatum # pfromData txInfoF.outputs
|
# txInfoF.datums
|
||||||
|
in passert
|
||||||
|
"Should owned by stake validator"
|
||||||
|
isOwnedByStakeValidator
|
||||||
|
(pjust # datum)
|
||||||
|
-- 0
|
||||||
|
PLT -> pnothing
|
||||||
|
|
||||||
spendProposalContext =
|
--------------------------------------------------------------------------
|
||||||
let getProposalRedeemer = plam $ \ref ->
|
|
||||||
flip (ptryFrom @PProposalRedeemer) fst $
|
|
||||||
pto $
|
|
||||||
passertPJust
|
|
||||||
# "Malformed script context: propsoal input not found in redeemer map"
|
|
||||||
#$ plookup
|
|
||||||
# pcon
|
|
||||||
( PSpending $
|
|
||||||
pdcons @_0
|
|
||||||
# pdata ref
|
|
||||||
# pdnil
|
|
||||||
)
|
|
||||||
# txInfoF.redeemers
|
|
||||||
|
|
||||||
getContext = plam $
|
-- Find all stake inputs.
|
||||||
flip pletAll $ \inInfoF ->
|
|
||||||
pfmap
|
|
||||||
# plam
|
|
||||||
( \proposalDatum ->
|
|
||||||
let id = pfield @"proposalId" # proposalDatum
|
|
||||||
status = pfield @"status" # proposalDatum
|
|
||||||
redeemer = getProposalRedeemer # inInfoF.outRef
|
|
||||||
in pcon $ PSpendProposal id status redeemer
|
|
||||||
)
|
|
||||||
#$ getProposalDatum
|
|
||||||
# pfromData inInfoF.resolved
|
|
||||||
|
|
||||||
contexts =
|
stakeInputDatums <-
|
||||||
pmapMaybe @PList # getContext # pfromData txInfoF.inputs
|
pletC $
|
||||||
in -- Can only handle one proposal at a time.
|
pmapMaybe
|
||||||
precList
|
# plam ((getStakeDatum #) . (pfield @"resolved" #))
|
||||||
( \_ h t ->
|
# pfromData txInfoF.inputs
|
||||||
pif
|
|
||||||
(pnull # t)
|
|
||||||
(pjust # h)
|
|
||||||
(ptraceError "Ambiguous proposal")
|
|
||||||
)
|
|
||||||
(const pnothing)
|
|
||||||
# contexts
|
|
||||||
|
|
||||||
noProposalContext = pcon PNoProposal
|
--------------------------------------------------------------------------
|
||||||
|
|
||||||
proposalContext <-
|
-- Assemble the signature context.
|
||||||
pletC $
|
|
||||||
|
firstStakeInputDatumF <-
|
||||||
|
pletFieldsC @'["owner", "delegatedTo"] $
|
||||||
|
phead # stakeInputDatums
|
||||||
|
|
||||||
|
restOfStakeInputDatums <- pletC $ ptail # stakeInputDatums
|
||||||
|
|
||||||
|
authorizedBy <- pletC $ pauthorizedBy # authorizationContext txInfoF
|
||||||
|
|
||||||
|
PPair allHaveSameOwner allHaveSameDelegatee <-
|
||||||
|
pmatchC $
|
||||||
|
pfoldr
|
||||||
|
# plam
|
||||||
|
( \d p -> unTermCont $ do
|
||||||
|
dF <- pletFieldsC @'["owner", "delegatedTo"] d
|
||||||
|
|
||||||
|
pure $
|
||||||
|
pmatch p $ \(PPair allHaveSameOwner allHaveSameDelegatee) ->
|
||||||
|
let allHaveSameOwner' =
|
||||||
|
allHaveSameOwner
|
||||||
|
#&& dF.owner #== firstStakeInputDatumF.owner
|
||||||
|
allHaveSameDelegatee' =
|
||||||
|
allHaveSameDelegatee
|
||||||
|
#&& dF.delegatedTo #== firstStakeInputDatumF.delegatedTo
|
||||||
|
in pcon $ PPair allHaveSameOwner' allHaveSameDelegatee'
|
||||||
|
)
|
||||||
|
# pcon (PPair (pconstant True) (pconstant True))
|
||||||
|
# restOfStakeInputDatums
|
||||||
|
|
||||||
|
let ownerSignsTransaction =
|
||||||
|
allHaveSameOwner
|
||||||
|
#&& authorizedBy # firstStakeInputDatumF.owner
|
||||||
|
|
||||||
|
delegateSignsTransaction =
|
||||||
|
allHaveSameDelegatee
|
||||||
|
#&& pmaybeData
|
||||||
|
# pconstant False
|
||||||
|
# plam ((authorizedBy #) . pfromData)
|
||||||
|
# pfromData firstStakeInputDatumF.delegatedTo
|
||||||
|
|
||||||
|
signedBy =
|
||||||
pif
|
pif
|
||||||
pstMinted
|
ownerSignsTransaction
|
||||||
newProposalContext
|
(pcon PSignedByOwner)
|
||||||
(pfromMaybe # noProposalContext # spendProposalContext)
|
$ pif
|
||||||
|
delegateSignsTransaction
|
||||||
|
(pcon PSignedByDelegate)
|
||||||
|
$ pcon PUnknownSig
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
sigContext <-
|
||||||
|
pletC $
|
||||||
|
pcon $
|
||||||
|
PSigContext
|
||||||
|
firstStakeInputDatumF.owner
|
||||||
|
firstStakeInputDatumF.delegatedTo
|
||||||
|
signedBy
|
||||||
|
|
||||||
-- Assemeble the redeemer handler context.
|
--------------------------------------------------------------------------
|
||||||
|
|
||||||
mkRedeemerhandlerContext <- pletC $
|
-- Find all stake outputs.
|
||||||
plam $ \redeemerContext ->
|
-- First step of validating stake outputs. We make sure that every stake
|
||||||
|
-- output UTxO carries correct amount of GTs specified by its datum.
|
||||||
|
--
|
||||||
|
-- Note that non-GT assets are treated transparently.
|
||||||
|
stakeOutputDatums <-
|
||||||
|
pletC $
|
||||||
|
pmapMaybe
|
||||||
|
# plam
|
||||||
|
( \output ->
|
||||||
|
let validateGT = plam $ \stakeDatum ->
|
||||||
|
let expected = pfield @"stakedAmount" # stakeDatum
|
||||||
|
|
||||||
|
actual =
|
||||||
|
pvalueDiscrete
|
||||||
|
# gstClass
|
||||||
|
# (pfield @"value" # output)
|
||||||
|
in pif
|
||||||
|
(expected #== actual)
|
||||||
|
stakeDatum
|
||||||
|
(ptraceError "Unmatched GT value")
|
||||||
|
in pfmap
|
||||||
|
# validateGT
|
||||||
|
# (getStakeDatum # output)
|
||||||
|
)
|
||||||
|
# pfromData txInfoF.outputs
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------
|
||||||
|
|
||||||
|
mintedST <- pletC $ psymbolValueOf # sstSymbol # txInfoF.mint
|
||||||
|
|
||||||
|
pguardC "No new SST minted" $
|
||||||
|
foldl1
|
||||||
|
(#||)
|
||||||
|
[ ptraceIfTrue "All stakes burnt" $
|
||||||
|
mintedST #< 0 #&& pnull # stakeOutputDatums
|
||||||
|
, ptraceIfTrue "Nothing burnt" $
|
||||||
|
mintedST #== 0
|
||||||
|
]
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------
|
||||||
|
|
||||||
|
-- Assemble the proposal context.
|
||||||
|
|
||||||
|
getProposalDatum <- pletC $
|
||||||
|
plam $
|
||||||
|
flip pletAll $ \txOutF ->
|
||||||
|
let isProposalUTxO =
|
||||||
|
passetClassValueOf
|
||||||
|
# txOutF.value
|
||||||
|
# pstClass #== 1
|
||||||
|
proposalDatum =
|
||||||
|
pfromData $
|
||||||
|
pfromOutputDatum @(PAsData PProposalDatum)
|
||||||
|
# txOutF.datum
|
||||||
|
# txInfoF.datums
|
||||||
|
in pif isProposalUTxO (pjust # proposalDatum) pnothing
|
||||||
|
|
||||||
|
let pstMinted =
|
||||||
|
passetClassValueOf # txInfoF.mint # pstClass #== 1
|
||||||
|
|
||||||
|
newProposalContext =
|
||||||
pcon $
|
pcon $
|
||||||
PStakeRedeemerHandlerContext
|
PNewProposal $
|
||||||
stakeInputDatums
|
pfield @"proposalId"
|
||||||
stakeOutputDatums
|
#$ passertPJust # "Proposal output should present"
|
||||||
redeemerContext
|
#$ pfindJust # getProposalDatum # pfromData txInfoF.outputs
|
||||||
sigContext
|
|
||||||
proposalContext
|
|
||||||
txInfo
|
|
||||||
|
|
||||||
noMetadataContext <-
|
spendProposalContext =
|
||||||
pletC $
|
let getProposalRedeemer = plam $ \ref ->
|
||||||
mkRedeemerhandlerContext
|
flip (ptryFrom @PProposalRedeemer) fst $
|
||||||
#$ pcon
|
pto $
|
||||||
$ PNoMetadata
|
passertPJust
|
||||||
|
# "Malformed script context: propsoal input not found in redeemer map"
|
||||||
|
#$ plookup
|
||||||
|
# pcon
|
||||||
|
( PSpending $
|
||||||
|
pdcons @_0
|
||||||
|
# pdata ref
|
||||||
|
# pdnil
|
||||||
|
)
|
||||||
|
# txInfoF.redeemers
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
getContext = plam $
|
||||||
|
flip pletAll $ \inInfoF ->
|
||||||
|
pfmap
|
||||||
|
# plam
|
||||||
|
( \proposalDatum ->
|
||||||
|
let id = pfield @"proposalId" # proposalDatum
|
||||||
|
status = pfield @"status" # proposalDatum
|
||||||
|
redeemer = getProposalRedeemer # inInfoF.outRef
|
||||||
|
in pcon $ PSpendProposal id status redeemer
|
||||||
|
)
|
||||||
|
#$ getProposalDatum
|
||||||
|
# pfromData inInfoF.resolved
|
||||||
|
|
||||||
-- Call the redeemer handler.
|
contexts =
|
||||||
|
pmapMaybe @PList # getContext # pfromData txInfoF.inputs
|
||||||
|
in -- Can only handle one proposal at a time.
|
||||||
|
precList
|
||||||
|
( \_ h t ->
|
||||||
|
pif
|
||||||
|
(pnull # t)
|
||||||
|
(pjust # h)
|
||||||
|
(ptraceError "Ambiguous proposal")
|
||||||
|
)
|
||||||
|
(const pnothing)
|
||||||
|
# contexts
|
||||||
|
|
||||||
stakeRedeemer <- fst <$> ptryFromC redeemer
|
noProposalContext = pcon PNoProposal
|
||||||
|
|
||||||
pure $
|
proposalContext <-
|
||||||
popaque $
|
pletC $
|
||||||
pmatch stakeRedeemer $ \case
|
pif
|
||||||
PDestroy _ -> runStakeRedeemerHandler impl.onDestroy # noMetadataContext
|
pstMinted
|
||||||
PPermitVote _ -> runStakeRedeemerHandler impl.onPermitVote # noMetadataContext
|
newProposalContext
|
||||||
PRetractVotes _ -> runStakeRedeemerHandler impl.onRetractVote # noMetadataContext
|
(pfromMaybe # noProposalContext # spendProposalContext)
|
||||||
PClearDelegate _ -> runStakeRedeemerHandler impl.onClearDelegate # noMetadataContext
|
|
||||||
PDelegateTo ((pfield @"pkh" #) -> pkh) ->
|
--------------------------------------------------------------------------
|
||||||
runStakeRedeemerHandler impl.onDelegateTo
|
|
||||||
#$ mkRedeemerhandlerContext
|
-- Assemeble the redeemer handler context.
|
||||||
#$ pcon
|
|
||||||
$ PSetDelegateTo pkh
|
mkRedeemerhandlerContext <- pletC $
|
||||||
PDepositWithdraw ((pfield @"delta" #) -> delta) ->
|
plam $ \redeemerContext ->
|
||||||
runStakeRedeemerHandler impl.onDepositWithdraw #$ mkRedeemerhandlerContext
|
pcon $
|
||||||
#$ pcon
|
PStakeRedeemerHandlerContext
|
||||||
$ PDepositWithdrawDelta delta
|
stakeInputDatums
|
||||||
|
stakeOutputDatums
|
||||||
|
redeemerContext
|
||||||
|
sigContext
|
||||||
|
proposalContext
|
||||||
|
txInfo
|
||||||
|
|
||||||
|
noMetadataContext <-
|
||||||
|
pletC $
|
||||||
|
mkRedeemerhandlerContext
|
||||||
|
#$ pcon
|
||||||
|
$ PNoMetadata
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------
|
||||||
|
|
||||||
|
-- Call the redeemer handler.
|
||||||
|
|
||||||
|
stakeRedeemer <- fst <$> ptryFromC redeemer
|
||||||
|
|
||||||
|
pure $
|
||||||
|
popaque $
|
||||||
|
pmatch stakeRedeemer $ \case
|
||||||
|
PDestroy _ -> impl.onDestroy # noMetadataContext
|
||||||
|
PPermitVote _ -> impl.onPermitVote # noMetadataContext
|
||||||
|
PRetractVotes _ -> impl.onRetractVote # noMetadataContext
|
||||||
|
PClearDelegate _ -> impl.onClearDelegate # noMetadataContext
|
||||||
|
PDelegateTo ((pfield @"pkh" #) -> pkh) ->
|
||||||
|
impl.onDelegateTo
|
||||||
|
#$ mkRedeemerhandlerContext
|
||||||
|
#$ pcon
|
||||||
|
$ PSetDelegateTo pkh
|
||||||
|
PDepositWithdraw ((pfield @"delta" #) -> delta) ->
|
||||||
|
impl.onDepositWithdraw #$ mkRedeemerhandlerContext
|
||||||
|
#$ pcon
|
||||||
|
$ PDepositWithdrawDelta delta
|
||||||
|
|
||||||
{- | Validator intended for Stake UTXOs to be locked by.
|
{- | Validator intended for Stake UTXOs to be locked by.
|
||||||
|
|
||||||
|
|
@ -617,21 +592,24 @@ mkStakeValidator
|
||||||
- The stakes must not be locked.
|
- The stakes must not be locked.
|
||||||
- Tx must be signed by the owner.
|
- Tx must be signed by the owner.
|
||||||
|
|
||||||
@since 0.1.0
|
== Arguments
|
||||||
|
|
||||||
|
Following arguments should be provided(in this order):
|
||||||
|
1. stake ST symbol
|
||||||
|
2. proposal ST assetclass
|
||||||
|
3. governor ST assetclass
|
||||||
|
|
||||||
|
@since 1.0.0
|
||||||
-}
|
-}
|
||||||
stakeValidator ::
|
stakeValidator :: ClosedTerm (PCurrencySymbol :--> PAssetClass :--> PAssetClass :--> PValidator)
|
||||||
-- | Lazy precompiled scripts.
|
|
||||||
AgoraScripts ->
|
|
||||||
-- | See 'Agora.Governor.Governor.gtClassRef'.
|
|
||||||
Tagged GTTag AssetClass ->
|
|
||||||
ClosedTerm PValidator
|
|
||||||
stakeValidator =
|
stakeValidator =
|
||||||
mkStakeValidator $
|
plam $
|
||||||
StakeRedeemerImpl
|
mkStakeValidator $
|
||||||
{ onDepositWithdraw = PStakeRedeemerHandlerTerm pdepositWithdraw
|
StakeRedeemerImpl
|
||||||
, onDestroy = PStakeRedeemerHandlerTerm pdestroy
|
{ onDepositWithdraw = pdepositWithdraw
|
||||||
, onPermitVote = PStakeRedeemerHandlerTerm ppermitVote
|
, onDestroy = pdestroy
|
||||||
, onRetractVote = PStakeRedeemerHandlerTerm pretractVote
|
, onPermitVote = ppermitVote
|
||||||
, onDelegateTo = PStakeRedeemerHandlerTerm pdelegateTo
|
, onRetractVote = pretractVote
|
||||||
, onClearDelegate = PStakeRedeemerHandlerTerm pclearDelegate
|
, onDelegateTo = pdelegateTo
|
||||||
}
|
, onClearDelegate = pclearDelegate
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,22 +13,23 @@ module Agora.Treasury (
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Agora.AuthorityToken (singleAuthorityTokenBurned)
|
import Agora.AuthorityToken (singleAuthorityTokenBurned)
|
||||||
import Plutarch.Api.V1.Value (PValue)
|
import Plutarch.Api.V1.Value (PCurrencySymbol, PValue)
|
||||||
import Plutarch.Api.V2 (PScriptPurpose (PSpending), PValidator)
|
import Plutarch.Api.V2 (PScriptPurpose (PSpending), PValidator)
|
||||||
import "liqwid-plutarch-extra" Plutarch.Extra.TermCont (pguardC, pletC, pletFieldsC, pmatchC)
|
import "liqwid-plutarch-extra" Plutarch.Extra.TermCont (pguardC, pletFieldsC, pmatchC)
|
||||||
import Plutarch.TryFrom ()
|
|
||||||
import PlutusLedgerApi.V1.Value (CurrencySymbol)
|
|
||||||
|
|
||||||
{- | Validator ensuring that transactions consuming the treasury
|
{- | Validator ensuring that transactions consuming the treasury
|
||||||
do so in a valid manner.
|
do so in a valid manner.
|
||||||
|
|
||||||
|
== Arguments
|
||||||
|
|
||||||
|
Following arguments should be provided(in this order):
|
||||||
|
1. authority token symbol
|
||||||
|
|
||||||
@since 0.1.0
|
@since 0.1.0
|
||||||
-}
|
-}
|
||||||
treasuryValidator ::
|
treasuryValidator ::
|
||||||
-- | Governance Authority Token that can unlock this validator.
|
ClosedTerm (PCurrencySymbol :--> PValidator)
|
||||||
CurrencySymbol ->
|
treasuryValidator = plam $ \atSymbol _ _ ctx' -> unTermCont $ do
|
||||||
ClosedTerm PValidator
|
|
||||||
treasuryValidator gatCs' = plam $ \_ _ ctx' -> unTermCont $ do
|
|
||||||
-- plet required fields from script context.
|
-- plet required fields from script context.
|
||||||
ctx <- pletFieldsC @["txInfo", "purpose"] ctx'
|
ctx <- pletFieldsC @["txInfo", "purpose"] ctx'
|
||||||
|
|
||||||
|
|
@ -40,9 +41,7 @@ treasuryValidator gatCs' = plam $ \_ _ ctx' -> unTermCont $ do
|
||||||
let mint :: Term _ (PValue _ _)
|
let mint :: Term _ (PValue _ _)
|
||||||
mint = txInfo.mint
|
mint = txInfo.mint
|
||||||
|
|
||||||
gatCs <- pletC $ pconstant gatCs'
|
|
||||||
|
|
||||||
pguardC "A single authority token has been burned" $
|
pguardC "A single authority token has been burned" $
|
||||||
singleAuthorityTokenBurned gatCs txInfo.inputs mint
|
singleAuthorityTokenBurned atSymbol txInfo.inputs mint
|
||||||
|
|
||||||
pure . popaque $ pconstant ()
|
pure . popaque $ pconstant ()
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,6 @@ module Agora.Utils (
|
||||||
validatorHashToAddress,
|
validatorHashToAddress,
|
||||||
pltAsData,
|
pltAsData,
|
||||||
withBuiltinPairAsData,
|
withBuiltinPairAsData,
|
||||||
CompiledValidator (..),
|
|
||||||
CompiledMintingPolicy (..),
|
|
||||||
CompiledEffect (..),
|
|
||||||
pvalidatorHashToTokenName,
|
pvalidatorHashToTokenName,
|
||||||
pscriptHashToTokenName,
|
pscriptHashToTokenName,
|
||||||
scriptHashToTokenName,
|
scriptHashToTokenName,
|
||||||
|
|
@ -49,10 +46,8 @@ import Plutarch.Unsafe (punsafeCoerce)
|
||||||
import PlutusLedgerApi.V2 (
|
import PlutusLedgerApi.V2 (
|
||||||
Address (Address),
|
Address (Address),
|
||||||
Credential (ScriptCredential),
|
Credential (ScriptCredential),
|
||||||
MintingPolicy,
|
|
||||||
ScriptHash (ScriptHash),
|
ScriptHash (ScriptHash),
|
||||||
TokenName (TokenName),
|
TokenName (TokenName),
|
||||||
Validator,
|
|
||||||
ValidatorHash (ValidatorHash),
|
ValidatorHash (ValidatorHash),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -128,30 +123,6 @@ withBuiltinPairAsData f p =
|
||||||
b = pfromData $ psndBuiltin # p
|
b = pfromData $ psndBuiltin # p
|
||||||
in f a b
|
in f a b
|
||||||
|
|
||||||
{- | Type-safe wrapper for compiled plutus validator.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
newtype CompiledValidator (datum :: Type) (redeemer :: Type) = CompiledValidator
|
|
||||||
{ getCompiledValidator :: Validator
|
|
||||||
}
|
|
||||||
|
|
||||||
{- | Type-safe wrapper for compiled plutus miting policy.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
newtype CompiledMintingPolicy (redeemer :: Type) = CompiledMintingPolicy
|
|
||||||
{ getCompiledMintingPolicy :: MintingPolicy
|
|
||||||
}
|
|
||||||
|
|
||||||
{- | Type-safe wrapper for compiled plutus effect.
|
|
||||||
|
|
||||||
@since 0.2.0
|
|
||||||
-}
|
|
||||||
newtype CompiledEffect (datum :: Type) = CompiledEffect
|
|
||||||
{ getCompiledEffect :: Validator
|
|
||||||
}
|
|
||||||
|
|
||||||
-- | @since 1.0.0
|
-- | @since 1.0.0
|
||||||
plistEqualsBy ::
|
plistEqualsBy ::
|
||||||
forall
|
forall
|
||||||
|
|
|
||||||
934
bench.csv
934
bench.csv
|
|
@ -1,475 +1,475 @@
|
||||||
name,cpu,mem,size
|
name,cpu,mem,size
|
||||||
Agora/Effects/Treasury Withdrawal Effect/effect/Simple,216491233,584406,3879
|
Agora/Effects/Treasury Withdrawal Effect/effect/Simple,216491233,584406,3880
|
||||||
Agora/Effects/Treasury Withdrawal Effect/effect/Simple with multiple treasuries ,307752363,787074,4311
|
Agora/Effects/Treasury Withdrawal Effect/effect/Simple with multiple treasuries ,307752363,787074,4312
|
||||||
Agora/Effects/Treasury Withdrawal Effect/effect/Mixed Assets,300492604,786706,4249
|
Agora/Effects/Treasury Withdrawal Effect/effect/Mixed Assets,300492604,786706,4250
|
||||||
Agora/Effects/Governor Mutation Effect/validator/valid new governor datum/governor validator should pass,124118615,348863,11354
|
Agora/Effects/Governor Mutation Effect/validator/valid new governor datum/governor validator should pass,124325615,349763,11495
|
||||||
Agora/Effects/Governor Mutation Effect/validator/valid new governor datum/effect validator should pass,141875305,374153,4680
|
Agora/Effects/Governor Mutation Effect/validator/valid new governor datum/effect validator should pass,141944305,374453,4684
|
||||||
Agora/Stake/policy/stakeCreation,56986696,165703,3256
|
Agora/Stake/policy/stakeCreation,56258569,163343,3239
|
||||||
Agora/Stake/validator/stakeDepositWithdraw deposit,149771578,425074,7399
|
Agora/Stake/validator/stakeDepositWithdraw deposit,148453324,420954,7376
|
||||||
Agora/Stake/validator/stakeDepositWithdraw withdraw,149771578,425074,7391
|
Agora/Stake/validator/stakeDepositWithdraw withdraw,148453324,420954,7368
|
||||||
Agora/Stake/validator/set delegate/override existing delegate,178447216,494959,7530
|
Agora/Stake/validator/set delegate/override existing delegate,177128962,490839,7507
|
||||||
Agora/Stake/validator/set delegate/remove existing delegate,169112220,471571,7460
|
Agora/Stake/validator/set delegate/remove existing delegate,167793966,467451,7437
|
||||||
Agora/Stake/validator/set delegate/set delegate to something,176018228,487859,7460
|
Agora/Stake/validator/set delegate/set delegate to something,174699974,483739,7437
|
||||||
Agora/Proposal/policy (proposal creation)/legal/proposal,34052826,101718,2046
|
Agora/Proposal/policy (proposal creation)/legal/proposal,33117699,98458,2042
|
||||||
Agora/Proposal/policy (proposal creation)/legal/governor,277583164,731983,11807
|
Agora/Proposal/policy (proposal creation)/legal/governor,277790164,732883,11948
|
||||||
Agora/Proposal/policy (proposal creation)/legal/stake,310973429,839152,8182
|
Agora/Proposal/policy (proposal creation)/legal/stake,309862175,835932,8159
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/invalid next proposal id/proposal,34052826,101718,2046
|
Agora/Proposal/policy (proposal creation)/illegal/invalid next proposal id/proposal,33117699,98458,2042
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/invalid next proposal id/stake,310973429,839152,8182
|
Agora/Proposal/policy (proposal creation)/illegal/invalid next proposal id/stake,309862175,835932,8159
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/use other's stake/proposal,34052826,101718,2015
|
Agora/Proposal/policy (proposal creation)/illegal/use other's stake/proposal,33117699,98458,2011
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/use other's stake/governor,277583164,731983,11776
|
Agora/Proposal/policy (proposal creation)/illegal/use other's stake/governor,277790164,732883,11917
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/altered stake/proposal,34052826,101718,2046
|
Agora/Proposal/policy (proposal creation)/illegal/altered stake/proposal,33117699,98458,2042
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/invalid stake locks/proposal,34052826,101718,2054
|
Agora/Proposal/policy (proposal creation)/illegal/invalid stake locks/proposal,33117699,98458,2050
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/invalid stake locks/governor,277583164,731983,11815
|
Agora/Proposal/policy (proposal creation)/illegal/invalid stake locks/governor,277790164,732883,11956
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/has reached maximum proposals limit/proposal,34052826,101718,2067
|
Agora/Proposal/policy (proposal creation)/illegal/has reached maximum proposals limit/proposal,33117699,98458,2063
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/has reached maximum proposals limit/stake,323671865,875368,8213
|
Agora/Proposal/policy (proposal creation)/illegal/has reached maximum proposals limit/stake,322560611,872148,8190
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/loose time range/proposal,34052826,101718,2046
|
Agora/Proposal/policy (proposal creation)/illegal/loose time range/proposal,33117699,98458,2042
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/loose time range/stake,310973429,839152,8182
|
Agora/Proposal/policy (proposal creation)/illegal/loose time range/stake,309862175,835932,8159
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/open time range/proposal,34052826,101718,2042
|
Agora/Proposal/policy (proposal creation)/illegal/open time range/proposal,33117699,98458,2038
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/open time range/stake,310973429,839152,8178
|
Agora/Proposal/policy (proposal creation)/illegal/open time range/stake,309862175,835932,8155
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/invalid proposal status/VotingReady/proposal,34052826,101718,2046
|
Agora/Proposal/policy (proposal creation)/illegal/invalid proposal status/VotingReady/proposal,33117699,98458,2042
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/invalid proposal status/VotingReady/stake,310973429,839152,8182
|
Agora/Proposal/policy (proposal creation)/illegal/invalid proposal status/VotingReady/stake,309862175,835932,8159
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/invalid proposal status/Locked/proposal,34052826,101718,2046
|
Agora/Proposal/policy (proposal creation)/illegal/invalid proposal status/Locked/proposal,33117699,98458,2042
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/invalid proposal status/Locked/stake,310973429,839152,8182
|
Agora/Proposal/policy (proposal creation)/illegal/invalid proposal status/Locked/stake,309862175,835932,8159
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/invalid proposal status/Finished/proposal,34052826,101718,2046
|
Agora/Proposal/policy (proposal creation)/illegal/invalid proposal status/Finished/proposal,33117699,98458,2042
|
||||||
Agora/Proposal/policy (proposal creation)/illegal/invalid proposal status/Finished/stake,310973429,839152,8182
|
Agora/Proposal/policy (proposal creation)/illegal/invalid proposal status/Finished/stake,309862175,835932,8159
|
||||||
Agora/Proposal/validator/cosignature/legal/proposal,199710414,564260,11385
|
Agora/Proposal/validator/cosignature/legal/proposal,199754776,564002,11387
|
||||||
Agora/Proposal/validator/cosignature/legal/stake,263738828,736793,8026
|
Agora/Proposal/validator/cosignature/legal/stake,262558574,733273,8003
|
||||||
Agora/Proposal/validator/cosignature/illegal/insufficient staked amount/stake,263738828,736793,8026
|
Agora/Proposal/validator/cosignature/illegal/insufficient staked amount/stake,262558574,733273,8003
|
||||||
Agora/Proposal/validator/cosignature/illegal/proposal locks not updated/proposal,199710414,564260,11379
|
Agora/Proposal/validator/cosignature/illegal/proposal locks not updated/proposal,199754776,564002,11381
|
||||||
Agora/Proposal/validator/cosignature/illegal/duplicate cosigners/stake,270088046,754901,8043
|
Agora/Proposal/validator/cosignature/illegal/duplicate cosigners/stake,268907792,751381,8020
|
||||||
Agora/Proposal/validator/cosignature/illegal/cosigners not updated/stake,263738828,736793,7992
|
Agora/Proposal/validator/cosignature/illegal/cosigners not updated/stake,262558574,733273,7969
|
||||||
Agora/Proposal/validator/cosignature/illegal/cosign after draft/(negative test)/stake,263738828,736793,8026
|
Agora/Proposal/validator/cosignature/illegal/cosign after draft/(negative test)/stake,262558574,733273,8003
|
||||||
Agora/Proposal/validator/cosignature/illegal/cosign after draft/(negative test)/stake,263738828,736793,8026
|
Agora/Proposal/validator/cosignature/illegal/cosign after draft/(negative test)/stake,262558574,733273,8003
|
||||||
Agora/Proposal/validator/cosignature/illegal/cosign after draft/(negative test)/stake,263738828,736793,8026
|
Agora/Proposal/validator/cosignature/illegal/cosign after draft/(negative test)/stake,262558574,733273,8003
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/1 stakes/by owner/proposal,214112405,611164,11237
|
Agora/Proposal/validator/voting/legal/different number of stakes/1 stakes/by owner/proposal,213591278,609704,11239
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/1 stakes/by owner/stake,275392572,770760,7889
|
Agora/Proposal/validator/voting/legal/different number of stakes/1 stakes/by owner/stake,274212318,767240,7866
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/1 stakes/by delegatee/proposal,214112405,611164,11237
|
Agora/Proposal/validator/voting/legal/different number of stakes/1 stakes/by delegatee/proposal,213591278,609704,11239
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/1 stakes/by delegatee/stake,282219467,787916,7889
|
Agora/Proposal/validator/voting/legal/different number of stakes/1 stakes/by delegatee/stake,281039213,784396,7866
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/3 stakes/by owner/proposal,319042607,904612,12452
|
Agora/Proposal/validator/voting/legal/different number of stakes/3 stakes/by owner/proposal,318521480,903152,12454
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/3 stakes/by owner/stake,574886168,1552272,9104
|
Agora/Proposal/validator/voting/legal/different number of stakes/3 stakes/by owner/stake,572663660,1545832,9081
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/3 stakes/by delegatee/proposal,319042607,904612,12452
|
Agora/Proposal/validator/voting/legal/different number of stakes/3 stakes/by delegatee/proposal,318521480,903152,12454
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/3 stakes/by delegatee/stake,581713063,1569428,9104
|
Agora/Proposal/validator/voting/legal/different number of stakes/3 stakes/by delegatee/stake,579490555,1562988,9081
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/5 stakes/by owner/proposal,423972809,1198060,13667
|
Agora/Proposal/validator/voting/legal/different number of stakes/5 stakes/by owner/proposal,423451682,1196600,13669
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/5 stakes/by owner/stake,874379764,2333784,10319
|
Agora/Proposal/validator/voting/legal/different number of stakes/5 stakes/by owner/stake,871115002,2324424,10296
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/5 stakes/by delegatee/proposal,423972809,1198060,13667
|
Agora/Proposal/validator/voting/legal/different number of stakes/5 stakes/by delegatee/proposal,423451682,1196600,13669
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/5 stakes/by delegatee/stake,881206659,2350940,10319
|
Agora/Proposal/validator/voting/legal/different number of stakes/5 stakes/by delegatee/stake,877941897,2341580,10296
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/7 stakes/by owner/proposal,528903011,1491508,14881
|
Agora/Proposal/validator/voting/legal/different number of stakes/7 stakes/by owner/proposal,528381884,1490048,14883
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/7 stakes/by owner/stake,1173873360,3115296,11533
|
Agora/Proposal/validator/voting/legal/different number of stakes/7 stakes/by owner/stake,1169566344,3103016,11510
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/7 stakes/by delegatee/proposal,528903011,1491508,14881
|
Agora/Proposal/validator/voting/legal/different number of stakes/7 stakes/by delegatee/proposal,528381884,1490048,14883
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/7 stakes/by delegatee/stake,1180700255,3132452,11533
|
Agora/Proposal/validator/voting/legal/different number of stakes/7 stakes/by delegatee/stake,1176393239,3120172,11510
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/9 stakes/by owner/proposal,633833213,1784956,16096
|
Agora/Proposal/validator/voting/legal/different number of stakes/9 stakes/by owner/proposal,633312086,1783496,16098
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/9 stakes/by owner/stake,1473366956,3896808,12748
|
Agora/Proposal/validator/voting/legal/different number of stakes/9 stakes/by owner/stake,1468017686,3881608,12725
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/9 stakes/by delegatee/proposal,633833213,1784956,16096
|
Agora/Proposal/validator/voting/legal/different number of stakes/9 stakes/by delegatee/proposal,633312086,1783496,16098
|
||||||
Agora/Proposal/validator/voting/legal/different number of stakes/9 stakes/by delegatee/stake,1480193851,3913964,12748
|
Agora/Proposal/validator/voting/legal/different number of stakes/9 stakes/by delegatee/stake,1474844581,3898764,12725
|
||||||
Agora/Proposal/validator/voting/legal/transparent non-GT tokens/proposal,214112405,611164,11237
|
Agora/Proposal/validator/voting/legal/transparent non-GT tokens/proposal,213591278,609704,11239
|
||||||
Agora/Proposal/validator/voting/legal/transparent non-GT tokens/stake,275392572,770760,7889
|
Agora/Proposal/validator/voting/legal/transparent non-GT tokens/stake,274212318,767240,7866
|
||||||
Agora/Proposal/validator/voting/illegal/vote for nonexistent outcome/stake,275392572,770760,7894
|
Agora/Proposal/validator/voting/illegal/vote for nonexistent outcome/stake,274212318,767240,7871
|
||||||
Agora/Proposal/validator/voting/illegal/unauthorized tx/proposal,214112405,611164,11237
|
Agora/Proposal/validator/voting/illegal/unauthorized tx/proposal,213591278,609704,11239
|
||||||
Agora/Proposal/validator/voting/illegal/more than one proposals/stake,275392572,770760,7894
|
Agora/Proposal/validator/voting/illegal/more than one proposals/stake,274212318,767240,7871
|
||||||
Agora/Proposal/validator/voting/illegal/locks not added/proposal,423972809,1198060,13637
|
Agora/Proposal/validator/voting/illegal/locks not added/proposal,423451682,1196600,13639
|
||||||
Agora/Proposal/validator/voting/illegal/attempt to burn stakes/proposal,400905954,1146440,12608
|
Agora/Proposal/validator/voting/illegal/attempt to burn stakes/proposal,400384827,1144980,12610
|
||||||
Agora/Proposal/validator/voting/illegal/insufficient staked amount/stake,275392572,770760,7866
|
Agora/Proposal/validator/voting/illegal/insufficient staked amount/stake,274212318,767240,7843
|
||||||
Agora/Proposal/validator/voting/illegal/insufficient staked amount/stake,874379764,2333784,10231
|
Agora/Proposal/validator/voting/illegal/insufficient staked amount/stake,871115002,2324424,10208
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from Draft to VotingReady/proposal,241755556,683567,11851
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from Draft to VotingReady/proposal,241234429,682107,11853
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from VotingReady to Locked/proposal,222134383,620301,11614
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from VotingReady to Locked/proposal,221613256,618841,11616
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from Locked to Finished/proposal,236239047,649043,12885
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from Locked to Finished/proposal,235717920,647583,12887
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from Locked to Finished/governor,401301925,1085610,12822
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from Locked to Finished/governor,398800093,1081480,12963
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from Locked to Finished/authority,15755485,47872,3307
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from Locked to Finished/authority,15617485,47272,3302
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from Draft to VotingReady/proposal,237944266,671339,11572
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from Draft to VotingReady/proposal,237423139,669879,11574
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from VotingReady to Locked/proposal,218323093,608073,11335
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from VotingReady to Locked/proposal,217801966,606613,11337
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from Locked to Finished/proposal,232427757,636815,12427
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from Locked to Finished/proposal,231906630,635355,12429
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from Locked to Finished/governor,399047347,1078104,12457
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from Locked to Finished/governor,396545515,1073974,12598
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from Locked to Finished/authority,80911114,217260,2942
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to next state/from Locked to Finished/authority,79975987,214000,2937
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to failed state/from Draft to Finished/proposal,212003769,595862,11607
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to failed state/from Draft to Finished/proposal,211482642,594402,11609
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to failed state/from VotingReady to Finished/proposal,210329785,586268,11608
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to failed state/from VotingReady to Finished/proposal,209808658,584808,11610
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to failed state/from Locked to Finished/proposal,223217730,618674,11608
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to failed state/from Locked to Finished/proposal,222696603,617214,11610
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to failed state/from Draft to Finished/proposal,208192479,583634,11328
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to failed state/from Draft to Finished/proposal,207671352,582174,11330
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to failed state/from VotingReady to Finished/proposal,206518495,574040,11329
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to failed state/from VotingReady to Finished/proposal,205997368,572580,11331
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to failed state/from Locked to Finished/proposal,219406440,606446,11329
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/legal/to failed state/from Locked to Finished/proposal,218885313,604986,11331
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/advance finished proposals/(negative test)/authority,15755485,47872,3307
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/advance finished proposals/(negative test)/authority,15617485,47272,3302
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/advance finished proposals/(negative test)/authority,80911114,217260,2942
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/advance finished proposals/(negative test)/authority,79975987,214000,2937
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/to next state too late/from Locked/governor,401301925,1085610,12822
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/to next state too late/from Locked/governor,398800093,1081480,12963
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/to next state too late/from Locked/authority,15755485,47872,3307
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/to next state too late/from Locked/authority,15617485,47272,3302
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/to next state too late/from Locked/governor,399047347,1078104,12457
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/to next state too late/from Locked/governor,396545515,1073974,12598
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/to next state too late/from Locked/authority,80911114,217260,2942
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/to next state too late/from Locked/authority,79975987,214000,2937
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/forget to mint GATs/proposal,232427757,636815,11781
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/forget to mint GATs/proposal,231906630,635355,11783
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/mint GATs for wrong validators/proposal,232427757,636815,12427
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/mint GATs for wrong validators/proposal,231906630,635355,12429
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/mint GATs for wrong validators/authority,80911114,217260,2942
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/mint GATs for wrong validators/authority,79975987,214000,2937
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/mint GATs with bad token name/proposal,232427757,636815,12459
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/mint GATs with bad token name/proposal,231906630,635355,12461
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/mint GATs with bad token name/authority,12079326,37748,2974
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/mint GATs with bad token name/authority,11941326,37148,2969
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/wrong GAT datum/proposal,232427757,636815,12421
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/wrong GAT datum/proposal,231906630,635355,12423
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/wrong GAT datum/authority,80911114,217260,2936
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/wrong GAT datum/authority,79975987,214000,2931
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/invalid governor output datum/proposal,232427757,636815,12427
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/invalid governor output datum/proposal,231906630,635355,12429
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/invalid governor output datum/authority,80911114,217260,2942
|
Agora/Proposal/validator/advancing/with 1 cosigners and 1 effects/illegal/invalid governor output datum/authority,79975987,214000,2937
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from Draft to VotingReady/proposal,315980276,887869,12767
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from Draft to VotingReady/proposal,315459149,886409,12769
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from VotingReady to Locked/proposal,300053989,834591,12530
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from VotingReady to Locked/proposal,299532862,833131,12532
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from Locked to Finished/proposal,310463767,853345,13801
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from Locked to Finished/proposal,309942640,851885,13803
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from Locked to Finished/governor,443037153,1202842,13433
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from Locked to Finished/governor,440535321,1198712,13574
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from Locked to Finished/authority,15755485,47872,3918
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from Locked to Finished/authority,15617485,47272,3913
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from Draft to VotingReady/proposal,308357696,863413,12206
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from Draft to VotingReady/proposal,307836569,861953,12208
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from VotingReady to Locked/proposal,292431409,810135,11969
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from VotingReady to Locked/proposal,291910282,808675,11971
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from Locked to Finished/proposal,302841187,828889,13062
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from Locked to Finished/proposal,302320060,827429,13064
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from Locked to Finished/governor,439027962,1189222,12881
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from Locked to Finished/governor,436526130,1185092,13022
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from Locked to Finished/authority,80911114,217260,3366
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to next state/from Locked to Finished/authority,79975987,214000,3361
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to failed state/from Draft to Finished/proposal,286228489,800164,12523
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to failed state/from Draft to Finished/proposal,285707362,798704,12525
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to failed state/from VotingReady to Finished/proposal,284554505,790570,12524
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to failed state/from VotingReady to Finished/proposal,284033378,789110,12526
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to failed state/from Locked to Finished/proposal,297442450,822976,12524
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to failed state/from Locked to Finished/proposal,296921323,821516,12526
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to failed state/from Draft to Finished/proposal,278605909,775708,11962
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to failed state/from Draft to Finished/proposal,278084782,774248,11964
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to failed state/from VotingReady to Finished/proposal,276931925,766114,11963
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to failed state/from VotingReady to Finished/proposal,276410798,764654,11965
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to failed state/from Locked to Finished/proposal,289819870,798520,11963
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/legal/to failed state/from Locked to Finished/proposal,289298743,797060,11965
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/advance finished proposals/(negative test)/authority,15755485,47872,3918
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/advance finished proposals/(negative test)/authority,15617485,47272,3913
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/advance finished proposals/(negative test)/authority,80911114,217260,3366
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/advance finished proposals/(negative test)/authority,79975987,214000,3361
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/to next state too late/from Locked/governor,443037153,1202842,13433
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/to next state too late/from Locked/governor,440535321,1198712,13574
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/to next state too late/from Locked/authority,15755485,47872,3918
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/to next state too late/from Locked/authority,15617485,47272,3913
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/to next state too late/from Locked/governor,439027962,1189222,12881
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/to next state too late/from Locked/governor,436526130,1185092,13022
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/to next state too late/from Locked/authority,80911114,217260,3366
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/to next state too late/from Locked/authority,79975987,214000,3361
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/forget to mint GATs/proposal,302841187,828889,12416
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/forget to mint GATs/proposal,302320060,827429,12418
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/mint GATs for wrong validators/proposal,302841187,828889,13062
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/mint GATs for wrong validators/proposal,302320060,827429,13064
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/mint GATs for wrong validators/authority,80911114,217260,3366
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/mint GATs for wrong validators/authority,79975987,214000,3361
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/mint GATs with bad token name/proposal,302841187,828889,13094
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/mint GATs with bad token name/proposal,302320060,827429,13096
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/mint GATs with bad token name/authority,12079326,37748,3398
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/mint GATs with bad token name/authority,11941326,37148,3393
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/wrong GAT datum/proposal,302841187,828889,13056
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/wrong GAT datum/proposal,302320060,827429,13058
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/wrong GAT datum/authority,80911114,217260,3360
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/wrong GAT datum/authority,79975987,214000,3355
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/invalid governor output datum/proposal,302841187,828889,13062
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/invalid governor output datum/proposal,302320060,827429,13064
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/invalid governor output datum/authority,80911114,217260,3366
|
Agora/Proposal/validator/advancing/with 1 cosigners and 2 effects/illegal/invalid governor output datum/authority,79975987,214000,3361
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from Draft to VotingReady/proposal,538654436,1500775,15514
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from Draft to VotingReady/proposal,538133309,1499315,15516
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from VotingReady to Locked/proposal,533812807,1477461,15277
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from VotingReady to Locked/proposal,533291680,1476001,15279
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from Locked to Finished/proposal,533137927,1466251,16548
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from Locked to Finished/proposal,532616800,1464791,16550
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from Locked to Finished/governor,568242837,1554538,15264
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from Locked to Finished/governor,565741005,1550408,15405
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from Locked to Finished/authority,15755485,47872,5749
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from Locked to Finished/authority,15617485,47272,5744
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from Draft to VotingReady/proposal,519597986,1439635,14113
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from Draft to VotingReady/proposal,519076859,1438175,14115
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from VotingReady to Locked/proposal,514756357,1416321,13876
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from VotingReady to Locked/proposal,514235230,1414861,13878
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from Locked to Finished/proposal,514081477,1405111,14969
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from Locked to Finished/proposal,513560350,1403651,14971
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from Locked to Finished/governor,558969807,1522576,14152
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from Locked to Finished/governor,556467975,1518446,14293
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from Locked to Finished/authority,80911114,217260,4637
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to next state/from Locked to Finished/authority,79975987,214000,4632
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to failed state/from Draft to Finished/proposal,508902649,1413070,15270
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to failed state/from Draft to Finished/proposal,508381522,1411610,15272
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to failed state/from VotingReady to Finished/proposal,507228665,1403476,15271
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to failed state/from VotingReady to Finished/proposal,506707538,1402016,15273
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to failed state/from Locked to Finished/proposal,520116610,1435882,15271
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to failed state/from Locked to Finished/proposal,519595483,1434422,15273
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to failed state/from Draft to Finished/proposal,489846199,1351930,13869
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to failed state/from Draft to Finished/proposal,489325072,1350470,13871
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to failed state/from VotingReady to Finished/proposal,488172215,1342336,13870
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to failed state/from VotingReady to Finished/proposal,487651088,1340876,13872
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to failed state/from Locked to Finished/proposal,501060160,1374742,13870
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/legal/to failed state/from Locked to Finished/proposal,500539033,1373282,13872
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/advance finished proposals/(negative test)/authority,15755485,47872,5749
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/advance finished proposals/(negative test)/authority,15617485,47272,5744
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/advance finished proposals/(negative test)/authority,80911114,217260,4637
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/advance finished proposals/(negative test)/authority,79975987,214000,4632
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/to next state too late/from Locked/governor,568242837,1554538,15264
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/to next state too late/from Locked/governor,565741005,1550408,15405
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/to next state too late/from Locked/authority,15755485,47872,5749
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/to next state too late/from Locked/authority,15617485,47272,5744
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/to next state too late/from Locked/governor,558969807,1522576,14152
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/to next state too late/from Locked/governor,556467975,1518446,14293
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/to next state too late/from Locked/authority,80911114,217260,4637
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/to next state too late/from Locked/authority,79975987,214000,4632
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/forget to mint GATs/proposal,514081477,1405111,14323
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/forget to mint GATs/proposal,513560350,1403651,14325
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/mint GATs for wrong validators/proposal,514081477,1405111,14969
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/mint GATs for wrong validators/proposal,513560350,1403651,14971
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/mint GATs for wrong validators/authority,80911114,217260,4637
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/mint GATs for wrong validators/authority,79975987,214000,4632
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/mint GATs with bad token name/proposal,514081477,1405111,15001
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/mint GATs with bad token name/proposal,513560350,1403651,15003
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/mint GATs with bad token name/authority,12079326,37748,4669
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/mint GATs with bad token name/authority,11941326,37148,4664
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/wrong GAT datum/proposal,514081477,1405111,14963
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/wrong GAT datum/proposal,513560350,1403651,14965
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/wrong GAT datum/authority,80911114,217260,4631
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/wrong GAT datum/authority,79975987,214000,4626
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/invalid governor output datum/proposal,514081477,1405111,14969
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/invalid governor output datum/proposal,513560350,1403651,14971
|
||||||
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/invalid governor output datum/authority,80911114,217260,4637
|
Agora/Proposal/validator/advancing/with 1 cosigners and 5 effects/illegal/invalid governor output datum/authority,79975987,214000,4632
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from Draft to VotingReady/proposal,418041446,1190051,13352
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from Draft to VotingReady/proposal,417520319,1188591,13354
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from VotingReady to Locked/proposal,252485103,704029,12025
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from VotingReady to Locked/proposal,251963976,702569,12027
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from Locked to Finished/proposal,266589767,732771,13295
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from Locked to Finished/proposal,266068640,731311,13297
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from Locked to Finished/governor,416175221,1127474,13095
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from Locked to Finished/governor,413673389,1123344,13236
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from Locked to Finished/authority,15755485,47872,3580
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from Locked to Finished/authority,15617485,47272,3575
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from Draft to VotingReady/proposal,414230156,1177823,13071
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from Draft to VotingReady/proposal,413709029,1176363,13073
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from VotingReady to Locked/proposal,248673813,691801,11744
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from VotingReady to Locked/proposal,248152686,690341,11746
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from Locked to Finished/proposal,262778477,720543,12836
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from Locked to Finished/proposal,262257350,719083,12838
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from Locked to Finished/governor,413920643,1119968,12730
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from Locked to Finished/governor,411418811,1115838,12871
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from Locked to Finished/authority,80911114,217260,3215
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to next state/from Locked to Finished/authority,79975987,214000,3210
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to failed state/from Draft to Finished/proposal,242354489,679590,12017
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to failed state/from Draft to Finished/proposal,241833362,678130,12019
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to failed state/from VotingReady to Finished/proposal,240680505,669996,12018
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to failed state/from VotingReady to Finished/proposal,240159378,668536,12020
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to failed state/from Locked to Finished/proposal,253568450,702402,12018
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to failed state/from Locked to Finished/proposal,253047323,700942,12020
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to failed state/from Draft to Finished/proposal,238543199,667362,11737
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to failed state/from Draft to Finished/proposal,238022072,665902,11739
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to failed state/from VotingReady to Finished/proposal,236869215,657768,11738
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to failed state/from VotingReady to Finished/proposal,236348088,656308,11740
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to failed state/from Locked to Finished/proposal,249757160,690174,11738
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/legal/to failed state/from Locked to Finished/proposal,249236033,688714,11740
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/advance finished proposals/(negative test)/authority,15755485,47872,3580
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/advance finished proposals/(negative test)/authority,15617485,47272,3575
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/advance finished proposals/(negative test)/authority,80911114,217260,3215
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/advance finished proposals/(negative test)/authority,79975987,214000,3210
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/to next state too late/from Locked/governor,416175221,1127474,13095
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/to next state too late/from Locked/governor,413673389,1123344,13236
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/to next state too late/from Locked/authority,15755485,47872,3580
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/to next state too late/from Locked/authority,15617485,47272,3575
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/to next state too late/from Locked/governor,413920643,1119968,12730
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/to next state too late/from Locked/governor,411418811,1115838,12871
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/to next state too late/from Locked/authority,80911114,217260,3215
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/to next state too late/from Locked/authority,79975987,214000,3210
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/forget to mint GATs/proposal,262778477,720543,12191
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/forget to mint GATs/proposal,262257350,719083,12193
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/mint GATs for wrong validators/proposal,262778477,720543,12836
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/mint GATs for wrong validators/proposal,262257350,719083,12838
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/mint GATs for wrong validators/authority,80911114,217260,3215
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/mint GATs for wrong validators/authority,79975987,214000,3210
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/mint GATs with bad token name/proposal,262778477,720543,12868
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/mint GATs with bad token name/proposal,262257350,719083,12870
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/mint GATs with bad token name/authority,12079326,37748,3247
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/mint GATs with bad token name/authority,11941326,37148,3242
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/wrong GAT datum/proposal,262778477,720543,12830
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/wrong GAT datum/proposal,262257350,719083,12832
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/wrong GAT datum/authority,80911114,217260,3209
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/wrong GAT datum/authority,79975987,214000,3204
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/invalid governor output datum/proposal,262778477,720543,12836
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/invalid governor output datum/proposal,262257350,719083,12838
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/invalid governor output datum/authority,80911114,217260,3215
|
Agora/Proposal/validator/advancing/with 5 cosigners and 1 effects/illegal/invalid governor output datum/authority,79975987,214000,3210
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from Draft to VotingReady/proposal,492266166,1394353,14267
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from Draft to VotingReady/proposal,491745039,1392893,14269
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from VotingReady to Locked/proposal,330404709,918319,12940
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from VotingReady to Locked/proposal,329883582,916859,12942
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from Locked to Finished/proposal,340814487,937073,14211
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from Locked to Finished/proposal,340293360,935613,14213
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from Locked to Finished/governor,457910449,1244706,13706
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from Locked to Finished/governor,455408617,1240576,13847
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from Locked to Finished/authority,15755485,47872,4191
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from Locked to Finished/authority,15617485,47272,4186
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from Draft to VotingReady/proposal,484643586,1369897,13707
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from Draft to VotingReady/proposal,484122459,1368437,13709
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from VotingReady to Locked/proposal,322782129,893863,12379
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from VotingReady to Locked/proposal,322261002,892403,12381
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from Locked to Finished/proposal,333191907,912617,13472
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from Locked to Finished/proposal,332670780,911157,13474
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from Locked to Finished/governor,453901258,1231086,13154
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from Locked to Finished/governor,451399426,1226956,13295
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from Locked to Finished/authority,80911114,217260,3639
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to next state/from Locked to Finished/authority,79975987,214000,3634
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to failed state/from Draft to Finished/proposal,316579209,883892,12933
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to failed state/from Draft to Finished/proposal,316058082,882432,12935
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to failed state/from VotingReady to Finished/proposal,314905225,874298,12934
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to failed state/from VotingReady to Finished/proposal,314384098,872838,12936
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to failed state/from Locked to Finished/proposal,327793170,906704,12934
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to failed state/from Locked to Finished/proposal,327272043,905244,12936
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to failed state/from Draft to Finished/proposal,308956629,859436,12372
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to failed state/from Draft to Finished/proposal,308435502,857976,12374
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to failed state/from VotingReady to Finished/proposal,307282645,849842,12373
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to failed state/from VotingReady to Finished/proposal,306761518,848382,12375
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to failed state/from Locked to Finished/proposal,320170590,882248,12373
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/legal/to failed state/from Locked to Finished/proposal,319649463,880788,12375
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/advance finished proposals/(negative test)/authority,15755485,47872,4191
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/advance finished proposals/(negative test)/authority,15617485,47272,4186
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/advance finished proposals/(negative test)/authority,80911114,217260,3639
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/advance finished proposals/(negative test)/authority,79975987,214000,3634
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/to next state too late/from Locked/governor,457910449,1244706,13706
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/to next state too late/from Locked/governor,455408617,1240576,13847
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/to next state too late/from Locked/authority,15755485,47872,4191
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/to next state too late/from Locked/authority,15617485,47272,4186
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/to next state too late/from Locked/governor,453901258,1231086,13154
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/to next state too late/from Locked/governor,451399426,1226956,13295
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/to next state too late/from Locked/authority,80911114,217260,3639
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/to next state too late/from Locked/authority,79975987,214000,3634
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/forget to mint GATs/proposal,333191907,912617,12826
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/forget to mint GATs/proposal,332670780,911157,12828
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/mint GATs for wrong validators/proposal,333191907,912617,13472
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/mint GATs for wrong validators/proposal,332670780,911157,13474
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/mint GATs for wrong validators/authority,80911114,217260,3639
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/mint GATs for wrong validators/authority,79975987,214000,3634
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/mint GATs with bad token name/proposal,333191907,912617,13504
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/mint GATs with bad token name/proposal,332670780,911157,13506
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/mint GATs with bad token name/authority,12079326,37748,3671
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/mint GATs with bad token name/authority,11941326,37148,3666
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/wrong GAT datum/proposal,333191907,912617,13466
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/wrong GAT datum/proposal,332670780,911157,13468
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/wrong GAT datum/authority,80911114,217260,3633
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/wrong GAT datum/authority,79975987,214000,3628
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/invalid governor output datum/proposal,333191907,912617,13472
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/invalid governor output datum/proposal,332670780,911157,13474
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/invalid governor output datum/authority,80911114,217260,3639
|
Agora/Proposal/validator/advancing/with 5 cosigners and 2 effects/illegal/invalid governor output datum/authority,79975987,214000,3634
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from Draft to VotingReady/proposal,714940326,2007259,17013
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from Draft to VotingReady/proposal,714419199,2005799,17015
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from VotingReady to Locked/proposal,564163527,1561189,15686
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from VotingReady to Locked/proposal,563642400,1559729,15688
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from Locked to Finished/proposal,563488647,1549979,16957
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from Locked to Finished/proposal,562967520,1548519,16959
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from Locked to Finished/governor,583116133,1596402,15537
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from Locked to Finished/governor,580614301,1592272,15678
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from Locked to Finished/authority,15755485,47872,6022
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from Locked to Finished/authority,15617485,47272,6017
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from Draft to VotingReady/proposal,695883876,1946119,15613
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from Draft to VotingReady/proposal,695362749,1944659,15615
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from VotingReady to Locked/proposal,545107077,1500049,14285
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from VotingReady to Locked/proposal,544585950,1498589,14287
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from Locked to Finished/proposal,544432197,1488839,15378
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from Locked to Finished/proposal,543911070,1487379,15380
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from Locked to Finished/governor,573843103,1564440,14425
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from Locked to Finished/governor,571341271,1560310,14566
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from Locked to Finished/authority,80911114,217260,4910
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to next state/from Locked to Finished/authority,79975987,214000,4905
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to failed state/from Draft to Finished/proposal,539253369,1496798,15679
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to failed state/from Draft to Finished/proposal,538732242,1495338,15681
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to failed state/from VotingReady to Finished/proposal,537579385,1487204,15680
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to failed state/from VotingReady to Finished/proposal,537058258,1485744,15682
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to failed state/from Locked to Finished/proposal,550467330,1519610,15680
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to failed state/from Locked to Finished/proposal,549946203,1518150,15682
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to failed state/from Draft to Finished/proposal,520196919,1435658,14278
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to failed state/from Draft to Finished/proposal,519675792,1434198,14280
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to failed state/from VotingReady to Finished/proposal,518522935,1426064,14279
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to failed state/from VotingReady to Finished/proposal,518001808,1424604,14281
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to failed state/from Locked to Finished/proposal,531410880,1458470,14279
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/legal/to failed state/from Locked to Finished/proposal,530889753,1457010,14281
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/advance finished proposals/(negative test)/authority,15755485,47872,6022
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/advance finished proposals/(negative test)/authority,15617485,47272,6017
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/advance finished proposals/(negative test)/authority,80911114,217260,4910
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/advance finished proposals/(negative test)/authority,79975987,214000,4905
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/to next state too late/from Locked/governor,583116133,1596402,15537
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/to next state too late/from Locked/governor,580614301,1592272,15678
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/to next state too late/from Locked/authority,15755485,47872,6022
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/to next state too late/from Locked/authority,15617485,47272,6017
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/to next state too late/from Locked/governor,573843103,1564440,14425
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/to next state too late/from Locked/governor,571341271,1560310,14566
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/to next state too late/from Locked/authority,80911114,217260,4910
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/to next state too late/from Locked/authority,79975987,214000,4905
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/forget to mint GATs/proposal,544432197,1488839,14732
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/forget to mint GATs/proposal,543911070,1487379,14734
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/mint GATs for wrong validators/proposal,544432197,1488839,15378
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/mint GATs for wrong validators/proposal,543911070,1487379,15380
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/mint GATs for wrong validators/authority,80911114,217260,4910
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/mint GATs for wrong validators/authority,79975987,214000,4905
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/mint GATs with bad token name/proposal,544432197,1488839,15410
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/mint GATs with bad token name/proposal,543911070,1487379,15412
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/mint GATs with bad token name/authority,12079326,37748,4942
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/mint GATs with bad token name/authority,11941326,37148,4937
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/wrong GAT datum/proposal,544432197,1488839,15372
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/wrong GAT datum/proposal,543911070,1487379,15374
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/wrong GAT datum/authority,80911114,217260,4904
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/wrong GAT datum/authority,79975987,214000,4899
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/invalid governor output datum/proposal,544432197,1488839,15378
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/invalid governor output datum/proposal,543911070,1487379,15380
|
||||||
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/invalid governor output datum/authority,80911114,217260,4910
|
Agora/Proposal/validator/advancing/with 5 cosigners and 5 effects/illegal/invalid governor output datum/authority,79975987,214000,4905
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from Draft to VotingReady/proposal,653562252,1868847,15228
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from Draft to VotingReady/proposal,653041125,1867387,15230
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from VotingReady to Locked/proposal,290423503,808689,12536
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from VotingReady to Locked/proposal,289902376,807229,12538
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from Locked to Finished/proposal,304528167,837431,13807
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from Locked to Finished/proposal,304007040,835971,13809
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from Locked to Finished/governor,434766841,1179804,13437
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from Locked to Finished/governor,432265009,1175674,13578
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from Locked to Finished/authority,15755485,47872,3922
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from Locked to Finished/authority,15617485,47272,3917
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from Draft to VotingReady/proposal,649750962,1856619,14949
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from Draft to VotingReady/proposal,649229835,1855159,14951
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from VotingReady to Locked/proposal,286612213,796461,12256
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from VotingReady to Locked/proposal,286091086,795001,12258
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from Locked to Finished/proposal,300716877,825203,13348
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from Locked to Finished/proposal,300195750,823743,13350
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from Locked to Finished/governor,432512263,1172298,13071
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from Locked to Finished/governor,430010431,1168168,13212
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from Locked to Finished/authority,80911114,217260,3556
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to next state/from Locked to Finished/authority,79975987,214000,3551
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to failed state/from Draft to Finished/proposal,280292889,784250,12529
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to failed state/from Draft to Finished/proposal,279771762,782790,12531
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to failed state/from VotingReady to Finished/proposal,278618905,774656,12530
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to failed state/from VotingReady to Finished/proposal,278097778,773196,12532
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to failed state/from Locked to Finished/proposal,291506850,807062,12530
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to failed state/from Locked to Finished/proposal,290985723,805602,12532
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to failed state/from Draft to Finished/proposal,276481599,772022,12249
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to failed state/from Draft to Finished/proposal,275960472,770562,12251
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to failed state/from VotingReady to Finished/proposal,274807615,762428,12250
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to failed state/from VotingReady to Finished/proposal,274286488,760968,12252
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to failed state/from Locked to Finished/proposal,287695560,794834,12250
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/legal/to failed state/from Locked to Finished/proposal,287174433,793374,12252
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/advance finished proposals/(negative test)/authority,15755485,47872,3922
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/advance finished proposals/(negative test)/authority,15617485,47272,3917
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/advance finished proposals/(negative test)/authority,80911114,217260,3556
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/advance finished proposals/(negative test)/authority,79975987,214000,3551
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/to next state too late/from Locked/governor,434766841,1179804,13437
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/to next state too late/from Locked/governor,432265009,1175674,13578
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/to next state too late/from Locked/authority,15755485,47872,3922
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/to next state too late/from Locked/authority,15617485,47272,3917
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/to next state too late/from Locked/governor,432512263,1172298,13071
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/to next state too late/from Locked/governor,430010431,1168168,13212
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/to next state too late/from Locked/authority,80911114,217260,3556
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/to next state too late/from Locked/authority,79975987,214000,3551
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/forget to mint GATs/proposal,300716877,825203,12703
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/forget to mint GATs/proposal,300195750,823743,12705
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/mint GATs for wrong validators/proposal,300716877,825203,13348
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/mint GATs for wrong validators/proposal,300195750,823743,13350
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/mint GATs for wrong validators/authority,80911114,217260,3556
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/mint GATs for wrong validators/authority,79975987,214000,3551
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/mint GATs with bad token name/proposal,300716877,825203,13381
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/mint GATs with bad token name/proposal,300195750,823743,13383
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/mint GATs with bad token name/authority,12079326,37748,3588
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/mint GATs with bad token name/authority,11941326,37148,3583
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/wrong GAT datum/proposal,300716877,825203,13342
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/wrong GAT datum/proposal,300195750,823743,13344
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/wrong GAT datum/authority,80911114,217260,3550
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/wrong GAT datum/authority,79975987,214000,3545
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/invalid governor output datum/proposal,300716877,825203,13348
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/invalid governor output datum/proposal,300195750,823743,13350
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/invalid governor output datum/authority,80911114,217260,3556
|
Agora/Proposal/validator/advancing/with 10 cosigners and 1 effects/illegal/invalid governor output datum/authority,79975987,214000,3551
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from Draft to VotingReady/proposal,727786972,2073149,16144
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from Draft to VotingReady/proposal,727265845,2071689,16146
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from VotingReady to Locked/proposal,368343109,1022979,13451
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from VotingReady to Locked/proposal,367821982,1021519,13453
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from Locked to Finished/proposal,378752887,1041733,14722
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from Locked to Finished/proposal,378231760,1040273,14724
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from Locked to Finished/governor,476502069,1297036,14047
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from Locked to Finished/governor,474000237,1292906,14188
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from Locked to Finished/authority,15755485,47872,4532
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from Locked to Finished/authority,15617485,47272,4527
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from Draft to VotingReady/proposal,720164392,2048693,15584
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from Draft to VotingReady/proposal,719643265,2047233,15586
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from VotingReady to Locked/proposal,360720529,998523,12892
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from VotingReady to Locked/proposal,360199402,997063,12894
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from Locked to Finished/proposal,371130307,1017277,13984
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from Locked to Finished/proposal,370609180,1015817,13986
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from Locked to Finished/governor,472492878,1283416,13495
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from Locked to Finished/governor,469991046,1279286,13636
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from Locked to Finished/authority,80911114,217260,3980
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to next state/from Locked to Finished/authority,79975987,214000,3975
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to failed state/from Draft to Finished/proposal,354517609,988552,13444
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to failed state/from Draft to Finished/proposal,353996482,987092,13446
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to failed state/from VotingReady to Finished/proposal,352843625,978958,13445
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to failed state/from VotingReady to Finished/proposal,352322498,977498,13447
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to failed state/from Locked to Finished/proposal,365731570,1011364,13445
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to failed state/from Locked to Finished/proposal,365210443,1009904,13447
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to failed state/from Draft to Finished/proposal,346895029,964096,12885
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to failed state/from Draft to Finished/proposal,346373902,962636,12887
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to failed state/from VotingReady to Finished/proposal,345221045,954502,12886
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to failed state/from VotingReady to Finished/proposal,344699918,953042,12888
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to failed state/from Locked to Finished/proposal,358108990,986908,12886
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/legal/to failed state/from Locked to Finished/proposal,357587863,985448,12888
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/advance finished proposals/(negative test)/authority,15755485,47872,4532
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/advance finished proposals/(negative test)/authority,15617485,47272,4527
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/advance finished proposals/(negative test)/authority,80911114,217260,3980
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/advance finished proposals/(negative test)/authority,79975987,214000,3975
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/to next state too late/from Locked/governor,476502069,1297036,14047
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/to next state too late/from Locked/governor,474000237,1292906,14188
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/to next state too late/from Locked/authority,15755485,47872,4532
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/to next state too late/from Locked/authority,15617485,47272,4527
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/to next state too late/from Locked/governor,472492878,1283416,13495
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/to next state too late/from Locked/governor,469991046,1279286,13636
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/to next state too late/from Locked/authority,80911114,217260,3980
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/to next state too late/from Locked/authority,79975987,214000,3975
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/forget to mint GATs/proposal,371130307,1017277,13339
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/forget to mint GATs/proposal,370609180,1015817,13341
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/mint GATs for wrong validators/proposal,371130307,1017277,13984
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/mint GATs for wrong validators/proposal,370609180,1015817,13986
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/mint GATs for wrong validators/authority,80911114,217260,3980
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/mint GATs for wrong validators/authority,79975987,214000,3975
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/mint GATs with bad token name/proposal,371130307,1017277,14016
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/mint GATs with bad token name/proposal,370609180,1015817,14018
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/mint GATs with bad token name/authority,12079326,37748,4012
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/mint GATs with bad token name/authority,11941326,37148,4007
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/wrong GAT datum/proposal,371130307,1017277,13978
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/wrong GAT datum/proposal,370609180,1015817,13980
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/wrong GAT datum/authority,80911114,217260,3974
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/wrong GAT datum/authority,79975987,214000,3969
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/invalid governor output datum/proposal,371130307,1017277,13984
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/invalid governor output datum/proposal,370609180,1015817,13986
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/invalid governor output datum/authority,80911114,217260,3980
|
Agora/Proposal/validator/advancing/with 10 cosigners and 2 effects/illegal/invalid governor output datum/authority,79975987,214000,3975
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from Draft to VotingReady/proposal,950461132,2686055,18891
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from Draft to VotingReady/proposal,949940005,2684595,18893
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from VotingReady to Locked/proposal,602101927,1665849,16198
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from VotingReady to Locked/proposal,601580800,1664389,16200
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from Locked to Finished/proposal,601427047,1654639,17469
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from Locked to Finished/proposal,600905920,1653179,17471
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from Locked to Finished/governor,601707753,1648732,15878
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from Locked to Finished/governor,599205921,1644602,16019
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from Locked to Finished/authority,15755485,47872,6363
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from Locked to Finished/authority,15617485,47272,6358
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from Draft to VotingReady/proposal,931404682,2624915,17490
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from Draft to VotingReady/proposal,930883555,2623455,17492
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from VotingReady to Locked/proposal,583045477,1604709,14798
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from VotingReady to Locked/proposal,582524350,1603249,14800
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from Locked to Finished/proposal,582370597,1593499,15890
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from Locked to Finished/proposal,581849470,1592039,15892
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from Locked to Finished/governor,592434723,1616770,14766
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from Locked to Finished/governor,589932891,1612640,14907
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from Locked to Finished/authority,80911114,217260,5251
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to next state/from Locked to Finished/authority,79975987,214000,5246
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to failed state/from Draft to Finished/proposal,577191769,1601458,16191
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to failed state/from Draft to Finished/proposal,576670642,1599998,16193
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to failed state/from VotingReady to Finished/proposal,575517785,1591864,16192
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to failed state/from VotingReady to Finished/proposal,574996658,1590404,16194
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to failed state/from Locked to Finished/proposal,588405730,1624270,16192
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to failed state/from Locked to Finished/proposal,587884603,1622810,16194
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to failed state/from Draft to Finished/proposal,558135319,1540318,14791
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to failed state/from Draft to Finished/proposal,557614192,1538858,14793
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to failed state/from VotingReady to Finished/proposal,556461335,1530724,14792
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to failed state/from VotingReady to Finished/proposal,555940208,1529264,14794
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to failed state/from Locked to Finished/proposal,569349280,1563130,14792
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/legal/to failed state/from Locked to Finished/proposal,568828153,1561670,14794
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/advance finished proposals/(negative test)/authority,15755485,47872,6363
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/advance finished proposals/(negative test)/authority,15617485,47272,6358
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/advance finished proposals/(negative test)/authority,80911114,217260,5251
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/advance finished proposals/(negative test)/authority,79975987,214000,5246
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/to next state too late/from Locked/governor,601707753,1648732,15878
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/to next state too late/from Locked/governor,599205921,1644602,16019
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/to next state too late/from Locked/authority,15755485,47872,6363
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/to next state too late/from Locked/authority,15617485,47272,6358
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/to next state too late/from Locked/governor,592434723,1616770,14766
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/to next state too late/from Locked/governor,589932891,1612640,14907
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/to next state too late/from Locked/authority,80911114,217260,5251
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/to next state too late/from Locked/authority,79975987,214000,5246
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/forget to mint GATs/proposal,582370597,1593499,15244
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/forget to mint GATs/proposal,581849470,1592039,15246
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/mint GATs for wrong validators/proposal,582370597,1593499,15890
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/mint GATs for wrong validators/proposal,581849470,1592039,15892
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/mint GATs for wrong validators/authority,80911114,217260,5251
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/mint GATs for wrong validators/authority,79975987,214000,5246
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/mint GATs with bad token name/proposal,582370597,1593499,15922
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/mint GATs with bad token name/proposal,581849470,1592039,15924
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/mint GATs with bad token name/authority,12079326,37748,5283
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/mint GATs with bad token name/authority,11941326,37148,5278
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/wrong GAT datum/proposal,582370597,1593499,15884
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/wrong GAT datum/proposal,581849470,1592039,15886
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/wrong GAT datum/authority,80911114,217260,5245
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/wrong GAT datum/authority,79975987,214000,5240
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/invalid governor output datum/proposal,582370597,1593499,15890
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/invalid governor output datum/proposal,581849470,1592039,15892
|
||||||
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/invalid governor output datum/authority,80911114,217260,5251
|
Agora/Proposal/validator/advancing/with 10 cosigners and 5 effects/illegal/invalid governor output datum/authority,79975987,214000,5246
|
||||||
Agora/Proposal/validator/unlocking/legal/with 1 stakes/voter: retract votes while voting/stake,286583408,781140,8111
|
Agora/Proposal/validator/unlocking/legal/with 1 stakes/voter: retract votes while voting/stake,285403154,777620,8088
|
||||||
Agora/Proposal/validator/unlocking/legal/with 1 stakes/voter: retract votes while voting/proposal,211726371,599872,11464
|
Agora/Proposal/validator/unlocking/legal/with 1 stakes/voter: retract votes while voting/proposal,210639755,597210,11466
|
||||||
Agora/Proposal/validator/unlocking/legal/with 1 stakes/voter: retract votes while voting by delegatee/stake,293410303,798296,8111
|
Agora/Proposal/validator/unlocking/legal/with 1 stakes/voter: retract votes while voting by delegatee/stake,292230049,794776,8088
|
||||||
Agora/Proposal/validator/unlocking/legal/with 1 stakes/voter: retract votes while voting by delegatee/proposal,211726371,599872,11464
|
Agora/Proposal/validator/unlocking/legal/with 1 stakes/voter: retract votes while voting by delegatee/proposal,210639755,597210,11466
|
||||||
Agora/Proposal/validator/unlocking/legal/with 1 stakes/voter/creator: retract votes while voting/stake,297089663,811742,8127
|
Agora/Proposal/validator/unlocking/legal/with 1 stakes/voter/creator: retract votes while voting/stake,295909409,808222,8104
|
||||||
Agora/Proposal/validator/unlocking/legal/with 1 stakes/voter/creator: retract votes while voting/proposal,218061775,618286,11475
|
Agora/Proposal/validator/unlocking/legal/with 1 stakes/voter/creator: retract votes while voting/proposal,216975159,615624,11477
|
||||||
Agora/Proposal/validator/unlocking/legal/with 1 stakes/creator: remove creator lock after voting/stake,287584665,784347,8114
|
Agora/Proposal/validator/unlocking/legal/with 1 stakes/creator: remove creator lock after voting/stake,286404411,780827,8091
|
||||||
Agora/Proposal/validator/unlocking/legal/with 1 stakes/creator: remove creator lock after voting/proposal,182085595,516679,11468
|
Agora/Proposal/validator/unlocking/legal/with 1 stakes/creator: remove creator lock after voting/proposal,180998979,514017,11470
|
||||||
Agora/Proposal/validator/unlocking/legal/with 1 stakes/Voter: remove lock after voting/stake,287714386,783544,8116
|
Agora/Proposal/validator/unlocking/legal/with 1 stakes/Voter: remove lock after voting/stake,286534132,780024,8093
|
||||||
Agora/Proposal/validator/unlocking/legal/with 1 stakes/Voter: remove lock after voting/proposal,183123872,519477,11469
|
Agora/Proposal/validator/unlocking/legal/with 1 stakes/Voter: remove lock after voting/proposal,182037256,516815,11471
|
||||||
Agora/Proposal/validator/unlocking/legal/with 3 stakes/voter: retract votes while voting/stake,606983718,1573538,9456
|
Agora/Proposal/validator/unlocking/legal/with 3 stakes/voter: retract votes while voting/stake,604761210,1567098,9433
|
||||||
Agora/Proposal/validator/unlocking/legal/with 3 stakes/voter: retract votes while voting/proposal,321452619,905880,12809
|
Agora/Proposal/validator/unlocking/legal/with 3 stakes/voter: retract votes while voting/proposal,320366003,903218,12811
|
||||||
Agora/Proposal/validator/unlocking/legal/with 3 stakes/voter: retract votes while voting by delegatee/stake,613810613,1590694,9456
|
Agora/Proposal/validator/unlocking/legal/with 3 stakes/voter: retract votes while voting by delegatee/stake,611588105,1584254,9433
|
||||||
Agora/Proposal/validator/unlocking/legal/with 3 stakes/voter: retract votes while voting by delegatee/proposal,321452619,905880,12809
|
Agora/Proposal/validator/unlocking/legal/with 3 stakes/voter: retract votes while voting by delegatee/proposal,320366003,903218,12811
|
||||||
Agora/Proposal/validator/unlocking/legal/with 3 stakes/voter/creator: retract votes while voting/stake,638502483,1665344,9494
|
Agora/Proposal/validator/unlocking/legal/with 3 stakes/voter/creator: retract votes while voting/stake,636279975,1658904,9471
|
||||||
Agora/Proposal/validator/unlocking/legal/with 3 stakes/voter/creator: retract votes while voting/proposal,340458831,961122,12842
|
Agora/Proposal/validator/unlocking/legal/with 3 stakes/voter/creator: retract votes while voting/proposal,339372215,958460,12844
|
||||||
Agora/Proposal/validator/unlocking/legal/with 3 stakes/creator: remove creator lock after voting/stake,607725533,1578351,9457
|
Agora/Proposal/validator/unlocking/legal/with 3 stakes/creator: remove creator lock after voting/stake,605503025,1571911,9434
|
||||||
Agora/Proposal/validator/unlocking/legal/with 3 stakes/creator: remove creator lock after voting/proposal,248010757,696223,12811
|
Agora/Proposal/validator/unlocking/legal/with 3 stakes/creator: remove creator lock after voting/proposal,246924141,693561,12813
|
||||||
Agora/Proposal/validator/unlocking/legal/with 3 stakes/Voter: remove lock after voting/stake,608114696,1575942,9461
|
Agora/Proposal/validator/unlocking/legal/with 3 stakes/Voter: remove lock after voting/stake,605892188,1569502,9438
|
||||||
Agora/Proposal/validator/unlocking/legal/with 3 stakes/Voter: remove lock after voting/proposal,251125588,704617,12814
|
Agora/Proposal/validator/unlocking/legal/with 3 stakes/Voter: remove lock after voting/proposal,250038972,701955,12816
|
||||||
Agora/Proposal/validator/unlocking/legal/with 5 stakes/voter: retract votes while voting/stake,947030684,2397376,10802
|
Agora/Proposal/validator/unlocking/legal/with 5 stakes/voter: retract votes while voting/stake,943765922,2388016,10779
|
||||||
Agora/Proposal/validator/unlocking/legal/with 5 stakes/voter: retract votes while voting/proposal,431178867,1211888,14155
|
Agora/Proposal/validator/unlocking/legal/with 5 stakes/voter: retract votes while voting/proposal,430092251,1209226,14157
|
||||||
Agora/Proposal/validator/unlocking/legal/with 5 stakes/voter: retract votes while voting by delegatee/stake,953857579,2414532,10802
|
Agora/Proposal/validator/unlocking/legal/with 5 stakes/voter: retract votes while voting by delegatee/stake,950592817,2405172,10779
|
||||||
Agora/Proposal/validator/unlocking/legal/with 5 stakes/voter: retract votes while voting by delegatee/proposal,431178867,1211888,14155
|
Agora/Proposal/validator/unlocking/legal/with 5 stakes/voter: retract votes while voting by delegatee/proposal,430092251,1209226,14157
|
||||||
Agora/Proposal/validator/unlocking/legal/with 5 stakes/voter/creator: retract votes while voting/stake,999561959,2550386,10862
|
Agora/Proposal/validator/unlocking/legal/with 5 stakes/voter/creator: retract votes while voting/stake,996297197,2541026,10839
|
||||||
Agora/Proposal/validator/unlocking/legal/with 5 stakes/voter/creator: retract votes while voting/proposal,462855887,1303958,14210
|
Agora/Proposal/validator/unlocking/legal/with 5 stakes/voter/creator: retract votes while voting/proposal,461769271,1301296,14212
|
||||||
Agora/Proposal/validator/unlocking/legal/with 5 stakes/creator: remove creator lock after voting/stake,947513057,2403795,10801
|
Agora/Proposal/validator/unlocking/legal/with 5 stakes/creator: remove creator lock after voting/stake,944248295,2394435,10778
|
||||||
Agora/Proposal/validator/unlocking/legal/with 5 stakes/creator: remove creator lock after voting/proposal,313935919,875767,14155
|
Agora/Proposal/validator/unlocking/legal/with 5 stakes/creator: remove creator lock after voting/proposal,312849303,873105,14157
|
||||||
Agora/Proposal/validator/unlocking/legal/with 5 stakes/Voter: remove lock after voting/stake,948161662,2399780,10807
|
Agora/Proposal/validator/unlocking/legal/with 5 stakes/Voter: remove lock after voting/stake,944896900,2390420,10784
|
||||||
Agora/Proposal/validator/unlocking/legal/with 5 stakes/Voter: remove lock after voting/proposal,319127304,889757,14160
|
Agora/Proposal/validator/unlocking/legal/with 5 stakes/Voter: remove lock after voting/proposal,318040688,887095,14162
|
||||||
Agora/Proposal/validator/unlocking/legal/with 7 stakes/voter: retract votes while voting/stake,1306724306,3252654,12147
|
Agora/Proposal/validator/unlocking/legal/with 7 stakes/voter: retract votes while voting/stake,1302417290,3240374,12124
|
||||||
Agora/Proposal/validator/unlocking/legal/with 7 stakes/voter: retract votes while voting/proposal,540905115,1517896,15500
|
Agora/Proposal/validator/unlocking/legal/with 7 stakes/voter: retract votes while voting/proposal,539818499,1515234,15502
|
||||||
Agora/Proposal/validator/unlocking/legal/with 7 stakes/voter: retract votes while voting by delegatee/stake,1313551201,3269810,12147
|
Agora/Proposal/validator/unlocking/legal/with 7 stakes/voter: retract votes while voting by delegatee/stake,1309244185,3257530,12124
|
||||||
Agora/Proposal/validator/unlocking/legal/with 7 stakes/voter: retract votes while voting by delegatee/proposal,540905115,1517896,15500
|
Agora/Proposal/validator/unlocking/legal/with 7 stakes/voter: retract votes while voting by delegatee/proposal,539818499,1515234,15502
|
||||||
Agora/Proposal/validator/unlocking/legal/with 7 stakes/voter/creator: retract votes while voting/stake,1380268091,3466868,12229
|
Agora/Proposal/validator/unlocking/legal/with 7 stakes/voter/creator: retract votes while voting/stake,1375961075,3454588,12206
|
||||||
Agora/Proposal/validator/unlocking/legal/with 7 stakes/voter/creator: retract votes while voting/proposal,585252943,1646794,15577
|
Agora/Proposal/validator/unlocking/legal/with 7 stakes/voter/creator: retract votes while voting/proposal,584166327,1644132,15579
|
||||||
Agora/Proposal/validator/unlocking/legal/with 7 stakes/creator: remove creator lock after voting/stake,1306947237,3260679,12144
|
Agora/Proposal/validator/unlocking/legal/with 7 stakes/creator: remove creator lock after voting/stake,1302640221,3248399,12121
|
||||||
Agora/Proposal/validator/unlocking/legal/with 7 stakes/creator: remove creator lock after voting/proposal,379861081,1055311,15498
|
Agora/Proposal/validator/unlocking/legal/with 7 stakes/creator: remove creator lock after voting/proposal,378774465,1052649,15500
|
||||||
Agora/Proposal/validator/unlocking/legal/with 7 stakes/Voter: remove lock after voting/stake,1307855284,3255058,12152
|
Agora/Proposal/validator/unlocking/legal/with 7 stakes/Voter: remove lock after voting/stake,1303548268,3242778,12129
|
||||||
Agora/Proposal/validator/unlocking/legal/with 7 stakes/Voter: remove lock after voting/proposal,387129020,1074897,15505
|
Agora/Proposal/validator/unlocking/legal/with 7 stakes/Voter: remove lock after voting/proposal,386042404,1072235,15507
|
||||||
Agora/Proposal/validator/unlocking/legal/with 9 stakes/voter: retract votes while voting/stake,1686064584,4139372,13492
|
Agora/Proposal/validator/unlocking/legal/with 9 stakes/voter: retract votes while voting/stake,1680715314,4124172,13469
|
||||||
Agora/Proposal/validator/unlocking/legal/with 9 stakes/voter: retract votes while voting/proposal,650631363,1823904,16845
|
Agora/Proposal/validator/unlocking/legal/with 9 stakes/voter: retract votes while voting/proposal,649544747,1821242,16847
|
||||||
Agora/Proposal/validator/unlocking/legal/with 9 stakes/voter: retract votes while voting by delegatee/stake,1692891479,4156528,13492
|
Agora/Proposal/validator/unlocking/legal/with 9 stakes/voter: retract votes while voting by delegatee/stake,1687542209,4141328,13469
|
||||||
Agora/Proposal/validator/unlocking/legal/with 9 stakes/voter: retract votes while voting by delegatee/proposal,650631363,1823904,16845
|
Agora/Proposal/validator/unlocking/legal/with 9 stakes/voter: retract votes while voting by delegatee/proposal,649544747,1821242,16847
|
||||||
Agora/Proposal/validator/unlocking/legal/with 9 stakes/voter/creator: retract votes while voting/stake,1780620879,4414790,13596
|
Agora/Proposal/validator/unlocking/legal/with 9 stakes/voter/creator: retract votes while voting/stake,1775271609,4399590,13573
|
||||||
Agora/Proposal/validator/unlocking/legal/with 9 stakes/voter/creator: retract votes while voting/proposal,707649999,1989630,16944
|
Agora/Proposal/validator/unlocking/legal/with 9 stakes/voter/creator: retract votes while voting/proposal,706563383,1986968,16946
|
||||||
Agora/Proposal/validator/unlocking/legal/with 9 stakes/creator: remove creator lock after voting/stake,1686028073,4149003,13487
|
Agora/Proposal/validator/unlocking/legal/with 9 stakes/creator: remove creator lock after voting/stake,1680678803,4133803,13464
|
||||||
Agora/Proposal/validator/unlocking/legal/with 9 stakes/creator: remove creator lock after voting/proposal,445786243,1234855,16841
|
Agora/Proposal/validator/unlocking/legal/with 9 stakes/creator: remove creator lock after voting/proposal,444699627,1232193,16843
|
||||||
Agora/Proposal/validator/unlocking/legal/with 9 stakes/Voter: remove lock after voting/stake,1687195562,4141776,13497
|
Agora/Proposal/validator/unlocking/legal/with 9 stakes/Voter: remove lock after voting/stake,1681846292,4126576,13474
|
||||||
Agora/Proposal/validator/unlocking/legal/with 9 stakes/Voter: remove lock after voting/proposal,455130736,1260037,16850
|
Agora/Proposal/validator/unlocking/legal/with 9 stakes/Voter: remove lock after voting/proposal,454044120,1257375,16852
|
||||||
Agora/Proposal/validator/unlocking/legal/with 11 stakes/voter: retract votes while voting/stake,2085051518,5057530,14838
|
Agora/Proposal/validator/unlocking/legal/with 11 stakes/voter: retract votes while voting/stake,2078659994,5039410,14815
|
||||||
Agora/Proposal/validator/unlocking/legal/with 11 stakes/voter: retract votes while voting/proposal,760357611,2129912,18191
|
Agora/Proposal/validator/unlocking/legal/with 11 stakes/voter: retract votes while voting/proposal,759270995,2127250,18193
|
||||||
Agora/Proposal/validator/unlocking/legal/with 11 stakes/voter: retract votes while voting by delegatee/stake,2091878413,5074686,14838
|
Agora/Proposal/validator/unlocking/legal/with 11 stakes/voter: retract votes while voting by delegatee/stake,2085486889,5056566,14815
|
||||||
Agora/Proposal/validator/unlocking/legal/with 11 stakes/voter: retract votes while voting by delegatee/proposal,760357611,2129912,18191
|
Agora/Proposal/validator/unlocking/legal/with 11 stakes/voter: retract votes while voting by delegatee/proposal,759270995,2127250,18193
|
||||||
Agora/Proposal/validator/unlocking/legal/with 11 stakes/voter/creator: retract votes while voting/stake,2200620323,5394152,14965
|
Agora/Proposal/validator/unlocking/legal/with 11 stakes/voter/creator: retract votes while voting/stake,2194228799,5376032,14942
|
||||||
Agora/Proposal/validator/unlocking/legal/with 11 stakes/voter/creator: retract votes while voting/proposal,830047055,2332466,18313
|
Agora/Proposal/validator/unlocking/legal/with 11 stakes/voter/creator: retract votes while voting/proposal,828960439,2329804,18315
|
||||||
Agora/Proposal/validator/unlocking/legal/with 11 stakes/creator: remove creator lock after voting/stake,2084755565,5068767,14831
|
Agora/Proposal/validator/unlocking/legal/with 11 stakes/creator: remove creator lock after voting/stake,2078364041,5050647,14808
|
||||||
Agora/Proposal/validator/unlocking/legal/with 11 stakes/creator: remove creator lock after voting/proposal,511711405,1414399,18185
|
Agora/Proposal/validator/unlocking/legal/with 11 stakes/creator: remove creator lock after voting/proposal,510624789,1411737,18187
|
||||||
Agora/Proposal/validator/unlocking/legal/with 11 stakes/Voter: remove lock after voting/stake,2086182496,5059934,14843
|
Agora/Proposal/validator/unlocking/legal/with 11 stakes/Voter: remove lock after voting/stake,2079790972,5041814,14820
|
||||||
Agora/Proposal/validator/unlocking/legal/with 11 stakes/Voter: remove lock after voting/proposal,523132452,1445177,18196
|
Agora/Proposal/validator/unlocking/legal/with 11 stakes/Voter: remove lock after voting/proposal,522045836,1442515,18198
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 1 stakes/retract votes while not voting/(negative test)/stake,286017919,779938,8111
|
Agora/Proposal/validator/unlocking/illegal/with 1 stakes/retract votes while not voting/(negative test)/stake,284837665,776418,8088
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 1 stakes/retract votes while not voting/(negative test)/stake,287148897,782342,8111
|
Agora/Proposal/validator/unlocking/illegal/with 1 stakes/retract votes while not voting/(negative test)/stake,285968643,778822,8088
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 1 stakes/retract votes while not voting/(negative test)/stake,287714386,783544,8111
|
Agora/Proposal/validator/unlocking/illegal/with 1 stakes/retract votes while not voting/(negative test)/stake,286534132,780024,8088
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 1 stakes/remove creator too early/(negative test)/proposal,180389128,513073,11468
|
Agora/Proposal/validator/unlocking/illegal/with 1 stakes/remove creator too early/(negative test)/proposal,179302512,510411,11470
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 1 stakes/remove creator too early/(negative test)/proposal,184593979,524334,11468
|
Agora/Proposal/validator/unlocking/illegal/with 1 stakes/remove creator too early/(negative test)/proposal,183507363,521672,11470
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 1 stakes/remove creator too early/(negative test)/proposal,181520106,515477,11468
|
Agora/Proposal/validator/unlocking/illegal/with 1 stakes/remove creator too early/(negative test)/proposal,180433490,512815,11470
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 1 stakes/unlock an irrelevant stake/stake,296230945,814266,8133
|
Agora/Proposal/validator/unlocking/illegal/with 1 stakes/unlock an irrelevant stake/stake,295050691,810746,8110
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 1 stakes/creator: retract votes/stake,284930762,783569,8115
|
Agora/Proposal/validator/unlocking/illegal/with 1 stakes/creator: retract votes/stake,283750508,780049,8092
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 1 stakes/change output stake value/proposal,211726371,599872,11461
|
Agora/Proposal/validator/unlocking/illegal/with 1 stakes/change output stake value/proposal,210639755,597210,11463
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 3 stakes/retract votes while not voting/(negative test)/stake,606418229,1572336,9456
|
Agora/Proposal/validator/unlocking/illegal/with 3 stakes/retract votes while not voting/(negative test)/stake,604195721,1565896,9433
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 3 stakes/retract votes while not voting/(negative test)/stake,607549207,1574740,9456
|
Agora/Proposal/validator/unlocking/illegal/with 3 stakes/retract votes while not voting/(negative test)/stake,605326699,1568300,9433
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 3 stakes/retract votes while not voting/(negative test)/stake,608114696,1575942,9456
|
Agora/Proposal/validator/unlocking/illegal/with 3 stakes/retract votes while not voting/(negative test)/stake,605892188,1569502,9433
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 3 stakes/remove creator too early/(negative test)/proposal,246314290,692617,12811
|
Agora/Proposal/validator/unlocking/illegal/with 3 stakes/remove creator too early/(negative test)/proposal,245227674,689955,12813
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 3 stakes/remove creator too early/(negative test)/proposal,250519141,703878,12811
|
Agora/Proposal/validator/unlocking/illegal/with 3 stakes/remove creator too early/(negative test)/proposal,249432525,701216,12813
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 3 stakes/remove creator too early/(negative test)/proposal,247445268,695021,12811
|
Agora/Proposal/validator/unlocking/illegal/with 3 stakes/remove creator too early/(negative test)/proposal,246358652,692359,12813
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 3 stakes/unlock an irrelevant stake/stake,621191337,1649336,9512
|
Agora/Proposal/validator/unlocking/illegal/with 3 stakes/unlock an irrelevant stake/stake,618968829,1642896,9489
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 3 stakes/creator: retract votes/stake,587290788,1557245,9470
|
Agora/Proposal/validator/unlocking/illegal/with 3 stakes/creator: retract votes/stake,585068280,1550805,9447
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 3 stakes/change output stake value/proposal,321452619,905880,12800
|
Agora/Proposal/validator/unlocking/illegal/with 3 stakes/change output stake value/proposal,320366003,903218,12802
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 5 stakes/retract votes while not voting/(negative test)/stake,946465195,2396174,10802
|
Agora/Proposal/validator/unlocking/illegal/with 5 stakes/retract votes while not voting/(negative test)/stake,943200433,2386814,10779
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 5 stakes/retract votes while not voting/(negative test)/stake,947596173,2398578,10802
|
Agora/Proposal/validator/unlocking/illegal/with 5 stakes/retract votes while not voting/(negative test)/stake,944331411,2389218,10779
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 5 stakes/retract votes while not voting/(negative test)/stake,948161662,2399780,10802
|
Agora/Proposal/validator/unlocking/illegal/with 5 stakes/retract votes while not voting/(negative test)/stake,944896900,2390420,10779
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 5 stakes/remove creator too early/(negative test)/proposal,312239452,872161,14155
|
Agora/Proposal/validator/unlocking/illegal/with 5 stakes/remove creator too early/(negative test)/proposal,311152836,869499,14157
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 5 stakes/remove creator too early/(negative test)/proposal,316444303,883422,14155
|
Agora/Proposal/validator/unlocking/illegal/with 5 stakes/remove creator too early/(negative test)/proposal,315357687,880760,14157
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 5 stakes/remove creator too early/(negative test)/proposal,313370430,874565,14155
|
Agora/Proposal/validator/unlocking/illegal/with 5 stakes/remove creator too early/(negative test)/proposal,312283814,871903,14157
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 5 stakes/unlock an irrelevant stake/stake,946151729,2484406,10892
|
Agora/Proposal/validator/unlocking/illegal/with 5 stakes/unlock an irrelevant stake/stake,942886967,2475046,10869
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 5 stakes/creator: retract votes/stake,889650814,2330921,10826
|
Agora/Proposal/validator/unlocking/illegal/with 5 stakes/creator: retract votes/stake,886386052,2321561,10803
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 5 stakes/change output stake value/proposal,431178867,1211888,14140
|
Agora/Proposal/validator/unlocking/illegal/with 5 stakes/change output stake value/proposal,430092251,1209226,14142
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 7 stakes/retract votes while not voting/(negative test)/stake,1306158817,3251452,12147
|
Agora/Proposal/validator/unlocking/illegal/with 7 stakes/retract votes while not voting/(negative test)/stake,1301851801,3239172,12124
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 7 stakes/retract votes while not voting/(negative test)/stake,1307289795,3253856,12147
|
Agora/Proposal/validator/unlocking/illegal/with 7 stakes/retract votes while not voting/(negative test)/stake,1302982779,3241576,12124
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 7 stakes/retract votes while not voting/(negative test)/stake,1307855284,3255058,12147
|
Agora/Proposal/validator/unlocking/illegal/with 7 stakes/retract votes while not voting/(negative test)/stake,1303548268,3242778,12124
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 7 stakes/remove creator too early/(negative test)/proposal,378164614,1051705,15498
|
Agora/Proposal/validator/unlocking/illegal/with 7 stakes/remove creator too early/(negative test)/proposal,377077998,1049043,15500
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 7 stakes/remove creator too early/(negative test)/proposal,382369465,1062966,15498
|
Agora/Proposal/validator/unlocking/illegal/with 7 stakes/remove creator too early/(negative test)/proposal,381282849,1060304,15500
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 7 stakes/remove creator too early/(negative test)/proposal,379295592,1054109,15498
|
Agora/Proposal/validator/unlocking/illegal/with 7 stakes/remove creator too early/(negative test)/proposal,378208976,1051447,15500
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 7 stakes/unlock an irrelevant stake/stake,1271112121,3319476,12271
|
Agora/Proposal/validator/unlocking/illegal/with 7 stakes/unlock an irrelevant stake/stake,1266805105,3307196,12248
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 7 stakes/creator: retract votes/stake,1192010840,3104597,12181
|
Agora/Proposal/validator/unlocking/illegal/with 7 stakes/creator: retract votes/stake,1187703824,3092317,12158
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 7 stakes/change output stake value/proposal,540905115,1517896,15479
|
Agora/Proposal/validator/unlocking/illegal/with 7 stakes/change output stake value/proposal,539818499,1515234,15481
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 9 stakes/retract votes while not voting/(negative test)/stake,1685499095,4138170,13492
|
Agora/Proposal/validator/unlocking/illegal/with 9 stakes/retract votes while not voting/(negative test)/stake,1680149825,4122970,13469
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 9 stakes/retract votes while not voting/(negative test)/stake,1686630073,4140574,13492
|
Agora/Proposal/validator/unlocking/illegal/with 9 stakes/retract votes while not voting/(negative test)/stake,1681280803,4125374,13469
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 9 stakes/retract votes while not voting/(negative test)/stake,1687195562,4141776,13492
|
Agora/Proposal/validator/unlocking/illegal/with 9 stakes/retract votes while not voting/(negative test)/stake,1681846292,4126576,13469
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 9 stakes/remove creator too early/(negative test)/proposal,444089776,1231249,16841
|
Agora/Proposal/validator/unlocking/illegal/with 9 stakes/remove creator too early/(negative test)/proposal,443003160,1228587,16843
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 9 stakes/remove creator too early/(negative test)/proposal,448294627,1242510,16841
|
Agora/Proposal/validator/unlocking/illegal/with 9 stakes/remove creator too early/(negative test)/proposal,447208011,1239848,16843
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 9 stakes/remove creator too early/(negative test)/proposal,445220754,1233653,16841
|
Agora/Proposal/validator/unlocking/illegal/with 9 stakes/remove creator too early/(negative test)/proposal,444134138,1230991,16843
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 9 stakes/unlock an irrelevant stake/stake,1596072513,4154546,13651
|
Agora/Proposal/validator/unlocking/illegal/with 9 stakes/unlock an irrelevant stake/stake,1590723243,4139346,13628
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 9 stakes/creator: retract votes/stake,1494370866,3878273,13536
|
Agora/Proposal/validator/unlocking/illegal/with 9 stakes/creator: retract votes/stake,1489021596,3863073,13513
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 9 stakes/change output stake value/proposal,650631363,1823904,16818
|
Agora/Proposal/validator/unlocking/illegal/with 9 stakes/change output stake value/proposal,649544747,1821242,16820
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 11 stakes/retract votes while not voting/(negative test)/stake,2084486029,5056328,14838
|
Agora/Proposal/validator/unlocking/illegal/with 11 stakes/retract votes while not voting/(negative test)/stake,2078094505,5038208,14815
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 11 stakes/retract votes while not voting/(negative test)/stake,2085617007,5058732,14838
|
Agora/Proposal/validator/unlocking/illegal/with 11 stakes/retract votes while not voting/(negative test)/stake,2079225483,5040612,14815
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 11 stakes/retract votes while not voting/(negative test)/stake,2086182496,5059934,14838
|
Agora/Proposal/validator/unlocking/illegal/with 11 stakes/retract votes while not voting/(negative test)/stake,2079790972,5041814,14815
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 11 stakes/remove creator too early/(negative test)/proposal,510014938,1410793,18185
|
Agora/Proposal/validator/unlocking/illegal/with 11 stakes/remove creator too early/(negative test)/proposal,508928322,1408131,18187
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 11 stakes/remove creator too early/(negative test)/proposal,514219789,1422054,18185
|
Agora/Proposal/validator/unlocking/illegal/with 11 stakes/remove creator too early/(negative test)/proposal,513133173,1419392,18187
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 11 stakes/remove creator too early/(negative test)/proposal,511145916,1413197,18185
|
Agora/Proposal/validator/unlocking/illegal/with 11 stakes/remove creator too early/(negative test)/proposal,510059300,1410535,18187
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 11 stakes/unlock an irrelevant stake/stake,1921032905,4989616,15031
|
Agora/Proposal/validator/unlocking/illegal/with 11 stakes/unlock an irrelevant stake/stake,1914641381,4971496,15008
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 11 stakes/creator: retract votes/stake,1796730892,4651949,14893
|
Agora/Proposal/validator/unlocking/illegal/with 11 stakes/creator: retract votes/stake,1790339368,4633829,14870
|
||||||
Agora/Proposal/validator/unlocking/illegal/with 11 stakes/change output stake value/proposal,760357611,2129912,18158
|
Agora/Proposal/validator/unlocking/illegal/with 11 stakes/change output stake value/proposal,759270995,2127250,18160
|
||||||
Agora/AuthorityToken/singleAuthorityTokenBurned/Correct simple,26456223,75851,755
|
Agora/AuthorityToken/singleAuthorityTokenBurned/Correct simple,26456223,75851,755
|
||||||
Agora/AuthorityToken/singleAuthorityTokenBurned/Correct many inputs,51581175,146321,855
|
Agora/AuthorityToken/singleAuthorityTokenBurned/Correct many inputs,51581175,146321,855
|
||||||
Agora/AuthorityToken/singleAuthorityTokenBurned/Correct even though scripts don't match,26456223,75851,754
|
Agora/AuthorityToken/singleAuthorityTokenBurned/Correct even though scripts don't match,26456223,75851,754
|
||||||
Agora/Treasury/Validator/Positive/Allows for effect changes,42170246,119764,1460
|
Agora/Treasury/Validator/Positive/Allows for effect changes,42170246,119764,1444
|
||||||
Agora/Treasury/Validator/Positive/Fails when GAT token name is not script address,42170246,119764,1496
|
Agora/Treasury/Validator/Positive/Fails when GAT token name is not script address,42170246,119764,1480
|
||||||
Agora/AuthorityToken/singleAuthorityTokenBurned/Correct simple,26456223,75851,755
|
Agora/AuthorityToken/singleAuthorityTokenBurned/Correct simple,26456223,75851,755
|
||||||
Agora/AuthorityToken/singleAuthorityTokenBurned/Correct many inputs,51581175,146321,855
|
Agora/AuthorityToken/singleAuthorityTokenBurned/Correct many inputs,51581175,146321,855
|
||||||
Agora/AuthorityToken/singleAuthorityTokenBurned/Correct even though scripts don't match,26456223,75851,754
|
Agora/AuthorityToken/singleAuthorityTokenBurned/Correct even though scripts don't match,26456223,75851,754
|
||||||
Agora/Governor/policy/totally legal,63319800,170930,2766
|
Agora/Governor/policy/totally legal,63319800,170930,2766
|
||||||
Agora/Governor/validator/mutate/legal,129016947,358159,11167
|
Agora/Governor/validator/mutate/legal,129223947,359059,11308
|
||||||
|
|
|
||||||
|
7988
flake.lock
generated
7988
flake.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -33,8 +33,8 @@
|
||||||
"github:liqwid-labs/plutarch-quickcheck?ref=staging";
|
"github:liqwid-labs/plutarch-quickcheck?ref=staging";
|
||||||
plutarch-context-builder.url =
|
plutarch-context-builder.url =
|
||||||
"github:Liqwid-Labs/plutarch-context-builder?ref=main";
|
"github:Liqwid-Labs/plutarch-context-builder?ref=main";
|
||||||
plutarch-script-export.url =
|
liqwid-script-export.url =
|
||||||
"github:Liqwid-Labs/plutarch-script-export?ref=main";
|
"github:Liqwid-Labs/liqwid-script-export?ref=main";
|
||||||
liqwid-nix.url = "github:Liqwid-Labs/liqwid-nix?ref=main";
|
liqwid-nix.url = "github:Liqwid-Labs/liqwid-nix?ref=main";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -85,7 +85,9 @@
|
||||||
"${inputs.plutarch-quickcheck}"
|
"${inputs.plutarch-quickcheck}"
|
||||||
"${inputs.plutarch-context-builder}"
|
"${inputs.plutarch-context-builder}"
|
||||||
"${inputs.liqwid-plutarch-extra}"
|
"${inputs.liqwid-plutarch-extra}"
|
||||||
"${inputs.plutarch-script-export}"
|
"${inputs.liqwid-script-export}"
|
||||||
|
"${inputs.liqwid-script-export.inputs.ply}/ply-core"
|
||||||
|
"${inputs.liqwid-script-export.inputs.ply}/ply-plutarch"
|
||||||
])
|
])
|
||||||
(liqwid-nix.enableFormatCheck [
|
(liqwid-nix.enableFormatCheck [
|
||||||
"-XQuasiQuotes"
|
"-XQuasiQuotes"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue