use validatorHashToTokenName
This commit is contained in:
parent
4bf6a4f921
commit
25ef9ba926
1 changed files with 2 additions and 3 deletions
|
|
@ -86,6 +86,7 @@ import Agora.Utils (
|
||||||
pvalueSpent,
|
pvalueSpent,
|
||||||
scriptHashFromAddress,
|
scriptHashFromAddress,
|
||||||
validatorHashToAddress,
|
validatorHashToAddress,
|
||||||
|
validatorHashToTokenName,
|
||||||
)
|
)
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
@ -129,7 +130,6 @@ import Plutarch.TryFrom (ptryFrom)
|
||||||
import Plutus.V1.Ledger.Api (
|
import Plutus.V1.Ledger.Api (
|
||||||
CurrencySymbol (..),
|
CurrencySymbol (..),
|
||||||
MintingPolicy,
|
MintingPolicy,
|
||||||
TokenName (..),
|
|
||||||
)
|
)
|
||||||
import Plutus.V1.Ledger.Scripts (ValidatorHash (..))
|
import Plutus.V1.Ledger.Scripts (ValidatorHash (..))
|
||||||
import Plutus.V1.Ledger.Value (
|
import Plutus.V1.Ledger.Value (
|
||||||
|
|
@ -735,8 +735,7 @@ stakeSTAssetClassFromGovernor gov = AssetClass (symbol, tokenName)
|
||||||
symbol = stakeSTSymbolFromGovernor gov
|
symbol = stakeSTSymbolFromGovernor gov
|
||||||
|
|
||||||
-- Tag with the address where the token is being sent to.
|
-- Tag with the address where the token is being sent to.
|
||||||
ValidatorHash hash = stakeValidatorHashFromGovernor gov
|
tokenName = validatorHashToTokenName $ stakeValidatorHashFromGovernor gov
|
||||||
tokenName = TokenName hash
|
|
||||||
|
|
||||||
stakeFromGovernor :: Governor -> Stake
|
stakeFromGovernor :: Governor -> Stake
|
||||||
stakeFromGovernor gov =
|
stakeFromGovernor gov =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue