Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Support for loom-network #405

Open
crackwei opened this issue Oct 28, 2018 · 3 comments
Open

Support for loom-network #405

crackwei opened this issue Oct 28, 2018 · 3 comments
Labels
kind:question A question to answer topic:chains Work on chains other than Ethereum

Comments

@crackwei
Copy link

hello, i was tried zos and openzeppelin on last 2 month,they are very good.for now i already deploied to our program.but as the gas reason,we want to deploy zos program to loom-network.the problem is promopt the error,as "web3 version error".so my problem is :

does Zos support loom-network?and how to?

i try truffle migrate,and can deploy to loom-network.

@spalladino spalladino added the kind:question A question to answer label Oct 29, 2018
@facuspagnuolo facuspagnuolo added this to the v2.1.0 milestone Nov 26, 2018
@crackwei
Copy link
Author

crackwei commented Dec 2, 2018

i change the function getNodeVersion of "zos-lib/lib/utils/Transactions.js",and it can be work:

async function getNodeVersion() {
  await web3.version.getNode(function(error, result)
  {
    if (error)
    {
      state.nodeInfo = 'UnknowNetwork'
    }
    else if (!state.nodeInfo) {
      state.nodeInfo = (0, _util.promisify)(web3.version.getNode.bind(web3.version))();
    }
  });
  if (!state.nodeInfo)
  {
    state.nodeInfo = await (0, _util.promisify)(web3.version.getNode.bind(web3.version))();
  }
  
  return state.nodeInfo;
}

@crackwei
Copy link
Author

crackwei commented Dec 4, 2018

can be run "zos push ..." after i change the getNodeVersion code.but it still have an error after created proxy when get implementation of the contract.problem is in the function getStorageAt(position){...}, provider did not support "web3_getStorageAt()"

@facuspagnuolo facuspagnuolo removed this from the v2.1.0 milestone Jan 8, 2019
@abcoathup
Copy link
Contributor

abcoathup commented Aug 27, 2019

Need Loom (loom-truffle-provider) to support JSON RPC methods web3_clientVersion and eth_getStorageAt

Loom Issue: loomnetwork/loom-js#306

network.js for Loom extdev_plasma_us1

const { readFileSync } = require('fs')
const LoomTruffleProvider = require('loom-truffle-provider')
 
const chainId = 'extdev-plasma-us1'
const writeUrl = 'http://extdev-plasma-us1.dappchains.com:80/rpc'
const readUrl = 'http://extdev-plasma-us1.dappchains.com:80/query'
 
// ./privateKey file contains a base64 encoded key generated by the command:
// loom genkey -a publicKey -k privateKey
const privateKey = readFileSync('./privateKey', 'utf-8')
 
const loomTruffleProvider = new LoomTruffleProvider(chainId, writeUrl, readUrl, privateKey)
 
// Create 10 extra accounts, useful for tests
loomTruffleProvider.createExtraAccounts(10)

const loomProvider = loomTruffleProvider.getProviderEngine()

loomProvider.addCustomMethod('web3_clientVersion', payload => {
  return 'Loom/v1.0.0/loom-js'
})

module.exports = {
  networks: {
    extdev_plasma_us1: {
      provider: function() {
        return loomTruffleProvider
      },
      networkId: '9545242630824'
    },
  },
};

Topic in Community Forum: https://forum.openzeppelin.com/t/loom-support/1239

@spalladino spalladino added the topic:chains Work on chains other than Ethereum label Dec 11, 2019
@spalladino spalladino changed the title does Zos support loom-network? Support for loom-network Dec 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind:question A question to answer topic:chains Work on chains other than Ethereum
Projects
None yet
Development

No branches or pull requests

4 participants