input-output-hk / plutus-apps

The Plutus application platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Single token staking

vadirajkulkarni opened this issue · comments

Describe the feature you'd like

I am trying to create a single native-token staking.

  1. I am trying to use the code from plutus pioneer program regarding gift to create a contract to deposit and withdraw. I am not able to compile it and deploy using the plutus excercise methods. I would love to get an example which shows the implementation where it shows the usage of native tokens deposit to the contract.

  2. An example for using staking credentials.

  3. The contract I am trying to reuse is https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week03/src/Week03/Vesting.hs

  4. In my code I am using the following for the native token definition

data NativeToken = NativeToken
    { currency           :: !CurrencySymbol
    , token              :: !TokenName
    }

Describe alternatives you've considered

Currently I am using address of the user and blockfrost api to find the utxo that was deposited and returning the UTXO to the user whenever withdrawn.

I am trying to use the code from plutus pioneer program regarding gift to create a contract to deposit and withdraw. I am not able to compile it and deploy using the plutus excercise methods. I would love to get an example which shows the implementation where it shows the usage of native tokens deposit to the contract.

Please take a look at https://github.com/input-output-hk/plutus-starter. It's a starter repository with a working game contract with PAB.

For more contract examples you may take a look at plutus-use-cases package https://github.com/input-output-hk/plutus-apps/tree/main/plutus-use-cases/src/Plutus/Contracts.

ezoic increase your site revenue