Skip to content

Commit

Permalink
Pointers precompile added
Browse files Browse the repository at this point in the history
  • Loading branch information
dssei committed May 23, 2024
1 parent 65706b5 commit fd34357
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"ibc": "IBC",
"json": "JSON",
"oracle": "Oracle",
"pointer": "Pointer",
"governance": "Governance"
}
Original file line number Diff line number Diff line change
@@ -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);
```
<Callout type="info">
View the Pointer precompile source code and the contract ABI
[here](https://github.com/sei-protocol/sei-chain/tree/main/precompiles/pointer).
</Callout>

0 comments on commit fd34357

Please sign in to comment.