Skip to content

Commit

Permalink
mint effect re-order
Browse files Browse the repository at this point in the history
  • Loading branch information
julesGoullee committed Nov 17, 2021
1 parent b9c02bd commit 43e029c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
8 changes: 3 additions & 5 deletions packages/contracts/contracts/CyberDropBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,12 @@ contract CyberDropBase is CyberTokenBase {

uint256 price = getMintPriceForDrop(drop);
require(msg.value >= price, 'IA');

_safeMint(sender, _tokenId, 1, '');
drop.minted += 1;
emit Minted(sender, _tokenId, 1);

uint256 amountOnCyber = (msg.value * drop.shareCyber) / 100;
uint256 amountCreator = msg.value - amountOnCyber;
drop.minted += 1;

_safeMint(sender, _tokenId, 1, '');
emit Minted(sender, _tokenId, 1);
drop.creator.transfer(amountCreator);
payable(LibAppStorage.layout().oncyber).transfer(amountOnCyber);
return true;
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit 43e029c

Please sign in to comment.