Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: Replace ERC721Facet with SolidState implementation #99

Merged
merged 4 commits into from
Oct 5, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Upgrade to solidity 0.8.16
  • Loading branch information
codynhat committed Oct 5, 2022
commit 97dc2418774766901e3ef0901e99e0b72828a19c
2 changes: 1 addition & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "solhint:recommended",
"rules": {
"compiler-version": ["error", "^0.8.4"],
"compiler-version": ["error", "^0.8.16"],
"not-rely-on-time": "off",
"reason-string": ["warn", { "maxLength": 100 }],
"func-visibility": ["warn", { "ignoreConstructors": true }]
Expand Down
2 changes: 1 addition & 1 deletion contracts/beacon-diamond/BeaconDiamond.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

/******************************************************************************\
* EIP-2535 Diamonds implementation that uses an external IDiamondLoupe to store facet addresses.
Expand Down
2 changes: 1 addition & 1 deletion contracts/beacon-diamond/libraries/LibBeaconDiamond.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

import {IDiamondLoupe} from "hardhat-deploy/solc_0.8/diamond/interfaces/IDiamondLoupe.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/beneficiary/BeneficiarySuperApp.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

import {SuperAppBase} from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperAppBase.sol";
import "./interfaces/ICFABeneficiary.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/beneficiary/interfaces/ICFABeneficiary.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

interface ICFABeneficiary {
/// @notice Get last deletion for sender
Expand Down
2 changes: 1 addition & 1 deletion contracts/pco-license/facets/CFABasePCOFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

import "../libraries/LibCFABasePCO.sol";
import "../interfaces/IBasePCO.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/pco-license/facets/CFABasePCOFacet.test.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

import "../libraries/LibCFABasePCO.sol";
import {ISuperToken} from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/pco-license/facets/CFAPenaltyBidFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

import "../libraries/LibCFABasePCO.sol";
import {CFABasePCOFacetModifiers} from "./CFABasePCOFacet.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/pco-license/facets/CFAReclaimerFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

import "../libraries/LibCFABasePCO.sol";
import "../libraries/LibCFAPenaltyBid.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/pco-license/interfaces/IBasePCO.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;
import {IERC721} from "@solidstate/contracts/interfaces/IERC721.sol";

interface IBasePCO {
Expand Down
2 changes: 1 addition & 1 deletion contracts/pco-license/interfaces/ICFABiddable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

import "../libraries/LibCFAPenaltyBid.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/pco-license/libraries/LibCFABasePCO.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

import "../../registry/interfaces/IPCOLicenseParamsStore.sol";
import "../../beneficiary/interfaces/ICFABeneficiary.sol";
Expand Down
3 changes: 1 addition & 2 deletions contracts/pco-license/libraries/LibCFAPenaltyBid.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

import "../../registry/interfaces/IPCOLicenseParamsStore.sol";
import {CFAv1Library} from "@superfluid-finance/ethereum-contracts/contracts/apps/CFAv1Library.sol";
Expand Down Expand Up @@ -215,7 +215,6 @@ library LibCFAPenaltyBid {
LibCFABasePCO.DiamondStorage storage ds = LibCFABasePCO
.diamondStorage();
LibCFABasePCO.DiamondCFAStorage storage cs = LibCFABasePCO.cfaStorage();
LibCFABasePCO.Bid storage _currentBid = LibCFABasePCO._currentBid();
Bid memory _pendingBid = pendingBid();

ISuperToken paymentToken = ds.paramsStore.getPaymentToken();
Expand Down
2 changes: 1 addition & 1 deletion contracts/registry/facets/GeoWebParcelFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

import "../libraries/LibGeoWebParcel.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/registry/facets/GeoWebParcelFacet.test.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

import "../libraries/LibGeoWebParcel.sol";
import "./GeoWebParcelFacet.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/registry/facets/PCOERC721Facet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

import "hardhat-deploy/solc_0.8/diamond/libraries/LibDiamond.sol";
import "../libraries/LibPCOLicenseClaimer.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/registry/facets/PCOLicenseClaimerFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

import "../libraries/LibPCOLicenseClaimer.sol";
import "../libraries/LibPCOLicenseParams.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/registry/facets/PCOLicenseParamsFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

import "../libraries/LibPCOLicenseParams.sol";
import "../interfaces/IPCOLicenseParamsStore.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/registry/interfaces/IPCOLicenseParamsStore.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

import {ISuperfluid} from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol";
import {ISuperToken} from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/registry/libraries/LibGeoWebCoordinate.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

/// @title LibGeoWebCoordinate is an unsigned 64-bit integer that contains x and y coordinates in the upper and lower 32 bits, respectively
library LibGeoWebCoordinate {
Expand Down
2 changes: 1 addition & 1 deletion contracts/registry/libraries/LibGeoWebParcel.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

import "./LibGeoWebCoordinate.sol";
import "hardhat/console.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/registry/libraries/LibPCOLicenseClaimer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

import "./LibGeoWebParcel.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/registry/libraries/LibPCOLicenseParams.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
pragma solidity ^0.8.16;

import {ISuperfluid} from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol";
import {CFAv1Library} from "@superfluid-finance/ethereum-contracts/contracts/apps/CFAv1Library.sol";
Expand Down
2 changes: 1 addition & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if (process.env.INFURA_KEY) {
module.exports = {
networks,
solidity: {
version: "0.8.14",
version: "0.8.16",
settings: {
optimizer: {
enabled: true,
Expand Down
2 changes: 1 addition & 1 deletion typechain-types/factories/CFABasePCOFacet__factory.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion typechain-types/factories/CFAPenaltyBidFacet__factory.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion typechain-types/factories/GeoWebParcelFacet__factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const _abi = [
];

const _bytecode =
"0x608060405234801561001057600080fd5b5061023f806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806331a5ee9c1461003b578063e7feff2e14610098575b600080fd5b610085610049366004610176565b60009182527f1d99a33cbbd99d244d8804dd6e7f77acb60cc0c0934fe2f7b00cabddc4b4b0f86020908152604080842092845291905290205490565b6040519081526020015b60405180910390f35b6100ab6100a6366004610198565b6100b9565b60405161008f9291906101b1565b60008181527f1d99a33cbbd99d244d8804dd6e7f77acb60cc0c0934fe2f7b00cabddc4b4b0f96020908152604080832080546001820180548451818702810187019095528085526060957f1d99a33cbbd99d244d8804dd6e7f77acb60cc0c0934fe2f7b00cabddc4b4b0f89567ffffffffffffffff9094169391839183018282801561016457602002820191906000526020600020905b815481526020019060010190808311610150575b50505050509050935093505050915091565b6000806040838503121561018957600080fd5b50508035926020909101359150565b6000602082840312156101aa57600080fd5b5035919050565b60006040820167ffffffffffffffff851683526020604081850152818551808452606086019150828701935060005b818110156101fc578451835293830193918301916001016101e0565b509097965050505050505056fea264697066735822122020cecb219da513fde76f04e84690378a66223fe38b2c6d0b1513f9cb8b55468464736f6c634300080e0033";
"0x608060405234801561001057600080fd5b5061023f806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806331a5ee9c1461003b578063e7feff2e14610098575b600080fd5b610085610049366004610176565b60009182527f1d99a33cbbd99d244d8804dd6e7f77acb60cc0c0934fe2f7b00cabddc4b4b0f86020908152604080842092845291905290205490565b6040519081526020015b60405180910390f35b6100ab6100a6366004610198565b6100b9565b60405161008f9291906101b1565b60008181527f1d99a33cbbd99d244d8804dd6e7f77acb60cc0c0934fe2f7b00cabddc4b4b0f96020908152604080832080546001820180548451818702810187019095528085526060957f1d99a33cbbd99d244d8804dd6e7f77acb60cc0c0934fe2f7b00cabddc4b4b0f89567ffffffffffffffff9094169391839183018282801561016457602002820191906000526020600020905b815481526020019060010190808311610150575b50505050509050935093505050915091565b6000806040838503121561018957600080fd5b50508035926020909101359150565b6000602082840312156101aa57600080fd5b5035919050565b60006040820167ffffffffffffffff851683526020604081850152818551808452606086019150828701935060005b818110156101fc578451835293830193918301916001016101e0565b509097965050505050505056fea264697066735822122080dab8166d28a9eadf64ad8a831c626d2115b41177c8ced346be682f2162562c64736f6c63430008100033";

type GeoWebParcelFacetConstructorParams =
| [signer?: Signer]
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ const _abi = [
];

const _bytecode =
"0x608060405234801561001057600080fd5b50610724806100206000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c806377742126116100b8578063a3cecf831161007c578063a3cecf831461022e578063bf7cdf6d14610241578063c13ed2ec14610254578063c85e0be21461025c578063d41c3a651461026f578063de7aff3c1461027757600080fd5b806377742126146101e55780637c627e1b146101f85780637d28dfc91461020b5780637d51ce901461021e578063801c5b1e1461022657600080fd5b80634d73f0b4116100ff5780634d73f0b41461019c578063520aa8ee146101af578063565a2e2c146101b75780636a326ab1146101bf57806373a29931146101d257600080fd5b8063014df4141461013c57806316a31026146101575780631c31f7101461015f57806320bc442514610174578063356248da14610194575b600080fd5b61014461028a565b6040519081526020015b60405180910390f35b61014461029f565b61017261016d366004610627565b6102b4565b005b61017c6102e8565b6040516001600160a01b03909116815260200161014e565b610144610306565b6101726101aa36600461064b565b61031b565b610144610337565b61017c61034c565b6101726101cd366004610627565b610367565b6101726101e036600461064b565b61039e565b6101726101f336600461064b565b6103ba565b61017261020636600461064b565b6103d6565b610172610219366004610664565b6103f2565b610144610476565b61014461048b565b61017261023c36600461064b565b6104a0565b61017261024f36600461064b565b6104bc565b6101446104d8565b61017261026a366004610627565b6104ed565b61017c610524565b61017261028536600461064b565b610542565b60008061029561055e565b6004015492915050565b6000806102aa61055e565b6003015492915050565b6102bc610582565b60006102c661055e565b80546001600160a01b0319166001600160a01b03939093169290921790915550565b6000806102f361055e565b600201546001600160a01b031692915050565b60008061031161055e565b6009015492915050565b610323610582565b600061032d61055e565b6004019190915550565b60008061034261055e565b6008015492915050565b60008061035761055e565b546001600160a01b031692915050565b61036f610582565b600061037961055e565b60010180546001600160a01b0319166001600160a01b03939093169290921790915550565b6103a6610582565b60006103b061055e565b6005019190915550565b6103c2610582565b60006103cc61055e565b6008019190915550565b6103de610582565b60006103e861055e565b6006019190915550565b6103fa610582565b600061040461055e565b80546001600160a01b039c8d166001600160a01b03199182161782556001820180549c8e169c82169c909c17909b556002810180549a909c1699909a16989098179099556003880195909555600487019390935560058601919091556006850155600784015560088301555060090155565b60008061048161055e565b6006015492915050565b60008061049661055e565b6007015492915050565b6104a8610582565b60006104b261055e565b6003019190915550565b6104c4610582565b60006104ce61055e565b6007019190915550565b6000806104e361055e565b6005015492915050565b6104f5610582565b60006104ff61055e565b60020180546001600160a01b0319166001600160a01b03939093169290921790915550565b60008061052f61055e565b600101546001600160a01b031692915050565b61054a610582565b600061055461055e565b6009019190915550565b7f6ee8bf8f33d87ee8fc792bdab0fa8c5d1fb2132b416aab215664bf4732bc299790565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c600401546001600160a01b0316331461060d5760405162461bcd60e51b815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201526132b960f11b606482015260840160405180910390fd5b565b6001600160a01b038116811461062457600080fd5b50565b60006020828403121561063957600080fd5b81356106448161060f565b9392505050565b60006020828403121561065d57600080fd5b5035919050565b6000806000806000806000806000806101408b8d03121561068457600080fd5b8a3561068f8161060f565b995060208b013561069f8161060f565b985060408b01356106af8161060f565b999c989b5098996060810135995060808101359860a0820135985060c0820135975060e08201359650610100820135955061012090910135935091505056fea26469706673582212205ccec2d6cbcc53ef5de2aef1212cb7d021668fcf1a065ae69f9c3bd86cfea12964736f6c634300080e0033";
"0x608060405234801561001057600080fd5b50610724806100206000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c806377742126116100b8578063a3cecf831161007c578063a3cecf831461022e578063bf7cdf6d14610241578063c13ed2ec14610254578063c85e0be21461025c578063d41c3a651461026f578063de7aff3c1461027757600080fd5b806377742126146101e55780637c627e1b146101f85780637d28dfc91461020b5780637d51ce901461021e578063801c5b1e1461022657600080fd5b80634d73f0b4116100ff5780634d73f0b41461019c578063520aa8ee146101af578063565a2e2c146101b75780636a326ab1146101bf57806373a29931146101d257600080fd5b8063014df4141461013c57806316a31026146101575780631c31f7101461015f57806320bc442514610174578063356248da14610194575b600080fd5b61014461028a565b6040519081526020015b60405180910390f35b61014461029f565b61017261016d366004610627565b6102b4565b005b61017c6102e8565b6040516001600160a01b03909116815260200161014e565b610144610306565b6101726101aa36600461064b565b61031b565b610144610337565b61017c61034c565b6101726101cd366004610627565b610367565b6101726101e036600461064b565b61039e565b6101726101f336600461064b565b6103ba565b61017261020636600461064b565b6103d6565b610172610219366004610664565b6103f2565b610144610476565b61014461048b565b61017261023c36600461064b565b6104a0565b61017261024f36600461064b565b6104bc565b6101446104d8565b61017261026a366004610627565b6104ed565b61017c610524565b61017261028536600461064b565b610542565b60008061029561055e565b6004015492915050565b6000806102aa61055e565b6003015492915050565b6102bc610582565b60006102c661055e565b80546001600160a01b0319166001600160a01b03939093169290921790915550565b6000806102f361055e565b600201546001600160a01b031692915050565b60008061031161055e565b6009015492915050565b610323610582565b600061032d61055e565b6004019190915550565b60008061034261055e565b6008015492915050565b60008061035761055e565b546001600160a01b031692915050565b61036f610582565b600061037961055e565b60010180546001600160a01b0319166001600160a01b03939093169290921790915550565b6103a6610582565b60006103b061055e565b6005019190915550565b6103c2610582565b60006103cc61055e565b6008019190915550565b6103de610582565b60006103e861055e565b6006019190915550565b6103fa610582565b600061040461055e565b80546001600160a01b039c8d166001600160a01b03199182161782556001820180549c8e169c82169c909c17909b556002810180549a909c1699909a16989098179099556003880195909555600487019390935560058601919091556006850155600784015560088301555060090155565b60008061048161055e565b6006015492915050565b60008061049661055e565b6007015492915050565b6104a8610582565b60006104b261055e565b6003019190915550565b6104c4610582565b60006104ce61055e565b6007019190915550565b6000806104e361055e565b6005015492915050565b6104f5610582565b60006104ff61055e565b60020180546001600160a01b0319166001600160a01b03939093169290921790915550565b60008061052f61055e565b600101546001600160a01b031692915050565b61054a610582565b600061055461055e565b6009019190915550565b7f6ee8bf8f33d87ee8fc792bdab0fa8c5d1fb2132b416aab215664bf4732bc299790565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c600401546001600160a01b0316331461060d5760405162461bcd60e51b815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201526132b960f11b606482015260840160405180910390fd5b565b6001600160a01b038116811461062457600080fd5b50565b60006020828403121561063957600080fd5b81356106448161060f565b9392505050565b60006020828403121561065d57600080fd5b5035919050565b6000806000806000806000806000806101408b8d03121561068457600080fd5b8a3561068f8161060f565b995060208b013561069f8161060f565b985060408b01356106af8161060f565b999c989b5098996060810135995060808101359860a0820135985060c0820135975060e08201359650610100820135955061012090910135935091505056fea26469706673582212200fc54482d2d44069e528e296474e07e014a0821d618d27ebef5f31221505572864736f6c63430008100033";

type PCOLicenseParamsFacetConstructorParams =
| [signer?: Signer]
Expand Down