DAPPER
The XYO Foundation provides this source code available in our efforts to advance the understanding of the XYO Procotol and its possible uses. We continue to maintain this software in the interest of developer education. Usage of this source code is not intended for production. Developer usage of the Dapper app is intended for educational purposes on geospatial location blockchain protocol.
Getting Started
Install
yarn
it out in the project directory:
yarn
Run dapper
yarn start
Dapploy Some Contracts locally
We need to deploy a suite of smart contracts
Before we do let's set up an array of account addresses using Ganache:
There are two ways you can do this:
Install Ganache
- If you don't already have it, download and install Ganache from their site
Install MetaMask
Same with MetaMask from their site
Configure Ganache on 8545:
- Open Ganache
- Click the Gear Icon ( ⚙️ ) to open
Preferences...
. Make sure that port is set to 8545. - Click "Save and Restart" in the top-right of Ganache
- Configure Metamask network to
localhost
- Sign into Metamask and change Network on Metamask to localhost 8545
- Add ganache account to metamask
- In your Ganache UI, you'll see a list of ~10 addresses.
Other ganache options
Or:
Install Ganache CLI
npm install -g ganache-cli
or
yarn global add ganache-cli
Then enter this command in its own terminal(its recommended that in local development you maintain the same mnemonic and accounts):
ganache-cli --port 8545 --deterministic
Once you start up ganache, do not close the terminal window. You will see a mnemonic and 10 ethereum account addresses and the amount of ether for each
- In another terminal window, use Dapploy and create your first standalone smart contact project:
dapploy init my-first-coin -s ERC20
cd my-first-coint
dApploy the contracts
dapploy
This command will compile, migrate, and deploy your contracts in your local environment
At this point, you could interact with your contracts using truffle console
but why do that when you can now use dApploy?
dapploy -p
The -p
tag pins your contracts to IPFS for remote access
Note Copy your IPFS hash which can be found after running dapploy -p
, you will need it in the next section
Running dapploy
Contracts stored to IPFS <your IPFS hash>
View Local Contracts on IPFS
dApper's settings interface allows you to set up the environment to upload your ABI through an IPFS address, this is where we use the ipfs address from our dApployed contract
Set the portis
network to Development (local)
and in the text input under Add ABI
and IPFS address
paste your IPFS hash, which was given to you when you ran dapploy -p
on your my-first-coin
project:
Running dapploy
Contracts stored to IPFS <your IPFS hash>
Play with your Smart Contracts
You should now see your contracts in the contract simulator