Skip to content

Instantly share code, notes, and snippets.

View sagaratalatti's full-sized avatar
🏠
Working from home

Sagar Atalatti sagaratalatti

🏠
Working from home
  • India
View GitHub Profile
@sagaratalatti
sagaratalatti / Readme.md
Created November 10, 2024 11:45
Fund raising

NFT Project Financial Analysis

1. Gross Revenue Breakdown

Sale Revenue

Sale Stage NFTs Price/NFT Subtotal
Whitelist 2,000 $100 $200,000
Presale 3,000 $250 $750,000
Public Sale 5,000 $500 $2,500,000
@sagaratalatti
sagaratalatti / 721Token.sol
Last active October 16, 2024 10:36
Generated ERC721 with Airdrop Contract by Bountys
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
contract AMEYA is ERC721, ERC721Enumerable, ERC721Pausable, Ownable, ERC721Burnable {
@sagaratalatti
sagaratalatti / ERC4907.sol
Created July 22, 2024 07:31
Rentable NFTs implementing ERC4907
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./IERC4907.sol";
contract ERC4907 is ERC721, IERC4907 {
struct UserInfo {
@sagaratalatti
sagaratalatti / Gene.sol
Created February 13, 2024 09:25
ERC721A
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import 'erc721a/contracts/ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
contract VHNAMETACARS is ERC721A, Ownable, ReentrancyGuard {
@sagaratalatti
sagaratalatti / ContractBuilder.tsx
Last active January 31, 2024 03:32
Generate Solidity Files using React TypeScript
import React, { useState } from 'react';
import { FunctionTemplate, mintFunction, pauseFunction, unpauseFunction } from './functions';
const ContractBuilder: React.FC = () => {
const [selectedFunction, setSelectedFunction] = useState<FunctionTemplate | null>(null);
const [functionParams, setFunctionParams] = useState<Record<string, any>>({});
const functionTemplates = [mintFunction, pauseFunction, unpauseFunction];
const handleFunctionSelection = (func: FunctionTemplate) => {
@sagaratalatti
sagaratalatti / [email protected]
Last active August 11, 2022 15:39
Chainlink Dynamic NFT
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
@sagaratalatti
sagaratalatti / Partners.sol
Last active June 8, 2022 10:46
Partnership Smartcontract
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.6;
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
@sagaratalatti
sagaratalatti / Safecum.sol
Created June 5, 2021 10:52
Safecum Protocol is a decentralized finance (DeFi) token. Safecum has three functions that take place during each trade: Reflection, LP Acquisition and Burn
pragma solidity ^0.6.12;
// SPDX-License-Identifier: Unlicensed
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
@sagaratalatti
sagaratalatti / Address.sol
Created May 13, 2021 13:23
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.12+commit.27d51765.js&optimize=false&runs=200&gist=
pragma solidity ^0.6.12;
// SPDX-License-Identifier: Unlicensed
library Address {
function isContract(address account) internal view returns (bool) {
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
assembly { codehash := extcodehash(account) }
@sagaratalatti
sagaratalatti / Address.sol
Created May 13, 2021 13:22
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.12+commit.27d51765.js&optimize=false&runs=200&gist=
pragma solidity ^0.6.12;
library Address {
function isContract(address account) internal view returns (bool) {
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
assembly { codehash := extcodehash(account) }
return (codehash != accountHash && codehash != 0x0);
}