Created
December 27, 2019 19:23
-
-
Save ryanpedersen42/67ad31c7656cd24cd02a7634575b1826 to your computer and use it in GitHub Desktop.
getContractAndPosts
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
getContractAndPosts = async () => { | |
const { setCurrentIPFS, setContract } = this.props | |
const contract = await new web3.eth // eslint-disable-line | |
.Contract(Pet.abi, '0x892de2063c8F898E21A9A1d4b981F7446a561Fe3'); | |
await setContract(contract) | |
const petHashes = await contract.methods.getHashes().call() | |
await setCurrentIPFS(petHashes) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment