Skip to content

Commit

Permalink
generate
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Oct 17, 2024
1 parent 8f318f1 commit 0f3b61e
Show file tree
Hide file tree
Showing 58 changed files with 4,049 additions and 122 deletions.
3 changes: 1 addition & 2 deletions v2/contracts/evm/interfaces/IGatewayEVM.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ interface IGatewayEVMEvents {
address indexed receiver,
uint256 amount,
address asset,
bytes reserved, // Previously `payload`
bytes reserved,
RevertOptions revertOptions
);

Expand All @@ -59,7 +59,6 @@ interface IGatewayEVMEvents {
RevertOptions revertOptions
);


/// @notice Emitted when an omnichain smart contract call is made without asset transfer.
/// @param sender The address of the sender.
/// @param receiver The address of the receiver.
Expand Down
2 changes: 1 addition & 1 deletion v2/contracts/zevm/interfaces/IGatewayZEVM.sol
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ interface IGatewayZEVMEvents {
uint256 value,
uint256 gasfee,
uint256 protocolFlatFee,
bytes reserved, // Previously `message`
bytes reserved,
CallOptions callOptions,
RevertOptions revertOptions
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ function withdrawAndRevert(

Deposits asset to custody and pay fee in zeta erc20.

**Note:**
This method is deprecated.


```solidity
function deposit(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ uint256 public constant MAX_PAYLOAD_SIZE = 1024;
## Functions
### constructor

**Note:**
constructor


```solidity
constructor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,32 @@ Emitted when a deposit is made.

```solidity
event Deposited(
address indexed sender,
address indexed receiver,
uint256 amount,
address asset,
bytes reserved,
RevertOptions revertOptions
);
```

**Parameters**

|Name|Type|Description|
|----|----|-----------|
|`sender`|`address`|The address of the sender.|
|`receiver`|`address`|The address of the receiver.|
|`amount`|`uint256`|The amount of ETH or tokens deposited.|
|`asset`|`address`|The address of the ERC20 token (zero address if ETH).|
|`reserved`|`bytes`|Reserved for future use; previously used as `payload`.|
|`revertOptions`|`RevertOptions`|Revert options.|

### DepositedAndCalled
Emitted when a deposit and call is made.


```solidity
event DepositedAndCalled(
address indexed sender,
address indexed receiver,
uint256 amount,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ modifier onlyProtocol();

### constructor

**Note:**
constructor


```solidity
constructor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,40 @@ Emitted when a withdrawal is made.

```solidity
event Withdrawn(
address indexed sender,
uint256 indexed chainId,
bytes receiver,
address zrc20,
uint256 value,
uint256 gasfee,
uint256 protocolFlatFee,
bytes reserved,
CallOptions callOptions,
RevertOptions revertOptions
);
```

**Parameters**

|Name|Type|Description|
|----|----|-----------|
|`sender`|`address`|The address from which the tokens are withdrawn.|
|`chainId`|`uint256`|Chain id of external chain.|
|`receiver`|`bytes`|The receiver address on the external chain.|
|`zrc20`|`address`|The address of the ZRC20 token.|
|`value`|`uint256`|The amount of tokens withdrawn.|
|`gasfee`|`uint256`|The gas fee for the withdrawal.|
|`protocolFlatFee`|`uint256`|The protocol flat fee for the withdrawal.|
|`reserved`|`bytes`|Reserved for future use; previously used as `message`.|
|`callOptions`|`CallOptions`|Call options including gas limit and arbirtrary call flag.|
|`revertOptions`|`RevertOptions`|Revert options.|

### WithdrawnAndCalled
Emitted when a withdraw and call is made.


```solidity
event WithdrawnAndCalled(
address indexed sender,
uint256 indexed chainId,
bytes receiver,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# zContract
[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/main/v2/contracts/zevm/interfaces/UniversalContract.sol)

**Note:**
should be removed once v2 SystemContract is not used anymore.
UniversalContract should be used


## Functions
### onCrossChainCall
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# zContext
[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/main/v2/contracts/zevm/interfaces/UniversalContract.sol)

**Note:**
should be removed once v2 SystemContract is not used anymore.
MessageContext should be used


```solidity
struct zContext {
Expand Down
2 changes: 1 addition & 1 deletion v2/pkg/erc20custody.sol/erc20custody.go

Large diffs are not rendered by default.

169 changes: 163 additions & 6 deletions v2/pkg/erc20custody.t.sol/erc20custodytest.go

Large diffs are not rendered by default.

Large diffs are not rendered by default.

169 changes: 163 additions & 6 deletions v2/pkg/gatewayevm.sol/gatewayevm.go

Large diffs are not rendered by default.

169 changes: 163 additions & 6 deletions v2/pkg/gatewayevm.t.sol/gatewayevminboundtest.go

Large diffs are not rendered by default.

169 changes: 163 additions & 6 deletions v2/pkg/gatewayevm.t.sol/gatewayevmtest.go

Large diffs are not rendered by default.

169 changes: 163 additions & 6 deletions v2/pkg/gatewayevmupgradetest.sol/gatewayevmupgradetest.go

Large diffs are not rendered by default.

338 changes: 328 additions & 10 deletions v2/pkg/gatewayevmzevm.t.sol/gatewayevmzevmtest.go

Large diffs are not rendered by default.

173 changes: 167 additions & 6 deletions v2/pkg/gatewayzevm.sol/gatewayzevm.go

Large diffs are not rendered by default.

173 changes: 167 additions & 6 deletions v2/pkg/gatewayzevm.t.sol/gatewayzevminboundtest.go

Large diffs are not rendered by default.

173 changes: 167 additions & 6 deletions v2/pkg/gatewayzevm.t.sol/gatewayzevmoutboundtest.go

Large diffs are not rendered by default.

173 changes: 167 additions & 6 deletions v2/pkg/gatewayzevmupgradetest.sol/gatewayzevmupgradetest.go

Large diffs are not rendered by default.

167 changes: 162 additions & 5 deletions v2/pkg/igatewayevm.sol/igatewayevm.go

Large diffs are not rendered by default.

167 changes: 162 additions & 5 deletions v2/pkg/igatewayevm.sol/igatewayevmevents.go

Large diffs are not rendered by default.

171 changes: 166 additions & 5 deletions v2/pkg/igatewayzevm.sol/igatewayzevm.go

Large diffs are not rendered by default.

171 changes: 166 additions & 5 deletions v2/pkg/igatewayzevm.sol/igatewayzevmevents.go

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

0 comments on commit 0f3b61e

Please sign in to comment.