From fd34357eb3af7795056347ae4408578ec7760225 Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Thu, 23 May 2024 15:22:06 -0700 Subject: [PATCH] Pointers precompile added --- .../interoperability/precompiles/_meta.json | 1 + .../interoperability/precompiles/pointer.mdx | 44 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 pages/dev-advanced-concepts/interoperability/precompiles/pointer.mdx diff --git a/pages/dev-advanced-concepts/interoperability/precompiles/_meta.json b/pages/dev-advanced-concepts/interoperability/precompiles/_meta.json index 14bf434..e8567b5 100644 --- a/pages/dev-advanced-concepts/interoperability/precompiles/_meta.json +++ b/pages/dev-advanced-concepts/interoperability/precompiles/_meta.json @@ -8,5 +8,6 @@ "ibc": "IBC", "json": "JSON", "oracle": "Oracle", + "pointer": "Pointer", "governance": "Governance" } diff --git a/pages/dev-advanced-concepts/interoperability/precompiles/pointer.mdx b/pages/dev-advanced-concepts/interoperability/precompiles/pointer.mdx new file mode 100644 index 0000000..fe6c2fe --- /dev/null +++ b/pages/dev-advanced-concepts/interoperability/precompiles/pointer.mdx @@ -0,0 +1,44 @@ +import { Callout } from "nextra/components"; + +# Pointer Precompile + +**Address**: `0x000000000000000000000000000000000000100b` + +This precompile enables EVM clients to add pointers to the CosmWasm contracts. + +## Functions + +### Transactions +- `addNativePointer`: Adds a native pointer for the contract. + ```solidity + /// Adds a native pointer for the contract. + /// @param token The native token to add. + /// @return An Ethereum address of the pointer. + function addNativePointer( + string memory token + ) external returns (address ret); + ``` + +- `addCW20Pointer`: Adds a CW20 pointer for the contract. + ```solidity + /// Adds a CW20 pointer for the contract. + /// @param cwAddr The CW20 contract address to add. + /// @return An Ethereum address of the pointer. + function addCW20Pointer( + string memory cwAddr + ) external returns (address ret); + ``` + +- `addCW20Pointer`: Adds a CW721 pointer for the contract. + ```solidity + /// Adds a CW721 pointer for the contract. + /// @param cwAddr The CW721 contract address to add. + /// @return An Ethereum address of the pointer. + function addCW721Pointer( + string memory cwAddr + ) external returns (address ret); + ``` + + View the Pointer precompile source code and the contract ABI + [here](https://github.com/sei-protocol/sei-chain/tree/main/precompiles/pointer). +