This repository has been archived by the owner on Nov 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(contracts): refactor contracts and consistent use of NatSpec (…
…#27) * docs: natspec * test: simplified tests * refactor
- Loading branch information
Showing
5 changed files
with
122 additions
and
120 deletions.
There are no files selected for viewing
48 changes: 0 additions & 48 deletions
48
contracts/ibc-lite-shared/ics07-tendermint/ICS07Tendermint.sol
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.13; | ||
|
||
/// @title ICS07Tendermint | ||
/// @author srdtrk | ||
/// @notice Defines shared types for ICS07Tendermint implementations. | ||
contract ICS07Tendermint { | ||
/// @notice Height of the counterparty chain | ||
struct Height { | ||
/// Previously known as "epoch" | ||
uint64 revision_number; | ||
/// The height of a block | ||
uint64 revision_height; | ||
} | ||
|
||
/// Fraction of validator overlap needed to update header | ||
struct TrustThreshold { | ||
/// Numerator of the fraction | ||
uint64 numerator; | ||
/// Denominator of the fraction | ||
uint64 denominator; | ||
} | ||
|
||
/// @notice Defines the ICS07Tendermint ClientState for ibc-lite | ||
struct ClientState { | ||
/// Chain ID | ||
string chain_id; | ||
/// Fraction of validator overlap needed to update header | ||
TrustThreshold trust_level; | ||
/// Latest height the client was updated to | ||
Height latest_height; | ||
/// duration of the period since the LatestTimestamp during which the | ||
/// submitted headers are valid for upgrade | ||
uint64 trusting_period; | ||
/// duration of the staking unbonding period | ||
uint64 unbonding_period; | ||
/// whether or not client is frozen (due to misbehavior) | ||
bool is_frozen; | ||
} | ||
|
||
/// Defines the Tendermint light client's consensus state at some height. | ||
struct ConsensusState { | ||
/// timestamp that corresponds to the block height in which the ConsensusState | ||
/// was stored. | ||
uint64 timestamp; | ||
/// commitment root (i.e app hash) | ||
bytes root; | ||
/// next validators hash | ||
bytes next_validators_hash; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters