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.7; | |
import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol'; | |
import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeMath.sol'; | |
contract Allowance is Ownable { | |
using SafeMath for uint; | |
mapping(address => uint) public allowance; | |
event AllowanceChange(address indexed _forWho , address indexed _fromWhom , uint _oldAmount , uint newAmount); | |
modifier ownerOrAllowed (uint _amount){ |
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
export const getQueryParams = queryParams => { | |
const urlParams = new URLSearchParams(queryParams); | |
return Array.from(urlParams.entries()).reduce((acc, [key, value]) => { | |
acc[key] = value; | |
return acc; | |
}, {}); | |
}; |