Skip to content

Commit

Permalink
Merge pull request #15 from polysensus/robin/contracts-sol-0822
Browse files Browse the repository at this point in the history
Robin/contracts sol 0822
  • Loading branch information
robinbryce authored Apr 6, 2024
2 parents 85222f9 + e7dd6f2 commit 1f17261
Show file tree
Hide file tree
Showing 59 changed files with 1,606 additions and 3,084 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.DS_Store
typechain-types
.envrc
.env.op
.env.secret
commit.md
.npmrc
tmp
Expand Down
6 changes: 3 additions & 3 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ tasks:
npx prettier --write 'chaintrap/**/*.sol'
npx prettier --write 'lib/**/*.sol'
npx prettier --write 'scripts/**/*.sol'
npx prettier --write 'chaintrap/**/*.{js,mjs}'
npx prettier --write 'tests/hh/**/*.{js,mjs}'
npx prettier --write 'chaintrap/**/*.{js,mjs,ts}'
npx prettier --write 'tests/hh/**/*.{js,mjs,ts}'
build:
Expand Down Expand Up @@ -275,7 +275,7 @@ tasks:
test:hh:
desc: run the hardhat tests
cmds:
- npx mocha --require esm --timeout 20000 'tests/**/*.{mjs,js}' {{.CLI_ARGS}}
- npx hardhat test

deploy:
cmds:
Expand Down
4 changes: 2 additions & 2 deletions lib/arena/storage.sol → chaintrap/arena/storage.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.8.9;
pragma solidity ^0.8.9;

import {LibTranscript, Transcript} from "lib/libtranscript.sol";
import {LibTranscript, Transcript} from "chaintrap/libtranscript.sol";

library LibArenaStorage {
struct Layout {
Expand Down
4 changes: 0 additions & 4 deletions chaintrap/chaintrap.js

This file was deleted.

4 changes: 4 additions & 0 deletions chaintrap/chaintrap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from "./erc2535proxy";

import { TXProfiler } from "./txprofile";
export { TXProfiler };
2 changes: 1 addition & 1 deletion lib/contextmixin.sol → chaintrap/contextmixin.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.8.9;
pragma solidity ^0.8.9;

/**
* https://github.com/maticnetwork/pos-portal/blob/master/contracts/common/ContextMixin.sol
Expand Down
14 changes: 7 additions & 7 deletions chaintrap/diamond/interfaces/IERC173.sol
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma solidity ^0.8.22;

/// @dev This emits when ownership of a contract changes.
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);

/// @title ERC-173 Contract Ownership Standard
/// Note: the ERC-165 identifier for this interface is 0x7f5828d0
/* is ERC165 */
interface IERC173 {
/// @dev This emits when ownership of a contract changes.
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);

/// @notice Get the address of the owner
/// @return owner_ The address of the owner.
function owner() external view returns (address owner_);
Expand Down
6 changes: 1 addition & 5 deletions chaintrap/diamond/libraries/LibDiamond.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pragma solidity ^0.8.0;
* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535
/******************************************************************************/
import {IDiamondCut} from "../interfaces/IDiamondCut.sol";
import {OwnershipTransferred} from "../interfaces/IERC173.sol";

// Remember to add the loupe functions from DiamondLoupeFacet to the diamond.
// The loupe functions are required by the EIP2535 Diamonds standard
Expand Down Expand Up @@ -47,11 +48,6 @@ library LibDiamond {
}
}

event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);

function setContractOwner(address _newOwner) internal {
DiamondStorage storage ds = diamondStorage();
address previousOwner = ds.contractOwner;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.8.9;
pragma solidity ^0.8.9;

import {IERC1155BaseInternal} from "@solidstate/contracts/token/ERC1155/base/IERC1155BaseInternal.sol";
import {ERC1155BaseStorage} from "@solidstate/contracts/token/ERC1155/base/ERC1155BaseStorage.sol";

import "lib/erc1155/storage.sol";
import "lib/tokenid.sol";
import "chaintrap/erc1155/storage.sol";
import "chaintrap/tokenid.sol";

error TokenNotBoundBy(uint256, uint256);

Expand Down
6 changes: 3 additions & 3 deletions lib/erc1155/storage.sol → chaintrap/erc1155/storage.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.8.9;
pragma solidity ^0.8.9;

import "lib/erc1155/liberc1155arena.sol";
import "lib/tokenid.sol";
import "chaintrap/erc1155/liberc1155arena.sol";
import "chaintrap/tokenid.sol";

library ArenaERC1155Storage {
struct Layout {
Expand Down
156 changes: 0 additions & 156 deletions chaintrap/erc2535proxy.js

This file was deleted.

Loading

0 comments on commit 1f17261

Please sign in to comment.