Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
shep-eth committed Aug 26, 2022
1 parent cb47d33 commit efdd31b
Show file tree
Hide file tree
Showing 42 changed files with 104 additions and 29 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ out/
!/broadcast
/broadcast/*
/broadcast/*/31337/
.DS_Store
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/solmate"]
path = lib/solmate
url = https://github.com/transmissions11/solmate
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/openzeppelin/openzeppelin-contracts
15 changes: 15 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 120,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false,
"explicitTypes": "always"
}
}
]
}
4 changes: 3 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
src = 'src'
out = 'out'
libs = ['lib']
solc = "0.8.15"
remappings=['@openzeppelin/=lib/openzeppelin-contracts/']

# See more config options https://github.com/foundry-rs/foundry/tree/master/config
# See more config options https://github.com/foundry-rs/foundry/tree/master/config
Binary file added images/10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/22.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/23.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/25.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/26.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/9.png
1 change: 1 addition & 0 deletions lib/forge-std
Submodule forge-std added at 2c7cbf
1 change: 1 addition & 0 deletions lib/openzeppelin-contracts
Submodule openzeppelin-contracts added at ec825d
1 change: 1 addition & 0 deletions lib/solmate
Submodule solmate added at 478f9d
6 changes: 6 additions & 0 deletions metadata/4
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "Nextalk #4",
"description": "NextDAO Events is a collection of events hosted by NextDAO.",
"image": "https://d21iehwzq7iye8.cloudfront.net/images/4.png",
"attributes": [{"trait_type": "Type", "value": "Nextalk"}]
}
6 changes: 6 additions & 0 deletions metadata/5
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "Nextalk #5",
"description": "NextDAO Events is a collection of events hosted by NextDAO.",
"image": "https://d21iehwzq7iye8.cloudfront.net/images/5.png",
"attributes": [{"trait_type": "Type", "value": "Nextalk"}]
}
6 changes: 6 additions & 0 deletions metadata/6
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "Nextalk #6",
"description": "NextDAO Events is a collection of events hosted by NextDAO.",
"image": "https://d21iehwzq7iye8.cloudfront.net/images/6.png",
"attributes": [{"trait_type": "Type", "value": "Nextalk"}]
}
6 changes: 6 additions & 0 deletions metadata/7
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "Nextalk #7",
"description": "NextDAO Events is a collection of events hosted by NextDAO.",
"image": "https://d21iehwzq7iye8.cloudfront.net/images/7.png",
"attributes": [{"trait_type": "Type", "value": "Nextalk"}]
}
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "nextdao_events",
"version": "1.0.0",
"main": "index.js",
"author": "shep.eth <[email protected]>",
"license": "MIT"
}
12 changes: 0 additions & 12 deletions script/Contract.s.sol

This file was deleted.

4 changes: 0 additions & 4 deletions src/Contract.sol

This file was deleted.

42 changes: 42 additions & 0 deletions src/NextDAOEvents.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.15;

import "solmate/tokens/ERC1155.sol";
import "solmate/auth/Owned.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

contract NextDAOEvents is ERC1155, Owned {
using Strings for uint256;

string public constant name = "NextDAO Events";
string public baseURI;

constructor(address _owner, string memory _uri) Owned(_owner) {
baseURI = _uri;
}

function create(
address recipient,
uint256[] calldata ids,
uint256[] calldata amounts
) external onlyOwner {
_batchMint(recipient, ids, amounts, "");
}

function burn(
address from,
uint256[] calldata ids,
uint256[] calldata amounts
) external onlyOwner {
_batchBurn(from, ids, amounts);
}

function uri(uint256 id) public view override returns (string memory) {
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, id.toString())) : "";
}

function updateBaseURI(string calldata _uri) external onlyOwner {
baseURI = _uri;
}
}
12 changes: 0 additions & 12 deletions test/Contract.t.sol

This file was deleted.

0 comments on commit efdd31b

Please sign in to comment.