Skip to content

Instantly share code, notes, and snippets.

@saadSarwar28
saadSarwar28 / contracts...test.sol
Created August 17, 2021 23:49
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.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Ownership
* check Ownership of nfts
*/
interface deployedContract {
function totalSupply() external view returns (uint);
function ownerOf(uint tokenId)external view returns (address);
@saadSarwar28
saadSarwar28 / contracts...test.sol
Created August 18, 2021 15:14
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.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Ownership
* check Ownership of nfts
*/
interface deployedContract {
function totalSupply() external view returns (uint);
function ownerOf(uint tokenId)external view returns (address);
@saadSarwar28
saadSarwar28 / contracts...test.sol
Created August 18, 2021 18:46
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.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
pragma solidity >=0.7.0 <0.9.0;
// SPDX-License-Identifier: MIT
/**
* @title Ownership
* check Ownership of nfts
*/
interface deployedContract {
function totalSupply() external view returns (uint);
function ownerOf(uint tokenId)external view returns (address);
@saadSarwar28
saadSarwar28 / contracts...RugZombieAuthenticator.sol
Created August 23, 2021 20:34
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.4+commit.c7e474f2.js&optimize=true&runs=200&gist=
pragma solidity >=0.7.0 <0.9.0;
import "./interfaces/IZombieToken.sol";
// SPDX-License-Identifier: MIT
/**
* @title RugZombieAuthenticator
* @author Saad Sarwar
*/
@saadSarwar28
saadSarwar28 / contracts...RugSwap.sol
Created September 2, 2021 21:35
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.4+commit.c7e474f2.js&optimize=true&runs=200&gist=
pragma solidity >=0.7.0 <0.9.0;
import "./access/Ownable.sol";
import "./token/BEP20/IBEP20.sol";
// SPDX-License-Identifier: MIT
/**
* @title RugSwap
* @author Saad Sarwar
*/
@saadSarwar28
saadSarwar28 / contracts...RugSwap.sol
Created September 4, 2021 15:49
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.4+commit.c7e474f2.js&optimize=true&runs=200&gist=
pragma solidity >=0.7.0 <0.9.0;
import "./access/Ownable.sol";
import "./token/BEP20/IBEP20.sol";
// SPDX-License-Identifier: MIT
/**
* @title RugSwap
* @author Saad Sarwar
*/
@saadSarwar28
saadSarwar28 / contracts...Zombets.sol
Created September 10, 2021 18:05
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.4+commit.c7e474f2.js&optimize=true&runs=200&gist=
pragma solidity ^0.8.4;
// ZombieToken interface.
interface IZombieToken {
// function mint(address _to, uint256 _amount) external;
// function delegates(address delegator) external view returns (address);
// function delegate(address delegatee) external;
// function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) external;
// function transferOwnership(address newOwner) external;
// function getCurrentVotes(address account) external view returns (uint256);
@saadSarwar28
saadSarwar28 / contracts...RugZombieAuthenticator.sol
Created September 10, 2021 21:03
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.4+commit.c7e474f2.js&optimize=true&runs=200&gist=
pragma solidity >=0.7.0 <0.9.0;
// import "./token/BEP20/IBEP20.sol";
// SPDX-License-Identifier: MIT
/**
* @title RugZombieAuthenticator
* @author Saad Sarwar
*/
@saadSarwar28
saadSarwar28 / contracts...Zombets.sol
Created September 12, 2021 12:39
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.4+commit.c7e474f2.js&optimize=true&runs=200&gist=
pragma solidity ^0.8.4;
// ZombieToken interface.
interface IZombieToken {
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
@saadSarwar28
saadSarwar28 / contracts...RPN.sol
Created October 26, 2022 23:30
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=true&runs=200&gist=
// SPDX-License-Identifier: GPLv3
pragma solidity ^0.8.12;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, 'SafeMath: addition overflow');