diff --git a/Cargo.lock b/Cargo.lock
index 51f6a415b..8a6b4f46a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6050,6 +6050,7 @@ dependencies = [
"pallet-evm-precompile-simple",
"pallet-evm-precompile-sr25519",
"pallet-evm-precompile-substrate-ecdsa",
+ "pallet-evm-precompile-unified-accounts",
"pallet-evm-precompile-xvm",
"pallet-grandpa",
"pallet-insecure-randomness-collective-flip",
@@ -8063,6 +8064,35 @@ dependencies = [
"sp-std",
]
+[[package]]
+name = "pallet-evm-precompile-unified-accounts"
+version = "0.1.0"
+dependencies = [
+ "astar-primitives",
+ "derive_more",
+ "ethers",
+ "fp-evm",
+ "frame-support",
+ "frame-system",
+ "hex",
+ "hex-literal",
+ "libsecp256k1",
+ "log",
+ "num_enum 0.5.11",
+ "pallet-balances",
+ "pallet-evm",
+ "pallet-timestamp",
+ "pallet-unified-accounts",
+ "parity-scale-codec",
+ "precompile-utils",
+ "scale-info",
+ "serde",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+]
+
[[package]]
name = "pallet-evm-precompile-xcm"
version = "0.11.0"
@@ -13163,6 +13193,7 @@ dependencies = [
"pallet-evm-precompile-simple",
"pallet-evm-precompile-sr25519",
"pallet-evm-precompile-substrate-ecdsa",
+ "pallet-evm-precompile-unified-accounts",
"pallet-evm-precompile-xcm",
"pallet-evm-precompile-xvm",
"pallet-identity",
diff --git a/Cargo.toml b/Cargo.toml
index e451b0309..4bedb6497 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -291,6 +291,7 @@ pallet-evm-precompile-substrate-ecdsa = { path = "./precompiles/substrate-ecdsa"
pallet-evm-precompile-xcm = { path = "./precompiles/xcm", default-features = false }
pallet-evm-precompile-xvm = { path = "./precompiles/xvm", default-features = false }
pallet-evm-precompile-dapps-staking = { path = "./precompiles/dapps-staking", default-features = false }
+pallet-evm-precompile-unified-accounts = { path = "./precompiles/unified-accounts", default-features = false }
pallet-chain-extension-dapps-staking = { path = "./chain-extensions/dapps-staking", default-features = false }
pallet-chain-extension-xvm = { path = "./chain-extensions/xvm", default-features = false }
diff --git a/precompiles/unified-accounts/Cargo.toml b/precompiles/unified-accounts/Cargo.toml
new file mode 100644
index 000000000..30842e065
--- /dev/null
+++ b/precompiles/unified-accounts/Cargo.toml
@@ -0,0 +1,62 @@
+[package]
+name = "pallet-evm-precompile-unified-accounts"
+description = "Evm Precompile for AU"
+version = "0.1.0"
+authors.workspace = true
+edition.workspace = true
+homepage.workspace = true
+repository.workspace = true
+
+[dependencies]
+hex = { workspace = true }
+log = { workspace = true }
+num_enum = { workspace = true }
+precompile-utils = { workspace = true }
+
+# Substrate
+frame-support = { workspace = true }
+frame-system = { workspace = true }
+parity-scale-codec = { workspace = true, features = ["max-encoded-len"] }
+sp-core = { workspace = true }
+sp-io = { workspace = true }
+sp-runtime = { workspace = true }
+sp-std = { workspace = true }
+
+# Frontier
+fp-evm = { workspace = true }
+pallet-evm = { workspace = true }
+pallet-unified-accounts = { workspace = true }
+
+# Astar
+astar-primitives = { workspace = true }
+
+[dev-dependencies]
+derive_more = { workspace = true }
+hex-literal = { workspace = true }
+scale-info = { workspace = true }
+serde = { workspace = true }
+
+precompile-utils = { workspace = true, features = ["testing"] }
+
+ethers = { workspace = true }
+libsecp256k1 = { workspace = true, features = ["hmac", "static-context"] }
+pallet-balances = { workspace = true, features = ["std"] }
+pallet-timestamp = { workspace = true }
+sp-runtime = { workspace = true }
+
+[features]
+default = ["std"]
+std = [
+ "parity-scale-codec/std",
+ "pallet-unified-accounts/std",
+ "fp-evm/std",
+ "frame-support/std",
+ "frame-system/std",
+ "pallet-evm/std",
+ "precompile-utils/std",
+ "sp-core/std",
+ "sp-std/std",
+ "sp-io/std",
+ "sp-runtime/std",
+ "astar-primitives/std",
+]
diff --git a/precompiles/unified-accounts/UnifiedAccounts.sol b/precompiles/unified-accounts/UnifiedAccounts.sol
new file mode 100644
index 000000000..9569af44e
--- /dev/null
+++ b/precompiles/unified-accounts/UnifiedAccounts.sol
@@ -0,0 +1,28 @@
+pragma solidity ^0.8.0;
+
+/**
+ * @title UA interface.
+ */
+
+/// Interface to the precompiled contract
+/// Predeployed at the address 0x0000000000000000000000000000000000005006
+/// For better understanding check the source code:
+/// repo: https://github.com/AstarNetwork/astar
+/// code: pallets/unified-accounts/src/lib.rs
+interface UnifiedAccounts {
+ /// Gets the evm address associated with given account id. If no mapping exists,
+ /// then return the default account id.
+ /// @param accountId: The account id for which you want the evm address for.
+ /// @return (mapped_address, true) if there is a mapping found otherwise (default_address, false)
+ function get_evm_address_or_default(
+ bytes32 accountId
+ ) external view returns (address, bool);
+
+ /// Gets the account id associated with given evm address. If no mapping exists,
+ /// then return the default evm address.
+ /// @param evmAddress: The evm address for which you want the account id for.
+ /// @return (mapped_account, true) if there is a mapping found otherwise (default_account, false)
+ function get_native_address_or_default(
+ address evmAddress
+ ) external view returns (bytes32, bool);
+}
diff --git a/precompiles/unified-accounts/src/lib.rs b/precompiles/unified-accounts/src/lib.rs
new file mode 100644
index 000000000..d1dbf3dbf
--- /dev/null
+++ b/precompiles/unified-accounts/src/lib.rs
@@ -0,0 +1,106 @@
+// This file is part of Astar.
+
+// Copyright (C) 2019-2023 Stake Technologies Pte.Ltd.
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+// Astar is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Astar is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Astar. If not, see .
+
+#![cfg_attr(not(feature = "std"), no_std)]
+
+use astar_primitives::evm::{UnifiedAddress, UnifiedAddressMapper};
+use core::marker::PhantomData;
+use fp_evm::Precompile;
+use fp_evm::{PrecompileHandle, PrecompileOutput};
+use frame_support::dispatch::Dispatchable;
+use frame_support::traits::IsType;
+use precompile_utils::{
+ succeed, Address, EvmDataWriter, EvmResult, FunctionModifier, PrecompileHandleExt,
+};
+use sp_core::{crypto::AccountId32, H256};
+use sp_std::prelude::*;
+
+#[cfg(test)]
+mod mock;
+#[cfg(test)]
+mod tests;
+
+#[precompile_utils::generate_function_selector]
+#[derive(Debug, PartialEq)]
+pub enum Action {
+ GetEvmAddressOrDefault = "get_evm_address_or_default(bytes32)",
+ GetNativeAddressOrDefault = "get_native_address_or_default(address)",
+}
+
+/// A precompile that expose AU related functions.
+pub struct UnifiedAccountsPrecompile(PhantomData<(T, UA)>);
+
+impl Precompile for UnifiedAccountsPrecompile
+where
+ R: pallet_evm::Config + pallet_unified_accounts::Config,
+ <::RuntimeCall as Dispatchable>::RuntimeOrigin:
+ From