flake: bump plutarch, fix resulting issues
Collection of things fixed: - `agora-test`: Fix compile resulting from some changes to hackage. - `agora-benchmark`: Switched to `plutarch`-style `evalScript`. - CI: Ported over new flake changes. This is quite a mess.
This commit is contained in:
parent
8e71ecbdfd
commit
ad9da8e6b3
49 changed files with 3487 additions and 3829 deletions
|
|
@ -24,8 +24,7 @@ import Agora.Proposal (ProposalId (..), ProposalThresholds (..))
|
|||
|
||||
import Data.Tagged (Tagged (..))
|
||||
import Plutarch.Api.V1 (mkValidator, validatorHash)
|
||||
import Plutus.V1.Ledger.Address (scriptHashAddress)
|
||||
import Plutus.V1.Ledger.Api (
|
||||
import PlutusLedgerApi.V1 (
|
||||
Address,
|
||||
Datum (..),
|
||||
ToData (..),
|
||||
|
|
@ -37,9 +36,10 @@ import Plutus.V1.Ledger.Api (
|
|||
Validator,
|
||||
ValidatorHash (..),
|
||||
)
|
||||
import Plutus.V1.Ledger.Api qualified as Interval
|
||||
import Plutus.V1.Ledger.Value (AssetClass, assetClass)
|
||||
import Plutus.V1.Ledger.Value qualified as Value
|
||||
import PlutusLedgerApi.V1 qualified as Interval
|
||||
import PlutusLedgerApi.V1.Address (scriptHashAddress)
|
||||
import PlutusLedgerApi.V1.Value (AssetClass, assetClass)
|
||||
import PlutusLedgerApi.V1.Value qualified as Value
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ module Sample.Effect.TreasuryWithdrawal (
|
|||
) where
|
||||
|
||||
import Plutarch.Api.V1 (mkValidator, validatorHash)
|
||||
import Plutus.V1.Ledger.Api (
|
||||
import PlutusLedgerApi.V1 (
|
||||
Address (Address),
|
||||
Credential (..),
|
||||
CurrencySymbol (CurrencySymbol),
|
||||
|
|
@ -50,11 +50,11 @@ import Plutus.V1.Ledger.Api (
|
|||
Value,
|
||||
toBuiltin,
|
||||
)
|
||||
import Plutus.V1.Ledger.Interval qualified as Interval
|
||||
import Plutus.V1.Ledger.Value qualified as Value
|
||||
import PlutusLedgerApi.V1.Interval qualified as Interval
|
||||
import PlutusLedgerApi.V1.Value qualified as Value
|
||||
|
||||
import Data.ByteString.Char8 qualified as C
|
||||
import Data.ByteString.Hash (sha2)
|
||||
import Data.ByteString.Hash (sha2_256)
|
||||
|
||||
import Agora.Effect.TreasuryWithdrawal (
|
||||
TreasuryWithdrawalDatum (TreasuryWithdrawalDatum),
|
||||
|
|
@ -71,11 +71,11 @@ signer = "8a30896c4fd5e79843e4ca1bd2cdbaa36f8c0bc3be7401214142019c"
|
|||
|
||||
-- | List of users who the effect will pay to.
|
||||
users :: [Credential]
|
||||
users = PubKeyCredential . PubKeyHash . toBuiltin . sha2 . C.pack . show <$> ([1 ..] :: [Integer])
|
||||
users = PubKeyCredential . PubKeyHash . toBuiltin . sha2_256 . C.pack . show <$> ([1 ..] :: [Integer])
|
||||
|
||||
-- | List of users who the effect will pay to.
|
||||
treasuries :: [Credential]
|
||||
treasuries = ScriptCredential . ValidatorHash . toBuiltin . sha2 . C.pack . show <$> ([1 ..] :: [Integer])
|
||||
treasuries = ScriptCredential . ValidatorHash . toBuiltin . sha2_256 . C.pack . show <$> ([1 ..] :: [Integer])
|
||||
|
||||
inputGAT :: TxInInfo
|
||||
inputGAT =
|
||||
|
|
|
|||
|
|
@ -19,10 +19,11 @@ import Plutarch.Api.V1 (mkValidator, validatorHash)
|
|||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
import Plutus.V1.Ledger.Address (scriptHashAddress)
|
||||
import Plutus.V1.Ledger.Api (
|
||||
import PlutusLedgerApi.V1 (
|
||||
Address (..),
|
||||
BuiltinData (BuiltinData),
|
||||
Credential (ScriptCredential),
|
||||
Data (I),
|
||||
Datum (..),
|
||||
ScriptContext (..),
|
||||
ScriptPurpose (Minting, Spending),
|
||||
|
|
@ -35,12 +36,12 @@ import Plutus.V1.Ledger.Api (
|
|||
Validator,
|
||||
ValidatorHash (..),
|
||||
)
|
||||
import Plutus.V1.Ledger.Interval qualified as Interval
|
||||
import Plutus.V1.Ledger.Scripts (unitDatum)
|
||||
import Plutus.V1.Ledger.Value (
|
||||
import PlutusLedgerApi.V1.Address (scriptHashAddress)
|
||||
import PlutusLedgerApi.V1.Interval qualified as Interval
|
||||
import PlutusLedgerApi.V1.Value (
|
||||
AssetClass (..),
|
||||
)
|
||||
import Plutus.V1.Ledger.Value qualified as Value
|
||||
import PlutusLedgerApi.V1.Value qualified as Value
|
||||
import PlutusTx.AssocMap qualified as AssocMap
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
|
@ -92,6 +93,10 @@ import Data.Default.Class (Default (def))
|
|||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
-- | Unit datum
|
||||
unitDatum :: Datum
|
||||
unitDatum = Datum . BuiltinData $ I 0 -- This could be anything, really. It doesn't matter.
|
||||
|
||||
{- | A valid 'ScriptContext' for minting GST.
|
||||
|
||||
- Only the minting policy will be ran in the transaction.
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import Plutarch.Api.V1 (
|
|||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
import Plutus.V1.Ledger.Api (
|
||||
import PlutusLedgerApi.V1 (
|
||||
Address (Address),
|
||||
Credential (ScriptCredential),
|
||||
Datum (Datum),
|
||||
|
|
@ -46,7 +46,7 @@ import Plutus.V1.Ledger.Api (
|
|||
TxOutRef (TxOutRef),
|
||||
ValidatorHash,
|
||||
)
|
||||
import Plutus.V1.Ledger.Value qualified as Value
|
||||
import PlutusLedgerApi.V1.Value qualified as Value
|
||||
import PlutusTx.AssocMap qualified as AssocMap
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
|
@ -431,9 +431,9 @@ voteOnProposal params =
|
|||
-- | Parameters for state transition of proposals.
|
||||
data TransitionParameters = TransitionParameters
|
||||
{ -- The initial status of the propsoal.
|
||||
initialProposalStatus :: ProposalStatus
|
||||
initialProposalStatus :: ProposalStatus
|
||||
, -- The starting time of the propsoal.
|
||||
proposalStartingTime :: ProposalStartingTime
|
||||
proposalStartingTime :: ProposalStartingTime
|
||||
}
|
||||
|
||||
-- | Create a 'TxInfo' that update the status of a proposal.
|
||||
|
|
|
|||
|
|
@ -92,8 +92,7 @@ import Plutarch.Api.V1 (
|
|||
mkValidator,
|
||||
validatorHash,
|
||||
)
|
||||
import Plutus.V1.Ledger.Address (scriptHashAddress)
|
||||
import Plutus.V1.Ledger.Api (
|
||||
import PlutusLedgerApi.V1 (
|
||||
Address (Address),
|
||||
Credential (ScriptCredential),
|
||||
CurrencySymbol,
|
||||
|
|
@ -107,12 +106,13 @@ import Plutus.V1.Ledger.Api (
|
|||
UpperBound (..),
|
||||
Value,
|
||||
)
|
||||
import Plutus.V1.Ledger.Contexts (
|
||||
import PlutusLedgerApi.V1.Address (scriptHashAddress)
|
||||
import PlutusLedgerApi.V1.Contexts (
|
||||
TxOut (..),
|
||||
)
|
||||
import Plutus.V1.Ledger.Scripts (Validator, ValidatorHash (..))
|
||||
import Plutus.V1.Ledger.Value (AssetClass, TokenName)
|
||||
import Plutus.V1.Ledger.Value qualified as Value
|
||||
import PlutusLedgerApi.V1.Scripts (Validator, ValidatorHash (..))
|
||||
import PlutusLedgerApi.V1.Value (AssetClass, TokenName)
|
||||
import PlutusLedgerApi.V1.Value qualified as Value
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import Plutarch.Api.V1 (
|
|||
mkValidator,
|
||||
validatorHash,
|
||||
)
|
||||
import Plutus.V1.Ledger.Api (
|
||||
import PlutusLedgerApi.V1 (
|
||||
Address (Address),
|
||||
Credential (ScriptCredential),
|
||||
Datum (Datum),
|
||||
|
|
@ -38,10 +38,10 @@ import Plutus.V1.Ledger.Api (
|
|||
TxOut (txOutAddress, txOutDatumHash, txOutValue),
|
||||
ValidatorHash (ValidatorHash),
|
||||
)
|
||||
import Plutus.V1.Ledger.Contexts (TxOut (TxOut), TxOutRef (TxOutRef))
|
||||
import Plutus.V1.Ledger.Interval qualified as Interval
|
||||
import Plutus.V1.Ledger.Value (TokenName (TokenName))
|
||||
import Plutus.V1.Ledger.Value qualified as Value
|
||||
import PlutusLedgerApi.V1.Contexts (TxOut (TxOut), TxOutRef (TxOutRef))
|
||||
import PlutusLedgerApi.V1.Interval qualified as Interval
|
||||
import PlutusLedgerApi.V1.Value (TokenName (TokenName))
|
||||
import PlutusLedgerApi.V1.Value qualified as Value
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@ module Sample.Treasury (
|
|||
) where
|
||||
|
||||
import Plutarch.Api.V1 (validatorHash)
|
||||
import Plutus.V1.Ledger.Address (Address (..))
|
||||
import Plutus.V1.Ledger.Api (
|
||||
import PlutusLedgerApi.V1 (
|
||||
BuiltinByteString,
|
||||
Credential (PubKeyCredential),
|
||||
PubKeyHash (PubKeyHash),
|
||||
)
|
||||
import Plutus.V1.Ledger.Contexts (
|
||||
import PlutusLedgerApi.V1.Address (Address (..))
|
||||
import PlutusLedgerApi.V1.Contexts (
|
||||
ScriptContext (..),
|
||||
ScriptPurpose (Minting),
|
||||
TxInInfo (..),
|
||||
|
|
@ -32,12 +32,12 @@ import Plutus.V1.Ledger.Contexts (
|
|||
TxOut (..),
|
||||
TxOutRef (..),
|
||||
)
|
||||
import Plutus.V1.Ledger.Credential (Credential (ScriptCredential))
|
||||
import Plutus.V1.Ledger.Interval qualified as Interval
|
||||
import Plutus.V1.Ledger.Scripts (
|
||||
import PlutusLedgerApi.V1.Credential (Credential (ScriptCredential))
|
||||
import PlutusLedgerApi.V1.Interval qualified as Interval
|
||||
import PlutusLedgerApi.V1.Scripts (
|
||||
ValidatorHash (ValidatorHash),
|
||||
)
|
||||
import Plutus.V1.Ledger.Value qualified as Value
|
||||
import PlutusLedgerApi.V1.Value qualified as Value
|
||||
import Sample.Shared (
|
||||
gatCs,
|
||||
gatTn,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue