forked from artemii235/etomic-swap
-
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.
feat(nft): update deps and solc version, add ERC721 and ERC1155 suppo…
…rt (#2) This commit does the following: * updates deps * updates solidity version from ^0.5.0 to ^0.8.20 * implements ERC721 functions for EtomicSwap contract * adds ERC721 tests * implements ERC1155 functions for EtomicSwap contract * adds ERC1155 tests
- Loading branch information
Showing
13 changed files
with
1,826 additions
and
2,278 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
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.20; | ||
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; | ||
|
||
contract Erc1155Token is ERC1155 { | ||
constructor(string memory tokenUri) ERC1155(tokenUri) { | ||
uint256 tokenId = 1; | ||
uint256 amount = 3; | ||
_mint(msg.sender, tokenId, amount, ""); | ||
} | ||
} |
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,13 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.20; | ||
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | ||
|
||
contract Erc721Token is ERC721 { | ||
constructor(string memory tokenName, string memory tokenSymbol) | ||
ERC721(tokenName, tokenSymbol) | ||
{ | ||
uint256 tokenId = 1; | ||
_mint(msg.sender, tokenId); | ||
} | ||
} |
Oops, something went wrong.