An open API service indexing awesome lists of open source software.

https://github.com/whoislewys/predict-deterministic-address

Minimal JavaScript ports of CREATE2 and CREATE3 logic for address prediction.
https://github.com/whoislewys/predict-deterministic-address

create2 create3 ethereum

Last synced: 2 months ago
JSON representation

Minimal JavaScript ports of CREATE2 and CREATE3 logic for address prediction.

Awesome Lists containing this project

README

          

## Predict Deterministic Address
Minimal JavaScript implementation of Create2 and Create3 functions to predict addresses deterministically.

## Development

```
npm i
npm run test
```

## Usage
Installation:
```bash
npm i viem predict-deterministic-address
```

Usage:
```
import { predictDeterministicAddress } from '@whoislewys/predict-deterministic-address';
import { zeroAddress } from 'viem';

// Mock values for implementation, salt, and deployer
const implementation = zeroAddress;
const salt = 69n;
const deployer = zeroAddress;

const predictedAddress = predictDeterministicAddress(implementation, salt, deployer);
```