Skip to content

Instantly share code, notes, and snippets.

pragma solidity ^0.6.11;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
// File: openzeppelin-solidity/contracts/introspection/IERC165.sol
pragma solidity ^0.5.2;
/**
* @title IERC165
* @dev https://eips.ethereum.org/EIPS/eip-165
*/
interface IERC165 {
pragma solidity >=0.5.0 <0.6.0;
import "./ISubredditPointsParent.sol";
import "./contracts-package/Initializable.sol";
import "./contracts-package/Ownable.sol";
import "./contracts-package/ERC20.sol";
import "./libraries/Address.sol";
// ERC20 and borrows only operators notion from ERC777, accounts can revoke default operator
contract SubredditPointsParent is
pragma solidity >=0.5.0 <0.6.0;
import "../contracts-package/IERC20.sol";
import "./ERC20Predicate.sol";
contract MintableERC20Predicate is ERC20Predicate {
constructor(
address _withdrawManager,
address _depositManager,
// File: openzeppelin-solidity/contracts/math/SafeMath.sol
pragma solidity ^0.5.2;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
library SafeMath {
/**
let Web3 = require("web3");
const provider = new Web3.providers.HttpProvider(
"https://rpc-mumbai.matic.today"
);
const web3 = new Web3(provider);
web3.eth
.getTransactionReceipt(
"0xd38dd611ae110286a9c640e08181869211752be9a48b52b9e6edeba90fe58921"
// File: contracts/contracts-package/IERC20.sol
// File: @openzeppelin/contracts-ethereum-package/contracts/token/ERC20/IERC20.sol
pragma solidity ^0.5.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
const HDWalletProvider = require("@truffle/hdwallet-provider");
//
// const fs = require('fs');
// const mnemonic = fs.readFileSync(".secret").toString().trim();
const MNEMONIC =
process.env.MNEMONIC ||
"";
module.exports = {
// File: LibReentrancyGuardRichErrors.sol
/*
Copyright 2019 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
{
"PLASMA_ROOTCHAIN_ADDRESS": "0x2890bA17EfE978480615e330ecB65333b880928e",
"POS_ROOT_CHAIN_MANAGER_ADDRESS": "0x53Df1D4F98602a04661486AAF433952878706077",
"MATIC_PROVIDER": "https://rpc-mumbai.matic.today",
"PARENT_PROVIDER": "https://goerli.infura.io/v3/75aa7935112647bc8cc49d20beafa189",
"PRIVATE_KEY": "0xHAHAHA",
"FROM_ADDRESS": "0xFUFUFU",
"GOERLI_ERC20": "0x24eb81d800786ffad0f26611868b8d8a02303790",
"MUMBAI_ERC20": "0x6EC9cF44A185102b9A312dae7C8f6D8961C0E020",
"GOERLI_WETH": "0xd0A5b09353db5aaE3d133511e17Ec8369757be7c",