smartcontract_template_js
### a library to interact with duel smart contract
install duel sdk: npm i smartcontract_template_js --save
-
alice creates an arena with arena_id
skyrim_room_1
, stakes 10 COS,skyrim_admin
is the refereeconst Gladiator = require.Gladiator;const gladiator = new Gladiator;gladiator.open_arena; -
bob wants to join an arena that is created by alice,
const Gladiator = require.Gladiator;const gladiator = new Gladiator;gladiator.join_arena; -
The duel is over, the referee
skyrim_admin
decides bob is the winnerconst Gladiator = require.Gladiator;const gladiator = new Gladiator;gladiator.close_arena;