mirror of
https://github.com/FiloSpaTeam/plutus-pioneer-program.git
synced 2024-11-21 22:32:00 +01:00
small update
This commit is contained in:
parent
e19af4cd80
commit
c74fb6fefa
1 changed files with 18 additions and 18 deletions
|
@ -12,24 +12,24 @@
|
||||||
|
|
||||||
module Week05.Signed where
|
module Week05.Signed where
|
||||||
|
|
||||||
import Control.Monad hiding (fmap)
|
import Control.Monad hiding (fmap)
|
||||||
import Data.Aeson (ToJSON, FromJSON)
|
import Data.Aeson (ToJSON, FromJSON)
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
import Data.Void (Void)
|
import Data.Void (Void)
|
||||||
import GHC.Generics (Generic)
|
import GHC.Generics (Generic)
|
||||||
import Plutus.Contract as Contract
|
import Plutus.Contract as Contract
|
||||||
import Plutus.Trace.Emulator as Emulator
|
import Plutus.Trace.Emulator as Emulator
|
||||||
import qualified PlutusTx
|
import qualified PlutusTx
|
||||||
import PlutusTx.Prelude hiding (Semigroup(..), unless)
|
import PlutusTx.Prelude hiding (Semigroup(..), unless)
|
||||||
import Ledger hiding (mint, singleton)
|
import Ledger hiding (mint, singleton)
|
||||||
import Ledger.Constraints as Constraints
|
import Ledger.Constraints as Constraints
|
||||||
import qualified Ledger.Typed.Scripts as Scripts
|
import qualified Ledger.Typed.Scripts as Scripts
|
||||||
import Ledger.Value as Value
|
import Ledger.Value as Value
|
||||||
import Playground.Contract (printJson, printSchemas, ensureKnownCurrencies, stage, ToSchema)
|
import Playground.Contract (printJson, printSchemas, ensureKnownCurrencies, stage, ToSchema)
|
||||||
import Playground.TH (mkKnownCurrencies, mkSchemaDefinitions)
|
import Playground.TH (mkKnownCurrencies, mkSchemaDefinitions)
|
||||||
import Playground.Types (KnownCurrency (..))
|
import Playground.Types (KnownCurrency (..))
|
||||||
import Prelude (IO, Show (..), String)
|
import Prelude (IO, Show (..), String)
|
||||||
import Text.Printf (printf)
|
import Text.Printf (printf)
|
||||||
import Wallet.Emulator.Wallet
|
import Wallet.Emulator.Wallet
|
||||||
|
|
||||||
{-# INLINABLE mkPolicy #-}
|
{-# INLINABLE mkPolicy #-}
|
||||||
|
@ -40,7 +40,7 @@ policy :: PubKeyHash -> Scripts.MintingPolicy
|
||||||
policy pkh = mkMintingPolicyScript $
|
policy pkh = mkMintingPolicyScript $
|
||||||
$$(PlutusTx.compile [|| Scripts.wrapMintingPolicy . mkPolicy ||])
|
$$(PlutusTx.compile [|| Scripts.wrapMintingPolicy . mkPolicy ||])
|
||||||
`PlutusTx.applyCode`
|
`PlutusTx.applyCode`
|
||||||
PlutusTx.liftCode pkh
|
(PlutusTx.liftCode pkh)
|
||||||
|
|
||||||
curSymbol :: PubKeyHash -> CurrencySymbol
|
curSymbol :: PubKeyHash -> CurrencySymbol
|
||||||
curSymbol = scriptCurrencySymbol . policy
|
curSymbol = scriptCurrencySymbol . policy
|
||||||
|
|
Loading…
Reference in a new issue