Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,10 @@ TSWLatexianTemp*
.DS_Store
.stack-work/
dist-newstyle/

# direnv
.direnv/

# nix
result
result/
3 changes: 0 additions & 3 deletions act/Act/TH/Extractor.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ module Act.TH.Extractor (argumentExtractorName, generateExtractMethods) where

import Act.Prelude
import Act.Utils
import Data.Data
import Data.List
import Language.Haskell.TH.Syntax as TH
import Syntax.Annotated

deriving instance Data AbiType

-- Given each method in the contract we need to know how to extract the arguments from the
-- arguments' array. for this we create a partial top-level function which matches
-- on the argument array and return the correct number of argument in its expected type
Expand Down
3 changes: 1 addition & 2 deletions act/EVM/TH.hs
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ emptyVM contracts =
{ contracts = Map.fromList (fmap (fmap bytecodeToContract) contracts),
chainId = 0,
storage = EmptyStore,
origStorage = mempty,
sha3Crack = mempty
origStorage = mempty
}

bytecodeToContract :: ByteString -> Contract
Expand Down
149 changes: 149 additions & 0 deletions flake.lock

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

48 changes: 48 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
haskell-flake.url = "github:srid/haskell-flake";
act.url = "github:ethereum/act/52e99daf3121a4e6a6cb28255e862cf8e83cf4cd";
act.flake = false;
};

outputs = inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
imports = [
inputs.haskell-flake.flakeModule
];
perSystem = { self', system, lib, config, pkgs, ... }: {
haskellProjects.default = {
basePackages = pkgs.haskell.packages.ghc927;

packages = {
act.source = "${inputs.act}/src";
};

settings = {
act.extraTestToolDepends = [pkgs.z3];
poly = {
# TODO: what's going on here? why are these tests failing? where is this dep even coming from?
check = false;
broken = false;
};
};

# send everything but the devShell to the main flake outputs
autoWire = [ "packages" "apps" "checks" ];
};

packages.default = self'.packages.open-games-hs;
apps.default = self'.apps.open-games-hs;

devShells.default = pkgs.mkShell {
name = "og devshell";
inputsFrom = [
config.haskellProjects.default.outputs.devShell
];
};
};
};
}
1 change: 1 addition & 0 deletions open-games-hs.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ license-file: LICENSE
build-type: Simple
extra-source-files:
README.md
amm.act

library
exposed-modules:
Expand Down