Skip to content

Commit

Permalink
Merge pull request #80 from rainlanguage/2024-08-28-check-deployer-words
Browse files Browse the repository at this point in the history
CI task to check deployer words.
  • Loading branch information
hardyjosh authored Aug 29, 2024
2 parents fd358a1 + 3be8964 commit dc96c80
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 16 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
RPC_URL_FLARE: ${{ secrets.CI_DEPLOY_FLARE_RPC_URL || vars.CI_DEPLOY_FLARE_RPC_URL }}

steps:
- run: |
echo "MANIFEST_PATH=./lib/h20.test-std/lib/rain.orderbook/Cargo.toml" >> $GITHUB_ENV
echo "SETTINGS_PATH=src/settings.yml" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
submodules: recursive
Expand Down Expand Up @@ -50,4 +54,6 @@ jobs:
- run: ./prep-tauri.sh
working-directory: lib/h20.test-std/lib/rain.orderbook

- run: nix develop -c rainix-sol-test
- run: nix develop -c rainix-sol-test

- run: nix run .#check-deployer-words
6 changes: 3 additions & 3 deletions flake.lock

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

36 changes: 30 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,42 @@
description = "Flake for development workflows.";

inputs = {
rainix.url = "github:rainprotocol/rainix";
flake-utils.url = "github:numtide/flake-utils";
rainix.url = "github:rainprotocol/rainix";
};

outputs = {self, flake-utils, rainix }:
outputs = {self, rainix, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = rainix.pkgs.${system};
in {
packages = rainix.packages.${system};
devShells = rainix.devShells.${system};
in rec {
packages = rec{
network-list = rainix.network-list.${system};
networks = pkgs.lib.concatStringsSep " " network-list;

check-deployer-words = rainix.mkTask.${system} {
name = "check-deployer-words";
body = ''
for network in ${networks}
do
echo "Checking deployer words for $network"
cargo run --manifest-path ''${MANIFEST_PATH} --package rain_orderbook_cli words -c ''${SETTINGS_PATH} -d "$network" --stdout
done
'';
};
} // rainix.packages.${system};

devShells.default = pkgs.mkShell {
packages = [
packages.check-deployer-words
];

shellHook = rainix.devShells.${system}.default.shellHook;
buildInputs = rainix.devShells.${system}.default.buildInputs;
nativeBuildInputs = rainix.devShells.${system}.default.nativeBuildInputs;
};

}
);

}
}
37 changes: 34 additions & 3 deletions src/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,48 @@ networks:
rpc: https://rpc.ankr.com/flare
chain-id: 14
currency: FLR
base:
rpc: https://mainnet.base.org
chain-id: 8453
network-id: 8453
currency: ETH
sepolia:
rpc: https://1rpc.io/sepolia
chain-id: 11155111
network-id: 11155111
currency: ETH

subgraphs:
flare: http://replaceme.com

base: http://replaceme.com
sepolia: http://replaceme.com

metaboards:
flare: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-flare-0x893BBFB7/0.1/gn
base: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-base-0x59401C93/0.1/gn
sepolia: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-sepolia-0x77991674/0.1/gn

orderbooks:
flare:
address: 0xaa3b14Af0e29E3854E4148f43321C4410db002bC
network: flare
subgraph: flare
base:
address: 0x80DE00e3cA96AE0569426A1bb1Ae22CD4181dE6F
network: base
subgraph: base
sepolia:
address: 0x0bB72B4C7c0d47b2CaED07c804D9243C1B8a0728
network: sepolia
subgraph: sepolia

deployers:
flare:
address: 0xEBe394cff4980992B826Ec70ef0a9ec8b5D4C640
network: flare
address: 0x3214CdB105a73f8356583eCd85264cCfA8417694
network: flare
base:
address: 0xC1A14cE2fd58A3A2f99deCb8eDd866204eE07f8D
network: base
sepolia:
address: 0x7692BA8446Bb8B3140A2c02df073080BeD0a7F8E
network: sepolia
2 changes: 1 addition & 1 deletion src/tranche/tranche-space.rain
Original file line number Diff line number Diff line change
Expand Up @@ -526,5 +526,5 @@ deployments:
),
:call<'set-last-tranche>(tranche-space-after-snapped current-time);

#post-add-order
#handle-add-order
:;
2 changes: 1 addition & 1 deletion test/TrancheSpaceTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ contract TrancheSpaceTest is StrategyTests {
using Strings for address;
using Strings for uint256;

uint256 constant FORK_BLOCK_NUMBER = 28712894;
uint256 constant FORK_BLOCK_NUMBER = 28982497;

function selectFlareFork() internal {
uint256 fork = vm.createFork(vm.envString("RPC_URL_FLARE"));
Expand Down

0 comments on commit dc96c80

Please sign in to comment.