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

fix: removed the tags and added the branch in .gitmodules #687

Merged
merged 8 commits into from Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
25 changes: 9 additions & 16 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,40 +1,33 @@
[submodule "packages/contracts/lib/Uniswap/v2-periphery"]
path = packages/contracts/lib/Uniswap/v2-periphery
url = https://github.com/Uniswap/v2-periphery.git
tag = v1.0.0-beta.0
branch= master
[submodule "packages/contracts/lib/Uniswap/v2-core"]
path = packages/contracts/lib/Uniswap/v2-core
url = https://github.com/Uniswap/v2-core.git
tag = v1.0.1
branch= master
[submodule "packages/contracts/lib/solidity-linked-list"]
path = packages/contracts/lib/solidity-linked-list
url = https://github.com/vittominacori/solidity-linked-list
tag = v5.1.0
branch= master
[submodule "packages/contracts/lib/openzeppelin-contracts"]
path = packages/contracts/lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
tag = v4.9.0
branch = release-v4.9
[submodule "packages/contracts/lib/forge-std"]
path = packages/contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
tag = v1.5.6
branch = chore/v1.5.6
[submodule "packages/contracts/lib/abdk-libraries-solidity"]
path = packages/contracts/lib/abdk-libraries-solidity
url = https://github.com/abdk-consulting/abdk-libraries-solidity
tag = v3.2
branch= master
[submodule "packages/contracts/lib/operator-filter-registry"]
path = packages/contracts/lib/operator-filter-registry
url = https://github.com/ProjectOpenSea/operator-filter-registry
tag = v1.4.1
branch= v1.4.0
[submodule "packages/contracts/lib/Uniswap/v3-periphery"]
path = packages/contracts/lib/Uniswap/v3-periphery
url = https://github.com/Uniswap/v3-periphery.git
tag = v1.3.0
[submodule "packages/contracts/packages/contracts/lib/Uniswap/v2-periphery"]
path = packages/contracts/packages/contracts/lib/Uniswap/v2-periphery
url = https://github.com/Uniswap/v2-periphery.git
tag = v1.0.0-beta.0
[submodule "packages/contracts/packages/contracts/lib/Uniswap/v2-core"]
path = packages/contracts/packages/contracts/lib/Uniswap/v2-core
url = https://github.com/Uniswap/v2-core
tag = v1.0.1
branch= main

2 changes: 1 addition & 1 deletion packages/contracts/lib/forge-std
Submodule forge-std updated 48 files
+92 −0 .github/workflows/ci.yml
+29 −0 .github/workflows/sync.yml
+0 −27 .github/workflows/tests.yml
+1 −1 .gitignore
+1 −1 LICENSE-APACHE
+1 −1 LICENSE-MIT
+8 −4 README.md
+19 −0 foundry.toml
+1 −1 lib/ds-test
+16 −0 package.json
+35 −0 src/Base.sol
+23 −41 src/Script.sol
+376 −0 src/StdAssertions.sol
+231 −0 src/StdChains.sol
+676 −0 src/StdCheats.sol
+15 −0 src/StdError.sol
+92 −0 src/StdInvariant.sol
+122 −61 src/StdJson.sol
+43 −0 src/StdMath.sol
+327 −0 src/StdStorage.sol
+333 −0 src/StdStyle.sol
+198 −0 src/StdUtils.sol
+28 −1,134 src/Test.sol
+450 −186 src/Vm.sol
+406 −386 src/console2.sol
+105 −0 src/interfaces/IERC1155.sol
+12 −0 src/interfaces/IERC165.sol
+43 −0 src/interfaces/IERC20.sol
+190 −0 src/interfaces/IERC4626.sol
+164 −0 src/interfaces/IERC721.sol
+73 −0 src/interfaces/IMulticall3.sol
+13,248 −0 src/safeconsole.sol
+0 −20 src/test/Script.t.sol
+0 −282 src/test/StdCheats.t.sol
+0 −200 src/test/StdMath.t.sol
+454 −57 test/StdAssertions.t.sol
+160 −0 test/StdChains.t.sol
+507 −0 test/StdCheats.t.sol
+5 −11 test/StdError.t.sol
+197 −0 test/StdMath.t.sol
+46 −84 test/StdStorage.t.sol
+110 −0 test/StdStyle.t.sol
+312 −0 test/StdUtils.t.sol
+10 −0 test/compilation/CompilationScript.sol
+10 −0 test/compilation/CompilationScriptBase.sol
+10 −0 test/compilation/CompilationTest.sol
+10 −0 test/compilation/CompilationTestBase.sol
+0 −0 test/fixtures/broadcast.log.json
2 changes: 1 addition & 1 deletion packages/contracts/lib/openzeppelin-contracts
2 changes: 1 addition & 1 deletion packages/contracts/lib/operator-filter-registry
Submodule operator-filter-registry updated 48 files
+0 −7 .npmignore
+83 −22 README.md
+ audit/OpenSea Operator Filteer Audit Report.pdf
+9 −2 package.json
+12 −6 script/ConfigureOwnedRegistrant.s.sol
+7 −4 src/DefaultOperatorFilterer.sol
+110 −0 src/IOperatorFilterRegistry.sol
+78 −48 src/OperatorFilterRegistry.sol
+46 −0 src/OperatorFilterRegistryErrorsAndEvents.sol
+19 −2 src/OperatorFilterer.sol
+4 −4 src/OwnedRegistrant.sol
+7 −5 src/RevokableDefaultOperatorFilterer.sol
+8 −7 src/RevokableOperatorFilterer.sol
+19 −2 src/UpdatableOperatorFilterer.sol
+22 −2 src/example/ExampleERC1155.sol
+30 −2 src/example/ExampleERC721.sol
+26 −3 src/example/RevokableExampleERC1155.sol
+39 −3 src/example/RevokableExampleERC721.sol
+32 −1 src/example/upgradeable/ExampleERC1155Upgradeable.sol
+40 −1 src/example/upgradeable/ExampleERC721Upgradeable.sol
+35 −1 src/example/upgradeable/RevokableExampleERC1155Upgradeable.sol
+43 −1 src/example/upgradeable/RevokableExampleERC721Upgradeable.sol
+5 −0 src/lib/Constants.sol
+8 −3 src/upgradeable/DefaultOperatorFiltererUpgradeable.sol
+40 −21 src/upgradeable/OperatorFiltererUpgradeable.sol
+10 −3 src/upgradeable/RevokableDefaultOperatorFiltererUpgradeable.sol
+42 −25 src/upgradeable/RevokableOperatorFiltererUpgradeable.sol
+11 −0 test/DefaultOperatorFilterer.t.sol
+10 −1 test/OperatorFilterer.t.sol
+4 −0 test/RevokableDefaultOperatorFilterer.t.sol
+0 −0 test/RevokableOperatorFilterer.t.sol
+9 −0 test/UpdatableOperatorFilterer.t.sol
+9 −0 test/example/ExampleERC1155.t.sol
+9 −0 test/example/ExampleERC721.t.sol
+9 −0 test/example/RevokableERC1155.t.sol
+9 −0 test/example/RevokableERC721.t.sol
+9 −0 test/example/upgradeable/ExampleERC1155Upgradeable.t.sol
+9 −0 test/example/upgradeable/ExampleERC721Upgradeable.t.sol
+9 −0 test/example/upgradeable/RevokableExampleERC1155Upgradeable.t.sol
+9 −0 test/example/upgradeable/RevokableExampleERC721Upgradeable.t.sol
+4 −0 test/helpers/Filterer.sol
+10 −0 test/helpers/OperatorFilterRegistryStub.sol
+25 −0 test/helpers/RevokableUpgradeableFilterer.sol
+4 −0 test/helpers/UpdatableFilterer.sol
+21 −0 test/helpers/UpgradeableFilterer.sol
+43 −0 test/upgradeable/RevokableUpgradeableOperatorFilterer.t.sol
+37 −0 test/upgradeable/UpgradeableOperatorFilterer.t.sol
+1 −1 test/validation/Validation.t.sol
31 changes: 16 additions & 15 deletions packages/contracts/src/ubiquistick/UbiquiStick.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ contract UbiquiStick is
address public minter;

string private _tokenURI;
uint256 private constant STANDARD_TYPE = 0;
uint256 private constant _STANDARD_TYPE = 0;
rndquu marked this conversation as resolved.
Show resolved Hide resolved

string private _goldTokenURI;
mapping(uint256 => bool) public gold;
uint256 private constant GOLD_FREQ = 64;
uint256 private constant GOLD_TYPE = 1;
uint256 private constant _GOLD_FREQ = 64;
uint256 private constant _GOLD_TYPE = 1;

string private _invisibleTokenURI;
uint256 private constant INVISIBLE_TOKEN_ID = 42;
uint256 private constant INVISIBLE_TYPE = 2;
uint256 private constant _INVISIBLE_TOKEN_ID = 42;
uint256 private constant _INVISIBLE_TYPE = 2;

modifier onlyMinter() {
require(msg.sender == minter, "Not minter");
Expand All @@ -61,7 +61,7 @@ contract UbiquiStick is
gold[tokenId]
? _goldTokenURI
: (
tokenId == INVISIBLE_TOKEN_ID
tokenId == _INVISIBLE_TOKEN_ID
? _invisibleTokenURI
: _tokenURI
);
Expand All @@ -71,11 +71,11 @@ contract UbiquiStick is
uint256 ntype,
string memory tokenURI_
) public onlyMinter {
if (ntype == STANDARD_TYPE) {
if (ntype == _STANDARD_TYPE) {
_tokenURI = tokenURI_;
} else if (ntype == GOLD_TYPE) {
} else if (ntype == _GOLD_TYPE) {
_goldTokenURI = tokenURI_;
} else if (ntype == INVISIBLE_TYPE) {
} else if (ntype == _INVISIBLE_TYPE) {
_invisibleTokenURI = tokenURI_;
}
}
Expand All @@ -89,8 +89,8 @@ contract UbiquiStick is
tokenIdNext += 1;

// Gold one
if (random() % uint256(GOLD_FREQ) == 0) {
if (tokenId != INVISIBLE_TOKEN_ID) {
if (_random() % uint256(_GOLD_FREQ) == 0) {
if (tokenId != _INVISIBLE_TOKEN_ID) {
gold[tokenId] = true;
}
}
Expand All @@ -103,7 +103,7 @@ contract UbiquiStick is
}
}

function random() private view returns (uint256) {
function _random() private view returns (uint256) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're relying on block.prevrandao @rndquu to avoid compiling warnings as foundry.toml is shanghai

??

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the question

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, your PR sets it to prevrandao but this PR merges into the development branch which uses the "old" difficulty. I still can't get what you mean

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes no issues, what's trying to sync the whole thing, that's why asked

return
uint256(
keccak256(
Expand All @@ -120,17 +120,18 @@ contract UbiquiStick is
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
uint256 tokenId,
uint256 batchSize
) internal override(ERC721, ERC721Enumerable) {
super._beforeTokenTransfer(from, to, tokenId);
super._beforeTokenTransfer(from, to, tokenId, batchSize);
}

function _beforeConsecutiveTokenTransfer(
address,
address,
uint256,
uint96
) internal override(ERC721, ERC721Enumerable) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove the override? @rndquu it conflicts with the other branch, i think this would trigger compiler warning

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove the override? @rndquu it conflicts with the other branch, i think this would trigger compiler warning

it was not overriding anything

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's retest, the idea is to avoid branching conflicts

Copy link
Contributor

@molecula451 molecula451 Jun 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error (4327): Function needs to specify overridden contracts "ERC721" and "ERC721Enumerable".
--> src/ubiquistick/UbiquiStick.sol:128:5

can you confirm. Not to dismiss your PR. i think its best to recheck!

@pavlovcik
@rndquu
this conflicted with #704

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not a good idea to rely on VSCode problems, the compiler shall tell you what's good and what's not

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compiler saying the same wym

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@molecula451 if it conflicts with another branch then we should resolve conflicts and compiler warnings

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@molecula451 this PR updates dependencies so perhaps you should run forge update and check again

) internal {
revert("ERC721Enumerable: consecutive transfers not supported");
}

Expand Down