Skip to content

Commit 707ec69

Browse files
committed
Upgrade dependencies
1 parent 6444b71 commit 707ec69

14 files changed

+157
-160
lines changed

contracts/PremiaErc20.sol

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ contract PremiaErc20 is SolidStateERC20 {
1414
constructor() {
1515
ERC20MetadataStorage.Layout storage l = ERC20MetadataStorage.layout();
1616

17-
l.setName("Premia");
18-
l.setSymbol("PREMIA");
19-
l.setDecimals(18);
17+
l.name = "Premia";
18+
l.symbol = "PREMIA";
19+
l.decimals = 18;
2020

2121
_mint(msg.sender, 1e26);
2222
// 100m

contracts/ProxyUpgradeableOwnable.sol

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@
44
pragma solidity ^0.8.0;
55

66
import {Proxy} from "@solidstate/contracts/proxy/Proxy.sol";
7-
import {SafeOwnable, OwnableStorage} from "@solidstate/contracts/access/ownable/SafeOwnable.sol";
7+
import {SafeOwnable} from "@solidstate/contracts/access/ownable/SafeOwnable.sol";
8+
import {OwnableStorage} from "@solidstate/contracts/access/ownable/OwnableStorage.sol";
89
import {ProxyUpgradeableOwnableStorage} from "./ProxyUpgradeableOwnableStorage.sol";
910

1011
contract ProxyUpgradeableOwnable is Proxy, SafeOwnable {
1112
using ProxyUpgradeableOwnableStorage for ProxyUpgradeableOwnableStorage.Layout;
1213
using OwnableStorage for OwnableStorage.Layout;
1314

1415
constructor(address implementation) {
15-
OwnableStorage.layout().setOwner(msg.sender);
16+
OwnableStorage.layout().owner = msg.sender;
1617
ProxyUpgradeableOwnableStorage.layout().implementation = implementation;
1718
}
1819

contracts/layerZero/token/oft/OFT.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ contract OFT is OFTCore, SolidStateERC20, IOFT {
2121
override
2222
returns (uint256)
2323
{
24-
return totalSupply();
24+
return _totalSupply();
2525
}
2626

2727
function _debitFrom(

contracts/layerZero/token/oft/OFTCore.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ pragma solidity ^0.8.0;
44

55
import {NonblockingLzApp} from "../../lzApp/NonblockingLzApp.sol";
66
import {IOFTCore} from "./IOFTCore.sol";
7-
import {ERC165, IERC165} from "@solidstate/contracts/introspection/ERC165.sol";
7+
import {ERC165Base, IERC165} from "@solidstate/contracts/introspection/ERC165/base/ERC165Base.sol";
88
import {BytesLib} from "../../util/BytesLib.sol";
99

10-
abstract contract OFTCore is NonblockingLzApp, ERC165, IOFTCore {
10+
abstract contract OFTCore is NonblockingLzApp, ERC165Base, IOFTCore {
1111
using BytesLib for bytes;
1212

1313
// packet type

contracts/layerZero/token/oft/OFTProxy.sol

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
pragma solidity ^0.8.0;
44

5-
import {ERC165Storage} from "@solidstate/contracts/introspection/ERC165Storage.sol";
5+
import {ERC165BaseStorage} from "@solidstate/contracts/introspection/ERC165/base/ERC165BaseStorage.sol";
66
import {IERC165} from "@solidstate/contracts/interfaces/IERC165.sol";
77
import {IERC20} from "@solidstate/contracts/interfaces/IERC20.sol";
88

@@ -11,17 +11,17 @@ import {IOFT} from "./IOFT.sol";
1111
import {IOFTCore} from "./IOFTCore.sol";
1212

1313
contract OFTProxy is ProxyUpgradeableOwnable {
14-
using ERC165Storage for ERC165Storage.Layout;
14+
using ERC165BaseStorage for ERC165BaseStorage.Layout;
1515

1616
constructor(
1717
address implementation
1818
) ProxyUpgradeableOwnable(implementation) {
1919
{
20-
ERC165Storage.Layout storage l = ERC165Storage.layout();
21-
l.setSupportedInterface(type(IERC165).interfaceId, true);
22-
l.setSupportedInterface(type(IERC20).interfaceId, true);
23-
l.setSupportedInterface(type(IOFTCore).interfaceId, true);
24-
l.setSupportedInterface(type(IOFT).interfaceId, true);
20+
ERC165BaseStorage.Layout storage l = ERC165BaseStorage.layout();
21+
l.supportedInterfaces[type(IERC165).interfaceId] = true;
22+
l.supportedInterfaces[type(IERC20).interfaceId] = true;
23+
l.supportedInterfaces[type(IOFTCore).interfaceId] = true;
24+
l.supportedInterfaces[type(IOFT).interfaceId] = true;
2525
}
2626
}
2727
}

contracts/pool/PoolBase.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
pragma solidity ^0.8.0;
55

6-
import {ERC165} from "@solidstate/contracts/introspection/ERC165.sol";
6+
import {ERC165Base} from "@solidstate/contracts/introspection/ERC165/base/ERC165Base.sol";
77
import {ERC1155Base} from "@solidstate/contracts/token/ERC1155/base/ERC1155Base.sol";
88
import {ERC1155BaseInternal} from "@solidstate/contracts/token/ERC1155/base/ERC1155BaseInternal.sol";
99
import {ERC1155Enumerable} from "@solidstate/contracts/token/ERC1155/enumerable/ERC1155Enumerable.sol";
@@ -22,7 +22,7 @@ contract PoolBase is
2222
PoolInternal,
2323
ERC1155Base,
2424
ERC1155Enumerable,
25-
ERC165,
25+
ERC165Base,
2626
Multicall
2727
{
2828
constructor(

contracts/pool/PoolProxy.sol

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pragma solidity ^0.8.0;
55

66
import {ABDKMath64x64Token} from "@solidstate/abdk-math-extensions/contracts/ABDKMath64x64Token.sol";
77
import {OwnableStorage} from "@solidstate/contracts/access/ownable/OwnableStorage.sol";
8-
import {ERC165Storage} from "@solidstate/contracts/introspection/ERC165Storage.sol";
8+
import {ERC165BaseStorage} from "@solidstate/contracts/introspection/ERC165/base/ERC165BaseStorage.sol";
99
import {Proxy} from "@solidstate/contracts/proxy/Proxy.sol";
1010
import {IDiamondReadable} from "@solidstate/contracts/proxy/diamond/readable/IDiamondReadable.sol";
1111
import {IERC20Metadata} from "@solidstate/contracts/token/ERC20/metadata/IERC20Metadata.sol";
@@ -20,7 +20,7 @@ import {PoolStorage} from "./PoolStorage.sol";
2020
*/
2121
contract PoolProxy is Proxy {
2222
using PoolStorage for PoolStorage.Layout;
23-
using ERC165Storage for ERC165Storage.Layout;
23+
using ERC165BaseStorage for ERC165BaseStorage.Layout;
2424

2525
address private immutable DIAMOND;
2626

@@ -76,9 +76,9 @@ contract PoolProxy is Proxy {
7676
}
7777

7878
{
79-
ERC165Storage.Layout storage l = ERC165Storage.layout();
80-
l.setSupportedInterface(type(IERC165).interfaceId, true);
81-
l.setSupportedInterface(type(IERC1155).interfaceId, true);
79+
ERC165BaseStorage.Layout storage l = ERC165BaseStorage.layout();
80+
l.supportedInterfaces[type(IERC165).interfaceId] = true;
81+
l.supportedInterfaces[type(IERC1155).interfaceId] = true;
8282
}
8383
}
8484

contracts/staking/PremiaStakingProxy.sol

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ contract PremiaStakingProxy is ProxyUpgradeableOwnable {
1313
address implementation
1414
) ProxyUpgradeableOwnable(implementation) {
1515
ERC20MetadataStorage.Layout storage l = ERC20MetadataStorage.layout();
16-
l.setName("Staked Premia");
17-
l.setSymbol("xPREMIA");
18-
l.setDecimals(18);
16+
l.name = "Staked Premia";
17+
l.symbol = "xPREMIA";
18+
l.decimals = 18;
1919
}
2020
}

contracts/staking/PremiaStakingUpgrade.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ contract PremiaStakingUpgrade is SolidStateERC20, OwnableInternal {
4848
{
4949
ERC20MetadataStorage.Layout storage metadataL = ERC20MetadataStorage
5050
.layout();
51-
metadataL.setName("vxPremia");
52-
metadataL.setSymbol("vxPREMIA");
51+
metadataL.name = "vxPremia";
52+
metadataL.symbol = "vxPREMIA";
5353
}
5454

5555
FeeDiscountStorage.Layout storage oldL = FeeDiscountStorage.layout();

contracts/staking/VxPremiaProxy.sol

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ contract VxPremiaProxy is ProxyUpgradeableOwnable {
1414
address implementation
1515
) ProxyUpgradeableOwnable(implementation) {
1616
ERC20MetadataStorage.Layout storage l = ERC20MetadataStorage.layout();
17-
l.setName("vxPremia");
18-
l.setSymbol("vxPREMIA");
19-
l.setDecimals(18);
17+
l.name = "vxPremia";
18+
l.symbol = "vxPREMIA";
19+
l.decimals = 18;
2020
}
2121
}

contracts/test/ERC20Placeholder.sol

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ contract ERC20Placeholder is SolidStateERC20 {
1212
constructor() {
1313
ERC20MetadataStorage.Layout storage l = ERC20MetadataStorage.layout();
1414

15-
l.setName("Placeholder");
16-
l.setSymbol("PLACEHOLDER");
17-
l.setDecimals(18);
15+
l.name = "Placeholder";
16+
l.symbol = "PLACEHOLDER";
17+
l.decimals = 18;
1818
}
1919
}

contracts/test/PoolMock.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
pragma solidity ^0.8.0;
44

55
import {OwnableStorage} from "@solidstate/contracts/access/ownable/OwnableStorage.sol";
6-
import {ERC165Storage} from "@solidstate/contracts/introspection/ERC165Storage.sol";
6+
import {ERC165BaseStorage} from "@solidstate/contracts/introspection/ERC165/base/ERC165BaseStorage.sol";
77
import {SolidStateERC20} from "@solidstate/contracts/token/ERC20/SolidStateERC20.sol";
88
import {ERC20MetadataStorage} from "@solidstate/contracts/token/ERC20/metadata/ERC20MetadataStorage.sol";
99

1010
import {PoolBase} from "../pool/PoolBase.sol";
1111
import {PoolStorage} from "../pool/PoolStorage.sol";
1212

1313
contract PoolMock is PoolBase {
14-
using ERC165Storage for ERC165Storage.Layout;
14+
using ERC165BaseStorage for ERC165BaseStorage.Layout;
1515
using PoolStorage for PoolStorage.Layout;
1616

1717
constructor(

package.json

+15-15
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,22 @@
4141
"devDependencies": {
4242
"@chainlink/contracts": "^0.5.1",
4343
"@ethereum-waffle/mock-contract": "^3.4.4",
44-
"@nomicfoundation/hardhat-chai-matchers": "^1.0.4",
44+
"@nomicfoundation/hardhat-chai-matchers": "^1.0.5",
4545
"@nomiclabs/hardhat-ethers": "^2.2.1",
46-
"@nomiclabs/hardhat-etherscan": "^3.1.2",
46+
"@nomiclabs/hardhat-etherscan": "^3.1.4",
4747
"@premia/utils": "^0.0.4",
4848
"@solidstate/abdk-math-extensions": "^1.0.0",
49-
"@solidstate/contracts": "^0.0.48",
49+
"@solidstate/contracts": "^0.0.52",
5050
"@solidstate/hardhat-4byte-uploader": "^1.0.2",
5151
"@solidstate/hardhat-test-short-circuit": "^1.0.2",
52-
"@solidstate/library": "^0.0.48",
53-
"@solidstate/spec": "^0.0.48",
54-
"@typechain/ethers-v5": "^10.1.1",
55-
"@typechain/hardhat": "^6.1.4",
52+
"@solidstate/library": "^0.0.52",
53+
"@solidstate/spec": "^0.0.52",
54+
"@typechain/ethers-v5": "^10.2.0",
55+
"@typechain/hardhat": "^6.1.5",
5656
"@types/chai": "^4.3.4",
5757
"@types/chai-almost": "^1.0.1",
58-
"@types/mocha": "^10.0.0",
59-
"@types/node": "^18.11.9",
58+
"@types/mocha": "^10.0.1",
59+
"@types/node": "^18.11.18",
6060
"@types/utf8": "^3.0.1",
6161
"@uniswap/v2-core": "^1.0.1",
6262
"@uniswap/v2-periphery": "^1.1.0-beta.0",
@@ -67,22 +67,22 @@
6767
"dotenv": "^16.0.3",
6868
"eth-permit": "^0.2.3",
6969
"ethers": "5.7.2",
70-
"hardhat": "2.12.2",
70+
"hardhat": "2.12.5",
7171
"hardhat-abi-exporter": "^2.10.1",
7272
"hardhat-artifactor": "^0.2.0",
7373
"hardhat-contract-sizer": "^2.6.1",
7474
"hardhat-dependency-compiler": "^1.1.3",
7575
"hardhat-docgen": "^1.3.0",
7676
"hardhat-gas-reporter": "^1.0.9",
7777
"hardhat-spdx-license-identifier": "^2.1.0",
78-
"husky": "^8.0.2",
79-
"lint-staged": "^13.0.3",
80-
"prettier": "^2.7.1",
81-
"prettier-plugin-solidity": "^1.0.0-rc.1",
78+
"husky": "^8.0.3",
79+
"lint-staged": "^13.1.0",
80+
"prettier": "^2.8.2",
81+
"prettier-plugin-solidity": "^1.1.1",
8282
"solidity-coverage": "^0.8.2",
8383
"ts-node": "^10.9.1",
8484
"typechain": "^8.1.1",
85-
"typescript": "^4.9.3",
85+
"typescript": "^4.9.4",
8686
"utf8": "^3.0.0"
8787
}
8888
}

0 commit comments

Comments
 (0)