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

docs: make comment clearer for revert context address #445

Merged
merged 3 commits into from
Jan 10, 2025
Merged
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
4 changes: 3 additions & 1 deletion v2/contracts/Revert.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ struct RevertOptions {

/// @notice Struct containing revert context passed to onRevert.
/// @param sender Address of account that initiated smart contract call.
/// @param asset Address of asset, empty if it's gas token.
/// @param asset Address of asset. On a connected chain, it contains the fungible
/// token address or is empty if it's a gas token. On ZetaChain, it contains the
/// address of the ZRC20.
/// @param amount Amount specified with the transaction.
/// @param revertMessage Arbitrary data sent back in onRevert.
struct RevertContext {
Expand Down
28 changes: 28 additions & 0 deletions v2/data/addresses.mainnet.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


[
{
"address": "0x000007Cf399229b2f5A4D043F20E90C9C98B7C6a",
Expand Down Expand Up @@ -266,6 +268,19 @@
"symbol": "BNB.BSC",
"type": "zrc20"
},
{
"address": "0x4bC32034caCcc9B7e02536945eDbC286bACbA073",
"asset": "",
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_mainnet",
"coin_type": "gas",
"decimals": 9,
"description": "ZetaChain ZRC20 SOL on Solana Mainnet",
"foreign_chain_id": "900",
"symbol": "SOL.SOL",
"type": "zrc20"
},
{
"address": "0x777915D031d1e8144c90D025C594b3b8Bf07a08d",
"asset": "0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce",
Expand All @@ -292,6 +307,19 @@
"symbol": "USDT.ETH",
"type": "zrc20"
},
{
"address": "0x8344d6f84d26f998fa070BbEA6D2E15E359e2641",
"asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_mainnet",
"coin_type": "erc20",
"decimals": 6,
"description": "ZetaChain ZRC20 USDC on Solana Mainnet",
"foreign_chain_id": "900",
"symbol": "USDC.SOL",
"type": "zrc20"
},
{
"address": "0x91d4F0D54090Df2D81e834c3c8CE71C6c865e79F",
"asset": "0x55d398326f99059ff775485246999027b3197955",
Expand Down
22 changes: 2 additions & 20 deletions v2/data/addresses.testnet.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


[
{
"address": "0x0000ecb8cdd25a18f12daa23f6422e07fbf8b9e1",
Expand Down Expand Up @@ -123,19 +125,6 @@
"symbol": "ETH.BASESEPOLIA",
"type": "zrc20"
},
{
"address": "0x65a45c57636f9BcCeD4fe193A602008578BcA90b",
"asset": "",
"category": "omnichain",
"chain_id": 7001,
"chain_name": "zeta_testnet",
"coin_type": "gas",
"decimals": 8,
"description": "BTC-btc_testnet-btc_testnet",
"foreign_chain_id": "18332",
"symbol": "tBTC",
"type": "zrc20"
},
{
"address": "0x777915D031d1e8144c90D025C594b3b8Bf07a08d",
"asset": "",
Expand Down Expand Up @@ -253,13 +242,6 @@
"symbol": "tBTC",
"type": "zrc20"
},
{
"address": "tb1qy9pqmk2pd9sv63g27jt8r657wy0d9ueeh0nqur",
"category": "omnichain",
"chain_id": 18332,
"chain_name": "btc_testnet",
"type": "tss"
},
{
"address": "tb1qy9pqmk2pd9sv63g27jt8r657wy0d9ueeh0nqur",
"category": "omnichain",
Expand Down
2 changes: 1 addition & 1 deletion v2/docs/src/contracts/Revert.sol/struct.RevertContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct RevertContext {
|Name|Type|Description|
|----|----|-----------|
|`sender`|`address`|Address of account that initiated smart contract call.|
|`asset`|`address`|Address of asset, empty if it's gas token.|
|`asset`|`address`|Address of asset. On a connected chain, it contains the fungible token address or is empty if it's a gas token. On ZetaChain, it contains the address of the ZRC20.|
|`amount`|`uint256`|Amount specified with the transaction.|
|`revertMessage`|`bytes`|Arbitrary data sent back in onRevert.|

4 changes: 2 additions & 2 deletions v2/lib/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type ParamSymbol = "USDC.BSC" | "USDC.ETH" | "BTC.BTC" | "ETH.BASE" | "PEPE.ETH" | "BNB.BSC" | "SHIB.ETH" | "USDT.ETH" | "USDT.BSC" | "USDC.BASE" | "POL.POLYGON" | "DAI.ETH" | "ULTI.BSC" | "ETH.ETH" | "USDT.POL" | "ULTI.ETH" | "USDC.POL" | "sETH.SEPOLIA" | "ETH.BASESEPOLIA" | "tBTC" | "MATIC.AMOY" | "USDC" | "SOL.SOLANA" | "USDC.SEPOLIA" | "USDC.SOL" | "tBNB" | "sBTC" | "USDC.AMOY";
export type ParamChainName = "eth_mainnet" | "bsc_mainnet" | "polygon_mainnet" | "zeta_mainnet" | "btc_mainnet" | "base_mainnet" | "bsc_testnet" | "solana_devnet" | "zeta_testnet" | "btc_testnet" | "btc_signet_testnet" | "btc_testnet4" | "amoy_testnet" | "base_sepolia" | "sepolia_testnet";
export type ParamSymbol = "USDC.BSC" | "USDC.ETH" | "BTC.BTC" | "ETH.BASE" | "PEPE.ETH" | "BNB.BSC" | "SOL.SOL" | "SHIB.ETH" | "USDT.ETH" | "USDC.SOL" | "USDT.BSC" | "USDC.BASE" | "POL.POLYGON" | "DAI.ETH" | "ULTI.BSC" | "ETH.ETH" | "USDT.POL" | "ULTI.ETH" | "USDC.POL" | "sETH.SEPOLIA" | "ETH.BASESEPOLIA" | "MATIC.AMOY" | "USDC" | "SOL.SOLANA" | "USDC.SEPOLIA" | "tBNB" | "sBTC" | "USDC.AMOY" | "tBTC";
export type ParamChainName = "eth_mainnet" | "bsc_mainnet" | "polygon_mainnet" | "zeta_mainnet" | "btc_mainnet" | "base_mainnet" | "bsc_testnet" | "solana_devnet" | "zeta_testnet" | "btc_signet_testnet" | "btc_testnet4" | "amoy_testnet" | "base_sepolia" | "sepolia_testnet";
export type ParamType = "connector" | "erc20Custody" | "gateway" | "tss" | "uniswapV2Factory" | "uniswapV2Router02" | "uniswapV3Factory" | "uniswapV3Router" | "weth9" | "zetaToken" | "fungibleModule" | "systemContract" | "zrc20" | "custody";

2 changes: 1 addition & 1 deletion v2/pkg/erc20custody.sol/erc20custody.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion v2/pkg/erc20custody.t.sol/erc20custodytest.go

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion v2/pkg/gatewayevm.sol/gatewayevm.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion v2/pkg/gatewayevm.t.sol/gatewayevminboundtest.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion v2/pkg/gatewayevm.t.sol/gatewayevmtest.go

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion v2/pkg/gatewayevmzevm.t.sol/gatewayevmzevmtest.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion v2/pkg/gatewayzevm.sol/gatewayzevm.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion v2/pkg/gatewayzevm.t.sol/gatewayzevminboundtest.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion v2/pkg/gatewayzevm.t.sol/gatewayzevmoutboundtest.go

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion v2/pkg/receiverevm.sol/receiverevm.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion v2/pkg/senderzevm.sol/senderzevm.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading