forked from ourzora/nft-editions
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #313 from joinzien/passes
Add support for passes
- Loading branch information
Showing
12 changed files
with
3,751 additions
and
802 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
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
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,30 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
|
||
/** | ||
Test pass ERC721 contract | ||
*/ | ||
|
||
pragma solidity ^0.8.19; | ||
|
||
import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; | ||
import {CountersUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; | ||
|
||
contract TestPassOne is ERC721Upgradeable { | ||
using CountersUpgradeable for CountersUpgradeable.Counter; | ||
CountersUpgradeable.Counter private _tokenIds; | ||
|
||
function initialize() public initializer { | ||
__ERC721_init("Test Pass One", "TPO"); | ||
} | ||
|
||
function mint(address player) public returns (uint256) { | ||
_tokenIds.increment(); | ||
|
||
uint256 newItemId = _tokenIds.current(); | ||
_mint(player, newItemId); | ||
|
||
return newItemId; | ||
} | ||
} |
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,30 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
|
||
/** | ||
Test pass ERC721 contract | ||
*/ | ||
|
||
pragma solidity ^0.8.19; | ||
|
||
import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; | ||
import {CountersUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; | ||
|
||
contract TestPassTwo is ERC721Upgradeable { | ||
using CountersUpgradeable for CountersUpgradeable.Counter; | ||
CountersUpgradeable.Counter private _tokenIds; | ||
|
||
function initialize() public initializer { | ||
__ERC721_init("Test Pass One", "TPO"); | ||
} | ||
|
||
function mint(address player) public returns (uint256) { | ||
_tokenIds.increment(); | ||
|
||
uint256 newItemId = _tokenIds.current(); | ||
_mint(player, newItemId); | ||
|
||
return newItemId; | ||
} | ||
} |
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,11 @@ | ||
module.exports = async ({ getNamedAccounts, deployments }: any ) => { | ||
const { deploy } = deployments; | ||
const { deployer } = await getNamedAccounts(); | ||
|
||
await deploy("TestPassOne", { | ||
from: deployer, | ||
log: true, | ||
}); | ||
}; | ||
|
||
module.exports.tags = ["TestPassOne"]; |
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,11 @@ | ||
module.exports = async ({ getNamedAccounts, deployments }: any ) => { | ||
const { deploy } = deployments; | ||
const { deployer } = await getNamedAccounts(); | ||
|
||
await deploy("TestPassTwo", { | ||
from: deployer, | ||
log: true, | ||
}); | ||
}; | ||
|
||
module.exports.tags = ["TestPassTwo"]; |
Oops, something went wrong.