- Contract name:
- OneSwap
- Optimization enabled
- true
- Compiler version
- v0.8.4+commit.c7e474f2
- Optimization runs
- 200
- EVM Version
- default
- Verified at
- 2021-09-18 11:45:13.598099Z
Constructor Arguments
000000000000000000000000b1ac902b5d81d58739a1404b05ff34722c4d3c71
Arg [0] (address) : 0xb1ac902b5d81d58739a1404b05ff34722c4d3c71
Contract source code
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
// OneSwap token contract was forked from Compound's Comp token with ability to vote and delegate votes
// when the Governance Module is live
contract OneSwap {
/// @notice EIP-20 token name for this token
string public constant name = "1Swap Token";
/// @notice EIP-20 token symbol for this token
string public constant symbol = "1SWAP";
/// @notice EIP-20 token decimals for this token
uint8 public constant decimals = 18;
/// @notice Total number of tokens in circulation
uint256 public constant totalSupply = 1_000_000_000 ether; // 1 billion 1SWAP
/// @notice Allowance amounts on behalf of others
mapping(address => mapping(address => uint96)) internal allowances;
/// @notice Official record of token balances for each account
mapping(address => uint96) internal balances;
/// @notice A record of each accounts delegate
mapping(address => address) public delegates;
/// @notice A checkpoint for marking number of votes from a given block
struct Checkpoint {
uint32 fromBlock;
uint96 votes;
}
/// @notice A record of votes checkpoints for each account, by index
mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;
/// @notice The number of checkpoints for each account
mapping(address => uint32) public numCheckpoints;
/// @notice The EIP-712 typehash for the contract's domain
bytes32 public constant DOMAIN_TYPEHASH =
keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");
/// @notice The EIP-712 typehash for the delegation struct used by the contract
bytes32 public constant DELEGATION_TYPEHASH =
keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");
/// @notice A record of states for signing / validating signatures
mapping(address => uint256) public nonces;
/// @notice An event thats emitted when an account changes its delegate
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
/// @notice An event thats emitted when a delegate account's vote balance changes
event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);
/// @notice The standard EIP-20 transfer event
event Transfer(address indexed from, address indexed to, uint256 amount);
/// @notice The standard EIP-20 approval event
event Approval(address indexed owner, address indexed spender, uint256 amount);
/**
* @notice Construct a new token
* @param account The initial account to grant all the tokens
*/
constructor(address account) {
balances[account] = uint96(totalSupply);
emit Transfer(address(0), account, totalSupply);
}
/**
* @notice Get the number of tokens `spender` is approved to spend on behalf of `account`
* @param account The address of the account holding the funds
* @param spender The address of the account spending the funds
* @return The number of tokens approved
*/
function allowance(address account, address spender) external view returns (uint256) {
return allowances[account][spender];
}
/**
* @notice Approve `spender` to transfer up to `amount` from `src`
* @dev This will overwrite the approval amount for `spender`
* and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)
* @param spender The address of the account which may transfer tokens
* @param rawAmount The number of tokens that are approved (2^256-1 means infinite)
* @return Whether or not the approval succeeded
*/
function approve(address spender, uint256 rawAmount) external returns (bool) {
uint96 amount;
if (rawAmount == type(uint256).max) {
amount = type(uint96).max;
} else {
amount = safe96(rawAmount, "1Swap::approve: amount exceeds 96 bits");
}
allowances[msg.sender][spender] = amount;
emit Approval(msg.sender, spender, amount);
return true;
}
/**
* @notice Get the number of tokens held by the `account`
* @param account The address of the account to get the balance of
* @return The number of tokens held
*/
function balanceOf(address account) external view returns (uint256) {
return balances[account];
}
/**
* @notice Transfer `amount` tokens from `msg.sender` to `dst`
* @param dst The address of the destination account
* @param rawAmount The number of tokens to transfer
* @return Whether or not the transfer succeeded
*/
function transfer(address dst, uint256 rawAmount) external returns (bool) {
uint96 amount = safe96(rawAmount, "1Swap::transfer: amount exceeds 96 bits");
_transferTokens(msg.sender, dst, amount);
return true;
}
/**
* @notice Transfer `amount` tokens from `src` to `dst`
* @param src The address of the source account
* @param dst The address of the destination account
* @param rawAmount The number of tokens to transfer
* @return Whether or not the transfer succeeded
*/
function transferFrom(
address src,
address dst,
uint256 rawAmount
) external returns (bool) {
address spender = msg.sender;
uint96 spenderAllowance = allowances[src][spender];
uint96 amount = safe96(rawAmount, "1Swap::approve: amount exceeds 96 bits");
if (spender != src && spenderAllowance != type(uint96).max) {
uint96 newAllowance = sub96(
spenderAllowance,
amount,
"1Swap::transferFrom: transfer amount exceeds spender allowance"
);
allowances[src][spender] = newAllowance;
emit Approval(src, spender, newAllowance);
}
_transferTokens(src, dst, amount);
return true;
}
/**
* @notice Delegate votes from `msg.sender` to `delegatee`
* @param delegatee The address to delegate votes to
*/
function delegate(address delegatee) public {
return _delegate(msg.sender, delegatee);
}
/**
* @notice Delegates votes from signatory to `delegatee`
* @param delegatee The address to delegate votes to
* @param nonce The contract state required to match the signature
* @param expiry The time at which to expire the signature
* @param v The recovery byte of the signature
* @param r Half of the ECDSA signature pair
* @param s Half of the ECDSA signature pair
*/
function delegateBySig(
address delegatee,
uint256 nonce,
uint256 expiry,
uint8 v,
bytes32 r,
bytes32 s
) public {
bytes32 domainSeparator = keccak256(
abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))
);
bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));
bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
address signatory = ecrecover(digest, v, r, s);
require(signatory != address(0), "1Swap::delegateBySig: invalid signature");
require(nonce == nonces[signatory]++, "1Swap::delegateBySig: invalid nonce");
require(block.timestamp <= expiry, "1Swap::delegateBySig: signature expired");
return _delegate(signatory, delegatee);
}
/**
* @notice Gets the current votes balance for `account`
* @param account The address to get votes balance
* @return The number of current votes for `account`
*/
function getCurrentVotes(address account) external view returns (uint96) {
uint32 nCheckpoints = numCheckpoints[account];
return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
}
/**
* @notice Determine the prior number of votes for an account as of a block number
* @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
* @param account The address of the account to check
* @param blockNumber The block number to get the vote balance at
* @return The number of votes the account had as of the given block
*/
function getPriorVotes(address account, uint256 blockNumber) public view returns (uint96) {
require(blockNumber < block.number, "1Swap::getPriorVotes: not yet determined");
uint32 nCheckpoints = numCheckpoints[account];
if (nCheckpoints == 0) {
return 0;
}
// First check most recent balance
if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {
return checkpoints[account][nCheckpoints - 1].votes;
}
// Next check implicit zero balance
if (checkpoints[account][0].fromBlock > blockNumber) {
return 0;
}
uint32 lower = 0;
uint32 upper = nCheckpoints - 1;
while (upper > lower) {
uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
Checkpoint memory cp = checkpoints[account][center];
if (cp.fromBlock == blockNumber) {
return cp.votes;
} else if (cp.fromBlock < blockNumber) {
lower = center;
} else {
upper = center - 1;
}
}
return checkpoints[account][lower].votes;
}
function _delegate(address delegator, address delegatee) internal {
address currentDelegate = delegates[delegator];
uint96 delegatorBalance = balances[delegator];
delegates[delegator] = delegatee;
emit DelegateChanged(delegator, currentDelegate, delegatee);
_moveDelegates(currentDelegate, delegatee, delegatorBalance);
}
function _transferTokens(
address src,
address dst,
uint96 amount
) internal {
require(src != address(0), "1Swap::_transferTokens: cannot transfer from the zero address");
require(dst != address(0), "1Swap::_transferTokens: cannot transfer to the zero address");
balances[src] = sub96(balances[src], amount, "1Swap::_transferTokens: transfer amount exceeds balance");
balances[dst] = add96(balances[dst], amount, "1Swap::_transferTokens: transfer amount overflows");
emit Transfer(src, dst, amount);
_moveDelegates(delegates[src], delegates[dst], amount);
}
function _moveDelegates(
address srcRep,
address dstRep,
uint96 amount
) internal {
if (srcRep != dstRep && amount > 0) {
if (srcRep != address(0)) {
uint32 srcRepNum = numCheckpoints[srcRep];
uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;
uint96 srcRepNew = sub96(srcRepOld, amount, "1Swap::_moveVotes: vote amount underflows");
_writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);
}
if (dstRep != address(0)) {
uint32 dstRepNum = numCheckpoints[dstRep];
uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;
uint96 dstRepNew = add96(dstRepOld, amount, "1Swap::_moveVotes: vote amount overflows");
_writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);
}
}
}
function _writeCheckpoint(
address delegatee,
uint32 nCheckpoints,
uint96 oldVotes,
uint96 newVotes
) internal {
uint32 blockNumber = safe32(block.number, "1Swap::_writeCheckpoint: block number exceeds 32 bits");
if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {
checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;
} else {
checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);
numCheckpoints[delegatee] = nCheckpoints + 1;
}
emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
}
function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {
require(n < 2**32, errorMessage);
return uint32(n);
}
function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {
require(n < 2**96, errorMessage);
return uint96(n);
}
function add96(
uint96 a,
uint96 b,
string memory errorMessage
) internal pure returns (uint96) {
uint96 c = a + b;
require(c >= a, errorMessage);
return c;
}
function sub96(
uint96 a,
uint96 b,
string memory errorMessage
) internal pure returns (uint96) {
require(b <= a, errorMessage);
return a - b;
}
function getChainId() internal view returns (uint256) {
uint256 chainId;
assembly {
chainId := chainid()
}
return chainId;
}
}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"DelegateChanged","inputs":[{"type":"address","name":"delegator","internalType":"address","indexed":true},{"type":"address","name":"fromDelegate","internalType":"address","indexed":true},{"type":"address","name":"toDelegate","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"DelegateVotesChanged","inputs":[{"type":"address","name":"delegate","internalType":"address","indexed":true},{"type":"uint256","name":"previousBalance","internalType":"uint256","indexed":false},{"type":"uint256","name":"newBalance","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"DELEGATION_TYPEHASH","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"DOMAIN_TYPEHASH","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"rawAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint32","name":"fromBlock","internalType":"uint32"},{"type":"uint96","name":"votes","internalType":"uint96"}],"name":"checkpoints","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint32","name":"","internalType":"uint32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"delegate","inputs":[{"type":"address","name":"delegatee","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"delegateBySig","inputs":[{"type":"address","name":"delegatee","internalType":"address"},{"type":"uint256","name":"nonce","internalType":"uint256"},{"type":"uint256","name":"expiry","internalType":"uint256"},{"type":"uint8","name":"v","internalType":"uint8"},{"type":"bytes32","name":"r","internalType":"bytes32"},{"type":"bytes32","name":"s","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"delegates","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint96","name":"","internalType":"uint96"}],"name":"getCurrentVotes","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint96","name":"","internalType":"uint96"}],"name":"getPriorVotes","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"uint256","name":"blockNumber","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"nonces","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint32","name":"","internalType":"uint32"}],"name":"numCheckpoints","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"dst","internalType":"address"},{"type":"uint256","name":"rawAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"src","internalType":"address"},{"type":"address","name":"dst","internalType":"address"},{"type":"uint256","name":"rawAmount","internalType":"uint256"}]}]
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101215760003560e01c806370a08231116100ad578063b4b5ea5711610071578063b4b5ea5714610343578063c3cda52014610356578063dd62ed3e14610369578063e7a324dc146103a9578063f1127ed8146103d057600080fd5b806370a082311461028f578063782d6fe1146102c15780637ecebe00146102ec57806395d89b411461030c578063a9059cbb1461033057600080fd5b806323b872dd116100f457806323b872dd146101d1578063313ce567146101e4578063587cde1e146101fe5780635c19a95c1461023f5780636fcfff451461025457600080fd5b806306fdde0314610126578063095ea7b31461016657806318160ddd1461018957806320606b70146101aa575b600080fd5b6101506040518060400160405280600b81526020016a18a9bbb0b8102a37b5b2b760a91b81525081565b60405161015d919061154d565b60405180910390f35b610179610174366004611488565b610437565b604051901515815260200161015d565b61019c6b033b2e3c9fd0803ce800000081565b60405190815260200161015d565b61019c7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6101796101df36600461144d565b6104f6565b6101ec601281565b60405160ff909116815260200161015d565b61022761020c366004611401565b6002602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161015d565b61025261024d366004611401565b610637565b005b61027a610262366004611401565b60046020526000908152604090205463ffffffff1681565b60405163ffffffff909116815260200161015d565b61019c61029d366004611401565b6001600160a01b03166000908152600160205260409020546001600160601b031690565b6102d46102cf366004611488565b610644565b6040516001600160601b03909116815260200161015d565b61019c6102fa366004611401565b60056020526000908152604090205481565b61015060405180604001604052806005815260200164031535741560dc1b81525081565b61017961033e366004611488565b6108d1565b6102d4610351366004611401565b61090d565b6102526103643660046114b1565b61098b565b61019c61037736600461141b565b6001600160a01b039182166000908152602081815260408083209390941682529190915220546001600160601b031690565b61019c7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b6104136103de36600461150f565b600360209081526000928352604080842090915290825290205463ffffffff811690600160201b90046001600160601b031682565b6040805163ffffffff90931683526001600160601b0390911660208301520161015d565b60008060001983141561045257506001600160601b03610477565b6104748360405180606001604052806026815260200161173460269139610c7d565b90505b336000818152602081815260408083206001600160a01b0389168085529083529281902080546001600160601b0319166001600160601b03871690811790915590519081529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a360019150505b92915050565b6001600160a01b0383166000908152602081815260408083203380855290835281842054825160608101909352602680845291936001600160601b0390911692859261054c928892919061173490830139610c7d565b9050866001600160a01b0316836001600160a01b03161415801561057957506001600160601b0382811614155b1561061f5760006105a383836040518060600160405280603e81526020016116f6603e9139610cac565b6001600160a01b03898116600081815260208181526040808320948a168084529482529182902080546001600160601b0319166001600160601b0387169081179091559151918252939450919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505b61062a878783610cf6565b5060019695505050505050565b6106413382610f47565b50565b60004382106106ab5760405162461bcd60e51b815260206004820152602860248201527f31537761703a3a6765745072696f72566f7465733a206e6f74207965742064656044820152671d195c9b5a5b995960c21b60648201526084015b60405180910390fd5b6001600160a01b03831660009081526004602052604090205463ffffffff16806106d95760009150506104f0565b6001600160a01b038416600090815260036020526040812084916106fe600185611619565b63ffffffff90811682526020820192909252604001600020541611610771576001600160a01b038416600090815260036020526040812090610741600184611619565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b031691506104f09050565b6001600160a01b038416600090815260036020908152604080832083805290915290205463ffffffff168310156107ac5760009150506104f0565b6000806107ba600184611619565b90505b8163ffffffff168163ffffffff16111561088c57600060026107df8484611619565b6107e991906115ea565b6107f39083611619565b6001600160a01b038816600090815260036020908152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b031691810191909152919250871415610860576020015194506104f09350505050565b805163ffffffff1687111561087757819350610885565b610882600183611619565b92505b50506107bd565b506001600160a01b038516600090815260036020908152604080832063ffffffff909416835292905220546001600160601b03600160201b9091041691505092915050565b6000806108f68360405180606001604052806027815260200161178260279139610c7d565b9050610903338583610cf6565b5060019392505050565b6001600160a01b03811660009081526004602052604081205463ffffffff1680610938576000610984565b6001600160a01b03831660009081526003602052604081209061095c600184611619565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b03165b9392505050565b604080518082018252600b81526a18a9bbb0b8102a37b5b2b760a91b60209182015281517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866818301527f4e0ca8f3e95e541cec1a00a3ccae6c58899e5db1d2b4f377cb73e3c97e50b71a81840152466060820152306080808301919091528351808303909101815260a0820184528051908301207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c08301526001600160a01b038a1660e083015261010082018990526101208083018990528451808403909101815261014083019094528351939092019290922061190160f01b6101608401526101628301829052610182830181905290916000906101a20160408051601f198184030181528282528051602091820120600080855291840180845281905260ff8a169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa158015610b11573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b845760405162461bcd60e51b815260206004820152602760248201527f31537761703a3a64656c656761746542795369673a20696e76616c6964207369604482015266676e617475726560c81b60648201526084016106a2565b6001600160a01b0381166000908152600560205260408120805491610ba88361165e565b919050558914610c065760405162461bcd60e51b815260206004820152602360248201527f31537761703a3a64656c656761746542795369673a20696e76616c6964206e6f6044820152626e636560e81b60648201526084016106a2565b87421115610c665760405162461bcd60e51b815260206004820152602760248201527f31537761703a3a64656c656761746542795369673a207369676e617475726520604482015266195e1c1a5c995960ca1b60648201526084016106a2565b610c70818b610f47565b505050505b505050505050565b600081600160601b8410610ca45760405162461bcd60e51b81526004016106a2919061154d565b509192915050565b6000836001600160601b0316836001600160601b031611158290610ce35760405162461bcd60e51b81526004016106a2919061154d565b50610cee838561163e565b949350505050565b6001600160a01b038316610d725760405162461bcd60e51b815260206004820152603d60248201527f31537761703a3a5f7472616e73666572546f6b656e733a2063616e6e6f74207460448201527f72616e736665722066726f6d20746865207a65726f206164647265737300000060648201526084016106a2565b6001600160a01b038216610dee5760405162461bcd60e51b815260206004820152603b60248201527f31537761703a3a5f7472616e73666572546f6b656e733a2063616e6e6f74207460448201527f72616e7366657220746f20746865207a65726f2061646472657373000000000060648201526084016106a2565b6001600160a01b038316600090815260016020908152604091829020548251606081019093526037808452610e39936001600160601b0390921692859291906117a990830139610cac565b6001600160a01b03848116600090815260016020908152604080832080546001600160601b0319166001600160601b03968716179055928616825290829020548251606081019093526031808452610ea1949190911692859290919061169090830139610fd1565b6001600160a01b0383811660008181526001602090815260409182902080546001600160601b0319166001600160601b03968716179055905193851684529092918616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36001600160a01b03808416600090815260026020526040808220548584168352912054610f429291821691168361101e565b505050565b6001600160a01b03808316600081815260026020818152604080842080546001845282862054949093528787166001600160a01b031984168117909155905191909516946001600160601b039092169391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4610fcb82848361101e565b50505050565b600080610fde84866115c8565b9050846001600160601b0316816001600160601b0316101583906110155760405162461bcd60e51b81526004016106a2919061154d565b50949350505050565b816001600160a01b0316836001600160a01b03161415801561104957506000816001600160601b0316115b15610f42576001600160a01b0383161561110e576001600160a01b03831660009081526004602052604081205463ffffffff1690816110895760006110d5565b6001600160a01b0385166000908152600360205260408120906110ad600185611619565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b03165b905060006110fc82856040518060600160405280602981526020016117e060299139610cac565b905061110a868484846111c6565b5050505b6001600160a01b03821615610f42576001600160a01b03821660009081526004602052604081205463ffffffff169081611149576000611195565b6001600160a01b03841660009081526003602052604081209061116d600185611619565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b03165b905060006111bc828560405180606001604052806028815260200161175a60289139610fd1565b9050610c75858484845b60006111ea436040518060600160405280603581526020016116c1603591396113be565b905060008463ffffffff1611801561124457506001600160a01b038516600090815260036020526040812063ffffffff831691611228600188611619565b63ffffffff908116825260208201929092526040016000205416145b156112b8576001600160a01b0385166000908152600360205260408120839161126e600188611619565b63ffffffff168152602081019190915260400160002080546001600160601b0392909216600160201b026fffffffffffffffffffffffff0000000019909216919091179055611369565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000908152600382528681208b8616825290915294909420925183549451909116600160201b026fffffffffffffffffffffffffffffffff199094169116179190911790556113388460016115a0565b6001600160a01b0386166000908152600460205260409020805463ffffffff191663ffffffff929092169190911790555b604080516001600160601b038086168252841660208201526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a25050505050565b600081600160201b8410610ca45760405162461bcd60e51b81526004016106a2919061154d565b80356001600160a01b03811681146113fc57600080fd5b919050565b600060208284031215611412578081fd5b610984826113e5565b6000806040838503121561142d578081fd5b611436836113e5565b9150611444602084016113e5565b90509250929050565b600080600060608486031215611461578081fd5b61146a846113e5565b9250611478602085016113e5565b9150604084013590509250925092565b6000806040838503121561149a578182fd5b6114a3836113e5565b946020939093013593505050565b60008060008060008060c087890312156114c9578182fd5b6114d2876113e5565b95506020870135945060408701359350606087013560ff811681146114f5578283fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215611521578182fd5b61152a836113e5565b9150602083013563ffffffff81168114611542578182fd5b809150509250929050565b6000602080835283518082850152825b818110156115795785810183015185820160400152820161155d565b8181111561158a5783604083870101525b50601f01601f1916929092016040019392505050565b600063ffffffff8083168185168083038211156115bf576115bf611679565b01949350505050565b60006001600160601b038083168185168083038211156115bf576115bf611679565b600063ffffffff8084168061160d57634e487b7160e01b83526012600452602483fd5b92169190910492915050565b600063ffffffff8381169083168181101561163657611636611679565b039392505050565b60006001600160601b038381169083168181101561163657611636611679565b600060001982141561167257611672611679565b5060010190565b634e487b7160e01b600052601160045260246000fdfe31537761703a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f777331537761703a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747331537761703a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e636531537761703a3a617070726f76653a20616d6f756e742065786365656473203936206269747331537761703a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f777331537761703a3a7472616e736665723a20616d6f756e742065786365656473203936206269747331537761703a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e636531537761703a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f7773a2646970667358221220f7aba4b6781647641ccddc7d38be5a0cec3f6614ddf772cc931b5f452283bd0464736f6c63430008040033