We generated a wasm binary executable in the previous chapter. Let's put it into use. Now, we will upload the code to the blockchain. Afterwards, you can download the bytecode to verify it is proper:
We can now create an instance of this wasm contract. Here the verifier will fund an escrow, that will allow fred to control payout and upon release, the funds go to bob.
Once we have the funds in the escrow, let us try to release them. First, failing to do so with a key that is not the verifier, then using the proper key to release.
Node console needs to be updated. The code below is obsolete
First, go to the cli directory and start up your console:
Now, we make all the keys and initialize clients:
Hit the faucet it needed for fred, so he has tokens to submit transactions:
Now, we go back to the Node console and upload the contract and instantiate it:
Once we have properly configured the contract, let's show how to use it, both the proper "approve" command: