dapphub / dpack

simple lockfile for your dapp's addresses and artifacts
46 stars 9 forks source link

simpler declarative `build` #47

Open nmushegian opened 2 years ago

nmushegian commented 2 years ago

Based on our current usage it seems like we can just have a single pure build function. (We should also still have stateful builder pattern).

const pack = dpack.build({
  network: hh.network.name,
  types: {
    'Gem': {
      artifact: hh.artifacts.readArtifact('Gem')
    },
  },
  objects: {
    'gemfab': {
      typename: 'Gem',
      address: gem.address,
      artifact: hh.artifacts.readArtifact('Gem'),
      alsoPackType: true
    }
  }
})

notice: