Global state in Plutus smart contract

Hi there,

I think the above request of a pauseable token is possible (and it should since plutus is Turing complete). What one can do is create a bijective function that maps the key of a holder of you pauseable token to an utxo at a smart contract containing these tokens. In the contract this bijection is used to verify that only the token holden van spend the pauseable token at that script address. Here spending means changing the key value at the script address with the bijection.

In addition the script could check whether trades are even allowed by checking whether a certain nft is present (there are more ways to implemt this). Note that now the tokens are not in the wallet of a holder but at a script address, it is perhaps a good idea to mint fake tokens equivalent to send to the wallet of a holden that represent the tokens only his address can spend (and implent that these are burnt when a transaction is made with the real token to keep the values the same)

Hope this helps :slight_smile:

EDIT: Also see the following discussion

2 Likes