Skip to content
/ gera Public

A lightweight library designed to generate precise salt values with the correct bits prefix for V4 hooks. Simplify your hook development with targeted, easy-to-integrate salt generation.

Notifications You must be signed in to change notification settings

schroyar/gera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Uniswap V4 Hooks Salt Generator (gera)

license

Basic usage

let deployer_address: [u8; 20] = hex::decode("d8dA6BF26964aF9D7eEd9e03E53415D37aA96045").unwrap().try_into().unwrap();
let contract_bytecode = b"your_contract_bytecode_here";
let wanted_prefix = 0xF; // Desired prefix for the address

match get_salt(wanted_prefix, deployer_address, contract_bytecode) {
    Ok(salt) => println!("Generated Salt: {:?}", salt),
    Err(e) => eprintln!("Error generating salt: {}", e),
}

About

A lightweight library designed to generate precise salt values with the correct bits prefix for V4 hooks. Simplify your hook development with targeted, easy-to-integrate salt generation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages