Skip to content

Commit

Permalink
Deploy Test NFTS on multiple chains (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
giuseppecrj authored Jul 1, 2024
1 parent 425fb68 commit 1eb4d4f
Show file tree
Hide file tree
Showing 17 changed files with 71 additions and 21 deletions.
9 changes: 9 additions & 0 deletions contracts/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ anvil :; anvil -m 'test test test test test test test test test test test junk'

clear-anvil-deployments :; rm -rf deployments/base_anvil deployments/river_anvil

# ================================== LOCAL ==================================

# ===========================
# Base Anvil
# ===========================
Expand Down Expand Up @@ -113,6 +115,13 @@ interact-sepolia :;

# ================================== PRODUCTION ==================================

# ===========================
# Any
# ===========================
deploy-any :;
@echo "Deploying $(contract)..."
@forge script scripts/deployments/$(if $(findstring facet,$(type)),facets/)${contract}.s.sol:${contract} --ffi --rpc-url ${rpc} --private-key ${TESTNET_PRIVATE_KEY} --broadcast --verifier-url ${verifier} --etherscan-api-key ${etherscan} --verify -vvvv

# ===========================
# River
# ===========================
Expand Down
17 changes: 17 additions & 0 deletions contracts/scripts/deployments/DeployMockERC721A.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import {Deployer} from "../common/Deployer.s.sol";

import {MockERC721A} from "contracts/test/mocks/MockERC721A.sol";

contract DeployMockERC721A is Deployer {
function versionName() public pure override returns (string memory) {
return "mockERC721A";
}

function __deploy(address deployer) public override returns (address) {
vm.broadcast(deployer);
return address(new MockERC721A());
}
}
2 changes: 1 addition & 1 deletion contracts/src/diamond/facets/token/ERC721A/ERC721A.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ contract ERC721A is IERC721A, ERC721ABase, Facet {
function __ERC721A_init_unchained(
string memory name_,
string memory symbol_
) internal onlyInitializing {
) internal {
_addInterface(0x80ac58cd); // ERC165 Interface ID for ERC721
_addInterface(0x5b5e139f); // ERC165 Interface ID for ERC721Metadata
__ERC721ABase_init(name_, symbol_);
Expand Down
4 changes: 4 additions & 0 deletions contracts/test/mocks/MockERC721A.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ pragma solidity ^0.8.23;
import {ERC721A} from "contracts/src/diamond/facets/token/ERC721A/ERC721A.sol";

contract MockERC721A is ERC721A {
constructor() {
__ERC721A_init_unchained("TownsTest", "TNFT");
}

function mintTo(address to) external returns (uint256 tokenId) {
tokenId = _nextTokenId();
_mint(to, 1);
Expand Down
2 changes: 1 addition & 1 deletion packages/generated/dev/abis/MembershipFacet.bin

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/generated/dev/abis/MembershipFacet.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/generated/dev/abis/MembershipFacet.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -1949,10 +1949,10 @@
"license": "MIT"
},
"contracts/src/diamond/facets/token/ERC721A/ERC721A.sol": {
"keccak256": "0x831bb3c33d216c2469726e2665840bcd780bdea916e33ac53ff334b2a60e58d7",
"keccak256": "0x5662ab29272ecaabdaf5792c368a71693fcad9df24566f9e470ff1ec3510fd8f",
"urls": [
"bzz-raw://b2ca636e3c22830ca38ce5eaa3d9945dcb80b7acab637085038cdb39236401cb",
"dweb:/ipfs/QmeXEtdSitN9z4LNxQd1TZQJtYvNHqKfJa6VuiCyQtxgtP"
"bzz-raw://2ef719ff8dce040daf5bcfe328f3463261fb3acfe5c41c589365143916748cc3",
"dweb:/ipfs/QmUm4PHj4y2237H7hnCwnfRyTWbp1DHWpc8GN26M6T4ToC"
],
"license": "MIT"
},
Expand Down
5 changes: 5 additions & 0 deletions packages/generated/dev/abis/MockERC721A.abi.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
[
{
"type": "constructor",
"inputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "__ERC721A_init",
Expand Down
5 changes: 5 additions & 0 deletions packages/generated/dev/abis/MockERC721A.abi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
export default [
{
"type": "constructor",
"inputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "__ERC721A_init",
Expand Down
2 changes: 1 addition & 1 deletion packages/generated/dev/abis/MockERC721A.bin

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/generated/dev/abis/MockERC721A.json

Large diffs are not rendered by default.

17 changes: 11 additions & 6 deletions packages/generated/dev/abis/MockERC721A.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"type": "error",
Expand Down Expand Up @@ -671,10 +676,10 @@
"license": "MIT"
},
"contracts/src/diamond/facets/token/ERC721A/ERC721A.sol": {
"keccak256": "0x831bb3c33d216c2469726e2665840bcd780bdea916e33ac53ff334b2a60e58d7",
"keccak256": "0x5662ab29272ecaabdaf5792c368a71693fcad9df24566f9e470ff1ec3510fd8f",
"urls": [
"bzz-raw://b2ca636e3c22830ca38ce5eaa3d9945dcb80b7acab637085038cdb39236401cb",
"dweb:/ipfs/QmeXEtdSitN9z4LNxQd1TZQJtYvNHqKfJa6VuiCyQtxgtP"
"bzz-raw://2ef719ff8dce040daf5bcfe328f3463261fb3acfe5c41c589365143916748cc3",
"dweb:/ipfs/QmUm4PHj4y2237H7hnCwnfRyTWbp1DHWpc8GN26M6T4ToC"
],
"license": "MIT"
},
Expand Down Expand Up @@ -703,10 +708,10 @@
"license": "MIT"
},
"contracts/test/mocks/MockERC721A.sol": {
"keccak256": "0x3096e91334d0840ce7b1ec636da4fdf327dc47e9505eabfe3832597df43be691",
"keccak256": "0x80071b1ba055681eea1cc0827319e36c8aaf045d17d9e16866f16984bdcd6312",
"urls": [
"bzz-raw://c5716d0d1c7f28ba9bfb36e52536766646a758e99592328bf198ebf1bfde74a3",
"dweb:/ipfs/QmYDQMSB9nT7B37fDL47JP1mGJxk7auaAFyUvnrk8FXgnV"
"bzz-raw://b1b8864b9ffc23fa666b4b423b9fccf561694059ebf676debd5af205491633ab",
"dweb:/ipfs/QmemqAUhh1X9kh7v17Fy6D7Tr2hFxeE6dw77RvG7vMFvrA"
],
"license": "MIT"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/generated/dev/abis/SpaceOwner.bin

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/generated/dev/abis/SpaceOwner.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/generated/dev/abis/SpaceOwner.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -1417,10 +1417,10 @@
"license": "MIT"
},
"contracts/src/diamond/facets/token/ERC721A/ERC721A.sol": {
"keccak256": "0x831bb3c33d216c2469726e2665840bcd780bdea916e33ac53ff334b2a60e58d7",
"keccak256": "0x5662ab29272ecaabdaf5792c368a71693fcad9df24566f9e470ff1ec3510fd8f",
"urls": [
"bzz-raw://b2ca636e3c22830ca38ce5eaa3d9945dcb80b7acab637085038cdb39236401cb",
"dweb:/ipfs/QmeXEtdSitN9z4LNxQd1TZQJtYvNHqKfJa6VuiCyQtxgtP"
"bzz-raw://2ef719ff8dce040daf5bcfe328f3463261fb3acfe5c41c589365143916748cc3",
"dweb:/ipfs/QmUm4PHj4y2237H7hnCwnfRyTWbp1DHWpc8GN26M6T4ToC"
],
"license": "MIT"
},
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit 1eb4d4f

Please sign in to comment.