Last active
November 29, 2017 18:31
-
-
Save devonwesley/a25c0d721120b9f1c40caebec43609a3 to your computer and use it in GitHub Desktop.
This file contains 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 renderContractList() { | |
const contractListContainer = document.getElementById('contract-list') | |
const { contracts } = compiledContract | |
Object.keys(contracts).forEach((contract, index) => { | |
const label = `contract-id-${contract}-${Math.random()}` | |
const gas = contracts[contract].gasEstimates.creation | |
createContractInfo(gas, contract, label, function (el) { | |
contractListContainer.appendChild(el) | |
const btnContainer = document.getElementById(label) | |
btnContainer.appendChild( | |
buttonFactory('primary', contract, contracts[contract], 'details') | |
) | |
btnContainer.appendChild( | |
buttonFactory('danger', contract, contracts[contract], 'deploy') | |
) | |
}) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment