Skip to content

Instantly share code, notes, and snippets.

@devonwesley
Last active December 20, 2017 02:26
Show Gist options
  • Save devonwesley/49e48a34ac0623115e34f201134298f3 to your computer and use it in GitHub Desktop.
Save devonwesley/49e48a34ac0623115e34f201134298f3 to your computer and use it in GitHub Desktop.
Creates a Container for smart contract info inside of the UI.
function createContractPanel(contract, callback) {
const div = document.createElement('DIV')
div.className = 'mui-panel'
div.innerHTML = `
<h3>
<strong>Contract: </strong>
${contract.contractName}
</h3>
<p>
<strong>Block Number: </strong>
${contract.blockNumber}
</p>
<p>
<strong>Contract Balance: </strong>
${balanceInEth(contract.address)}
</p>
<strong>Contract Address: </strong>
${contract.address}
</p>
`
callback(div)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment