diff --git a/contracts/RewardsBooster.sol b/contracts/RewardsBooster.sol index 9a18bb79..2b3431d0 100644 --- a/contracts/RewardsBooster.sol +++ b/contracts/RewardsBooster.sol @@ -1361,8 +1361,7 @@ contract RewardsBooster is Initializable, OwnableUpgradeable, IRewardsBooster, S address(this), _amount ); - // Allowance - IERC20(settings.getContractAddress(SQContracts.SQToken)).approve(msg.sender, _amount); + sqToken.safeTransfer(msg.sender, _amount); emit QueryRewardsSpent(_deploymentId, _spender, _amount, _data); } @@ -1393,8 +1392,7 @@ contract RewardsBooster is Initializable, OwnableUpgradeable, IRewardsBooster, S address(this), _amount ); - // Allowance - IERC20(settings.getContractAddress(SQContracts.SQToken)).approve(msg.sender, _amount); + sqToken.safeTransfer(msg.sender, _amount); emit QueryRewardsSpent(_deploymentId, _spender, _amount, _data); } diff --git a/contracts/StateChannel.sol b/contracts/StateChannel.sol index f919dfc4..7f6e1703 100644 --- a/contracts/StateChannel.sol +++ b/contracts/StateChannel.sol @@ -327,13 +327,6 @@ contract StateChannel is Initializable, OwnableUpgradeable, SQParameter { amount, abi.encode(channelId) ); - if (rewardsAmount > 0) { - IERC20(settings.getContractAddress(SQContracts.SQToken)).safeTransferFrom( - rbAddress, - address(this), - rewardsAmount - ); - } if (rewardsAmount < amount) { // transfer the balance to contract @@ -592,13 +585,6 @@ contract StateChannel is Initializable, OwnableUpgradeable, SQParameter { spent - rewardsTotal, abi.encode(channelId) ); - if (rewardsAmount > 0) { - IERC20(settings.getContractAddress(SQContracts.SQToken)).safeTransferFrom( - rbAddress, - address(this), - rewardsAmount - ); - } total += rewardsAmount; } diff --git a/package.json b/package.json index 287708ac..83c40bc6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@subql/contract-sdk", - "version": "1.4.1-0", + "version": "1.5.0", "main": "index.js", "license": "GPL3", "scripts": { @@ -23,6 +23,8 @@ "deploy": "ts-node --transpileOnly scripts/deploy.ts", "upgrade": "ts-node --transpileOnly scripts/upgrade.ts", "setup": "ts-node --transpileOnly scripts/startup.ts", + "scan-verify:testnet": "hardhat publishChild --deployment publish/testnet.json --network base-sepolia --networkpair testnet ", + "scan-verify:mainnet": "hardhat publishChild --deployment publish/mainnet.json --network base --networkpair mainnet ", "verify": "ts-node --transpileOnly scripts/verify.ts", "upgrade:verify": "ts-node --transpileOnly scripts/verifyUpgrade.ts", "seed": "node -r ts-node/register/transpile-only -r dotenv/config scripts/seed.ts", diff --git a/publish/mainnet.json b/publish/mainnet.json index 81251833..39709298 100644 --- a/publish/mainnet.json +++ b/publish/mainnet.json @@ -195,10 +195,10 @@ "lastUpdate": "Tue, 21 May 2024 22:09:56 GMT" }, "RewardsBooster": { - "innerAddress": "0x6DA2eA5591d39d94Cc2Aae17e619d041D3315c6c", + "innerAddress": "0xF265b1B3526FE55138a86dc299e559e76960020f", "address": "0x7F138D57A5e05b6FBF3bCAdDa9a1252354245464", - "bytecodeHash": "cf14fe59440af7049bdb6a7520836f02d6a4a3d643850d2260b31234ce211bce", - "lastUpdate": "Thu, 19 Sep 2024 05:25:48 GMT" + "bytecodeHash": "10ded472cbfa2afbcfd1ac3a8b44414e12339fdd8018fcfd4c47a5b338e08af9", + "lastUpdate": "Mon, 14 Oct 2024 21:42:35 GMT" }, "StakingAllocation": { "innerAddress": "0x5Fa0105aa31e05d2f639Fe79DB20700AEC2B859C", diff --git a/publish/testnet.json b/publish/testnet.json index 5fa25b16..dbed8dad 100644 --- a/publish/testnet.json +++ b/publish/testnet.json @@ -195,10 +195,10 @@ "lastUpdate": "Tue, 21 May 2024 22:04:33 GMT" }, "RewardsBooster": { - "innerAddress": "0x113F10C5fe8C66e7F51Df6A2Dfd1d26d283d7bC4", + "innerAddress": "0x438bD56449Cd044F65C607EbdbB9a4Ede0c936b7", "address": "0x4f6A1045A56EeD1D2795b5f6F6713972B67C09C2", - "bytecodeHash": "cf14fe59440af7049bdb6a7520836f02d6a4a3d643850d2260b31234ce211bce", - "lastUpdate": "Wed, 11 Sep 2024 11:31:48 GMT" + "bytecodeHash": "10ded472cbfa2afbcfd1ac3a8b44414e12339fdd8018fcfd4c47a5b338e08af9", + "lastUpdate": "Tue, 08 Oct 2024 23:50:39 GMT" }, "StakingAllocation": { "innerAddress": "0xfbeB402CADFCDB28407E86f5F20Ee719f5F6F430",