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

Local Transactions in Ganache BSC fork #42

Closed
bigfootdeveloper opened this issue Sep 21, 2021 · 4 comments
Closed

Local Transactions in Ganache BSC fork #42

bigfootdeveloper opened this issue Sep 21, 2021 · 4 comments
Assignees

Comments

@bigfootdeveloper
Copy link

bigfootdeveloper commented Sep 21, 2021

I am unable to export local transaction of a forked binance chain in ganache.

I am using truffle and I run the commands in the truffle directory:

This is the command tenderly export init

✔ Choose the name for the exported network: Ganache
✔ BigFoot
✔ Enter rpc address (default: 127.0.0.1:8545): xxx.xxx.xxx.xxx:8546
✔ Binance

But when I run tenderly export

tenderly export 0x55fb651dd7da5533889e8780b07f50065d899982188965a8bd166953fb88a1dd --rpc xxx.xxx.xxx.xxx:8546 --debug
Trying OpenZeppelin config path: networks.js
couldn't read new OpenzeppelinConfig config file
Trying buidler config path: buidler.config.js
couldn't read new Buidler config file
Trying hardhat config path: hardhat.config.js
Trying hardhat ts config path: hardhat.config.ts
Trying brownie config path: brownie-config.yaml
Trying truffle config path: truffle-config.js
Collecting network information...

Collecting transaction information...

Unable to get transaction rerunning information: error processing transaction: user error: %!s(<nil>), message: Missing block base fee parameter for block 11109803, london hard fork is probabbly not activated.
Transaction processing failed. To see more info about this error, please run this command with the --debug flag.
Try exporting with --force to ignore some validation

May be that not work with forked bsc chain ?

truffle verify give me an error:

root@bsctoken:/node/bigfoot-finance/contracts# tenderly verify
Verifying your contracts...
Analyzing provider configuration...
Couldn't read provider build files at: build/contracts

But directory build/contracts exists and it has the contracts in json.

Any help?

Thanks in advance

@delta003
Copy link
Contributor

delta003 commented Sep 21, 2021

👋

Can you attach exports config from tenderly.yaml?

I think London hard fork is not activated in your local, but it is for exported network. Take a look at https://github.com/Tenderly/tenderly-cli#advanced-usage-1, you can configure london_block for exported network, or activate London hard fork in local.

@bigfootdeveloper
Copy link
Author

bigfootdeveloper commented Sep 21, 2021

Yes, this is my tenderly.yaml

account_id: 9d553e77-405e-47d4-83ae-60e04f801fc9
exports:
  ganache:
    chain_config:
      berlin_block: 0
      byzantium_block: 0
      constantinople_block: 0
      eip150_block: 0
      eip150_hash: "0x0000000000000000000000000000000000000000000000000000000000000000"
      eip155_block: 0
      eip158_block: 0
      homestead_block: 0
      istanbul_block: 0
      london_block: 0
      petersburg_block: 0
    forked_network: Binance
    project_slug: BigFoot/bigfoot
    protocol: ""
    rpc_address: XXX.XXX.XXX.XXX:8546
project_slug: bigfoot
provider: Truffle

And, sorry, but I didn't understand you about enable london_block. I forked BSC not ETH. am I able to enable london_block then?

I found this issue and I tested: #39 (It didn't work with -k istanbul)

Thanks

@delta003
Copy link
Contributor

delta003 commented Sep 21, 2021

If you comment out / remove london_block: 0 part of your chain_config, that will disable London hard fork for exported chain and it should fix your issue. Let me know if it worked :)

@bigfootdeveloper
Copy link
Author

I delete the line that you said. But I must use --force option because if I doesn't use it returns an error:

# tenderly export 0x80ed8d79a773d8180157ca724059a1d65133fb8e291b20b3787e49086c369826 --debug
Trying OpenZeppelin config path: networks.js
couldn't read new OpenzeppelinConfig config file
Trying buidler config path: buidler.config.js
couldn't read new Buidler config file
Trying hardhat config path: hardhat.config.js
Trying hardhat ts config path: hardhat.config.ts
Trying brownie config path: brownie-config.yaml
Trying truffle config path: truffle-config.js
Collecting network information...

Collecting transaction information...

Unable to get transaction rerunning information: error processing transaction: user error: gas mismatch between receipt and actual gas used, message: Rerun gas mismatch for transaction 0x80ed8d79a773d8180157ca724059a1d65133fb8e291b20b3787e49086c369826. This can happen when the chain config is incorrect or the local node is not running the latest version.

Please check which hardfork is active on your local node. If you are not running the newest fork, comment out the forks block in tenderly.yaml.

Transaction processing failed. To see more info about this error, please run this command with the --debug flag.
Try exporting with --force to ignore some validation
# tenderly export 0x80ed8d79a773d8180157ca724059a1d65133fb8e291b20b3787e49086c369826 --debug --force
Trying OpenZeppelin config path: networks.js
couldn't read new OpenzeppelinConfig config file
Trying buidler config path: buidler.config.js
couldn't read new Buidler config file
Trying hardhat config path: hardhat.config.js
Trying hardhat ts config path: hardhat.config.ts
Trying brownie config path: brownie-config.yaml
Trying truffle config path: truffle-config.js
Collecting network information...

Collecting transaction information...

Collecting contracts...
Trying truffle config path: /node/bigfoot-finance/contracts/truffle-config.js
[          ] Making request
[===       ] Got response with body
Successfully exported transaction with hash 0x80ed8d79a773d8180157ca724059a1d65133fb8e291b20b3787e49086c369826
You can view your transaction at https://dashboard.tenderly.co/BigFoot/bigfoot/local-transactions/a5f35f74-fe10-4a12-a5f8

Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants