Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zapnap/fourby_nft
Generative NFT project with on-chain SVG assets
https://github.com/zapnap/fourby_nft
Last synced: 12 days ago
JSON representation
Generative NFT project with on-chain SVG assets
- Host: GitHub
- URL: https://github.com/zapnap/fourby_nft
- Owner: zapnap
- License: mit
- Created: 2023-09-07T17:56:02.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-10T20:31:36.000Z (about 1 year ago)
- Last Synced: 2024-11-12T23:45:02.658Z (2 months ago)
- Language: Solidity
- Homepage: https://fourby.xyz
- Size: 51.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## FourbyNFT
A simple generative NFT art project with a nice color palette and dynamic graphics that illustrate changes in network state over the course of the mint. Assets built via SVG and stored 100% on-chain.
Deploy contract:
`forge create FourbyNFT --rpc-url=$RPC_URL --private-key=$PRIVATE_KEY --constructor-args "$OWNER_ADDRESS" src/FourbyNFT.sol:FourbyNFT`
Mint a token:
`cast send --rpc-url $RPC_URL --private-key $PRIVATE_KEY $CONTRACT_ADDRESS "mintTo(address)" "$OWNER_ADDRESS" --value 0.001ether`
Get token URI (Base64-encoded):
`cast call --rpc-url $RPC_URL $CONTRACT_ADDRESS "tokenURI(uint256)(string)" 1`
Decoding the returned value produces some JSON, that includes an encoded SVG image.
Alternatively, you can ask for the SVG directly:
`cast call --rpc-url $RPC_URL $CONTRACT_ADDRESS "renderSvg(uint256)(string)" 1`