From e36a4cde3140e3d0ce9a5fb88003fd23354d397e Mon Sep 17 00:00:00 2001 From: mike Date: Wed, 27 Nov 2024 18:51:37 +0100 Subject: [PATCH] Remove redundant `issueTokens` method on `NodeDriverAuth` --- contracts/sfc/NodeDriverAuth.sol | 8 -------- contracts/sfc/SFC.sol | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/contracts/sfc/NodeDriverAuth.sol b/contracts/sfc/NodeDriverAuth.sol index bdbbb5b..94383cd 100644 --- a/contracts/sfc/NodeDriverAuth.sol +++ b/contracts/sfc/NodeDriverAuth.sol @@ -83,14 +83,6 @@ contract NodeDriverAuth is OwnableUpgradeable, UUPSUpgradeable { /// Mint native token. To be used by SFC for minting validators rewards. function incBalance(address acc, uint256 diff) external onlySFC { - if (acc != address(sfc)) { - revert RecipientNotSFC(); - } - driver.setBalance(acc, address(acc).balance + diff); - } - - /// Issue tokens as a counterparty to burnt FTM tokens. - function issueTokens(address acc, uint256 diff) external onlySFC { driver.setBalance(acc, address(acc).balance + diff); } diff --git a/contracts/sfc/SFC.sol b/contracts/sfc/SFC.sol index 42e946e..ef9b782 100644 --- a/contracts/sfc/SFC.sol +++ b/contracts/sfc/SFC.sol @@ -464,7 +464,7 @@ contract SFC is OwnableUpgradeable, UUPSUpgradeable, Version { if (c.issuedTokensRecipient() == address(0)) { revert ZeroAddress(); } - node.issueTokens(c.issuedTokensRecipient(), amount); + node.incBalance(c.issuedTokensRecipient(), amount); totalSupply += amount; }