Skip to content
This repository was archived by the owner on Jul 4, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# shellcheck shell=bash
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then
URL=https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc
HASH=sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM=
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pr-assessment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
pull_request:
types:
- closed

jobs:
assess-pr-size-on-merge:
uses: rainlanguage/github-chore/.github/workflows/pr-assessment.yml@main
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/rainix-rs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: rainix-rs
on: [push]
jobs:
static:
uses: rainlanguage/rainix/.github/workflows/rainix-rs-static.yaml@main
test:
uses: rainlanguage/rainix/.github/workflows/rainix-rs-test.yaml@main
wasm:
uses: rainlanguage/rainix/.github/workflows/rainix-rs-wasm.yaml@main
47 changes: 0 additions & 47 deletions .github/workflows/rainix.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"editor.rulers": [80]
}
"editor.rulers": [80]
}
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
## Crate for Safe Typecasting between Ethers and Alloy types

Currently supporting type conversion for:
- `ethers::types::H160` to `alloy_primitives::Address`

- `ethers::types::H160` to `alloy_primitives::Address`
- `alloy_primitives::Address` to `ethers::types::H160`
- `ethers::types::U256` to `alloy_primitives::U256`
- `alloy_primitives::U256` to `ethers::types::U256`
- `ethers::types::Bytes` to `alloy_primitives::Bytes`
- `alloy_primitives::Bytes` to `ethers::types::Bytes`
- `ethers::types::U256` to `alloy_primitives::U256`
- `alloy_primitives::U256` to `ethers::types::U256`
- `ethers::types::Bytes` to `alloy_primitives::Bytes`
- `alloy_primitives::Bytes` to `ethers::types::Bytes`

## Example

```sh
let ethers_address: ethers::types::H160 = ethers::types::H160::random();
let alloy_address: alloy_primitives::Address = ethers_address_to_alloy(ethers_address);
```

```sh
let ethers_u256: ethers::types::U256 = ethers::types::U256::from_dec_str("126731272983");
let alloy_u256: alloy_primitives::U256 = ethers_u256_to_alloy(ethers_u256);
```
```
131 changes: 103 additions & 28 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
description = "Flake for development workflows.";

inputs = {
rainix.url = "github:rainprotocol/rainix";
rainix.url = "github:rainlanguage/rainix";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, flake-utils, rainix }:
outputs =
{ flake-utils, rainix, ... }:
flake-utils.lib.eachDefaultSystem (system: {
packages = rainix.packages.${system};
devShells = rainix.devShells.${system};
Expand Down
Loading