diff --git a/ethers-contract/ethers-contract-abigen/src/contract/errors.rs b/ethers-contract/ethers-contract-abigen/src/contract/errors.rs index fa3384d2..e8c3d3fb 100644 --- a/ethers-contract/ethers-contract-abigen/src/contract/errors.rs +++ b/ethers-contract/ethers-contract-abigen/src/contract/errors.rs @@ -60,10 +60,10 @@ impl Context { }; let doc = format!( - "Custom Error type `{}` with signature `{}` and selector `{:?}`", + "Custom Error type `{}` with signature `{}` and selector `0x{}`", error.name, abi_signature, - error.selector() + hex::encode(&error.selector()[..]) ); let abi_signature_doc = util::expand_doc(&doc); let ethers_contract = ethers_contract_crate(); diff --git a/ethers-contract/ethers-contract-abigen/src/contract/methods.rs b/ethers-contract/ethers-contract-abigen/src/contract/methods.rs index 57e16d19..6fc6bb56 100644 --- a/ethers-contract/ethers-contract-abigen/src/contract/methods.rs +++ b/ethers-contract/ethers-contract-abigen/src/contract/methods.rs @@ -125,10 +125,10 @@ impl Context { let function_name = &function.name; let abi_signature = function.abi_signature(); let doc = format!( - "Container type for all input parameters for the `{}` function with signature `{}` and selector `{:?}`", + "Container type for all input parameters for the `{}` function with signature `{}` and selector `0x{}`", function.name, abi_signature, - function.selector() + hex::encode(&function.selector()[..]) ); let abi_signature_doc = util::expand_doc(&doc); let ethers_contract = ethers_contract_crate(); @@ -177,10 +177,10 @@ impl Context { }; let abi_signature = function.abi_signature(); let doc = format!( - "Container type for all return fields from the `{}` function with signature `{}` and selector `{:?}`", + "Container type for all return fields from the `{}` function with signature `{}` and selector `0x{}`", function.name, abi_signature, - function.selector() + hex::encode(&function.selector()[..]) ); let abi_signature_doc = util::expand_doc(&doc); let ethers_contract = ethers_contract_crate();