diff options
Diffstat (limited to 'app/services/Lottery/index.js')
-rw-r--r-- | app/services/Lottery/index.js | 8 |
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; |