adrienthiery Github contribution chart
adrienthiery Github Stats
adrienthiery Most Used Languages

Activity

06 Sep 2022

Issue Comment

Adrienthiery

Cannot interact with a smartcontract using a private blockscout instance

Hi there,

I deployed a blockscout instance to explore a private (ganache) blockchain for development, and all works pretty well except when we want to interact with the contracts deployed from the "Write Contract" tab, we get the following error : image

Unauthorized
You connected to Unknown Private Network chain in the wallet, but the current instance of Blockscout is for Unknown Private Network chain 

Followed by this error: image

No "from" address specified in neither the given options, nor the default options. 

I don't see anything in the logs of the container

I tried to find a mention of this in the documentation, stackoverflow and issues, but could not find anything.

This is probably a setup error/missing step, but I can't find anything to resolve this.

Environment

  • Elixir & Erlang/OTP versions (elixir -version): 1.13.1
  • Operating System: Docker linux (using https://hub.docker.com/layers/alpine-elixir-phoenix/bitwalker/alpine-elixir-phoenix/1.13/images/sha256-ab38ca0743abba623298414e9b0f0cddd64e73606b04a86d72a9eaeac1a26aa6 as a base image)
  • Blockscout Version/branch: master from July 13th (i.e. https://github.com/blockscout/blockscout/commit/ef43da6d42b5aae00960fe42e6bc3cabc78d80d2 )

Steps to reproduce

Tell us how to reproduce this issue. ❤️ if you can push up a branch to your fork with a regression test we can run to reproduce locally.

Expected behaviour

I should be able to interact with my smartcontract on a blockscout instance

Actual behaviour

Getting an error when trying to.

Forked On 01 Sep 2022 at 03:45:01

Adrienthiery

Yay! That works! Thanks a lot @vbaranov :)

Commented On 01 Sep 2022 at 03:45:01
Issue Comment

Adrienthiery

Cannot interact with a smartcontract using a private blockscout instance

Hi there,

I deployed a blockscout instance to explore a private (ganache) blockchain for development, and all works pretty well except when we want to interact with the contracts deployed from the "Write Contract" tab, we get the following error : image

Unauthorized
You connected to Unknown Private Network chain in the wallet, but the current instance of Blockscout is for Unknown Private Network chain 

Followed by this error: image

No "from" address specified in neither the given options, nor the default options. 

I don't see anything in the logs of the container

I tried to find a mention of this in the documentation, stackoverflow and issues, but could not find anything.

This is probably a setup error/missing step, but I can't find anything to resolve this.

Environment

  • Elixir & Erlang/OTP versions (elixir -version): 1.13.1
  • Operating System: Docker linux (using https://hub.docker.com/layers/alpine-elixir-phoenix/bitwalker/alpine-elixir-phoenix/1.13/images/sha256-ab38ca0743abba623298414e9b0f0cddd64e73606b04a86d72a9eaeac1a26aa6 as a base image)
  • Blockscout Version/branch: master from July 13th (i.e. https://github.com/blockscout/blockscout/commit/ef43da6d42b5aae00960fe42e6bc3cabc78d80d2 )

Steps to reproduce

Tell us how to reproduce this issue. ❤️ if you can push up a branch to your fork with a regression test we can run to reproduce locally.

Expected behaviour

I should be able to interact with my smartcontract on a blockscout instance

Actual behaviour

Getting an error when trying to.

Forked On 01 Sep 2022 at 10:27:29

Adrienthiery

Should we not use the data-chain-id="<% env.CHAIN_ID %> instead of data-chain-id="<%= Explorer.Chain.Cache.NetVersion.get_version() %>" in here: https://github.com/blockscout/blockscout/blob/5de55bcbde703e43536af54c9222b7b448ccc0a4/apps/block_scout_web/lib/block_scout_web/templates/smart_contract/_functions.html.eex#L69 ?

Commented On 01 Sep 2022 at 10:27:29
Issue Comment

Adrienthiery

Cannot interact with a smartcontract using a private blockscout instance

Hi there,

I deployed a blockscout instance to explore a private (ganache) blockchain for development, and all works pretty well except when we want to interact with the contracts deployed from the "Write Contract" tab, we get the following error : image

Unauthorized
You connected to Unknown Private Network chain in the wallet, but the current instance of Blockscout is for Unknown Private Network chain 

Followed by this error: image

No "from" address specified in neither the given options, nor the default options. 

I don't see anything in the logs of the container

I tried to find a mention of this in the documentation, stackoverflow and issues, but could not find anything.

This is probably a setup error/missing step, but I can't find anything to resolve this.

Environment

  • Elixir & Erlang/OTP versions (elixir -version): 1.13.1
  • Operating System: Docker linux (using https://hub.docker.com/layers/alpine-elixir-phoenix/bitwalker/alpine-elixir-phoenix/1.13/images/sha256-ab38ca0743abba623298414e9b0f0cddd64e73606b04a86d72a9eaeac1a26aa6 as a base image)
  • Blockscout Version/branch: master from July 13th (i.e. https://github.com/blockscout/blockscout/commit/ef43da6d42b5aae00960fe42e6bc3cabc78d80d2 )

Steps to reproduce

Tell us how to reproduce this issue. ❤️ if you can push up a branch to your fork with a regression test we can run to reproduce locally.

Expected behaviour

I should be able to interact with my smartcontract on a blockscout instance

Actual behaviour

Getting an error when trying to.

Forked On 01 Sep 2022 at 10:24:42

Adrienthiery

I did not restart ganache, as we use it in a shared deployed environment (it's not on my local machine), so I can't reset it right now.

When running the curl command, I do get {"id":83,"jsonrpc":"2.0","result":"1657732650246"} back from ganache. (Which is the networkID we use for that test blockchain)

But we run ganache with : ganache --chainId 8888 (I will add the --networkId next time I can reset the blockchain, but I can't right now).

This whole chainId vs networkId is very confusing. Metamask asks for the chainId to be setup when adding the network, but the networkId seems to be something blurrier.

I know that for most chain, they match

Commented On 01 Sep 2022 at 10:24:42
Issue Comment

Adrienthiery

Cannot interact with a smartcontract using a private blockscout instance

Hi there,

I deployed a blockscout instance to explore a private (ganache) blockchain for development, and all works pretty well except when we want to interact with the contracts deployed from the "Write Contract" tab, we get the following error : image

Unauthorized
You connected to Unknown Private Network chain in the wallet, but the current instance of Blockscout is for Unknown Private Network chain 

Followed by this error: image

No "from" address specified in neither the given options, nor the default options. 

I don't see anything in the logs of the container

I tried to find a mention of this in the documentation, stackoverflow and issues, but could not find anything.

This is probably a setup error/missing step, but I can't find anything to resolve this.

Environment

  • Elixir & Erlang/OTP versions (elixir -version): 1.13.1
  • Operating System: Docker linux (using https://hub.docker.com/layers/alpine-elixir-phoenix/bitwalker/alpine-elixir-phoenix/1.13/images/sha256-ab38ca0743abba623298414e9b0f0cddd64e73606b04a86d72a9eaeac1a26aa6 as a base image)
  • Blockscout Version/branch: master from July 13th (i.e. https://github.com/blockscout/blockscout/commit/ef43da6d42b5aae00960fe42e6bc3cabc78d80d2 )

Steps to reproduce

Tell us how to reproduce this issue. ❤️ if you can push up a branch to your fork with a regression test we can run to reproduce locally.

Expected behaviour

I should be able to interact with my smartcontract on a blockscout instance

Actual behaviour

Getting an error when trying to.

Forked On 01 Sep 2022 at 09:58:30

Adrienthiery

Strange thing here, when inspecting the form, I see that data-chain-id is actually set to the networkId and not the chainId, which in our case are indeed different...

Commented On 01 Sep 2022 at 09:58:30
Issue Comment

Adrienthiery

Cannot interact with a smartcontract using a private blockscout instance

Hi there,

I deployed a blockscout instance to explore a private (ganache) blockchain for development, and all works pretty well except when we want to interact with the contracts deployed from the "Write Contract" tab, we get the following error : image

Unauthorized
You connected to Unknown Private Network chain in the wallet, but the current instance of Blockscout is for Unknown Private Network chain 

Followed by this error: image

No "from" address specified in neither the given options, nor the default options. 

I don't see anything in the logs of the container

I tried to find a mention of this in the documentation, stackoverflow and issues, but could not find anything.

This is probably a setup error/missing step, but I can't find anything to resolve this.

Environment

  • Elixir & Erlang/OTP versions (elixir -version): 1.13.1
  • Operating System: Docker linux (using https://hub.docker.com/layers/alpine-elixir-phoenix/bitwalker/alpine-elixir-phoenix/1.13/images/sha256-ab38ca0743abba623298414e9b0f0cddd64e73606b04a86d72a9eaeac1a26aa6 as a base image)
  • Blockscout Version/branch: master from July 13th (i.e. https://github.com/blockscout/blockscout/commit/ef43da6d42b5aae00960fe42e6bc3cabc78d80d2 )

Steps to reproduce

Tell us how to reproduce this issue. ❤️ if you can push up a branch to your fork with a regression test we can run to reproduce locally.

Expected behaviour

I should be able to interact with my smartcontract on a blockscout instance

Actual behaviour

Getting an error when trying to.

Forked On 01 Sep 2022 at 09:48:41

Adrienthiery

What's very strange is that it is not really a connection issue : Connect Wallet works fine, it does pop my Metamask up and asks to connect. Also, I can read data from the READ CONTRACT tab with no issue, it's really the WRITE action that poses problem with this No "from" address error

Commented On 01 Sep 2022 at 09:48:41
Issue Comment

Adrienthiery

Cannot interact with a smartcontract using a private blockscout instance

Hi there,

I deployed a blockscout instance to explore a private (ganache) blockchain for development, and all works pretty well except when we want to interact with the contracts deployed from the "Write Contract" tab, we get the following error : image

Unauthorized
You connected to Unknown Private Network chain in the wallet, but the current instance of Blockscout is for Unknown Private Network chain 

Followed by this error: image

No "from" address specified in neither the given options, nor the default options. 

I don't see anything in the logs of the container

I tried to find a mention of this in the documentation, stackoverflow and issues, but could not find anything.

This is probably a setup error/missing step, but I can't find anything to resolve this.

Environment

  • Elixir & Erlang/OTP versions (elixir -version): 1.13.1
  • Operating System: Docker linux (using https://hub.docker.com/layers/alpine-elixir-phoenix/bitwalker/alpine-elixir-phoenix/1.13/images/sha256-ab38ca0743abba623298414e9b0f0cddd64e73606b04a86d72a9eaeac1a26aa6 as a base image)
  • Blockscout Version/branch: master from July 13th (i.e. https://github.com/blockscout/blockscout/commit/ef43da6d42b5aae00960fe42e6bc3cabc78d80d2 )

Steps to reproduce

Tell us how to reproduce this issue. ❤️ if you can push up a branch to your fork with a regression test we can run to reproduce locally.

Expected behaviour

I should be able to interact with my smartcontract on a blockscout instance

Actual behaviour

Getting an error when trying to.

Forked On 01 Sep 2022 at 09:44:27

Adrienthiery

Mmmh, sadly I seem to still get the same error : The same two pop-ups are coming up.

Chrome's console says:

Uncaught (in promise) Error: No "from" address specified in neither the given options, nor the default options.
    at Object.ContractNoFromAddressDefinedError (smart-contract-helpers.js:2:2192881)
    at u._executeMethod (smart-contract-helpers.js:2:2307614)
    at smart-contract-helpers.js:2:3697352 

I did verify that the env vars set for NETWORK_ID and CHAIN_ID use the good values 🤔

Commented On 01 Sep 2022 at 09:44:27
Issue Comment

Adrienthiery

Cannot interact with a smartcontract using a private blockscout instance

Hi there,

I deployed a blockscout instance to explore a private (ganache) blockchain for development, and all works pretty well except when we want to interact with the contracts deployed from the "Write Contract" tab, we get the following error : image

Unauthorized
You connected to Unknown Private Network chain in the wallet, but the current instance of Blockscout is for Unknown Private Network chain 

Followed by this error: image

No "from" address specified in neither the given options, nor the default options. 

I don't see anything in the logs of the container

I tried to find a mention of this in the documentation, stackoverflow and issues, but could not find anything.

This is probably a setup error/missing step, but I can't find anything to resolve this.

Environment

  • Elixir & Erlang/OTP versions (elixir -version): 1.13.1
  • Operating System: Docker linux (using https://hub.docker.com/layers/alpine-elixir-phoenix/bitwalker/alpine-elixir-phoenix/1.13/images/sha256-ab38ca0743abba623298414e9b0f0cddd64e73606b04a86d72a9eaeac1a26aa6 as a base image)
  • Blockscout Version/branch: master from July 13th (i.e. https://github.com/blockscout/blockscout/commit/ef43da6d42b5aae00960fe42e6bc3cabc78d80d2 )

Steps to reproduce

Tell us how to reproduce this issue. ❤️ if you can push up a branch to your fork with a regression test we can run to reproduce locally.

Expected behaviour

I should be able to interact with my smartcontract on a blockscout instance

Actual behaviour

Getting an error when trying to.

Forked On 31 Aug 2022 at 02:41:34

Adrienthiery

Nice! I will try it now. Thanks @vbaranov

Commented On 31 Aug 2022 at 02:41:34
Issue Comment

Adrienthiery

Move "contract interaction" and "Add chain to MM" env vars to runtime

Resolves https://github.com/blockscout/blockscout/issues/5803

Motivation

Allow to setup configurable parameters for contract interaction functionality and adding chain to MM functionality in runtime. Currently, they are required at compile time.

Checklist for your Pull Request (PR)

  • [x] I added an entry to CHANGELOG.md with this PR
  • [ ] If I added new functionality, I added tests covering it.
  • [ ] If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • [x] I checked whether I should update the docs and did so by submitting a PR to https://github.com/blockscout/docs
  • [x] If I added/changed/removed ENV var, I submitted a PR to https://github.com/blockscout/docs to update the list of env vars at https://github.com/blockscout/docs/blob/master/for-developers/information-and-settings/env-variables.md and I updated the version to master in the Version column. Changes will be reflected in this table: https://docs.blockscout.com/for-developers/information-and-settings/env-variables.
  • [x] If I add new indices into DB, I checked, that they are not redundant with PGHero or other tools

Forked On 31 Aug 2022 at 02:41:15

Adrienthiery

Nice! I will try it now. Thanks @vbaranov

Commented On 31 Aug 2022 at 02:41:15
Issue Comment

Adrienthiery

Cannot interact with a smartcontract using a private blockscout instance

Hi there,

I deployed a blockscout instance to explore a private (ganache) blockchain for development, and all works pretty well except when we want to interact with the contracts deployed from the "Write Contract" tab, we get the following error : image

Unauthorized
You connected to Unknown Private Network chain in the wallet, but the current instance of Blockscout is for Unknown Private Network chain 

Followed by this error: image

No "from" address specified in neither the given options, nor the default options. 

I don't see anything in the logs of the container

I tried to find a mention of this in the documentation, stackoverflow and issues, but could not find anything.

This is probably a setup error/missing step, but I can't find anything to resolve this.

Environment

  • Elixir & Erlang/OTP versions (elixir -version): 1.13.1
  • Operating System: Docker linux (using https://hub.docker.com/layers/alpine-elixir-phoenix/bitwalker/alpine-elixir-phoenix/1.13/images/sha256-ab38ca0743abba623298414e9b0f0cddd64e73606b04a86d72a9eaeac1a26aa6 as a base image)
  • Blockscout Version/branch: master from July 13th (i.e. https://github.com/blockscout/blockscout/commit/ef43da6d42b5aae00960fe42e6bc3cabc78d80d2 )

Steps to reproduce

Tell us how to reproduce this issue. ❤️ if you can push up a branch to your fork with a regression test we can run to reproduce locally.

Expected behaviour

I should be able to interact with my smartcontract on a blockscout instance

Actual behaviour

Getting an error when trying to.

Forked On 30 Aug 2022 at 05:12:40

Adrienthiery

Hello @nikitosing, any idea how to help me out here? 🤔

Commented On 30 Aug 2022 at 05:12:40
Issue Comment

Adrienthiery

Cannot interact with a smartcontract using a private blockscout instance

Hi there,

I deployed a blockscout instance to explore a private (ganache) blockchain for development, and all works pretty well except when we want to interact with the contracts deployed from the "Write Contract" tab, we get the following error : image

Unauthorized
You connected to Unknown Private Network chain in the wallet, but the current instance of Blockscout is for Unknown Private Network chain 

Followed by this error: image

No "from" address specified in neither the given options, nor the default options. 

I don't see anything in the logs of the container

I tried to find a mention of this in the documentation, stackoverflow and issues, but could not find anything.

This is probably a setup error/missing step, but I can't find anything to resolve this.

Environment

  • Elixir & Erlang/OTP versions (elixir -version): 1.13.1
  • Operating System: Docker linux (using https://hub.docker.com/layers/alpine-elixir-phoenix/bitwalker/alpine-elixir-phoenix/1.13/images/sha256-ab38ca0743abba623298414e9b0f0cddd64e73606b04a86d72a9eaeac1a26aa6 as a base image)
  • Blockscout Version/branch: master from July 13th (i.e. https://github.com/blockscout/blockscout/commit/ef43da6d42b5aae00960fe42e6bc3cabc78d80d2 )

Steps to reproduce

Tell us how to reproduce this issue. ❤️ if you can push up a branch to your fork with a regression test we can run to reproduce locally.

Expected behaviour

I should be able to interact with my smartcontract on a blockscout instance

Actual behaviour

Getting an error when trying to.

Forked On 08 Aug 2022 at 07:27:49

Adrienthiery

Hi @nikitosing , I added a network with the RPC URL of my ganache blockchain to metamask, then connected by clicking the "connect wallet" button on the Read contract page of my blockscout instance.

Commented On 08 Aug 2022 at 07:27:49