Last active
May 8, 2020 11:36
-
-
Save alexroan/d47d03328ba9fb5cf7ea2285e17df46c to your computer and use it in GitHub Desktop.
loadingTwoContracts.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const loadTennisPlayerContract = async (dispatch, web3, address) => { | |
const instance = new web3.eth.Contract(TennisPlayer.abi, address); | |
dispatch(tennisPlayerLoaded(instance)); | |
return instance; | |
} | |
export const loadTennisPlayerSocket = async (dispatch, web3Socket, address) => { | |
const socketInstance = new web3Socket.eth.Contract(TennisPlayer.abi, address); | |
dispatch(tennisPlayerSocketLoaded(socketInstance)); | |
return socketInstance; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment