Untitled
unknown
plain_text
3 years ago
609 B
12
Indexable
let ethereum = null
if (typeof window !== 'undefined') {
ethereum = window.ethereum
}
const createWeb3Client = (async () => {
const web3 = new Web3(window.ethereum)
setWeb3Instance(web3)
const accounts = await web3.eth.getAccounts()
console.log(accounts)
setCurrentWalletAddress(accounts[0])
const contract = await blogInstance(web3)
setContractInstance(contract)
// getUploadedPostAddresses(contract);
})
createWeb3Client();
const addresses = await contract.methods.postData(imageUrl: _imageUrl, imageName: _imageName, title: _title,
text: _text)
Editor is loading...