Guest User

Untitled

a guest
Nov 22nd, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. function renderContractList() {
  2. const contractListContainer = document.getElementById('contract-list')
  3. const { contracts } = compiledContract
  4.  
  5. Object.keys(contracts).forEach((contract, index) => {
  6. const label = `contract-id-${index}`
  7. const gas = contracts[contract].gasEstimates.creation
  8.  
  9. createContractInfo(gas, contract, label, function (el) {
  10. contractListContainer.appendChild(el)
  11. const btnContainer = document.getElementById(label)
  12.  
  13. btnContainer.appendChild(
  14. buttonFactory('primary', contract, contracts[contract], 'details')
  15. )
  16.  
  17. btnContainer.appendChild(
  18. buttonFactory('danger', contract, contracts[contract], 'deploy')
  19. )
  20. })
  21. })
  22. }
Add Comment
Please, Sign In to add comment