Skip to content

Instantly share code, notes, and snippets.

View p14041999's full-sized avatar
🤓
Working from home

p14041999

🤓
Working from home
View GitHub Profile
@p14041999
p14041999 / VerifySignature.sol
Created August 23, 2024 08:18
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.8.26+commit.8a97fa7a.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
/**
DEAR Airdrop Claim
Call claim function with generated Signature
*/
interface IERC20{
function allowance(address owner, address spender) external view returns (uint256);
@p14041999
p14041999 / contract-13a661cfe4_flattened.sol
Created June 5, 2024 15:41
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.8.26+commit.8a97fa7a.js&optimize=false&runs=200&gist=
// File: @openzeppelin/[email protected]/token/ERC20/IERC20.sol
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
@p14041999
p14041999 / StakingContractNew.sol
Created November 22, 2022 14:06
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.8.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.10;
struct User{
uint startBlock;
uint endBlock;
uint totalStakedAmount;
uint startEpoch;
uint endEpoch;
uint pastReward;
@p14041999
p14041999 / AccountManager.sol
Created November 19, 2022 11:32
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.5.3;
import "./PermissionsUpgradable.sol";
/** @title Account manager contract
* @notice This contract holds implementation logic for all account management
functionality. This can be called only by the implementation contract only.
there are few view functions exposed as public and can be called directly.
these are invoked by quorum for populating permissions data in cache
* @dev account status is denoted by a fixed integer value. The values are
@p14041999
p14041999 / StakingContractNew.sol
Created November 11, 2022 10:56
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.4.26+commit.4563c3fc.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.10;
struct User{
uint startBlock;
uint endBlock;
uint totalStakedAmount;
uint startEpoch;
uint endEpoch;
uint pastReward;
@p14041999
p14041999 / WCIC.sol
Created November 11, 2022 09:55
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.4.26+commit.4563c3fc.js&optimize=false&runs=200&gist=
pragma solidity ^0.4.18;
contract WCIC {
string public name = "Wrapped CIC";
string public symbol = "WCIC";
uint8 public decimals = 18;
event Approval(address indexed src, address indexed guy, uint wad);
event Transfer(address indexed src, address indexed dst, uint wad);
event Deposit(address indexed dst, uint wad);
@p14041999
p14041999 / StakingContractNew.sol
Created November 11, 2022 09:25
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.8.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.10;
struct User{
uint startBlock;
uint endBlock;
uint totalStakedAmount;
uint startEpoch;
uint endEpoch;
uint pastReward;
@p14041999
p14041999 / StakingContract_flat.sol
Created November 9, 2022 11:36
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.8.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
// File: @openzeppelin/contracts/utils/Context.sol
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
@p14041999
p14041999 / StakingContract.sol
Created November 9, 2022 09:09
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.8.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
// File: @openzeppelin/contracts/utils/Context.sol
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
@p14041999
p14041999 / Ellithium.sol
Created November 8, 2022 13:21
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.8.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract BaseToken is ERC20{
constructor(uint supply)
ERC20("Base","BASE"){
_mint(msg.sender,supply);