Front End Template for GPTE v1.1.0
Work in progress 2023-03-06. | View on GitLab
Roadmap
- Complete this documentation
- Build Treasury View
- Organize single config file
- Create reliable transaction templates for Commit + Distribute
- Create transactions templates for Treasury Management: Add Funds + Update Approved Projects
- Add Contributor Token management, for example as needed for PPBL 2023
- Incorporate
gpte-template
into PPBL Front End Template - Build a GPTE Instance for GL Team?
How to use:
0. Pre-Requisite: Prep Tokens + Compile Contracts
- See GPTE docs
- (or pull from...can we deploy a SIDAN?)
You'll know you're ready for to prepare a GPTE FE if you have:
Contributor Token Policy ID
05cf1f9c1e4cdcb6702ed2c978d55beff5e178b206b4ec7935d5e056
Issuer Token Policy ID
15a9a88cf6e6f4e806a853cede246d0430455d4944401b9b71309fca
Treasury Contract (CBOR / Ref UTxO / Address)
/ppbl2023/gpte-plutus-v2/output
(create new for course reference)- address:
addr_test1wqrr5cvc4ecne0k49a7vkktdxtu7jlp90g53u3gd9gjt86ss0hpf6
- ref UTXO:
- Escrow Contract (CBOR / Ref UTxO / Address)
/ppbl2023/gpte-plutus-v2/output
(create new for course reference)- address:
addr_test1wqhkgd3xwa5wp0yavkltd7fjdjrz5hqtyk02fwlgcz0w2mqhjexy7
- ref UTXO
Note to self 2023-02-17: Where is the Contrib Token contract for PPBL2023 demo?
Ah it's here: /ppbl2023/ppbl2023-plutus-starter - prep this repo and add to Gitlab!
1. Front End: Clone + Checkout
git clone https://gitlab.com/gimbalabs/ppbl-2023/gpte-front-end-template-2023
cd gpte-front-end-template-2023
2. Configuration
In ppbl2023-plutus-starter/src/ContribToken
:
-- One ContribTokenValidator is all we need
contribReferenceParams :: ContribReferenceParams
contribReferenceParams = ContribReferenceParams {
adminTokenPolicyId = "15a9a88cf6e6f4e806a853cede246d0430455d4944401b9b71309fca",
contributorTokenPolicyId = "05cf1f9c1e4cdcb6702ed2c978d55beff5e178b206b4ec7935d5e056"
}
In GPTE:
escrowParam :: EscrowParam
escrowParam =
EscrowParam
{ projectTokenPolicyId = "fb45417ab92a155da3b31a8928c873eb9fd36c62184c736f189d334c",
projectTokenName = "tGimbal",
contribTokenPolicyId = "05cf1f9c1e4cdcb6702ed2c978d55beff5e178b206b4ec7935d5e056",
treasuryIssuerPolicyId = "15a9a88cf6e6f4e806a853cede246d0430455d4944401b9b71309fca"
}
writeProjectEscrowScript :: IO (Either (FileError ()) ())
writeProjectEscrowScript = writeValidator "output/gpte-escrow-ppbl-2023.plutus" $ Escrow.validator escrowParam
writeProjectTreasuryScript :: IO (Either (FileError ()) ())
writeProjectTreasuryScript =
writeValidator "output/gpte-treasury-ppbl-2023.plutus" $
Treasury.validator $
TreasuryParam
{ tContribTokenPolicyId = "15a9a88cf6e6f4e806a853cede246d0430455d4944401b9b71309fca",
escrowContractHash = Escrow.escrowValidatorHash escrowParam,
tProjectTokenPolicyId = "fb45417ab92a155da3b31a8928c873eb9fd36c62184c736f189d334c",
tProjectTokenName = "tGimbal",
tIssuerPolicyId = "05cf1f9c1e4cdcb6702ed2c978d55beff5e178b206b4ec7935d5e056"
}
Contribute:
- How can we best automate the process of creating a GPTE instance? How much is safe?
- What questions does this raise about headless dapps?