Skip to content

Commit

Permalink
bump v2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zjb0807 committed Jun 19, 2022
1 parent c265d64 commit 1b9f8d5
Show file tree
Hide file tree
Showing 27 changed files with 75 additions and 75 deletions.
2 changes: 1 addition & 1 deletion contracts/dex/DEX.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

import "./IDEX.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/dex/IDEX.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

interface IDEX {
event Swaped(address indexed sender, address[] path, uint256 supply_amount, uint256 target_amount);
Expand Down
2 changes: 1 addition & 1 deletion contracts/evm-accounts/EVMAccounts.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

import "./IEVMAccounts.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/evm-accounts/IEVMAccounts.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

interface IEVMAccounts {
event ClaimAccount(address indexed sender, bytes32 indexed accountId, address indexed evmAddress);
Expand Down
2 changes: 1 addition & 1 deletion contracts/evm/EVM.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

import "./IEVM.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/evm/IEVM.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

interface IEVM {
event TransferredMaintainer(address indexed contract_address, address indexed new_maintainer);
Expand Down
2 changes: 1 addition & 1 deletion contracts/homa/Homa.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

import "./IHoma.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/homa/IHoma.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

interface IHoma {
event Minted(address indexed sender, uint256 amount);
Expand Down
2 changes: 1 addition & 1 deletion contracts/honzon/Honzon.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

import "./IHonzon.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/honzon/IHonzon.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

interface IHonzon {
event AdjustedLoan(address indexed sender, address indexed currencyId, int128 collateralAdjustment, int128 debitAdjustment);
Expand Down
4 changes: 2 additions & 2 deletions contracts/incentives/Incentives.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

import "./InterfaceIncentives.sol";

Expand Down Expand Up @@ -129,7 +129,7 @@ contract Incentives is InterfaceIncentives {
* @dev Gets the pending rewards for a pool, actual reward could be deducted.
* returns (balances), an array of reward balances corresponding to currencyIds
*/
function getPendingRewards(address[] calldata currencyIds, PoolId pool, address poolCurrencyId, address who)
function getPendingRewards(address[] memory currencyIds, PoolId pool, address poolCurrencyId, address who)
public
view
override
Expand Down
2 changes: 1 addition & 1 deletion contracts/incentives/InterfaceIncentives.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

interface InterfaceIncentives {
event DepositedShare(address indexed sender, address indexed currencyId, uint256 amount);
Expand Down
2 changes: 1 addition & 1 deletion contracts/nft/NFT.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

library NFT {
address constant private precompile = address(0x0000000000000000000000000000000000000401);
Expand Down
2 changes: 1 addition & 1 deletion contracts/oracle/IOracle.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

interface IOracle {
// Get the price of the currency_id.
Expand Down
2 changes: 1 addition & 1 deletion contracts/oracle/Oracle.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

import "./IOracle.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@acala-network/contracts",
"version": "4.3.0",
"version": "2.3.0",
"description": "AcalaNetwork Smart Contract library for Solidity",
"files": [
"**/*.js",
Expand Down
2 changes: 1 addition & 1 deletion contracts/schedule/ISchedule.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

interface ISchedule {
event ScheduledCall(address indexed sender, address indexed contract_address, bytes task_id);
Expand Down
2 changes: 1 addition & 1 deletion contracts/schedule/Schedule.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

import "./ISchedule.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/token/MultiCurrency.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

library MultiCurrency {
address constant private precompile = address(0x0000000000000000000000000000000000000400);
Expand Down
16 changes: 8 additions & 8 deletions contracts/token/Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// Based on ERC20 implementation of @openzeppelin/contracts (v4.5.0):
// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.5.0/contracts/token/ERC20/ERC20.sol

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import "./MultiCurrency.sol";
Expand Down Expand Up @@ -147,9 +147,9 @@ contract Token is IERC20 {
address owner = msg.sender;
uint256 currentAllowance = _allowances[owner][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
//unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
//}

return true;
}
Expand Down Expand Up @@ -212,11 +212,11 @@ contract Token is IERC20 {
uint256 amount
) internal {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
//if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
//unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
//}
//}
}
}
2 changes: 1 addition & 1 deletion contracts/utils/AcalaAddress.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

contract ADDRESS {
address public constant ACA = 0x0000000000000000000100000000000000000000;
Expand Down
2 changes: 1 addition & 1 deletion contracts/utils/KaruraAddress.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

contract ADDRESS {
address public constant KAR = 0x0000000000000000000100000000000000000080;
Expand Down
2 changes: 1 addition & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import '@nomiclabs/hardhat-waffle'

const config: HardhatUserConfig = {
solidity: {
version: "0.8.4",
version: "0.6.2",
settings: {
optimizer: {
enabled: true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.5",
"@nomiclabs/hardhat-waffle": "^2.0.3",
"@openzeppelin/contracts": "4.5.0",
"@openzeppelin/contracts": "3.0.0",
"ethereum-waffle": "^3.4.4",
"handlebars": "^4.7.7",
"hardhat": "^2.9.3",
Expand Down
2 changes: 1 addition & 1 deletion resources/address.sol.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity ^0.8.0;
pragma solidity ^0.6.0;

contract ADDRESS {
{{#each this}}
Expand Down
76 changes: 38 additions & 38 deletions resources/bytecodes.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -531,10 +531,10 @@
"@types/sinon-chai" "^3.2.3"
"@types/web3" "1.0.19"

"@openzeppelin/contracts@4.5.0":
version "4.5.0"
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.5.0.tgz#3fd75d57de172b3743cdfc1206883f56430409cc"
integrity sha512-fdkzKPYMjrRiPK6K4y64e6GzULR7R7RwxSigHS8DDp7aWDeoReqsQI+cxHV1UuhAqX69L1lAaWDxenfP+xiqzA==
"@openzeppelin/contracts@3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.0.0.tgz#89bc0d32fc9eb257cf6499f2497a1b4a6715f186"
integrity sha512-u7oATjUK6jffDOoIjVQ7vJ2fnFKlfDS1CJzrMpp+YtGQ2fhdSk0kXjZTxk8Pj1SPVZRNES3yo0r144v8BsuRhQ==

"@resolver-engine/core@^0.3.3":
version "0.3.3"
Expand Down

0 comments on commit 1b9f8d5

Please sign in to comment.