import React, { useState } from "react";
import { ethers } from "ethers";
import "./App.css";
declare global {
interface Window {
ethereum?: ethers.Eip1193Provider;
}
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.26; | |
contract Crowdfunding { | |
uint public noOfCampaigns; | |
address public owner; | |
struct Campaign { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// What is Solidity? | |
// Contract Structure | |
// Variables(state variables vs local variables vs constant variables) | |
// Types | |
// - bool | |
// - integars | |
// - address | |
// Functions | |
// Visibility(internal, external, private, public) | |
// Modifiers(pure and view functions modifiers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Deployed contract address(polygon mainnet) = 0x4bc4154b03B7fBbE72CBFA33aDe77BB820FbB337 | |
// ABI | |
"abi": [ | |
{ | |
"inputs": [ | |
{ | |
"internalType": "string[]", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.9; | |
import {ERC721AppStorage} from "../libraries/AppStorage.sol"; | |
// import "../interfaces/IERC721.sol"; | |
// import "../interfaces/IERC721Receiver.sol"; | |
contract TwikklNFT { | |
ERC721AppStorage internal s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.4; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol"; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeMath.sol"; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol"; | |
contract Santa1966 is ERC20, Ownable { | |
using SafeMath for uint256; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.7; | |
import {Create3} from "./lib.sol"; | |
//https://github.com/0xsequence/create3 - imported library | |
struct Work { | |
uint8 number; | |
} | |
contract Factory { |
NewerOlder