-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: apply small changes after the audit
- Add a few interfaces related to quad operations and metadata registry to suppportInteface - Make UNKNOWN_NEIGHBORHOOD constant private in the land contract so it is not exposed in the abi. - This PR include some minor changes that we are fixing in advance as a result of some comments from the auditors. If needed they will be split in separated PRs before merging this one.
- Loading branch information
Andres Adjimann
committed
Jul 29, 2024
1 parent
c711ced
commit 59bd3de
Showing
5 changed files
with
65 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,36 +2,13 @@ | |
|
||
pragma solidity ^0.8.0; | ||
|
||
import {IQuad} from "./IQuad.sol"; | ||
|
||
/// @title ILandToken | ||
/// @author The Sandbox | ||
/// @custom:security-contact [email protected] | ||
/// @notice Interface of the LAND token including quad methods | ||
interface ILandToken { | ||
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only) | ||
/// @param from current owner of the quad | ||
/// @param to destination | ||
/// @param sizes list of sizes for each quad | ||
/// @param xs list of bottom left x coordinates for each quad | ||
/// @param ys list of bottom left y coordinates for each quad | ||
/// @param data additional data | ||
function batchTransferQuad( | ||
address from, | ||
address to, | ||
uint256[] calldata sizes, | ||
uint256[] calldata xs, | ||
uint256[] calldata ys, | ||
bytes calldata data | ||
) external; | ||
|
||
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only) | ||
/// @param from current owner of the quad | ||
/// @param to destination | ||
/// @param size size of the quad | ||
/// @param x The bottom left x coordinate of the quad | ||
/// @param y The bottom left y coordinate of the quad | ||
/// @param data additional data | ||
function transferQuad(address from, address to, uint256 size, uint256 x, uint256 y, bytes calldata data) external; | ||
|
||
interface ILandToken is IQuad { | ||
/// @notice Mint a new quad (aligned to a quad tree with size 1, 3, 6, 12 or 24 only) | ||
/// @param to The recipient of the new quad | ||
/// @param size The size of the new quad | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
//SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
/// @title IQuad | ||
/// @author The Sandbox | ||
/// @custom:security-contact [email protected] | ||
/// @notice Interface of the LAND token (quad methods) | ||
interface IQuad { | ||
/// @notice transfer multiple quad (aligned to a quad tree with size 3, 6, 12 or 24 only) | ||
/// @param from current owner of the quad | ||
/// @param to destination | ||
/// @param sizes list of sizes for each quad | ||
/// @param xs list of bottom left x coordinates for each quad | ||
/// @param ys list of bottom left y coordinates for each quad | ||
/// @param data additional data | ||
function batchTransferQuad( | ||
address from, | ||
address to, | ||
uint256[] calldata sizes, | ||
uint256[] calldata xs, | ||
uint256[] calldata ys, | ||
bytes calldata data | ||
) external; | ||
|
||
/// @notice transfer one quad (aligned to a quad tree with size 3, 6, 12 or 24 only) | ||
/// @param from current owner of the quad | ||
/// @param to destination | ||
/// @param size size of the quad | ||
/// @param x The bottom left x coordinate of the quad | ||
/// @param y The bottom left y coordinate of the quad | ||
/// @param data additional data | ||
function transferQuad(address from, address to, uint256 size, uint256 x, uint256 y, bytes calldata data) external; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59bd3de
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage for this commit
Coverage Report