Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
YaroShkvorets committed Mar 24, 2024
1 parent ff23b1f commit 13d6f4a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 deletions.
32 changes: 16 additions & 16 deletions abigen-tests/abi/grants.rs.golden
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -227,7 +227,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -246,7 +246,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -266,7 +266,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -286,7 +286,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -311,7 +311,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -331,7 +331,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -353,7 +353,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -373,7 +373,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -396,7 +396,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -418,7 +418,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -443,7 +443,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -463,7 +463,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -488,7 +488,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -508,7 +508,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -528,7 +528,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
}
12 changes: 6 additions & 6 deletions abigen-tests/abi/token.rs.golden
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -69,7 +69,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -90,7 +90,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -111,7 +111,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -131,7 +131,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -153,7 +153,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
}
12 changes: 6 additions & 6 deletions abigen-tests/abi/token_wrapped.rs.golden
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -69,7 +69,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -90,7 +90,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -111,7 +111,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -131,7 +131,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
Expand All @@ -153,7 +153,7 @@ pub mod actions {
fn decode(
trace: &substreams_antelope::pb::ActionTrace,
) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
}
4 changes: 2 additions & 2 deletions abigen-tests/tests/abigen_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mod tests {
impl substreams_antelope::Action for Transfer {
const NAME: &'static str = "transfer";
fn decode(trace: &substreams_antelope::pb::ActionTrace) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}

Expand All @@ -35,7 +35,7 @@ mod tests {
impl substreams_antelope::Action for Transfer2 {
const NAME: &'static str = "transfer2";
fn decode(trace: &substreams_antelope::pb::ActionTrace) -> Result<Self, substreams_antelope::Error> {
Ok(decode::<Self>(&trace.action.as_ref().unwrap().json_data)?)
decode::<Self>(&trace.action.as_ref().unwrap().json_data)
}
}
}
Expand Down

0 comments on commit 13d6f4a

Please sign in to comment.