Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ’₯ Implement ERC-1155 Standard Token #31

Merged
merged 76 commits into from
Jan 15, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
689a9f3
πŸ“ EIP-1155 interfaces
pcaversaccio Dec 19, 2022
779a2d6
πŸ‘» basic EIP-1155 implementation
pcaversaccio Dec 19, 2022
ded156a
πŸ”— add reference links to EIPs in interfaces
pcaversaccio Dec 19, 2022
19deb3c
add contract & update interface
jtriley-eth Dec 21, 2022
c23fa29
add set_uri function
jtriley-eth Dec 21, 2022
cccfd22
add set minter function
jtriley-eth Dec 21, 2022
1a0bce6
add constructor stuffs
jtriley-eth Dec 21, 2022
12ddd56
add test boilerplate
jtriley-eth Dec 22, 2022
4d6577a
Merge branch 'main' into erc1155
pcaversaccio Dec 22, 2022
d2aa5a0
Merge branch 'main' into erc1155
pcaversaccio Dec 22, 2022
66d828a
Merge branch 'erc1155' into erc1155
jtriley-eth Dec 22, 2022
b778f46
Update src/tokens/interfaces/IERC1155Receiver.vy
jtriley-eth Dec 24, 2022
4a49f81
Update test/tokens/interfaces/IERC1155Extended.sol
jtriley-eth Dec 24, 2022
3100695
Update src/tokens/ERC1155.vy
jtriley-eth Dec 24, 2022
43a45a1
Update src/tokens/ERC1155.vy
jtriley-eth Dec 24, 2022
712b4de
Update src/tokens/ERC1155.vy
jtriley-eth Dec 24, 2022
c5996ae
Update test/tokens/interfaces/IERC1155Extended.sol
jtriley-eth Dec 24, 2022
dde010f
Update test/tokens/ERC1155.t.sol
jtriley-eth Dec 24, 2022
b9ff7da
Update src/tokens/ERC1155.vy
jtriley-eth Dec 24, 2022
ba47a3b
Apply suggestions from code review
jtriley-eth Dec 24, 2022
656c63e
add tests, mocks, minor edits to dynarray sizes
jtriley-eth Dec 24, 2022
391326c
add proper indent to natspec
jtriley-eth Dec 24, 2022
092abd4
update contract based on code review
jtriley-eth Dec 26, 2022
098d5b9
rm tests to decouple pr
jtriley-eth Dec 27, 2022
0c1b641
break out auth checks to external transfers and mints
jtriley-eth Dec 27, 2022
da61332
rm outdated todo
jtriley-eth Dec 27, 2022
d6fd1fc
πŸ”‚ Merge pull request #34 from jtriley-eth/erc1155
pcaversaccio Dec 28, 2022
1a7cddf
♻️ bump submodules
pcaversaccio Dec 28, 2022
1a8951b
πŸ“ docs: add note on return value bounds in interfaces
pcaversaccio Dec 28, 2022
ac9fc00
♻️formatting
pcaversaccio Dec 28, 2022
3f6d3db
πŸ”¨ add RoleMinterChanged event in erc20 & erc721 as well as improve docs
pcaversaccio Dec 28, 2022
89e21e2
πŸ”¨ first round of chore & refactor erc1155
pcaversaccio Dec 28, 2022
3e20a3e
πŸͺ› fixing missing hooks & event issuance in erc20 constructor
pcaversaccio Dec 28, 2022
c89dd59
♻️formatting
pcaversaccio Dec 28, 2022
92cccd8
πŸ”¨ second round of chore & refactor erc1155
pcaversaccio Dec 29, 2022
69ca5c0
πŸ”¨ core erc1155 logic should be ready
pcaversaccio Dec 29, 2022
a5f2ce1
πŸ”¨ we're getting there soon
pcaversaccio Dec 29, 2022
29c0dca
πŸ”₯ burnable functions
pcaversaccio Dec 29, 2022
2246b43
⚑️ minting
pcaversaccio Dec 29, 2022
71e6b19
Merge branch 'main' into erc1155
pcaversaccio Dec 30, 2022
738aeb1
♻️ bump submodules
pcaversaccio Dec 30, 2022
6d7aa78
Merge branch 'main' into erc1155
pcaversaccio Dec 30, 2022
bc98e9b
βš’ refactor \ o\ to \owner\ wording in internal mint functions of ERC721
pcaversaccio Dec 30, 2022
2592d6d
πŸ“ comments are important
pcaversaccio Dec 30, 2022
205accd
πŸ“ comments & safe consistency
pcaversaccio Dec 30, 2022
038eea8
Merge branch 'main' into erc1155
pcaversaccio Jan 1, 2023
632aced
Merge branch 'main' into erc1155
pcaversaccio Jan 2, 2023
fedd65f
♻️ cache base uri length
pcaversaccio Jan 2, 2023
a6a2031
Merge branch 'main' into erc1155
pcaversaccio Jan 3, 2023
f17430f
Merge branch 'main' into erc1155
pcaversaccio Jan 5, 2023
a0e7bee
♻️ change readme sequence
pcaversaccio Jan 5, 2023
f3e1743
Merge branch 'main' into erc1155
pcaversaccio Jan 8, 2023
c4befea
Merge branch 'main' into erc1155
pcaversaccio Jan 9, 2023
080754f
add tests, mocks
jtriley-eth Jan 10, 2023
1d03715
♻️ prettier and fix typo
pcaversaccio Jan 12, 2023
28099a0
♻️ change logic sequence in test interfaces
pcaversaccio Jan 12, 2023
3075e62
πŸ›  refactor receiver mock & ix broken link
pcaversaccio Jan 12, 2023
a980213
♻️ remove unused imports & refactor first part of test suite
pcaversaccio Jan 12, 2023
e9ec14a
♻️ add IERC165 to IERC1155Receiver interface and change visibility t…
pcaversaccio Jan 12, 2023
2ca5d34
♻️ add missing IERC165 functions to interfaces
pcaversaccio Jan 12, 2023
305b8ce
♻️ enhance balanceOf and balanceOfBatch tests
pcaversaccio Jan 12, 2023
d35f4bd
♻️ enhance setApprovalForAll tests
pcaversaccio Jan 12, 2023
ff33c77
πŸ›  small refactor
pcaversaccio Jan 12, 2023
03087ad
♻️ enhance safeTransferFrom tests
pcaversaccio Jan 12, 2023
5b6d41d
♻️ enhance ownership function tests
pcaversaccio Jan 13, 2023
7d0100f
πŸ”¨ refactor transfer_ownership and renounce_ownership functions
pcaversaccio Jan 13, 2023
66fc991
♻️ enhance safBatchTransferFrom tests
pcaversaccio Jan 13, 2023
e764ac6
♻️ enhance uri and set_uri functions
pcaversaccio Jan 13, 2023
34f5535
♻️ add total_supply and exists tests
pcaversaccio Jan 13, 2023
c181885
♻️ enhance burn tests
pcaversaccio Jan 13, 2023
f94a872
♻️ enhance set_minter tests
pcaversaccio Jan 13, 2023
f6b7820
♻️ enhance safe_mint and safe_mint_batch tests
pcaversaccio Jan 13, 2023
ecc0844
♻️ add gas snapshot
pcaversaccio Jan 13, 2023
f031a87
♻️ format constructor args
pcaversaccio Jan 15, 2023
19f2e88
πŸ”¨ refactor ERC1155 tests
pcaversaccio Jan 15, 2023
35381ff
♻️ gas snapshot
pcaversaccio Jan 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
♻️ change logic sequence in test interfaces
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
  • Loading branch information
pcaversaccio committed Jan 12, 2023
commit 28099a00783bcad1665bf89eee83803d76a5a8ee
18 changes: 9 additions & 9 deletions test/tokens/interfaces/IERC1155Extended.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ pragma solidity ^0.8.17;
import {IERC1155MetadataURI} from "openzeppelin/token/ERC1155/extensions/IERC1155MetadataURI.sol";

interface IERC1155Extended is IERC1155MetadataURI {
function set_uri(uint256 id, string memory tokenUri) external;

function exists(uint256 id) external view returns (bool);

function total_supply(uint256 id) external view returns (uint256);

function burn(address owner, uint256 id, uint256 amount) external;

function burn_batch(
Expand All @@ -12,14 +18,8 @@ interface IERC1155Extended is IERC1155MetadataURI {
uint256[] memory amounts
) external;

function exists(uint256 id) external view returns (bool);

function is_minter(address account) external view returns (bool);

function owner() external view returns (address);

function renounce_ownership() external;

function safe_mint(
address owner,
uint256 id,
Expand All @@ -36,9 +36,9 @@ interface IERC1155Extended is IERC1155MetadataURI {

function set_minter(address minter, bool status) external;

function set_uri(uint256 id, string memory tokenUri) external;

function total_supply(uint256 id) external view returns (uint256);
function owner() external view returns (address);

function transfer_ownership(address newOwner) external;

function renounce_ownership() external;
}
4 changes: 2 additions & 2 deletions test/tokens/interfaces/IERC20Extended.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ interface IERC20Extended is IERC20Metadata, IERC20Permit {

function burn_from(address owner, uint256 amount) external;

function owner() external view returns (address);

function is_minter(address minter) external view returns (bool);

function mint(address owner, uint256 amount) external;

function set_minter(address minter, bool status) external;

function owner() external view returns (address);

function transfer_ownership(address newOwner) external;

function renounce_ownership() external;
Expand Down
4 changes: 2 additions & 2 deletions test/tokens/interfaces/IERC721Extended.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import {IERC4494} from "./IERC4494.sol";
interface IERC721Extended is IERC721Metadata, IERC721Enumerable, IERC4494 {
function burn(uint256 tokenId) external;

function owner() external view returns (address);

function is_minter(address minter) external view returns (bool);

function safe_mint(address owner, string calldata uri) external;

function set_minter(address minter, bool status) external;

function owner() external view returns (address);

function transfer_ownership(address newOwner) external;

function renounce_ownership() external;
Expand Down