-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
584 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: test | ||
|
||
on: push | ||
|
||
env: | ||
FOUNDRY_PROFILE: ci | ||
|
||
jobs: | ||
check: | ||
strategy: | ||
fail-fast: true | ||
|
||
name: Foundry project | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: "16" | ||
|
||
- run: npm install | ||
|
||
- name: Run Forge coverage | ||
run: | | ||
yarn run coverage | ||
id: build | ||
|
||
- name: Run Forge tests | ||
run: | | ||
forge test -vvv | ||
id: test | ||
|
||
- name: Setup LCOV | ||
uses: hrishikesh-kadam/setup-lcov@v1 | ||
|
||
- name: Report code coverage | ||
uses: zgosalvez/github-actions-report-lcov@v3 | ||
with: | ||
coverage-files: coverage/lcov.*.info | ||
minimum-coverage: 90 | ||
artifact-name: code-coverage-report | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
working-directory: ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: test | ||
|
||
on: workflow_dispatch | ||
on: push | ||
|
||
env: | ||
FOUNDRY_PROFILE: ci | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"solidity.compileUsingRemoteVersion": "v0.8.17+commit.8df45f5f" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Zora Labs | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.17; | ||
|
||
interface ICreatorPermissionControl { | ||
event UpdatedPermissions( | ||
uint256 tokenId, | ||
address user, | ||
uint256 permissions | ||
); | ||
|
||
function getPermissions(uint256 token, address user) | ||
external | ||
view | ||
returns (uint256); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.17; | ||
|
||
interface IMinter1155 { | ||
function requestMint( | ||
address sender, | ||
uint256 tokenId, | ||
uint256 quantity, | ||
address findersRecipient, | ||
bytes calldata minterArguments | ||
) external; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.17; | ||
|
||
import {IZoraCreator1155TypesV1} from "../nft/IZoraCreator1155TypesV1.sol"; | ||
|
||
interface IZoraCreator1155 is IZoraCreator1155TypesV1 { | ||
function PERMISSION_BIT_ADMIN() external returns (uint256); | ||
|
||
function PERMISSION_BIT_MINTER() external returns (uint256); | ||
|
||
function PERMISSION_BIT_SALES() external returns (uint256); | ||
|
||
function PERMISSION_BIT_METADATA() external returns (uint256); | ||
|
||
event UpdatedToken(address from, uint256 tokenId, TokenData tokenData); | ||
|
||
error UserMissingRoleForToken(address user, uint256 tokenId, uint256 role); | ||
|
||
event RoyaltyConfigurationUpdated( | ||
uint256 tokenId, | ||
address sender, | ||
RoyaltyConfiguration royaltyConfiguration | ||
); | ||
|
||
// TODO: maybe add more context | ||
error CannotMintMoreTokens(uint256 tokenId); | ||
|
||
// Only allow minting one token id at time | ||
function purchase( | ||
address minter, | ||
uint256 tokenId, | ||
uint256 quantity, | ||
address findersRecipient, | ||
bytes calldata minterArguments | ||
) external payable; | ||
|
||
function setupNewToken(string memory _uri, uint256 maxSupply) | ||
external | ||
returns (uint256 tokenId); | ||
|
||
event ContractURIUpdated(address updater, string newURI); | ||
|
||
event UpdatedMetadataRendererForToken( | ||
uint256 tokenId, | ||
address user, | ||
address metadataRenderer | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.17; | ||
|
||
interface IZoraCreator1155TypesV1 { | ||
struct RoyaltyConfiguration { | ||
uint32 royaltyBPS; | ||
address royaltyRecipient; | ||
} | ||
|
||
struct TokenData { | ||
string uri; | ||
uint256 maxSupply; | ||
uint256 totalSupply; | ||
} | ||
|
||
struct Command { | ||
uint256 blank; | ||
// type | ||
// args | ||
} | ||
} |
Oops, something went wrong.