Skip to content

Commit

Permalink
Andfriends contract upgrade for wow mint + goerli deployments (oncybe…
Browse files Browse the repository at this point in the history
…rio#41)

* Andfriends contract upgrade + goerli deployments

* Write tests for oncyberandriends

* Prettier

* Add coverage

* Linter

* Coverage 100

* Latest goerli deployments

* Change sender address

* Change sender

* please linter

* Take out comments

* Final cutdown

* Final cutdown

* Latest goerli deployments

* Latest goerli deployments + passing tests

* Latest deployments
  • Loading branch information
rayanoncyber authored Nov 1, 2022
1 parent 1f18d45 commit 38cf861
Show file tree
Hide file tree
Showing 42 changed files with 114,360 additions and 205 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,26 @@ pragma solidity 0.8.15;
//import 'hardhat/console.sol';
import '../../CyberDropBase.sol';

contract OnCyberAndFriendsFactoryFacet is CyberDropBase {}
contract OnCyberAndFriendsFactoryFacet is CyberDropBase {
function mintTransfer(
address to,
uint256 id,
uint256 amount
) external virtual {
uint256 tokenId = id + 14;
require((id == 0 || id == 1) && (tokenId == 14 || tokenId == 15), 'NT');

address sender = _msgSender();
require(sender == 0x09f717f77B5e7f2D2F37604fEC3D0e3D53eB9808, 'NS');

LibDropStorage.Drop storage drop = LibDropStorage.layout().drops[tokenId];
require(drop.amountCap - drop.minted >= amount, 'CR');
require(block.timestamp > drop.timeStart && block.timestamp <= drop.timeEnd, 'OOT');

// Effects
drop.minted += amount;
_safeMint(to, tokenId, amount, '');

emit Minted(to, tokenId, amount);
}
}
1,518 changes: 1,338 additions & 180 deletions packages/contracts/deployments/ethereum/DiamondOnCyberAndFriendsFactory.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/contracts/deployments/goerli/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5
Loading

0 comments on commit 38cf861

Please sign in to comment.