chore: generate selector as hex in docs (#1924)

This commit is contained in:
Matthias Seitz 2022-12-06 07:05:24 +01:00 committed by GitHub
parent 59dd541f2a
commit 556821f077
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -60,10 +60,10 @@ impl Context {
}; };
let doc = format!( let doc = format!(
"Custom Error type `{}` with signature `{}` and selector `{:?}`", "Custom Error type `{}` with signature `{}` and selector `0x{}`",
error.name, error.name,
abi_signature, abi_signature,
error.selector() hex::encode(&error.selector()[..])
); );
let abi_signature_doc = util::expand_doc(&doc); let abi_signature_doc = util::expand_doc(&doc);
let ethers_contract = ethers_contract_crate(); let ethers_contract = ethers_contract_crate();

View File

@ -125,10 +125,10 @@ impl Context {
let function_name = &function.name; let function_name = &function.name;
let abi_signature = function.abi_signature(); let abi_signature = function.abi_signature();
let doc = format!( 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, function.name,
abi_signature, abi_signature,
function.selector() hex::encode(&function.selector()[..])
); );
let abi_signature_doc = util::expand_doc(&doc); let abi_signature_doc = util::expand_doc(&doc);
let ethers_contract = ethers_contract_crate(); let ethers_contract = ethers_contract_crate();
@ -177,10 +177,10 @@ impl Context {
}; };
let abi_signature = function.abi_signature(); let abi_signature = function.abi_signature();
let doc = format!( 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, function.name,
abi_signature, abi_signature,
function.selector() hex::encode(&function.selector()[..])
); );
let abi_signature_doc = util::expand_doc(&doc); let abi_signature_doc = util::expand_doc(&doc);
let ethers_contract = ethers_contract_crate(); let ethers_contract = ethers_contract_crate();