This repository has been archived by the owner on May 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 690
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[evm] Added ERC721 and ERC1155 Move contracts to the hardhat project (#…
…52) - Added the Move contracts ERC721Mock and ERC1155Mock - Added the Solidity contracts ERC721Mock_Sol and ERC1155Mock_Sol - Checked that they all passed the Openzepplin testsuite - Ignored .js files in the broken link test
- Loading branch information
1 parent
5d600b7
commit 87e5ad7
Showing
15 changed files
with
3,312 additions
and
2 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
11 changes: 11 additions & 0 deletions
11
language/evm/hardhat-examples/contracts/ERC1155Mock/Move.toml
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 @@ | ||
[package] | ||
name = "ERC1155Mock" | ||
version = "0.0.0" | ||
|
||
[addresses] | ||
Std = "0x1" | ||
Evm = "0x2" | ||
|
||
[dependencies] | ||
EvmStdlib = { local = "../../../stdlib" } | ||
MoveStdlib = { local = "../../../../move-stdlib" } |
394 changes: 394 additions & 0 deletions
394
language/evm/hardhat-examples/contracts/ERC1155Mock/sources/ERC1155Mock.move
Large diffs are not rendered by default.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
language/evm/hardhat-examples/contracts/ERC1155Mock_Sol.sol
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,51 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; | ||
|
||
/** | ||
* @title ERC1155Mock | ||
* This mock just publicizes internal functions for testing purposes | ||
*/ | ||
contract ERC1155Mock_Sol is ERC1155 { | ||
constructor(string memory uri) ERC1155(uri) {} | ||
|
||
function setURI(string memory newuri) public { | ||
_setURI(newuri); | ||
} | ||
|
||
function mint( | ||
address to, | ||
uint256 id, | ||
uint256 value, | ||
bytes memory data | ||
) public { | ||
_mint(to, id, value, data); | ||
} | ||
|
||
function mintBatch( | ||
address to, | ||
uint256[] memory ids, | ||
uint256[] memory values, | ||
bytes memory data | ||
) public { | ||
_mintBatch(to, ids, values, data); | ||
} | ||
|
||
function burn( | ||
address owner, | ||
uint256 id, | ||
uint256 value | ||
) public { | ||
_burn(owner, id, value); | ||
} | ||
|
||
function burnBatch( | ||
address owner, | ||
uint256[] memory ids, | ||
uint256[] memory values | ||
) public { | ||
_burnBatch(owner, ids, values); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
language/evm/hardhat-examples/contracts/ERC721Mock/Move.toml
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 @@ | ||
[package] | ||
name = "ERC721Mock" | ||
version = "0.0.0" | ||
|
||
[addresses] | ||
Std = "0x1" | ||
Evm = "0x2" | ||
|
||
[dependencies] | ||
EvmStdlib = { local = "../../../stdlib" } | ||
MoveStdlib = { local = "../../../../move-stdlib" } |
Oops, something went wrong.