- Install: https://trufflesuite.com/ganache/
- Start app and click "Quickstart (Ethereum)" button - This will start blochain on the address:
http://127.0.0.1:7545
-
Get/clone smart contracts
-
Install Truffle cli tool globally (to build and deploy smart contracts to the blockchain) -
npm install -g truffle
-
Open smart contracts folder in terminal and execute the following commands:
## Compile contracts
$ truffle compile
## Test contracts
$ truffle test
## Deploy contracts (this by default will deploy contracts to http://127.0.0.1:7545)
$ truffle migrate
- After migrate command from logs we need
contract address
value under the2_deploy_contracts.js
-
Update blockchain endpoint
http://127.0.0.1:7545
(only if it's different from the default one) -Web3_Provider.swift
fileendpoint
variable -
Update smart contract address -
Web3_Provider.swift
filecontractAddress
variable (use contract address which we got from the logs) -
In order to test Sign Terms or Verify Signature you should import wallets with balance - Variables are in
ContentView.swift
file- There is two way to import wallet with mnemonics (update
mnemonicsForImportWallet
variable) or with private key (updateprivateKeyForImportWallet
variable) this will import wallets from Ganache
- There is two way to import wallet with mnemonics (update
-
Wallets/Addresses created in the app won't have balance so they won't be able to do any operation