I am new to motoko and coding in general. I am attempting to launch a dapp with an html front end, and a simple swap based on this example:
I am looking through the code and have seen some things I am not sure of. It seems that the sample tokens are deployed new via a script In the install.sh within the “scripts” file. If I wanted to use two existing tokens would I have to put them in the dfx.json?
Any advice would be much appreciated!
So far I have seen the deploy.sh file creates these two tokens? If I wanted to utilize two existing tokens would I need to remove this file from my deployment?
What exactly do you mean with ‘existing tokens’? If you are trying to integrate with something like ICP, you can use the remote canister feature
Sorry if my nomenclature is incorrect. Thank you for the link! So with this link I would include the canister ids of Icp and whatever else I wanted to be the tradable pair in this example?
Yes. Locally, you’d still deploy it yourself, but that should happen transparently if you use
Ok, so this maybe be an ignorant question, but I woild use this section of code in the package.json file within the src/frontend/src portion of this example?
Alright sir, so I would replace lines 1-6 with the following code:
Do I repeat this for each canister in the swap?
Yes, SGTM. Feel free to just try things out locally. You can’t really screw up too bad if you don’t deploy to mainnet