Last active
December 20, 2017 02:26
-
-
Save devonwesley/49e48a34ac0623115e34f201134298f3 to your computer and use it in GitHub Desktop.
Creates a Container for smart contract info inside of the UI.
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
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