Created
January 20, 2022 18:49
-
-
Save evaporei/05a6fc20af6ca267d932cffaf4e0bd98 to your computer and use it in GitHub Desktop.
ArtBlocks Error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Cargo.toml dependencies: | |
// hex = "0.4.3" | |
// ethabi = "16.0.0" | |
use ethabi::*; | |
use ethabi::ParamType::*; | |
use ethabi::StateMutability::*; | |
fn main() { | |
let hex_decode_bytes = hex::decode("ab834bab0000000000000000000000007be8076f4ea4a4ad08075c2508e481d6c946d12b000000000000000000000000f700b3d7b525f70092fc74128f8d578a683f25e90000000000000000000000008f0964189b28cd164ba1080a53962a26adafa51d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d4c3c23349348fa67f6d044f1357c54d8e6a661b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007be8076f4ea4a4ad08075c2508e481d6c946d12b0000000000000000000000008f0964189b28cd164ba1080a53962a26adafa51d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000005b3256965e7c3cf26e11fcaf296dfc8807c01073000000000000000000000000d4c3c23349348fa67f6d044f1357c54d8e6a661b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008e1bc9bf04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061e9844e0000000000000000000000000000000000000000000000000000000000000000dcae38d74061df89ea2ea74cb9dde60c668434e07bf7807470b44c2404c4324900000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008e1bc9bf04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061e639ad0000000000000000000000000000000000000000000000000000000061ea2e83bf8f6c924869e67ab3fa63401173f12706640cb32f9dde705fe82f9734f0e4fd0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006a0000000000000000000000000000000000000000000000000000000000000074000000000000000000000000000000000000000000000000000000000000007e0000000000000000000000000000000000000000000000000000000000000088000000000000000000000000000000000000000000000000000000000000009200000000000000000000000000000000000000000000000000000000000000940000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000001ce355fbc07931342c516655c51dd6d2632cc5ff92dd586bee0e9be17d030e260e7aa6e9f7837e6330ad097fcbd8b1dbc6fda1782dda2129ce6386e8bcaf921c96e355fbc07931342c516655c51dd6d2632cc5ff92dd586bee0e9be17d030e260e7aa6e9f7837e6330ad097fcbd8b1dbc6fda1782dda2129ce6386e8bcaf921c960000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006423b872dd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f700b3d7b525f70092fc74128f8d578a683f25e9000000000000000000000000000000000000000000000000000000000000227e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006423b872dd0000000000000000000000008f0964189b28cd164ba1080a53962a26adafa51d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000227e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006400000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000").unwrap(); | |
let function_abi = Function { name: "atomicMatch_".to_string(), inputs: vec![Param { name: "addrs".to_string(), kind: FixedArray(Box::new(Address), 14), internal_type: None }, Param { name: "uints".to_string(), kind: FixedArray(Box::new(Uint(256)), 18), internal_type: None }, Param { name: "feeMethodsSidesKindsHowToCalls".to_string(), kind: FixedArray(Box::new(Uint(8)), 8), internal_type: None }, Param { name: "calldataBuy".to_string(), kind: Bytes, internal_type: None }, Param { name: "calldataSell".to_string(), kind: Bytes, internal_type: None }, Param { name: "replacementPatternBuy".to_string(), kind: Bytes, internal_type: None }, Param { name: "replacementPatternSell".to_string(), kind: Bytes, internal_type: None }, Param { name: "staticExtradataBuy".to_string(), kind: Bytes, internal_type: None }, Param { name: "staticExtradataSell".to_string(), kind: Bytes, internal_type: None }, Param { name: "vs".to_string(), kind: FixedArray(Box::new(Uint(8)), 2), internal_type: None }, Param { name: "rssMetadata".to_string(), kind: FixedArray(Box::new(FixedBytes(32)), 5), internal_type: None }], outputs: vec![], constant: false, state_mutability: Payable }; | |
println!("hex_decode_bytes[4..] {:?}", function_abi.decode_input(&hex_decode_bytes[4..]));// Err(InvalidData) | |
} |
Author
evaporei
commented
Jan 20, 2022
atomicMatch_(address[14],uint256[18],uint8[8],bytes,bytes,bytes,bytes,bytes,bytes,uint8[2],bytes32[5])
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment