Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix web3 config #6503

Closed
luu-alex opened this issue Oct 12, 2023 · 0 comments
Closed

fix web3 config #6503

luu-alex opened this issue Oct 12, 2023 · 0 comments
Assignees
Labels
4.x 4.0 related Bug Addressing a bug

Comments

@luu-alex
Copy link
Contributor

luu-alex commented Oct 12, 2023

web3config does not proprogate to other packages properly between eachother.

How it is currently working:

const {Web3} = require('../packages/web3')
const basic = require('../fixtures/build/Basic.json')
const web3 = new Web3('http://127.0.0.1:8545/');
web3.setConfig({ contractDataInputFill: "data" });

const c1 = new web3.eth.Contract(basic.abi, '')
console.log(c1.config.contractDataInputFill) // input

const c2 = new web3.eth.Contract(basic.abi, '', web3.getContextObject())
console.log(c2.config.contractDataInputFill) // data

How it should work

const web3 = new Web3('http://127.0.0.1:8545/');
web3.setConfig({ contractDataInputFill: "data" });

const c1 = new web3.eth.Contract(basic.abi, '')
console.log(c1.config.contractDataInputFill) // data

const c2 = new web3.eth.Contract(basic.abi, '', web3.getContextObject())
console.log(c2.config.contractDataInputFill) // data

Expected behavior

Actual behavior

Steps to reproduce the behavior

  1. [First step]
  2. [Second step]
  3. [and so on...]

Logs

Environment

@luu-alex luu-alex added the 4.x 4.0 related label Oct 12, 2023
@mconnelly8 mconnelly8 added the Bug Addressing a bug label Oct 17, 2023
@luu-alex luu-alex mentioned this issue Oct 30, 2023
17 tasks
@luu-alex luu-alex changed the title web3 data input fix fix web3 config Oct 30, 2023
@luu-alex luu-alex closed this as completed Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 4.0 related Bug Addressing a bug
Projects
None yet
Development

No branches or pull requests

2 participants