Skip to content

Commit

Permalink
Compile Errors
Browse files Browse the repository at this point in the history
Fixing compile errors. Just realised @safe-global's safe.sol uses IERC165, which openzeppelin already imports. Conflict to be fixed in next patch
  • Loading branch information
EdmundBerkmann committed Feb 13, 2024
1 parent d2df6cd commit 56079af
Show file tree
Hide file tree
Showing 9 changed files with 9,278 additions and 90 deletions.
19 changes: 4 additions & 15 deletions Hardhat.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-ethers");
require('dotenv').config();
const { ethers } = require("ethers");

// Convert mnemonic to private keys
function getPrivateKeys(mnemonic) {
const walletPath = "m/44'/60'/0'/0";
const wallets = [];

for (let i = 0; i < 10; i++) {
const wallet = ethers.Wallet.fromMnemonic(mnemonic, `${walletPath}/${i}`);
wallets.push(wallet.privateKey);
}

return wallets;
}

/**
* @type import('hardhat/config').HardhatUserConfig
Expand All @@ -23,7 +10,9 @@ module.exports = {
networks: {
polygonZkEvmTestnet: {
url: process.env.POLYGON_ZKEVM_TESTNET_RPC_URL,
accounts: process.env.MNEMONIC ? getPrivateKeys(process.env.MNEMONIC) : [],
accounts: {
mnemonic: process.env.MNEMONIC
},
chainId: parseInt(process.env.POLYGON_ZKEVM_TESTNET_CHAIN_ID || 1422),
},
},
Expand Down
1 change: 1 addition & 0 deletions Package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"@reduxjs/toolkit": "^1.9.7",
"@safe-global/api-kit": "^2.1.0",
"@safe-global/protocol-kit": "^3.0.0",
"@safe-global/safe-contracts": "^1.4.1-build.0",
"@safe-global/safe-core-sdk": "^3.3.5",
"@safe-global/safe-core-sdk-types": "^4.0.0",
"@walletconnect/react-native-dapp": "^1.8.0",
Expand Down
2 changes: 1 addition & 1 deletion client/src/services/firestore.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ class FirestoreService {
console.error('Error getting documents: ', error);
}
}
}

export default FirestoreService;
}
4 changes: 2 additions & 2 deletions contracts/facets/features/BazaarFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ pragma solidity 0.8.20;

import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "../../libraries/LibDiamond.sol";
import "./interfaces/IUniswapV4.sol";
import "./interfaces/IUniswapX.sol";
import "../../interfaces/IUniswapV4.sol";
import "../../interfaces/IUniswapX.sol";

contract BazaarFacet {
// State variables for Uniswap interfaces, adjust types and names as per actual interface definitions
Expand Down
2 changes: 1 addition & 1 deletion contracts/facets/features/ProfileFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "../../interfaces/IProfileFacet.sol";
import "../../interfaces/IFeaturesFacet.sol";
import "../../libraries/LibDiamond.sol";
import "../../interfaces/ILens.sol";
import "../../interfaces/ISafe.sol";
Expand Down
16 changes: 4 additions & 12 deletions contracts/facets/features/VillageFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,11 @@
pragma solidity 0.8.20;

import "../../libraries/LibDiamond.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

// Simplified interface for the Diamond Standard
interface IDiamondCut {
function diamondCut(
bytes[] calldata _diamondCut,
address _init,
bytes calldata _calldata
) external;
}

// Simplified interface for handling chat encryption keys securely
interface IEncryptionKeyManager {
Expand All @@ -30,7 +22,7 @@ interface IESCROW {
// Additional functions for ESCROW management
}

contract VillageFacet is Ownable, Pausable {
contract VillageFacet is OwnableUpgradeable, PausableUpgradeable {
using EnumerableSet for EnumerableSet.AddressSet;

IDiamondCut diamondCut;
Expand Down Expand Up @@ -79,7 +71,7 @@ contract VillageFacet is Ownable, Pausable {
}

// Function to handle group chat governance, e.g., voting
function groupChatGovernance(uint256 chatId, /* parameters for governance */) external {
function groupChatGovernance(uint256 chatId, uint256 proposalId, bool vote) external {
// Governance logic here
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/facets/steelo/SteeloGovernanceFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity 0.8.20;
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "../../libraries/LibDiamond.sol";
import "../../interfaces/IGovernanceFacet.sol";
import "../../interfaces/IAppFacet.sol";

contract SteeloGovernanceFacet is IGovernanceFacet, Initializable, OwnableUpgradeable {
using LibDiamond for LibDiamond.DiamondStorage;
Expand Down
114 changes: 56 additions & 58 deletions yarn-error.log

Large diffs are not rendered by default.

Loading

0 comments on commit 56079af

Please sign in to comment.