Skip to content

Commit

Permalink
make generate
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Jan 23, 2025
1 parent fadc2ff commit c94f8f8
Show file tree
Hide file tree
Showing 52 changed files with 508 additions and 50 deletions.
2 changes: 1 addition & 1 deletion contracts/Revert.sol
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ interface Abortable {
/// @notice Called when a revertable call is aborted.
/// @param abortContext Abort context to pass to onAbort.
function onAbort(AbortContext calldata abortContext) external;
}
}
10 changes: 5 additions & 5 deletions docs/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

Contracts of official protocol contracts deployed by the core ZetaChain team.

### Learn more about ZetaChain
## Learn more about ZetaChain

* Check our [website](https://www.zetachain.com/).
* Read our [docs](https://docs.zetachain.com/).

### Codebase
## Codebase

The protocol contracts V2 codebase is separated into two sections:
The protocol contracts codebase is separated into two sections:

- `zevm`: contracts deployed on ZetaChain
- `evm`: contracts deployed on EVM connected chains (Ethereum, Base, etc..)
Expand All @@ -31,7 +31,7 @@ The protocol contracts V2 codebase is separated into two sections:

[Learn more about the Gateway contracts](https://www.zetachain.com/docs/developers/evm/gateway/)

### Usage
## Usage

**Install dependencies**

Expand Down Expand Up @@ -68,6 +68,6 @@ To view detailed instructions on how to deploy the contracts, please refer to th

This guide covers all steps required to deploy the contracts, including environment setup, commands, and best practices.

### Community
## Community

[X](https://x.com/zetablockchain) | [Discord](https://discord.com/invite/zetachain) | [Telegram](https://t.me/zetachainofficial) | [Website](https://zetachain.com)
2 changes: 2 additions & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,6 @@
- [INotSupportedMethods](contracts/Errors.sol/interface.INotSupportedMethods.md)
- [RevertOptions](contracts/Revert.sol/struct.RevertOptions.md)
- [RevertContext](contracts/Revert.sol/struct.RevertContext.md)
- [AbortContext](contracts/Revert.sol/struct.AbortContext.md)
- [Revertable](contracts/Revert.sol/interface.Revertable.md)
- [Abortable](contracts/Revert.sol/interface.Abortable.md)
2 changes: 2 additions & 0 deletions docs/src/contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
- [INotSupportedMethods](Errors.sol/interface.INotSupportedMethods.md)
- [RevertOptions](Revert.sol/struct.RevertOptions.md)
- [RevertContext](Revert.sol/struct.RevertContext.md)
- [AbortContext](Revert.sol/struct.AbortContext.md)
- [Revertable](Revert.sol/interface.Revertable.md)
- [Abortable](Revert.sol/interface.Abortable.md)
22 changes: 22 additions & 0 deletions docs/src/contracts/Revert.sol/interface.Abortable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Abortable
[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/main/v2/contracts/Revert.sol)

Interface for contracts that support abortable calls.


## Functions
### onAbort

Called when a revertable call is aborted.


```solidity
function onAbort(AbortContext calldata abortContext) external;
```
**Parameters**

|Name|Type|Description|
|----|----|-----------|
|`abortContext`|`AbortContext`|Abort context to pass to onAbort.|


28 changes: 28 additions & 0 deletions docs/src/contracts/Revert.sol/struct.AbortContext.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# AbortContext
[Git Source](https://github.com/zeta-chain/protocol-contracts/blob/main/v2/contracts/Revert.sol)

Struct containing abort context passed to onAbort.


```solidity
struct AbortContext {
bytes sender;
address asset;
uint256 amount;
bool outgoing;
uint256 chainID;
bytes revertMessage;
}
```

**Properties**

|Name|Type|Description|
|----|----|-----------|
|`sender`|`bytes`|Address of account that initiated smart contract call. bytes is used as the crosschain transaction can be initiated from a non-EVM chain.|
|`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.|
|`outgoing`|`bool`|Flag to indicate if the crosschain transaction was outgoing: from ZetaChain to connected chain. if false, the transaction was incoming: from connected chain to ZetaChain.|
|`chainID`|`uint256`|Chain ID of the connected chain.|
|`revertMessage`|`bytes`|Arbitrary data specified in the RevertOptions object when initating the crosschain transaction.|

12 changes: 7 additions & 5 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ title: "Protocol contracts"

Contracts of official protocol contracts deployed by the core ZetaChain team.

### Learn more about ZetaChain
## Learn more about ZetaChain

* Check our [website](https://www.zetachain.com/).
* Read our [docs](https://docs.zetachain.com/).

### Codebase
## Codebase

The protocol contracts V2 codebase is separated into two sections:
The protocol contracts codebase is separated into two sections:

- `zevm`: contracts deployed on ZetaChain
- `evm`: contracts deployed on EVM connected chains (Ethereum, Base, etc..)
Expand All @@ -35,7 +35,7 @@ The protocol contracts V2 codebase is separated into two sections:

[Learn more about the Gateway contracts](https://www.zetachain.com/docs/developers/evm/gateway/)

### Usage
## Usage

**Install dependencies**

Expand Down Expand Up @@ -72,7 +72,7 @@ To view detailed instructions on how to deploy the contracts, please refer to th

This guide covers all steps required to deploy the contracts, including environment setup, commands, and best practices.

### Community
## Community

[X](https://x.com/zetablockchain) | [Discord](https://discord.com/invite/zetachain) | [Telegram](https://t.me/zetachainofficial) | [Website](https://zetachain.com)# Summary
- [Home](README.md)
Expand Down Expand Up @@ -137,4 +137,6 @@ This guide covers all steps required to deploy the contracts, including environm
- [INotSupportedMethods](protocol/contracts/Errors.sol/interface.INotSupportedMethods.md)
- [RevertOptions](protocol/contracts/Revert.sol/struct.RevertOptions.md)
- [RevertContext](protocol/contracts/Revert.sol/struct.RevertContext.md)
- [AbortContext](protocol/contracts/Revert.sol/struct.AbortContext.md)
- [Revertable](protocol/contracts/Revert.sol/interface.Revertable.md)
- [Abortable](protocol/contracts/Revert.sol/interface.Abortable.md)
2 changes: 1 addition & 1 deletion pkg/erc20custody.sol/erc20custody.go

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

212 changes: 212 additions & 0 deletions pkg/revert.sol/abortable.go

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

Loading

0 comments on commit c94f8f8

Please sign in to comment.