Skip to content

Instantly share code, notes, and snippets.

@BenjaminLu
Created May 21, 2019 07:26
Show Gist options
  • Save BenjaminLu/f49c5519920f242d051ec21d65b6bf1f to your computer and use it in GitHub Desktop.
Save BenjaminLu/f49c5519920f242d051ec21d65b6bf1f to your computer and use it in GitHub Desktop.
<script>
import HelloWorld from './components/HelloWorld.vue'
import Web3 from 'web3'
import abi from './abis/SupplyChainAuthorization.json'
let address = '0x9e614eba660bb33c181716a448437fa4235b53d5'
let web3 = new Web3('http://localhost:8545')
export default {
name: 'app',
components: {
HelloWorld
},
async mounted () {
/* eslint-disable */
console.log(abi)
let contract = new web3.eth.Contract(abi, address)
let authorization = await contract.methods.authorizations('0x64e604787cbf194841e7b68d7cd28786f6c9a0a3ab9f8b0a0e87cb4387ab0107', '0x97798a7ce1eedb778fe135ba4f72c5cd61b1904f61f817965236ff22acf6c32a').call()
console.log(authorization)
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment