From d9cf4bd3a373e38b3da957f7028aa82b862aaaef Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Thu, 23 May 2024 15:44:35 -0700 Subject: [PATCH] PointerView precompile + updated repo links --- .../interoperability/precompiles/_meta.json | 1 + .../interoperability/precompiles/addr.mdx | 2 +- .../interoperability/precompiles/bank.mdx | 2 +- .../interoperability/precompiles/cosmwasm.mdx | 2 +- .../precompiles/distribution.mdx | 2 +- .../precompiles/governance.mdx | 2 +- .../precompiles/pointerview.mdx | 44 +++++++++++++++++++ 7 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 pages/dev-advanced-concepts/interoperability/precompiles/pointerview.mdx diff --git a/pages/dev-advanced-concepts/interoperability/precompiles/_meta.json b/pages/dev-advanced-concepts/interoperability/precompiles/_meta.json index e8567b5..65b8958 100644 --- a/pages/dev-advanced-concepts/interoperability/precompiles/_meta.json +++ b/pages/dev-advanced-concepts/interoperability/precompiles/_meta.json @@ -9,5 +9,6 @@ "json": "JSON", "oracle": "Oracle", "pointer": "Pointer", + "pointerview": "PointerView", "governance": "Governance" } diff --git a/pages/dev-advanced-concepts/interoperability/precompiles/addr.mdx b/pages/dev-advanced-concepts/interoperability/precompiles/addr.mdx index 1cbdd37..6e1d476 100644 --- a/pages/dev-advanced-concepts/interoperability/precompiles/addr.mdx +++ b/pages/dev-advanced-concepts/interoperability/precompiles/addr.mdx @@ -34,5 +34,5 @@ Association takes place when the wallet first signs and broadcasts any transacti View the Addr precompile source code and the contract ABI - [here](https://github.com/sei-protocol/sei-chain/tree/evm/precompiles/addr). + [here](https://github.com/sei-protocol/sei-chain/tree/main/precompiles/addr). diff --git a/pages/dev-advanced-concepts/interoperability/precompiles/bank.mdx b/pages/dev-advanced-concepts/interoperability/precompiles/bank.mdx index fdf0b20..70d5293 100644 --- a/pages/dev-advanced-concepts/interoperability/precompiles/bank.mdx +++ b/pages/dev-advanced-concepts/interoperability/precompiles/bank.mdx @@ -100,5 +100,5 @@ This precompile enables EVM clients to interact with the bank module. View the Bank precompile source code and the contract ABI - [here](https://github.com/sei-protocol/sei-chain/tree/evm/precompiles/bank). + [here](https://github.com/sei-protocol/sei-chain/tree/main/precompiles/bank). diff --git a/pages/dev-advanced-concepts/interoperability/precompiles/cosmwasm.mdx b/pages/dev-advanced-concepts/interoperability/precompiles/cosmwasm.mdx index 9aa9279..9ceb041 100644 --- a/pages/dev-advanced-concepts/interoperability/precompiles/cosmwasm.mdx +++ b/pages/dev-advanced-concepts/interoperability/precompiles/cosmwasm.mdx @@ -80,5 +80,5 @@ This precompile serves as an interface to the CosmWasm module, enabling EVM base View the CosmWasm precompile source code and the contract ABI - [here](https://github.com/sei-protocol/sei-chain/tree/evm/precompiles/wasmd). + [here](https://github.com/sei-protocol/sei-chain/tree/main/precompiles/wasmd). diff --git a/pages/dev-advanced-concepts/interoperability/precompiles/distribution.mdx b/pages/dev-advanced-concepts/interoperability/precompiles/distribution.mdx index 0345313..fc5b199 100644 --- a/pages/dev-advanced-concepts/interoperability/precompiles/distribution.mdx +++ b/pages/dev-advanced-concepts/interoperability/precompiles/distribution.mdx @@ -31,5 +31,5 @@ This precompile enables EVM clients to withdraw distributions and staking reward View the distribution precompile source code and the contract ABI - [here](https://github.com/sei-protocol/sei-chain/tree/evm/precompiles/distribution). + [here](https://github.com/sei-protocol/sei-chain/tree/main/precompiles/distribution). diff --git a/pages/dev-advanced-concepts/interoperability/precompiles/governance.mdx b/pages/dev-advanced-concepts/interoperability/precompiles/governance.mdx index e321bfe..6ba228d 100644 --- a/pages/dev-advanced-concepts/interoperability/precompiles/governance.mdx +++ b/pages/dev-advanced-concepts/interoperability/precompiles/governance.mdx @@ -34,5 +34,5 @@ This precompile enables participation in Sei's governance process through the EV View the Governance precompile source code and the contract ABI - [here](https://github.com/sei-protocol/sei-chain/tree/evm/precompiles/gov). + [here](https://github.com/sei-protocol/sei-chain/tree/main/precompiles/gov). diff --git a/pages/dev-advanced-concepts/interoperability/precompiles/pointerview.mdx b/pages/dev-advanced-concepts/interoperability/precompiles/pointerview.mdx new file mode 100644 index 0000000..c8e5085 --- /dev/null +++ b/pages/dev-advanced-concepts/interoperability/precompiles/pointerview.mdx @@ -0,0 +1,44 @@ +import { Callout } from "nextra/components"; + +# Pointer Precompile + +**Address**: `0x000000000000000000000000000000000000100A` + +This precompile enables EVM clients to query pointers to the CosmWasm contracts. + +## Functions + +### Queries +- `getNativePointer`: Retrieves the pointer address, version, and existence status for the specified native token. + ```solidity + /// Retrieves the pointer address, version, and existence status for the specified native token. + /// @param token The native token to query. + /// @return the address, version, and existence status. + function getNativePointer( + string memory token + ) view external returns (address addr, uint16 version, bool exists); + ``` + +- `getCW20Pointer`: Retrieves the pointer address, version, and existence status for the specified CW20 contract address. + ```solidity + /// Retrieves the pointer address, version, and existence status for the specified CW20 contract address. + /// @param cwAddr The CW20 contract address to query. + /// @return the address, version, and existence status. + function getCW20Pointer( + string memory cwAddr + ) view external returns (address addr, uint16 version, bool exists); + ``` + +- `getCW721Pointer`: Retrieves the pointer address, version, and existence status for the specified CW721 contract address. + ```solidity + /// Retrieves the pointer address, version, and existence status for the specified CW721 contract address. + /// @param cwAddr The CW721 contract address to query. + /// @return the address, version, and existence status. + function getCW721Pointer( + string memory cwAddr + ) view external returns (address addr, uint16 version, bool exists); + ``` + + View the PointerView precompile source code and the contract ABI + [here](https://github.com/sei-protocol/sei-chain/tree/main/precompiles/pointerview). +