aboutsummaryrefslogtreecommitdiffstats
path: root/app/services/Lottery/index.js
diff options
context:
space:
mode:
authorHsuan Lee <boczeratul@gmail.com>2019-04-08 22:18:34 +0800
committerHsuan Lee <boczeratul@gmail.com>2019-04-08 22:18:34 +0800
commitb9c0c169ce805124cb6b3fb84c7db8df9a76151e (patch)
tree88d4b5a09267a9cc9e4d56ccadeebe588dc36284 /app/services/Lottery/index.js
parent336162ac78ad3d5c787c5ecfe735b98d423c4053 (diff)
downloaddexon-lottery-b9c0c169ce805124cb6b3fb84c7db8df9a76151e.tar.gz
dexon-lottery-b9c0c169ce805124cb6b3fb84c7db8df9a76151e.tar.zst
dexon-lottery-b9c0c169ce805124cb6b3fb84c7db8df9a76151e.zip
Complete webapp
Diffstat (limited to 'app/services/Lottery/index.js')
-rw-r--r--app/services/Lottery/index.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/services/Lottery/index.js b/app/services/Lottery/index.js
new file mode 100644
index 0000000..4244122
--- /dev/null
+++ b/app/services/Lottery/index.js
@@ -0,0 +1,8 @@
+import Web3 from '@cobinhood/web3';
+import { DEXON_TESTNET, LOTTERY_ADDRESS } from './constants';
+import { abi } from '../../../build/contracts/Lottery.json';
+
+const web3 = new Web3(new Web3.providers.HttpProvider(DEXON_TESTNET));
+const lotteryContract = new web3.eth.Contract(abi, LOTTERY_ADDRESS);
+
+export default lotteryContract;