How To: use the PAB for Plutus Pioneer Program
Credit to : https://github.com/SIDANWhatever
Necessary files and scripts can be found here: https://github.com/SIDANWhatever/PlutusPioneerProgramme/tree/main/Week06
Step 0: Running a cardano node (fully synced)
Guide can be found here: https://plutus-community.readthedocs.io/en/latest/Environment/Guides/cnodesync/
Step 1: Run the start-testnet-wallet.sh
* Error of not recognizing node-socket: Either re-export the node socket or directly pointing to the exisiting node-socket (please find my shell script as uploaded).
Step 2: To Create the wallet create-wallet.sh
* Themysecretpassphrasecould interchange with any passphrase you want, file name could be either, could berestore-wallet.jsonas Lars uses.
Step 3: Fund the wallet through Faucet
- Simple way to get receive address: Look at
wallet.jsoncreated above, enter the seed phrase intoyoroi nightly(a testnet wallet) to restore the wallet & get addresses there.
Step 4: Inform the backend wallet about your new wallet load-wallet.sh
* After loading the wallet, you could find the wallet ID in terminal, you should put the wallet ID toenv.shfor theWALLETIDvariable (e.g. mine isf9fa0a8955b31c30078541a62644fbeeaa7e200e).
Step 5: Start the testnet chain index start-testnet-chain-index.sh
* Error of Duplicated block is normal, after a while you should see the chain index is syncing (it might take hours).
Step 6: Migrate the PAB migrate-pab.sh
Step 7: Start the PAB start-testnet-pab.sh
- Prior to starting the script, you can manually point to the latest block by amending the
pointBlockId&pointSlotas you can see in your cardano node. - Please change the variable of
--passphraseinsidestart-testnet-pab.shbefore running the script. - Upon successful starting, you should find a Swagger UI at
localhost:9080/swagger/swagger-ui
Step 9: Make sure your env.sh is updated with your ADDRESS & WALLETID
-
ADDRESScould be either updated through Step 3 or use./get-address.shand randomly choose one. -
WALLETIDshould follow along Step 4. - Make sure your
env.shvariable is used in your shell through:
Step 10: Mint Token through activating the contract mint-token-curl.sh
* The command above means minting thePPPtoken with quantity of123456. * Upon successful minting, you should find theAssetstab andPPPappears below.