Skip to content

Commit

Permalink
Added a pipeline to build a fuzznet image
Browse files Browse the repository at this point in the history
  • Loading branch information
jalextowle committed Oct 21, 2023
1 parent 6ba277c commit cdfbba2
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/fuzznet_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Publish the fuzznet image

on:
workflow_dispatch:
push:
branches:
# FIXME
- "jalextowle/infra/fuzznet-image"
tags:
- "v*"

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/fuzznet

jobs:
push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
# Add a tag matching the commit hash
type=sha,format=long,prefix=
# Add a version tag when a valid semver tag is pushed.
type=semver,pattern={{version}}
# Add the edge tag to represent the latest commit to main
type=raw,value=edge,enable={{is_default_branch}}
- name: Build and push the Testnet image
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
IS_COMPETITION_MODE=false
BASE_TOKEN_NAME=Wrapped Ether
BASE_TOKEN_SYMBOL=WETH
VAULT_NAME=stETH
VAULT_SYMBOL=STETH
VAULT_STARTING_RATE=35000000000000000 # 3.5% APR
HYPERDRIVE_CONTRIBUTION=50000000000000000000000 # 50,000 ETH
HYPERDRIVE_FIXED_RATE=35000000000000000 # 3.5% APR
HYPERDRIVE_INITIAL_SHARE_PRICE=1000000000000000000 # 1 base/share
HYPERDRIVE_MINIMUM_SHARE_RESERVES=1000000000000000 # 1e15
HYPERDRIVE_MINIMUM_TRANSACTION_AMOUNT=1000000000000 # 1e12
HYPERDRIVE_POSITION_DURATION=31536000 # 1 year in seconds
HYPERDRIVE_CHECKPOINT_DURATION=86400 # 1 day in seconds
HYPERDRIVE_TIME_STRETCH_APR=35000000000000000 # 3.5% APR
HYPERDRIVE_ORACLE_SIZE=10 # 10 recorded spot prices
HYPERDRIVE_UPDATE_GAP=3600 # 1 hour in seconds
8 changes: 8 additions & 0 deletions contracts/test/MockERC4626.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.19;

// FIXME
import { console2 as console } from "forge-std/console2.sol";

import { Authority } from "solmate/auth/Auth.sol";
import { MultiRolesAuthority } from "solmate/auth/authorities/MultiRolesAuthority.sol";
import { ERC20 } from "solmate/tokens/ERC20.sol";
Expand Down Expand Up @@ -104,6 +107,11 @@ contract MockERC4626 is ERC4626, MultiRolesAuthority {

function _accrue() internal {
ERC20Mintable(address(asset)).mint(_getAccruedInterest());
console.log(
"_accrue: Updating `_lastUpdated` from %s to %s",
_lastUpdated,
block.timestamp
);
_lastUpdated = block.timestamp;
}

Expand Down

0 comments on commit cdfbba2

Please sign in to comment.