Search…
⌃K
Links

GSR Smart Contract ABI

Updated 2022-09-12
/** 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
);
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
);