Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pages/developers/evm/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"description": "Enables message passing and ZETA transfer to and from universal apps"
},
"gas": {
"title": "Gas Fees",
"title": "Gas Fees & Limits",
"description": "Learn about ZRC-20 withdraw fees, message passing fees"
},
"cctx": {
Expand Down
21 changes: 18 additions & 3 deletions src/pages/developers/evm/gas.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Gas Fees
title: Gas
---

import { Fees } from "~/components/Docs";
Expand Down Expand Up @@ -66,9 +66,24 @@ the destination chain.

<Fees />

To calculate fees for a different gas limit, please, check out use the `query
fees` command:
To calculate fees for a different gas limit, please, check out use the `query fees` command:

```
npx zetachain query fees
```

## Gas Limits

Gas limits set the upper bound for how much computation a cross-chain
transaction can use. They’re defined per direction (incoming or outgoing) to
make sure calls have enough room to execute reliably. The values may change as
the network evolves.

| Direction | Gas Limit | Notes |
| ------------------------ | --------- | ----------------------------------------------------------------------------------------------------- |
| Incoming To ZetaChain | 1.6M | [API](https://zetachain-athens.blockpi.network/lcd/v1/public/zeta-chain/fungible/system_contract) |
| Outgoing to EVM | 2.5M | [Source](https://github.com/zeta-chain/node/blob/835341df/zetaclient/chains/evm/signer/gas.go) |
| Outgoing to EVM (revert) | 2M | [Source](https://github.com/zeta-chain/protocol-contracts/blob/main/contracts/Revert.sol) |
Comment on lines +85 to +86
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These values are not correct, users choose the fees and pay for it. But the default values are not the same neither.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I know that users specify gas limits, we can rename these as "max gas limits" or something to specify that this is the max amount you can set (but you can set less).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lumtis how can we fix this table to provide up-to-date max gas limit values?

| Outgoing to TON | 1M | [Source](https://github.com/zeta-chain/node/blob/835341df/zetaclient/chains/ton/observer/outbound.go) |
| Outgoing to Sui | 50B | [Source](https://github.com/zeta-chain/node/blob/835341df/zetaclient/chains/ton/observer/outbound.go) |
| Outgoing to Solana | 1.6M | [Source](https://github.com/zeta-chain/node/blob/835341df/zetaclient/chains/solana/signer/signer.go) |