Simple example of Truffle interacting with Loom DAppChain, this example uses loom-truffle-provider (check LoomTruffleProvider repository for more details)
Node >= 8
In order to download the Truffle DAppChain Example there're two methods Git or Unbox
git clone https://github.com/loomnetwork/truffle-dappchain-example
cd truffle-dappchain-example yarn install # or npm install
# Install Truffle if not installed npm install -g truffle mkdir truffle-dappchain-example cd truffle-dappchain-example truffle unbox loomnetwork/truffle-dappchain-example
# Download wget https://private.delegatecall.com/loom/osx/stable/loom chmod +x loom # Run ./loom init ./loom run
# On second terminal # Deploy Migrations.sol and SimpleStore.sol yarn deploy # Running test on directory /test yarn test
In order to correctly redeploy the contracts there's a command "yarn deploy:reset"
Also is possible to call truffle command directly by call "yarn truffle"
We're not versioning the build directory for this particular example, although is recommended to versioning, the limitation can be removed by editing .gitignore
- Events declared on smart contracts should have an named parameter like
NewValueSet(uint _value)in the contract
SimpleStore.sol. Also it helps to dealing with events
BSD 3-Clause License