Skip to content

Commit

Permalink
Remove deprecated methods from interface
Browse files Browse the repository at this point in the history
  • Loading branch information
joewagner committed Mar 29, 2023
1 parent f9d80b2 commit 0473a22
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 28 deletions.
6 changes: 3 additions & 3 deletions contracts/TablelandTables.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ contract TablelandTables is
}

/**
* @custom:deprecated See {ITablelandTables-createTable}.
* @custom:deprecated
* This function is deprecated, please use `create`.
*/
function createTable(
address owner,
string calldata statement
) external payable override whenNotPaused returns (uint256) {
) external payable whenNotPaused returns (uint256) {
return _create(owner, statement);
}

Expand Down Expand Up @@ -96,7 +96,7 @@ contract TablelandTables is
address caller,
uint256 tableId,
string calldata statement
) external payable override whenNotPaused nonReentrant {
) external payable whenNotPaused nonReentrant {
_mutate(caller, tableId, statement);
}

Expand Down
17 changes: 0 additions & 17 deletions contracts/interfaces/ITablelandTables.sol
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,6 @@ interface ITablelandTables {
string[] calldata statements
) external payable returns (uint256[] memory);

/**
* @custom:deprecated This is a temporary alias for `create`, do not use this.
*/
function createTable(
address owner,
string calldata statement
) external payable returns (uint256);

/**
* @dev Runs a mutating SQL statement for `caller` using `statement`.
*
Expand Down Expand Up @@ -159,15 +151,6 @@ interface ITablelandTables {
ITablelandTables.Statement[] calldata statements
) external payable;

/**
* @custom:deprecated This is a temporary alias for `mutate`, do not use this.
*/
function runSQL(
address caller,
uint256 tableId,
string calldata statement
) external payable;

/**
* @dev Sets the controller for a table. Controller can be an EOA or contract address.
*
Expand Down
2 changes: 1 addition & 1 deletion contracts/test/TestCreateFromContract.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ contract TestCreateFromContract is ERC721, Ownable {
require(tables[name] == 0, "name already exists");

// Make sure we can get table_id from the created table
uint256 tableId = _tableland.createTable(
uint256 tableId = _tableland.create(
msg.sender,
string(
abi.encodePacked(
Expand Down
6 changes: 3 additions & 3 deletions contracts/test/TestReentrancyRunSQLLegacy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import {ITablelandTables} from "../interfaces/ITablelandTables.sol";
import {TablelandTables} from "../TablelandTables.sol";
import {TablelandController} from "../TablelandController.sol";
import {Policies} from "../policies/Policies.sol";
import {TablelandPolicy} from "../TablelandPolicy.sol";
import "../policies/ERC721EnumerablePolicies.sol";
import "../policies/ERC721AQueryablePolicies.sol";

contract TestReentrancyRunSQLLegacy is TablelandController, ERC721, Ownable {
ITablelandTables private _tableland;
TablelandTables private _tableland;

constructor(address registry) ERC721("TestCreateFromContract", "MTK") {
_tableland = ITablelandTables(registry);
_tableland = TablelandTables(registry);
}

function getPolicy(
Expand Down
4 changes: 2 additions & 2 deletions contracts/test/TestTablelandTablesNoConstructor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ contract TestTablelandTablesNoConstructor is
function createTable(
address owner,
string calldata statement
) external payable override whenNotPaused returns (uint256) {
) external payable whenNotPaused returns (uint256) {
return _create(owner, statement);
}

Expand Down Expand Up @@ -75,7 +75,7 @@ contract TestTablelandTablesNoConstructor is
address caller,
uint256 tableId,
string calldata statement
) external payable override whenNotPaused nonReentrant {
) external payable whenNotPaused nonReentrant {
_mutate(caller, tableId, statement);
}

Expand Down
4 changes: 2 additions & 2 deletions contracts/test/TestTablelandTablesUpgrade.sol
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ contract TestTablelandTablesUpgrade is
function createTable(
address owner,
string calldata statement
) external payable override whenNotPaused returns (uint256) {
) external payable whenNotPaused returns (uint256) {
return _create(owner, statement);
}

Expand Down Expand Up @@ -82,7 +82,7 @@ contract TestTablelandTablesUpgrade is
address caller,
uint256 tableId,
string calldata statement
) external payable override whenNotPaused nonReentrant {
) external payable whenNotPaused nonReentrant {
_mutate(caller, tableId, statement);
}

Expand Down

0 comments on commit 0473a22

Please sign in to comment.