Merge pull request #167 from Liqwid-Labs/emiflake/expose-tracing-options
Expose trace options in `agora-scripts` executable.
This commit is contained in:
commit
75d052ef33
2 changed files with 18 additions and 18 deletions
|
|
@ -6,6 +6,13 @@ This format is based on [Keep A Changelog](https://keepachangelog.com/en/1.0.0).
|
|||
|
||||
### Modified
|
||||
|
||||
- `tracing` flag in `ScriptParams` of `agora-scripts` to enable/disable tracing in exported scripts.
|
||||
|
||||
NOTE: This changes the representation of `ScriptParams`. In order to preserve old behavior, the flag
|
||||
must be set to `True`.
|
||||
|
||||
Included by [#167](https://github.com/Liqwid-Labs/agora/pull/167).
|
||||
|
||||
- `effects` of `Proposaldatum` is now required to be sorted in ascending order. The uniqueness of result tags is also guaranteed.
|
||||
|
||||
`ProposalVotes` should be sorted the same way as a result.
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import Data.Tagged (Tagged)
|
|||
import Data.Text (Text)
|
||||
import Development.GitRev (gitBranch, gitHash)
|
||||
import GHC.Generics qualified as GHC
|
||||
import Plutarch (Config (Config, tracingMode), TracingMode (DoTracing))
|
||||
import Plutarch (Config (Config, tracingMode), TracingMode (DoTracing, NoTracing))
|
||||
import PlutusLedgerApi.V1 (
|
||||
MintingPolicy (getMintingPolicy),
|
||||
TxOutRef,
|
||||
|
|
@ -97,17 +97,19 @@ agoraScripts params =
|
|||
|
||||
scripts = Bootstrap.agoraScripts plutarchConfig governor
|
||||
|
||||
plutarchConfig :: Config
|
||||
plutarchConfig = Config {tracingMode = if params.tracing then DoTracing else NoTracing}
|
||||
|
||||
{- | Params required for creating script export.
|
||||
|
||||
@since 0.2.0
|
||||
@since 1.0.0
|
||||
-}
|
||||
data ScriptParams where
|
||||
ScriptParams ::
|
||||
{ governorInitialSpend :: TxOutRef
|
||||
, gtClassRef :: Tagged GTTag AssetClass
|
||||
, maximumCosigners :: Integer
|
||||
} ->
|
||||
ScriptParams
|
||||
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)
|
||||
|
||||
|
|
@ -140,15 +142,6 @@ data AgoraScripts = AgoraScripts
|
|||
GHC.Generic
|
||||
)
|
||||
|
||||
{- | Default plutarch configuration for compiling scripts.
|
||||
|
||||
TODO: we should have an option to control this.
|
||||
|
||||
@since 0.2.0
|
||||
-}
|
||||
plutarchConfig :: Config
|
||||
plutarchConfig = Config {tracingMode = DoTracing}
|
||||
|
||||
{- | Turn a precompiled minting policy to a 'ScriptInfo'.
|
||||
|
||||
@since 0.2.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue