You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 18, 2021. It is now read-only.
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:
Since vvisp console command has a addNetworkOption in packages/vvisp/commands/console.js path, it should support --network option.
However, the provider of contract instance file generated from vvisp gen-script is not same with the option provided with --network.
To check the current provider of contract instance, I added console.log in generated contract instance file, for example contractApis/back/js/Count.js.
module.exports = function(_contractAddr = '') {
const web3 = web3Store.get();
console.log(web3.currentProvider, 'web3 currentProvider') // added console.log in this line
const contract = new web3.eth.Contract(JSON.parse(abi));
contract.options.address = _contractAddr;
After adding console.log, I ran vvisp console --network devnet command.
❯ vvisp console --network devnet
'state.vvisp.json' does not existing in current path(/Users/hoonilkim/work2/myDapp2)
Run 'vvisp deploy-service' command to create state.vvisp.json and rerun 'vvisp console' again,
or enter the address of the currently registered contract
Available contract contracts:
Count
Enter the address of Count: 0xb527119DFEd10A61f3B71A3e4E93e7276BA5F9FB
Available contract contracts:
Index Contract Address
[0] Count 0xb527119DFEd10A61f3B71A3e4E93e7276BA5F9FB
If you are wondering how to use it, type help command.
Use exit or Ctrl-c to exit
>> call Count count
HttpProvider {
host: 'http://localhost:8545',
httpAgent:
Agent {
domain: null,
_events: { free: [Function] },
_eventsCount: 1,
_maxListeners: undefined,
defaultPort: 80,
protocol: 'http:',
options: { keepAlive: false, path: null },
requests: {},
sockets: {},
freeSockets: {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256 },
timeout: 0,
headers: undefined,
connected: false } 'web3 currentProvider'
I'm submitting a...
Current behavior
vvisp console --network devnet
command doesn't work.This is a part of content in truffle-config.js.
Since
vvisp console
command has aaddNetworkOption
inpackages/vvisp/commands/console.js
path, it should support--network
option.However, the provider of contract instance file generated from
vvisp gen-script
is not same with the option provided with--network
.To check the current provider of contract instance, I added
console.log
in generated contract instance file, for examplecontractApis/back/js/Count.js
.After adding console.log, I ran
vvisp console --network devnet
command.Like above logs, it shows 'http://localhost:8545' as a host which doesn't match with the
devnet
network(http://satoshi.klaytn.net:8551).Expected behavior
contract instance have a provider which same with the one provided by
--network
option.Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Environment
The text was updated successfully, but these errors were encountered: