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; | |
contract voting{ | |
//@author: BlackAdam | |
//This code allows a single poll to be created with 3 options (bad, average, good) | |
//@dev: the options can be inreased and cutomize | |
//note: the contracts needs to be redployed for another poll(else, you will mess up the initial poll) |
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.4.22 <0.8.0; | |
pragma experimental ABIEncoderV2; | |
contract Wallet { | |
address[] public approvers; | |
uint8 public quorum; | |
struct Transfer { |
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
require("dotenv").config({ path: ".env" }); | |
import { BytesLike } from "ethers"; | |
import { ethers } from "hardhat"; | |
// import * as dotenv from "dotenv"; | |
// import IMultiSig from "../typechain-types/Imultisig.sol" | |
async function main() { | |
let provider = { | |
PrivateKey: process.env.PRIVATE_KEY as BytesLike, |
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: GPL-3.0 | |
pragma solidity 0.8.4; | |
contract Vault{ | |
// a contract where the owner create grant for a beneficiary; | |
//allows beneficiary to withdraw only when time elapse | |
//allows owner to withdraw before time elapse | |
//get information of a beneficiary | |
//amount of ethers in the smart contract |
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.8; | |
library arithmetic{ | |
//Add two numbers together | |
function add(uint num1, uint num2) external pure returns(uint){ | |
uint result = num1 + num2; | |
return result; |
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.8; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/Pausable.sol"; | |
contract wallet is Pausable{ | |
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: GPL-3.0 | |
pragma solidity 0.8.4; | |
contract Energy{ | |
//have total supply | |
//transferrable | |
//name | |
//symbol | |
//decimal |
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: GPL-3.0 | |
pragma solidity 0.8.4; | |
contract Vault{ | |
// a contract where the owner create grant for a beneficiary; | |
//allows beneficiary to withdraw only when time elapse | |
//allows owner to withdraw before time elapse | |
//get information of a beneficiary | |
//amount of ethers in the smart contract |
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: GPL-3.0 | |
pragma solidity 0.8.4; | |
contract Vault{ | |
// a contract where the owner create grant for a beneficiary; | |
//allows beneficiary to withdraw only when time elapse | |
//allows owner to withdraw before time elapse | |
//get information of a beneficiary | |
//amount of ethers in the smart contract |
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.13; | |
contract fundContract{ | |
mapping(address => uint) balances; | |
function deposit() public payable{ | |
require(msg.value > 1, "Your deposit must be greater than 1 eth"); |
NewerOlder