Skip to content

Commit

Permalink
Merge pull request #216 from primitivefinance/waylon/folio
Browse files Browse the repository at this point in the history
Waylon/folio
  • Loading branch information
Autoparallel authored Apr 26, 2023
2 parents 329a18c + e9c0b05 commit f8f9022
Show file tree
Hide file tree
Showing 76 changed files with 47,289 additions and 54,941 deletions.
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[submodule "lib/ds-test"]
path = lib/ds-test
url = https://github.com/dapphub/ds-test
[submodule "lib/portfolio"]
path = lib/portfolio
url = https://github.com/primitivefinance/portfolio
[submodule "lib/canonical-weth"]
path = lib/canonical-weth
url = https://github.com/gnosis/canonical-weth
[submodule "lib/v3-core"]
path = lib/v3-core
url = https://github.com/Uniswap/v3-core
url = https://github.com/Uniswap/v3-core
[submodule "lib/portfolio"]
path = lib/portfolio
url = https://github.com/primitivefinance/portfolio
27 changes: 13 additions & 14 deletions crates/bindings/src/account_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ pub use account_lib::*;
clippy::upper_case_acronyms,
clippy::type_complexity,
dead_code,
non_camel_case_types
non_camel_case_types,
)]
pub mod account_lib {
#[rustfmt::skip]
const __ABI: &str = "[]";
///The parsed JSON ABI of the contract.
pub static ACCOUNTLIB_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> =
::ethers::contract::Lazy::new(|| {
::ethers::core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid")
});
pub static ACCOUNTLIB_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new(||
::ethers::core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid"));
pub struct AccountLib<M>(::ethers::contract::Contract<M>);
impl<M> ::core::clone::Clone for AccountLib<M> {
fn clone(&self) -> Self {
Expand All @@ -36,9 +34,7 @@ pub mod account_lib {
}
impl<M> ::core::fmt::Debug for AccountLib<M> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple(stringify!(AccountLib))
.field(&self.address())
.finish()
f.debug_tuple(stringify!(AccountLib)).field(&self.address()).finish()
}
}
impl<M: ::ethers::providers::Middleware> AccountLib<M> {
Expand All @@ -48,14 +44,17 @@ pub mod account_lib {
address: T,
client: ::std::sync::Arc<M>,
) -> Self {
Self(::ethers::contract::Contract::new(
address.into(),
ACCOUNTLIB_ABI.clone(),
client,
))
Self(
::ethers::contract::Contract::new(
address.into(),
ACCOUNTLIB_ABI.clone(),
client,
),
)
}
}
impl<M: ::ethers::providers::Middleware> From<::ethers::contract::Contract<M>> for AccountLib<M> {
impl<M: ::ethers::providers::Middleware> From<::ethers::contract::Contract<M>>
for AccountLib<M> {
fn from(contract: ::ethers::contract::Contract<M>) -> Self {
Self::new(contract.address(), contract.client())
}
Expand Down
203 changes: 123 additions & 80 deletions crates/bindings/src/arbiter_token.rs

Large diffs are not rendered by default.

157 changes: 79 additions & 78 deletions crates/bindings/src/assembly_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ pub use assembly_lib::*;
clippy::upper_case_acronyms,
clippy::type_complexity,
dead_code,
non_camel_case_types
non_camel_case_types,
)]
pub mod assembly_lib {
#[rustfmt::skip]
const __ABI: &str = "[]";
///The parsed JSON ABI of the contract.
pub static ASSEMBLYLIB_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> =
::ethers::contract::Lazy::new(|| {
::ethers::core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid")
});
pub static ASSEMBLYLIB_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new(||
::ethers::core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid"));
#[rustfmt::skip]
const __BYTECODE: &[u8] = &[
96,
Expand Down Expand Up @@ -117,38 +115,38 @@ pub mod assembly_lib {
34,
18,
32,
66,
248,
121,
57,
199,
129,
34,
173,
17,
57,
225,
27,
251,
161,
242,
6,
0,
196,
175,
60,
139,
10,
91,
77,
80,
163,
69,
87,
223,
103,
229,
135,
26,
239,
168,
148,
7,
238,
97,
122,
18,
149,
24,
93,
110,
224,
3,
68,
175,
167,
212,
33,
155,
114,
201,
246,
176,
89,
194,
185,
48,
107,
100,
115,
111,
Expand All @@ -162,8 +160,9 @@ pub mod assembly_lib {
51,
];
///The bytecode of the contract.
pub static ASSEMBLYLIB_BYTECODE: ::ethers::core::types::Bytes =
::ethers::core::types::Bytes::from_static(__BYTECODE);
pub static ASSEMBLYLIB_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static(
__BYTECODE,
);
#[rustfmt::skip]
const __DEPLOYED_BYTECODE: &[u8] = &[
115,
Expand Down Expand Up @@ -209,38 +208,38 @@ pub mod assembly_lib {
34,
18,
32,
66,
248,
121,
57,
199,
129,
34,
173,
17,
57,
225,
27,
251,
161,
242,
6,
0,
196,
175,
60,
139,
10,
91,
77,
80,
163,
69,
87,
223,
103,
229,
135,
26,
239,
168,
148,
7,
238,
97,
122,
18,
149,
24,
93,
110,
224,
3,
68,
175,
167,
212,
33,
155,
114,
201,
246,
176,
89,
194,
185,
48,
107,
100,
115,
111,
Expand All @@ -254,8 +253,9 @@ pub mod assembly_lib {
51,
];
///The deployed bytecode of the contract.
pub static ASSEMBLYLIB_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes =
::ethers::core::types::Bytes::from_static(__DEPLOYED_BYTECODE);
pub static ASSEMBLYLIB_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static(
__DEPLOYED_BYTECODE,
);
pub struct AssemblyLib<M>(::ethers::contract::Contract<M>);
impl<M> ::core::clone::Clone for AssemblyLib<M> {
fn clone(&self) -> Self {
Expand All @@ -275,9 +275,7 @@ pub mod assembly_lib {
}
impl<M> ::core::fmt::Debug for AssemblyLib<M> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple(stringify!(AssemblyLib))
.field(&self.address())
.finish()
f.debug_tuple(stringify!(AssemblyLib)).field(&self.address()).finish()
}
}
impl<M: ::ethers::providers::Middleware> AssemblyLib<M> {
Expand All @@ -287,11 +285,13 @@ pub mod assembly_lib {
address: T,
client: ::std::sync::Arc<M>,
) -> Self {
Self(::ethers::contract::Contract::new(
address.into(),
ASSEMBLYLIB_ABI.clone(),
client,
))
Self(
::ethers::contract::Contract::new(
address.into(),
ASSEMBLYLIB_ABI.clone(),
client,
),
)
}
/// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it.
/// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction
Expand Down Expand Up @@ -333,7 +333,8 @@ pub mod assembly_lib {
Ok(deployer)
}
}
impl<M: ::ethers::providers::Middleware> From<::ethers::contract::Contract<M>> for AssemblyLib<M> {
impl<M: ::ethers::providers::Middleware> From<::ethers::contract::Contract<M>>
for AssemblyLib<M> {
fn from(contract: ::ethers::contract::Contract<M>) -> Self {
Self::new(contract.address(), contract.client())
}
Expand Down
37 changes: 19 additions & 18 deletions crates/bindings/src/bit_math.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ pub use bit_math::*;
clippy::upper_case_acronyms,
clippy::type_complexity,
dead_code,
non_camel_case_types
non_camel_case_types,
)]
pub mod bit_math {
#[rustfmt::skip]
const __ABI: &str = "[]";
///The parsed JSON ABI of the contract.
pub static BITMATH_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> =
::ethers::contract::Lazy::new(|| {
::ethers::core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid")
});
pub static BITMATH_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new(||
::ethers::core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid"));
#[rustfmt::skip]
const __BYTECODE: &[u8] = &[
96,
Expand Down Expand Up @@ -142,8 +140,9 @@ pub mod bit_math {
51,
];
///The bytecode of the contract.
pub static BITMATH_BYTECODE: ::ethers::core::types::Bytes =
::ethers::core::types::Bytes::from_static(__BYTECODE);
pub static BITMATH_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static(
__BYTECODE,
);
#[rustfmt::skip]
const __DEPLOYED_BYTECODE: &[u8] = &[
115,
Expand Down Expand Up @@ -234,8 +233,9 @@ pub mod bit_math {
51,
];
///The deployed bytecode of the contract.
pub static BITMATH_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes =
::ethers::core::types::Bytes::from_static(__DEPLOYED_BYTECODE);
pub static BITMATH_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static(
__DEPLOYED_BYTECODE,
);
pub struct BitMath<M>(::ethers::contract::Contract<M>);
impl<M> ::core::clone::Clone for BitMath<M> {
fn clone(&self) -> Self {
Expand All @@ -255,9 +255,7 @@ pub mod bit_math {
}
impl<M> ::core::fmt::Debug for BitMath<M> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple(stringify!(BitMath))
.field(&self.address())
.finish()
f.debug_tuple(stringify!(BitMath)).field(&self.address()).finish()
}
}
impl<M: ::ethers::providers::Middleware> BitMath<M> {
Expand All @@ -267,11 +265,13 @@ pub mod bit_math {
address: T,
client: ::std::sync::Arc<M>,
) -> Self {
Self(::ethers::contract::Contract::new(
address.into(),
BITMATH_ABI.clone(),
client,
))
Self(
::ethers::contract::Contract::new(
address.into(),
BITMATH_ABI.clone(),
client,
),
)
}
/// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it.
/// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction
Expand Down Expand Up @@ -313,7 +313,8 @@ pub mod bit_math {
Ok(deployer)
}
}
impl<M: ::ethers::providers::Middleware> From<::ethers::contract::Contract<M>> for BitMath<M> {
impl<M: ::ethers::providers::Middleware> From<::ethers::contract::Contract<M>>
for BitMath<M> {
fn from(contract: ::ethers::contract::Contract<M>) -> Self {
Self::new(contract.address(), contract.client())
}
Expand Down
Loading

0 comments on commit f8f9022

Please # to comment.