Skip to content

Commit

Permalink
chore(contracts/core): migrate genesis contracts to monorepo (#2689)
Browse files Browse the repository at this point in the history
Migrated Genesis contracts into monorepo

issue: none
  • Loading branch information
Zodomo authored Dec 12, 2024
1 parent 365b021 commit 3f85919
Show file tree
Hide file tree
Showing 6 changed files with 623 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/core/.gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ OmniBridgeNative_Test:test_pauseBridging() (gas: 44379)
OmniBridgeNative_Test:test_pauseWithdraws() (gas: 61240)
OmniBridgeNative_Test:test_stub() (gas: 143)
OmniBridgeNative_Test:test_withdraw() (gas: 279580)
OmniGasPump_Test:testFuzz_quote(uint32) (runs: 256, μ: 63943, ~: 63991)
OmniGasPump_Test:testFuzz_quote(uint32) (runs: 256, μ: 63941, ~: 63991)
OmniGasPump_Test:test_fillUp() (gas: 237060)
OmniGasPump_Test:test_pause() (gas: 62825)
OmniGasPump_Test:test_setMaxSwap() (gas: 34771)
Expand Down
1 change: 1 addition & 0 deletions contracts/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"dependencies": {
"@nomad-xyz/excessively-safe-call": "github:nomad-xyz/ExcessivelySafeCall",
"@openzeppelin-v4/contracts": "npm:@openzeppelin/[email protected]",
"@openzeppelin-v4/contracts-upgradeable": "npm:@openzeppelin/[email protected]",
"@openzeppelin/contracts": "^5.0.2",
"@openzeppelin/contracts-upgradeable": "^5.0.2",
"eigenlayer-contracts": "github:Layr-Labs/eigenlayer-contracts",
Expand Down
8 changes: 8 additions & 0 deletions contracts/core/pnpm-lock.yaml

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

33 changes: 33 additions & 0 deletions contracts/core/src/interfaces/IGenesisStake.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity 0.8.24;

interface IGenesisStake {
/**
* @notice Stake `amount` tokens.
* @param amount The amount of tokens to stake.
*/
function stake(uint256 amount) external;

/**
* @notice Stake `amount` tokens for `recipient`, paid by the caller.
* @param recipient The recipient to stake tokens for.
* @param amount The amount of tokens to stake.
*/
function stakeFor(address recipient, uint256 amount) external;

/**
* @notice Unstake your entire balance, starting the unbonding period.
*/
function unstake() external;

/**
* @notice Withdraw your entire balance after the unbonding period.
*/
function withdraw() external;

/**
* @notice Returns timestamp at which `account` can withdraw.
* Reverts if the account has not staked & unstaked.
*/
function canWithdrawAt(address account) external view returns (uint256);
}
Loading

0 comments on commit 3f85919

Please sign in to comment.