Skip to content

Commit

Permalink
chore: bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
rymnc committed Aug 1, 2024
1 parent dd53644 commit 709d1b0
Show file tree
Hide file tree
Showing 15 changed files with 608 additions and 1,261 deletions.
2 changes: 0 additions & 2 deletions crates/bindings/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub mod Context {
///0x
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"",
);
Expand All @@ -29,7 +28,6 @@ pub mod Context {
///0x
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"",
);
Expand Down
10 changes: 4 additions & 6 deletions crates/bindings/src/deploy.rs

Large diffs are not rendered by default.

20 changes: 0 additions & 20 deletions crates/bindings/src/deploymentconfig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ pub mod DeploymentConfig {
///0x6080604052600c805462ff00ff19166201000117905534801561002157600080fd5b50604051610223380380610223833981016040819052610040916100f0565b6001600160a01b0381166100675760405163201616d160e21b815260040160405180910390fd5b600e80546001600160a01b0319166001600160a01b03831617905546617a69036100cb57604080516020808201835260009091528151908101909152600e546001600160a01b031690819052600d80546001600160a01b03191690911790556100ea565b604051630b13dbff60e01b815246600482015260240160405180910390fd5b50610120565b60006020828403121561010257600080fd5b81516001600160a01b038116811461011957600080fd5b9392505050565b60f58061012e6000396000f3fe6080604052348015600f57600080fd5b506004361060465760003560e01c806312900da814604b578063d7b6574514608f578063f8a8fd6d1460d2578063f8ccbf471460d4575b600080fd5b6040805160208082018352600090915281518082018352600e5473ffffffffffffffffffffffffffffffffffffffff16908190529151918252015b60405180910390f35b600d5460ae9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016086565b005b600c5460e69062010000900460ff1681565b6040519015158152602001608656
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"`\x80`@R`\x0C\x80Tb\xFF\0\xFF\x19\x16b\x01\0\x01\x17\x90U4\x80\x15a\0!W`\0\x80\xFD[P`@Qa\x02#8\x03\x80a\x02#\x839\x81\x01`@\x81\x90Ra\0@\x91a\0\xF0V[`\x01`\x01`\xA0\x1B\x03\x81\x16a\0gW`@Qc \x16\x16\xD1`\xE2\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[`\x0E\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x83\x16\x17\x90UFazi\x03a\0\xCBW`@\x80Q` \x80\x82\x01\x83R`\0\x90\x91R\x81Q\x90\x81\x01\x90\x91R`\x0ET`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x90R`\r\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16\x90\x91\x17\x90Ua\0\xEAV[`@Qc\x0B\x13\xDB\xFF`\xE0\x1B\x81RF`\x04\x82\x01R`$\x01`@Q\x80\x91\x03\x90\xFD[Pa\x01 V[`\0` \x82\x84\x03\x12\x15a\x01\x02W`\0\x80\xFD[\x81Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x01\x19W`\0\x80\xFD[\x93\x92PPPV[`\xF5\x80a\x01.`\09`\0\xF3\xFE`\x80`@R4\x80\x15`\x0FW`\0\x80\xFD[P`\x046\x10`FW`\x005`\xE0\x1C\x80c\x12\x90\r\xA8\x14`KW\x80c\xD7\xB6WE\x14`\x8FW\x80c\xF8\xA8\xFDm\x14`\xD2W\x80c\xF8\xCC\xBFG\x14`\xD4W[`\0\x80\xFD[`@\x80Q` \x80\x82\x01\x83R`\0\x90\x91R\x81Q\x80\x82\x01\x83R`\x0ETs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90\x81\x90R\x91Q\x91\x82R\x01[`@Q\x80\x91\x03\x90\xF3[`\rT`\xAE\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`\x86V[\0[`\x0CT`\xE6\x90b\x01\0\0\x90\x04`\xFF\x16\x81V[`@Q\x90\x15\x15\x81R` \x01`\x86V",
);
Expand All @@ -124,7 +123,6 @@ pub mod DeploymentConfig {
///0x6080604052348015600f57600080fd5b506004361060465760003560e01c806312900da814604b578063d7b6574514608f578063f8a8fd6d1460d2578063f8ccbf471460d4575b600080fd5b6040805160208082018352600090915281518082018352600e5473ffffffffffffffffffffffffffffffffffffffff16908190529151918252015b60405180910390f35b600d5460ae9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016086565b005b600c5460e69062010000900460ff1681565b6040519015158152602001608656
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"`\x80`@R4\x80\x15`\x0FW`\0\x80\xFD[P`\x046\x10`FW`\x005`\xE0\x1C\x80c\x12\x90\r\xA8\x14`KW\x80c\xD7\xB6WE\x14`\x8FW\x80c\xF8\xA8\xFDm\x14`\xD2W\x80c\xF8\xCC\xBFG\x14`\xD4W[`\0\x80\xFD[`@\x80Q` \x80\x82\x01\x83R`\0\x90\x91R\x81Q\x80\x82\x01\x83R`\x0ETs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90\x81\x90R\x91Q\x91\x82R\x01[`@Q\x80\x91\x03\x90\xF3[`\rT`\xAE\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`\x86V[\0[`\x0CT`\xE6\x90b\x01\0\0\x90\x04`\xFF\x16\x81V[`@Q\x90\x15\x15\x81R` \x01`\x86V",
);
Expand Down Expand Up @@ -184,9 +182,6 @@ struct NetworkConfig { address deployer; }
}
#[inline]
fn stv_abi_encoded_size(&self) -> usize {
if let Some(size) = <Self as alloy_sol_types::SolType>::ENCODED_SIZE {
return size;
}
let tuple = <UnderlyingRustTuple<
'_,
> as ::core::convert::From<Self>>::from(self.clone());
Expand All @@ -210,18 +205,6 @@ struct NetworkConfig { address deployer; }
'_,
> as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out)
}
#[inline]
fn stv_abi_packed_encoded_size(&self) -> usize {
if let Some(size) = <Self as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE {
return size;
}
let tuple = <UnderlyingRustTuple<
'_,
> as ::core::convert::From<Self>>::from(self.clone());
<UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple)
}
}
#[automatically_derived]
impl alloy_sol_types::SolType for NetworkConfig {
Expand All @@ -233,9 +216,6 @@ struct NetworkConfig { address deployer; }
const ENCODED_SIZE: Option<usize> = <UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::ENCODED_SIZE;
const PACKED_ENCODED_SIZE: Option<usize> = <UnderlyingSolTuple<
'_,
> as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE;
#[inline]
fn valid_token(token: &Self::Token<'_>) -> bool {
<UnderlyingSolTuple<'_> as alloy_sol_types::SolType>::valid_token(token)
Expand Down
2 changes: 0 additions & 2 deletions crates/bindings/src/foo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ pub mod Foo {
///0x6080604052348015600f57600080fd5b5060658061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80637d3c40c814602d575b600080fd5b603b6038366004604d565b90565b60405190815260200160405180910390f35b600060208284031215605e57600080fd5b503591905056
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"`\x80`@R4\x80\x15`\x0FW`\0\x80\xFD[P`e\x80a\0\x1E`\09`\0\xF3\xFE`\x80`@R4\x80\x15`\x0FW`\0\x80\xFD[P`\x046\x10`(W`\x005`\xE0\x1C\x80c}<@\xC8\x14`-W[`\0\x80\xFD[`;`86`\x04`MV[\x90V[`@Q\x90\x81R` \x01`@Q\x80\x91\x03\x90\xF3[`\0` \x82\x84\x03\x12\x15`^W`\0\x80\xFD[P5\x91\x90PV",
);
Expand All @@ -51,7 +50,6 @@ pub mod Foo {
///0x6080604052348015600f57600080fd5b506004361060285760003560e01c80637d3c40c814602d575b600080fd5b603b6038366004604d565b90565b60405190815260200160405180910390f35b600060208284031215605e57600080fd5b503591905056
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"`\x80`@R4\x80\x15`\x0FW`\0\x80\xFD[P`\x046\x10`(W`\x005`\xE0\x1C\x80c}<@\xC8\x14`-W[`\0\x80\xFD[`;`86`\x04`MV[\x90V[`@Q\x90\x81R` \x01`@Q\x80\x91\x03\x90\xF3[`\0` \x82\x84\x03\x12\x15`^W`\0\x80\xFD[P5\x91\x90PV",
);
Expand Down
2 changes: 0 additions & 2 deletions crates/bindings/src/ierc165.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ pub mod IERC165 {
///0x
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"",
);
Expand All @@ -51,7 +50,6 @@ pub mod IERC165 {
///0x
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"",
);
Expand Down
59 changes: 12 additions & 47 deletions crates/bindings/src/ierc20.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ pub mod IERC20 {
///0x
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"",
);
Expand All @@ -265,7 +264,6 @@ pub mod IERC20 {
///0x
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"",
);
Expand Down Expand Up @@ -377,20 +375,15 @@ event Approval(address indexed owner, address indexed spender, uint256 value);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for Approval {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
From::from(self)
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
From::from(&self)
}
}
#[automatically_derived]
impl From<&Approval> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &Approval) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
let topics = alloy_sol_types::SolEvent::encode_topics(this)
.into_iter()
.map(|t| t.into())
.collect();
let data = alloy_sol_types::SolEvent::encode_data(this).into();
alloy_sol_types::private::LogData::new_unchecked(topics, data)
}
}
};
Expand Down Expand Up @@ -502,20 +495,15 @@ event Transfer(address indexed from, address indexed to, uint256 value);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for Transfer {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
From::from(self)
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
From::from(&self)
}
}
#[automatically_derived]
impl From<&Transfer> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &Transfer) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
let topics = alloy_sol_types::SolEvent::encode_topics(this)
.into_iter()
.map(|t| t.into())
.collect();
let data = alloy_sol_types::SolEvent::encode_data(this).into();
alloy_sol_types::private::LogData::new_unchecked(topics, data)
}
}
};
Expand Down Expand Up @@ -2055,29 +2043,6 @@ function transferFrom(address from, address to, uint256 amount) external returns
}
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for IERC20Events {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
match self {
Self::Approval(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
Self::Transfer(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
}
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
match self {
Self::Approval(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
Self::Transfer(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
}
}
}
use alloy::contract as alloy_contract;
/**Creates a new wrapper around an on-chain [`IERC20`](self) contract instance.
Expand Down
82 changes: 18 additions & 64 deletions crates/bindings/src/ierc721.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ pub mod IERC721 {
///0x
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"",
);
Expand All @@ -330,7 +329,6 @@ pub mod IERC721 {
///0x
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"",
);
Expand Down Expand Up @@ -447,20 +445,15 @@ event Approval(address indexed _owner, address indexed _approved, uint256 indexe
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for Approval {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
From::from(self)
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
From::from(&self)
}
}
#[automatically_derived]
impl From<&Approval> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &Approval) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
let topics = alloy_sol_types::SolEvent::encode_topics(this)
.into_iter()
.map(|t| t.into())
.collect();
let data = alloy_sol_types::SolEvent::encode_data(this).into();
alloy_sol_types::private::LogData::new_unchecked(topics, data)
}
}
};
Expand Down Expand Up @@ -576,20 +569,15 @@ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _ap
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for ApprovalForAll {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
From::from(self)
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
From::from(&self)
}
}
#[automatically_derived]
impl From<&ApprovalForAll> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &ApprovalForAll) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
let topics = alloy_sol_types::SolEvent::encode_topics(this)
.into_iter()
.map(|t| t.into())
.collect();
let data = alloy_sol_types::SolEvent::encode_data(this).into();
alloy_sol_types::private::LogData::new_unchecked(topics, data)
}
}
};
Expand Down Expand Up @@ -706,20 +694,15 @@ event Transfer(address indexed _from, address indexed _to, uint256 indexed _toke
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for Transfer {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
From::from(self)
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
From::from(&self)
}
}
#[automatically_derived]
impl From<&Transfer> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &Transfer) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
let topics = alloy_sol_types::SolEvent::encode_topics(this)
.into_iter()
.map(|t| t.into())
.collect();
let data = alloy_sol_types::SolEvent::encode_data(this).into();
alloy_sol_types::private::LogData::new_unchecked(topics, data)
}
}
};
Expand Down Expand Up @@ -2554,35 +2537,6 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay
}
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for IERC721Events {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
match self {
Self::Approval(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
Self::ApprovalForAll(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
Self::Transfer(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
}
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
match self {
Self::Approval(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
Self::ApprovalForAll(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
Self::Transfer(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
}
}
}
use alloy::contract as alloy_contract;
/**Creates a new wrapper around an on-chain [`IERC721`](self) contract instance.
Expand Down
Loading

0 comments on commit 709d1b0

Please sign in to comment.