Skip to content

Commit

Permalink
Merge branch 'main' into fix/flake
Browse files Browse the repository at this point in the history
  • Loading branch information
jbearer authored Nov 8, 2023
2 parents 2d15dcd + b488762 commit a6498d3
Show file tree
Hide file tree
Showing 15 changed files with 141 additions and 755 deletions.
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
use nix
watch_file flake.nix
watch_file flake.lock
2 changes: 1 addition & 1 deletion .github/workflows/build_static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Enable Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: "${{ matrix.arch }}"
key: "v1-${{ matrix.arch }}"

- name: Initialize Nix Environment
run: |
Expand Down
2 changes: 2 additions & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ forge test
In order to avoid constant warnings about checksum mismatches with [svm-rs](https://github.com/roynalnaruto/svm-rs)
managed `solc` we set `FOUNDRY_SRC` to solc installed via flake.nix.

- To use the contrats from rust generate the rust contracts bindings: `just update-contract-bindings`.
- To use the contrats from rust generate the rust contracts bindings: `just gen-bindings`.

To generate documentation in `./docs` for solidity code run

Expand Down
1 change: 1 addition & 0 deletions contract-bindings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ edition = "2021"

[dependencies]
ethers = { version = "2", default-features = false, features = ["abigen"] }
serde = "1"
23 changes: 22 additions & 1 deletion contract-bindings/src/bls_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ pub mod bls_helper {
Clone,
::ethers::contract::EthError,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Expand All @@ -267,6 +269,8 @@ pub mod bls_helper {
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Expand All @@ -282,6 +286,8 @@ pub mod bls_helper {
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Expand All @@ -297,6 +303,8 @@ pub mod bls_helper {
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Expand All @@ -313,7 +321,16 @@ pub mod bls_helper {
pub pk: G2Point,
}
///Container type for all of the contract's call
#[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
#[derive(
Clone,
::ethers::contract::EthAbiType,
serde::Serialize,
serde::Deserialize,
Debug,
PartialEq,
Eq,
Hash,
)]
pub enum BLSHelperCalls {
HashToCurve(HashToCurveCall),
HashToField(HashToFieldCall),
Expand Down Expand Up @@ -375,6 +392,8 @@ pub mod bls_helper {
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Expand All @@ -390,6 +409,8 @@ pub mod bls_helper {
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Expand Down
2 changes: 2 additions & 0 deletions contract-bindings/src/bls_sig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ pub mod bls_sig {
Clone,
::ethers::contract::EthError,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Expand Down
19 changes: 18 additions & 1 deletion contract-bindings/src/bn254.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ pub mod bn254 {
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Expand All @@ -183,6 +185,8 @@ pub mod bn254 {
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Expand All @@ -192,7 +196,16 @@ pub mod bn254 {
#[ethcall(name = "R_MOD", abi = "R_MOD()")]
pub struct RModCall;
///Container type for all of the contract's call
#[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
#[derive(
Clone,
::ethers::contract::EthAbiType,
serde::Serialize,
serde::Deserialize,
Debug,
PartialEq,
Eq,
Hash,
)]
pub enum BN254Calls {
PMod(PModCall),
RMod(RModCall),
Expand Down Expand Up @@ -242,6 +255,8 @@ pub mod bn254 {
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Expand All @@ -254,6 +269,8 @@ pub mod bn254 {
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Expand Down
17 changes: 16 additions & 1 deletion contract-bindings/src/deploy_hot_shot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ pub mod deploy_hot_shot {
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Expand All @@ -175,6 +177,8 @@ pub mod deploy_hot_shot {
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Expand All @@ -184,7 +188,16 @@ pub mod deploy_hot_shot {
#[ethcall(name = "run", abi = "run()")]
pub struct RunCall;
///Container type for all of the contract's call
#[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
#[derive(
Clone,
::ethers::contract::EthAbiType,
serde::Serialize,
serde::Deserialize,
Debug,
PartialEq,
Eq,
Hash,
)]
pub enum DeployHotShotCalls {
IsScript(IsScriptCall),
Run(RunCall),
Expand Down Expand Up @@ -234,6 +247,8 @@ pub mod deploy_hot_shot {
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
serde::Serialize,
serde::Deserialize,
Default,
Debug,
PartialEq,
Expand Down
Loading

0 comments on commit a6498d3

Please sign in to comment.