# GSR Smart Contract ABI

```solidity
/** Place a piece according to a publisher. */
function place(
    EncodedAssetId calldata encodedAssetId,
    Geohash calldata geohash,
    TimeRange calldata timeRange
)

/** Place a piece according to a publisher, and set the scene URI, in one transaction. */
function placeWithScene(
    EncodedAssetId calldata encodedAssetId,
    Geohash calldata geohash,
    TimeRange calldata timeRange,
    string calldata sceneUri
)

/** Place an asset inside another asset, making it available for use in scenes. */
function placeInside(
    EncodedAssetId calldata encodedAssetId,
    bytes32 parentAssetId,
    TimeRange calldata timeRange
)

/** Remove an asset from the GSR */
function remove(EncodedAssetId calldata encodedAssetId)
    /// Just update a sceneUri without changing the placement.
    function updateSceneUri(
    EncodedAssetId calldata encodedAssetId,
    string memory sceneUri
)

/** Get the current location of an asset. */
function placeOf(bytes32 assetId, address publisher)
    external
    view
    returns (uint64 geohash, uint8 bitPrecision)
    
/** Get the Scene URI metadata of a published asset. */
function sceneURI(bytes32 assetId, address publisher)
    external
    view
    returns (string memory)
    
/// Check if an asset is within a bounding box using a geohash prefix.
function isWithin(
    Geohash calldata boundingGeohash,
    bytes32 assetId,
    address publisher
) external view returns (bool)

/// Check if an asset is currently placed within another asset.against
function isInsideAsset(
    bytes32 assetId,
    bytes32 parentAssetId,
    address publisher
) external view returns (bool)

/// The GsrPlacement event for off-chain querying
event GsrPlacement(
    // Indexed fields
    bytes32 indexed assetId,
    bytes32 indexed parentAssetId,
    bytes32 indexed collectionIdHash,
    // AssetId Details
    EncodedAssetId fullAssetId,
    // Placement data
    address publisher,
    bool published,
    Geohash geohash,
    string sceneUri,
    uint256 placedAt,
    TimeRange timeRange
);
```

&#x20; The full specification for the external functions to place and query assets in the GSR:]

```
/** Place a piece according to a publisher. */
function place(
EncodedAssetId calldata encodedAssetId,
Geohash calldata geohash,
TimeRange calldata timeRange
)
/** Place a piece according to a publisher, and set the scene URI, in one transaction. */
function placeWithScene(
EncodedAssetId calldata encodedAssetId,
Geohash calldata geohash,
TimeRange calldata timeRange,
string calldata sceneUri
)
/** Place an asset inside another asset, making it available for use in scenes. */
function placeInside(
EncodedAssetId calldata encodedAssetId,
bytes32 parentAssetId,
TimeRange calldata timeRange
)
/** Remove an asset from the GSR */
function remove(EncodedAssetId calldata encodedAssetId)
/// Just update a sceneUri without changing the placement.
function updateSceneUri(
EncodedAssetId calldata encodedAssetId,
string memory sceneUri
)
/** Get the current location of an asset. */
function placeOf(bytes32 assetId, address publisher)
external
view
returns (uint64 geohash, uint8 bitPrecision)
/** Get the Scene URI metadata of a published asset. */
function sceneURI(bytes32 assetId, address publisher)
external
view
returns (string memory)
/// Check if an asset is within a bounding box using a geohash prefix.
function isWithin(
Geohash calldata boundingGeohash,
bytes32 assetId,
address publisher
) external view returns (bool)
/// Check if an asset is currently placed within another asset.against
function isInsideAsset(
bytes32 assetId,
bytes32 parentAssetId,
address publisher
) external view returns (bool)
The GsrPlacement event for off-chain querying
event GsrPlacement(
// Indexed fields
bytes32 indexed assetId,
bytes32 indexed parentAssetId,
bytes32 indexed collectionIdHash,
// AssetId Details
EncodedAssetId fullAssetId,
// Placement data
address publisher,
bool published,
Geohash geohash,
string sceneUri,
uint256 placedAt,
TimeRange timeRange
);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://illust.gitbook.io/illust/papers-research-and-thought-leadership/geospatial-registry-litepaper/gsr-smart-contract-abi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
