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

Goku challenge - POAP Factory #2

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions ciwines_poap_factory/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PRIVATE_KEY=
EXPLORER_API_KEY=
35 changes: 35 additions & 0 deletions ciwines_poap_factory/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# POAP Factory - A zkEVM POAP Minter for communities
POAP Factory is a project specifically developed for The Quest and aims to create a simple yet useful set of smart contracts to easily create POAPs. The main idea of this comes from the fact that I want to create few web3 events and the POAP will be one of the features used to introduce more people into the crypto space.

## How it works
POAP Factory is composed by two smart contracts now: the Factory and the POAP. The POAP, as you can imagine, is the contract of the POAP while the Factory is the one that is able to easily deploy and manage it.
Each POAP can be customied and can act both as an NFT or a Soul Bound Token.
Users can get a POAP by minting it through the mint function, or by using a relayer node that will call the mintTo function specifying the address of the receiver.

## Deploy
In order to deploy POAP Factory you need to get some zkEVM ETH first. After that you can clone this repository
```bash
$ git clone https://github.com/ciwines/The-Quest.git
```

Then you have to install the required dependencies
```bash
$ npm i
```
Now you have to set up your environment variables by editing the .env file. You can use the .env.template as a starting point.

After that, you can change the relayer address in the scripts/deploy.js file (by default it's 0x0000...0000).
Last but not least, you need to deploy the smart contracts.
```bash
$ npx hardhat run scripts/deploy.js --network zkEVM
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.

Please make sure to update tests as appropriate.
Have fun improving it and happy coding 💜.

## License
[MIT](https://choosealicense.com/licenses/mit/)
186 changes: 186 additions & 0 deletions ciwines_poap_factory/abi/Factory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
[
{
"inputs": [
{
"internalType": "address",
"name": "_relayer",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "string",
"name": "name",
"type": "string"
},
{
"indexed": true,
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "poap",
"type": "address"
}
],
"name": "POAPDeployed",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "_relayer",
"type": "address"
}
],
"name": "changeRelayer",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"internalType": "string",
"name": "_symbol",
"type": "string"
},
{
"internalType": "string",
"name": "_baseUri",
"type": "string"
},
{
"internalType": "uint256",
"name": "_maxSupply",
"type": "uint256"
},
{
"internalType": "bool",
"name": "_sameForAll",
"type": "bool"
},
{
"internalType": "bool",
"name": "_isSBT",
"type": "bool"
}
],
"name": "deployPOAP",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "deployedPoaps",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "relayer",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "totoalPoaps",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
Loading