diff --git a/subgraph/flake.lock b/subgraph/flake.lock new file mode 100644 index 000000000..d90ffc989 --- /dev/null +++ b/subgraph/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1699099776, + "narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/subgraph/flake.nix b/subgraph/flake.nix index a895d74bb..2b7f6bccf 100644 --- a/subgraph/flake.nix +++ b/subgraph/flake.nix @@ -15,15 +15,15 @@ in rec { packages = rec { - concrete-contracts = ["AuthoringMetaGetter" "OrderBook" "RainterpreterExpressionDeployerNP" "RainterpreterNP" "RainterpreterStore"]; + concrete-contracts = ["OrderBook" "RainterpreterExpressionDeployerNP" "RainterpreterNP" "RainterpreterStore"]; copy-abis = contract: '' - cp ../out/${contract}.sol/${contract}.json ./tests/generated/ + cp ../out/${contract}.sol/${contract}.json ./test/generated/ ''; remove-duplicate-component = '' # Remove a component duplicated on RainterpreterExpressionDeployerNP abi that conflict with abigen - contract_path="tests/generated/RainterpreterExpressionDeployerNP.json" + contract_path="test/generated/RainterpreterExpressionDeployerNP.json" ${jq} '.abi |= map(select(.name != "StackUnderflow"))' $contract_path > updated_contract.json mv updated_contract.json $contract_path ''; @@ -31,6 +31,9 @@ init-setup = pkgs.writeShellScriptBin "init-setup" ('' forge build --root ../ + rm -rf ./abis ./test/generated + mkdir ./abis ./test/generated + cp ../out/OrderBook.sol/OrderBook.json ./abis/ cp ../out/ERC20.sol/ERC20.json ./abis/ERC20.json '' + pkgs.lib.concatStrings (map copy-abis concrete-contracts)