This file contains hidden or 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.0; | |
import "./libs/zeppelin/token/BEP20/IBEP20.sol"; | |
interface ILPToken is IBEP20 { | |
function getReserves() external view returns (uint, uint); | |
} |
This file contains hidden or 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.0; | |
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; | |
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; | |
import "../libs/fota/MerkelProof.sol"; | |
contract TheAirdropDistributor is EIP712 { |
This file contains hidden or 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.0; | |
import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol"; | |
import "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol"; | |
import "../libs/fota/MerkelProof.sol"; | |
contract TheAirdropDistributor is EIP712Upgradeable { |
This file contains hidden or 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
import Web3 from 'web3' | |
import { whiteList } from './whiteList' | |
const web3Provider = new Web3.providers.HttpProvider('https://bsc-dataseed1.binance.org:443') | |
const web3 = new Web3(web3Provider) | |
const merkleTree = { | |
leaves: null, | |
root: null | |
} |
This file contains hidden or 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.0; | |
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; | |
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; | |
contract MessageVerifier is EIP712 { | |
constructor(string memory _name, string memory _version) EIP712(_name, _version) { |
This file contains hidden or 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
global | |
log /dev/log local0 | |
log /dev/log local1 notice | |
chroot /var/lib/haproxy | |
stats socket /run/haproxy/yyy.sock mode 660 level yyy | |
stats timeout 30s | |
user haproxy | |
group haproxy | |
daemon | |
maxconn 2048 |
This file contains hidden or 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
const util require('util') | |
const eUtil = require('ethereumjs-util') | |
function translate(str = '', list = []) { | |
for (const i of list) { | |
str = util.format(str, i) | |
} | |
return str | |
} |
This file contains hidden or 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
import { User } from '../../models' | |
import tokenGenerator from '../../utils/token-generator' | |
import config from '../../configs' | |
async function signupUser(body) { | |
let user = await User.create(body) | |
const tokenData = user.genTokenData() | |
user = await User.commonUserData(user.toJSON()) | |
user.token = tokenGenerator.generate(tokenData) | |
user.refreshToken = tokenGenerator.generate(tokenData, { expiresIn: config.refreshTokenLife }) |
This file contains hidden or 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
import { User } from '../../models' | |
import { userLocale } from '../../locales' | |
import service from './service' | |
import responseBuilder from '../../utils/response-builder' | |
import errorUtil from '../../utils/error' | |
import to from '../../utils/to' | |
async function show(req, res) { | |
const [error, user] = await to(User.commonUserData(req.user)) | |
if (error) { |
NewerOlder