How to use the @aragon/wrapper function in @aragon/wrapper

To help you get started, we’ve selected a few @aragon/wrapper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pandonetwork / pando / packages / pando.js / src / organization / index.ts View on Github external
return new Promise(async (resolve, reject) => {
      const aragon = new Aragon(this.kernel.address, {
        accounts:
          { providedAccounts: [this.pando.options.ethereum.account] },
        provider: this.pando.options.ethereum.provider,
        apm: { ensRegistryAddress: this.pando.options.apm.ens }
      })

      console.log(aragon)

      await aragon.init({
        accounts:
          { providedAccounts: [this.pando.options.ethereum.account] }
        // provider: this.pando.options.ethereum.provider,
        // apm: { ensRegistryAddress: this.pando.options.apm.ens }
      })
      // await aragon.initApps()
github pandonetwork / pando / packages / git-pando / src / commands / repository / subcommands / deploy.ts View on Github external
const handler = async argv => {
  try {
    let txHash
    let spinner

    const pando = await Pando.create(defaultsDeep(options(), { ethereum: { network: argv.network } }))
    const appId = pando.options.ethereum.network === 'devchain' ? namehash.hash('pando-colony.aragonpm.eth') : namehash.hash('pando-colony.open.aragonpm.eth')
    const wrapper = new Aragon(argv.organization, {
      apm: {
        ensRegistryAddress: pando.options.apm.ens,
        ipfs: pando.options.ipfs.gateway,
      },
      defaultGasPriceFn: () => String(5e9), // gwei
      provider: pando.options.ethereum.provider,
    })
    await wrapper.init({ accounts: { providedAccounts: [pando.options.ethereum.account] } })
    const apps = await _apps(wrapper)
    const colonyAddress = apps.filter(app => app.appId === appId)[0].proxyAddress
    const colony = await pando.artifacts.PandoColony.at(colonyAddress)

    try {
      spinner = ora(`Deploying repository '${argv.name}' on ${pando.options.ethereum.network}`).start()

      colony
github pandonetwork / pando / packages / git-pando / src / lib / repository / factory.ts View on Github external
public async deploy(organization: string, name: string, description: string): Promise {
    // TODO: assert that organization address is the one of an Aragon DAO
    // TODO: if we are in a git directory also try to resolve the organization by the name of the remote
    // TODO: handle transaction pathing

    const wrapper = new Aragon(organization, {
      provider: this.pando.options.ethereum.provider,
      defaultGasPriceFn: () => String(5e9), // gwei
      apm: {
        ipfs: {},
        ensRegistryAddress: this.pando.options.apm.ens,
      },
    })

    await wrapper.init({ accounts: { providedAccounts: [this.pando.options.ethereum.account] } })
    const apps = await this._apps(wrapper)
    const address = apps.filter(app => app.appId === COLONY_APP_ID)[0].proxyAddress
    const colony = await this.pando.artifacts.PandoColony.at(address)
    const receipt = await colony.createRepository(name, '')

    return this._getRepositoryAddressFromReceipt(receipt)
  }

@aragon/wrapper

Library for Aragon client implementations

AGPL-3.0
Latest version published 2 years ago

Package Health Score

48 / 100
Full package analysis