How to create an instance of a contract in Truffle that deployed by another Ethereum node? #5808
-
I set Truffle to my private network. Now, I need to interact to a contract (C1) that deployed by another node of this network and I need to do that by Truffle. As I understood, I should define C1 to Truffle so that Truffle knows C1 deployed before. Because when I try this command on Truffle console:
After some search, I tried these commands on Truffle console:
But this error throwed:
This error throwed while C1 deployed on that address by another Ethereum node from the network. I don't know why Truffle cannot see C1 code at the address. Do I miss anything on console? I don't know am I trying the commands by a correct way or not? Please provide the correct way, Thanks. This is the Truffle config:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I found out what the problem is. When I wanted to connect Truffle console to PrivEth network I tried this:
This caused C1 not be deployed into
|
Beta Was this translation helpful? Give feedback.
I found out what the problem is. When I wanted to connect Truffle console to PrivEth network I tried this:
truffle develop --network PrivEth
This caused C1 not be deployed into
PrivEth
. BTW, the C1's address was unknown for all other Ethereum nodes.I changed the above command to:
truffle console --network PrivEth
And the issue resolved!