Skip to content

Instantly share code, notes, and snippets.

How to Verify a Smart Contract on Degen with Foundry/Forge

By Backseats

  1. You've developed your contract in Forge already.

  2. Now it's time to deploy.

  3. Make sure you have your env vars set in your .env file and run source .env in your terminal to load in the latest env vars.

[
{
"type": "enum",
"name": "Palette Name",
"options": [
"Vetro",
"Eclissi",
"Pepe",
"Vicini",
"Tutto apposto",
//SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
contract ERC1155TokenURIHelper {
function tokenURI(address _contractAddress, uint _tokenId) public view returns (string memory) {
if (tokenURIDetector(_contractAddress, _tokenId)) {
return IERC1155(_contractAddress).tokenURI(_tokenId);
} else {
return IERC1155(_contractAddress).uri(_tokenId);
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
interface ISomeContract {
function giftAToken(address _to, uint _count) external;
function transferOwnership(address newOwner) external;
}
@backseats
backseats / chains.py
Created January 13, 2022 16:48
Provenance and random id proof for manufacturable Chains NFTs
import random
manufacturable_chain_ids = []
for i in range(50):
manufacturable_chain_ids.append(random.randint(1,10000))
# Output: [9987, 6913, 1035, 3441, 5975, 2628, 7954, 7519, 4581, 3415, 2853, 4683, 3703, 2050, 528, 1502, 7545, 7389, 3858, 6817, 3170, 7900, 6258, 230, 1631, 1677, 3580, 8249, 9343, 5677, 9272, 3599, 6257, 1584, 2223, 3803, 1142, 9511, 5238, 2133, 1420, 992, 1222, 8469, 4558, 8009, 1828, 7033, 8203, 5052]
# String hashed: Random chain ids for manufacture, generated by Backseats on 1/13/22 at 11:36a – [9987, 6913, 1035, 3441, 5975, 2628, 7954, 7519, 4581, 3415, 2853, 4683, 3703, 2050, 528, 1502, 7545, 7389, 3858, 6817, 3170, 7900, 6258, 230, 1631, 1677, 3580, 8249, 9343, 5677, 9272, 3599, 6257, 1584, 2223, 3803, 1142, 9511, 5238, 2133, 1420, 992, 1222, 8469, 4558, 8009, 1828, 7033, 8203, 5052]. Added 1048 for contest winner.
# Use SHA256 @ https://passwordsgenerator.net/sha256-hash-generator/
# Provenance: 6CB57684DFB662F18155A65BE2C190D5790A9F8146792EAB13C2F1047D6D7151
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";