Skip to content

Commit

Permalink
fix(OwnedMulticaller): remove multi mint fn
Browse files Browse the repository at this point in the history
  • Loading branch information
TuDo1403 committed Jul 11, 2024
1 parent 467f438 commit 9d8ad83
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/utils/OwnedMulticaller.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,18 @@ contract OwnedMulticaller is Ownable {
using ErrorHandler for bool;

constructor(address owner_) {
require(owner_ != address(0), "owner_ == address(0x0)");
require(owner_ != address(0), "OwnedMulticaller: owner_ is null");
_transferOwnership(owner_);
}

function multiMint(
INSUnified rns,
uint256 parentId,
address resolver,
uint64 duration,
address[] calldata tos,
string[] calldata labels
) external onlyOwner {
for (uint256 i; i < labels.length; ++i) {
rns.mint(parentId, labels[i], resolver, tos[i], duration);
}
}

function multicall(address[] calldata tos, bytes[] calldata callDatas, uint256[] calldata values)
external
payable
onlyOwner
returns (bool[] memory results, bytes[] memory returnDatas)
{
uint256 length = tos.length;
require(length == callDatas.length && length == values.length, "invalid length");
require(length == callDatas.length && length == values.length, "OwnedMulticaller: mismatch length");
results = new bool[](length);
returnDatas = new bytes[](length);

Expand Down

0 comments on commit 9d8ad83

Please sign in to comment.