diff --git a/README.md b/README.md index d040697b..8cdb2871 100644 --- a/README.md +++ b/README.md @@ -74,3 +74,4 @@ cargo run -- account-balance --interval 2.0 -c polygon -a 0x75be52afd54a13b6c984 http://deposit.dev.golem.network:15555/erc20/api/attestation/sepolia/0xeb9b088871155d0ae32f382de5a42d0a64e946f512b722698f4ae6b32164f92d http://deposit.dev.golem.network:15555/erc20/api/attestation/sepolia/0xc8b0ceee393cdcf313945d20b3bd45a01b0ccf2484309b669da2d4da9266b4d5 +http://deposit.dev.golem.network:15555/erc20/api/attestation/base/0xc0f18976a498f7287562492cca4a145108e83e3606e020f10653afd3511656ef diff --git a/crates/erc20_payment_lib/src/server/web.rs b/crates/erc20_payment_lib/src/server/web.rs index b441a89b..79be6c1b 100644 --- a/crates/erc20_payment_lib/src/server/web.rs +++ b/crates/erc20_payment_lib/src/server/web.rs @@ -1383,7 +1383,22 @@ pub async fn check_attestation( decoded_items.push(AttestationItemInfo { name: token_name.to_string(), typ: token_type.to_string(), - value: token.to_string(), + value: match token { + ethabi::Token::Address(addr) => format!("{:#x}", addr), + ethabi::Token::FixedBytes(bytes) => hex::encode(bytes), + ethabi::Token::Int(int) => format!("{:#x}", int), + ethabi::Token::Uint(uint) => format!("{:#x}", uint), + ethabi::Token::Bool(b) => { + if *b { + "true".to_string() + } else { + "false".to_string() + } + } + ethabi::Token::String(s) => s.to_string(), + ethabi::Token::Bytes(bytes) => hex::encode(bytes), + _ => token.to_string(), + }, }); }