Skip to content

TechPay-io/TechPay-Mint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TechPay Mint DeFi module

The repository implements Mint module of the TechPay DeFi smart contracts in Solidity.

Please note we use OpenZeppelin library version 2.5 along with the Solidity 0.5 and truffle to conform with the EVM implemented in the Photon block chain. Consult the Truffle documents to find out how to build and deploy the smart contract implemented here.

In general, all you should need to do is to call truffle build to get the deployable contract code and ABI inside build/ folder.

Deployment Requirements

The TechPay Mint contract has following dependencies:

  • Wrapped TPC ERC20 contract wTPC.
  • At least one ERC20 token contract with minting and burning capability, see IERC20Detailed. We use OpenZeppelin implementation internally.
  • Band Protocol price oracle proxy, compatible with our proxy interface, or TechPay Price Oracle Proxy TechPay Oracle PriceFeed.
  • You need ChainLink compatible price oracle aggregate for each ERC20 token, if the deployment uses TechPay Price Oracle proxy. See AggregatorInterface.
  • TechPay DeFi Token Storage contract, available in this repository.
  • TechPay DeFi Token Registry contract, available in this repository.
  • TechPay Mint Address Provider contract, available in this repository.
  • TechPay Mint Reward Distribution contract, available in this repository.

Price oracle aggregates must receive price feeds from trusted external sources. Tokens will be rejected without a price tag even if they are registered in the token registry to be used with the Mint. The TechPay own deployment uses Band Protocol price oracle proxy to offer accurate and precise price value calculations.

Deployment using Photon JavaScript Console

We assume you have the deployment account unlocked using personal.unlockAccount() call, and you have the account address stored in account variable.

var account = "0x11111111111111111111111111111111";
personal.unlockAccount(account, "very-secret-password", 300);
web3.tpc.defaultAccount = account;

Deployment Steps

  1. Deploy wTPC and ERC20 tokens you will be using with the Mint.

  2. Obtain address of a price oracle proxy of your choice. Continue with the step 5, if you are going to use an external proxy. Alternatively, deploy ChainLink compatible Price Oracle Aggregates and continue with the next step.

  3. Deploy TechPay Price Oracle Proxy contract.

    /**
     * This deploys TechPay Price Oracle Proxy contract.
     */
    var priceProxyAbi = JSON.parse('[{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"aggregators","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"token","type":"address"}],"name":"getPrice","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"aggregator","type":"address"}],"name":"setAggregator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"token","type":"address"},{"name":"_back","type":"uint256"}],"name":"getPreviousTimeStamp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"token","type":"address"},{"name":"_back","type":"uint256"}],"name":"getPreviousPrice","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"token","type":"address"}],"name":"getTimeStamp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"token","type":"address"},{"indexed":false,"name":"aggregator","type":"address"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"AggregatorChanged","type":"event"}]');
    var priceProxyByteCode = "0x608060405234801561001057600080fd5b5060008054600160a060020a031916331790556108e9806100326000396000f3fe6080604052600436106100825763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663112cdab9811461008757806341976e09146100d65780637394a7f61461011b5780638da5cb5b14610158578063e0a3581e1461016d578063e889e5d6146101a6578063eb470ebf146101df575b600080fd5b34801561009357600080fd5b506100ba600480360360208110156100aa57600080fd5b5035600160a060020a0316610212565b60408051600160a060020a039092168252519081900360200190f35b3480156100e257600080fd5b50610109600480360360208110156100f957600080fd5b5035600160a060020a031661022d565b60408051918252519081900360200190f35b34801561012757600080fd5b506101566004803603604081101561013e57600080fd5b50600160a060020a038135811691602001351661032a565b005b34801561016457600080fd5b506100ba610407565b34801561017957600080fd5b506101096004803603604081101561019057600080fd5b50600160a060020a038135169060200135610416565b3480156101b257600080fd5b50610109600480360360408110156101c957600080fd5b50600160a060020a03813516906020013561060e565b3480156101eb57600080fd5b506101096004803603602081101561020257600080fd5b5035600160a060020a03166107d2565b600160205260009081526040902054600160a060020a031681565b600160a060020a03818116600090815260016020526040812054909116151561028e576040805160e560020a62461bcd028152602060048201526014602482015260008051602061089e833981519152604482015290519081900360640190fd5b600160a060020a038083166000908152600160209081526040918290205482517f50d25bcd00000000000000000000000000000000000000000000000000000000815292519316926350d25bcd926004808201939291829003018186803b1580156102f857600080fd5b505afa15801561030c573d6000803e3d6000fd5b505050506040513d602081101561032257600080fd5b505192915050565b600054600160a060020a0316331461038c576040805160e560020a62461bcd02815260206004820152601160248201527f6163636573732072657374726963746564000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a03828116600081815260016020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff1916948616948517905581519384524290840152805191927f51012bc010926f3f948f99b90ed487a209375a900797c69e70dbc17f09264357929081900390910190a25050565b600054600160a060020a031681565b600160a060020a038281166000908152600160205260408120549091161515610477576040805160e560020a62461bcd028152602060048201526014602482015260008051602061089e833981519152604482015290519081900360640190fd5b600160a060020a0380841660009081526001602090815260408083205481517f668a0f0200000000000000000000000000000000000000000000000000000000815291519394169263668a0f0292600480840193919291829003018186803b1580156104e257600080fd5b505afa1580156104f6573d6000803e3d6000fd5b505050506040513d602081101561050c57600080fd5b5051905080831115610568576040805160e560020a62461bcd02815260206004820152601260248201527f6e6f7420656e6f75676820686973746f72790000000000000000000000000000604482015290519081900360640190fd5b600160a060020a038085166000908152600160209081526040918290205482517fb633620c0000000000000000000000000000000000000000000000000000000081528786036004820152925193169263b633620c926024808201939291829003018186803b1580156105da57600080fd5b505afa1580156105ee573d6000803e3d6000fd5b505050506040513d602081101561060457600080fd5b5051949350505050565b600160a060020a03828116600090815260016020526040812054909116151561066f576040805160e560020a62461bcd028152602060048201526014602482015260008051602061089e833981519152604482015290519081900360640190fd5b600160a060020a0380841660009081526001602090815260408083205481517f668a0f0200000000000000000000000000000000000000000000000000000000815291519394169263668a0f0292600480840193919291829003018186803b1580156106da57600080fd5b505afa1580156106ee573d6000803e3d6000fd5b505050506040513d602081101561070457600080fd5b5051905080831115610760576040805160e560020a62461bcd02815260206004820152601260248201527f6e6f7420656e6f75676820686973746f72790000000000000000000000000000604482015290519081900360640190fd5b600160a060020a038085166000908152600160209081526040918290205482517fb5ab58dc0000000000000000000000000000000000000000000000000000000081528786036004820152925193169263b5ab58dc926024808201939291829003018186803b1580156105da57600080fd5b600160a060020a038181166000908152600160205260408120549091161515610833576040805160e560020a62461bcd028152602060048201526014602482015260008051602061089e833981519152604482015290519081900360640190fd5b600160a060020a038083166000908152600160209081526040918290205482517f8205bf6a0000000000000000000000000000000000000000000000000000000081529251931692638205bf6a926004808201939291829003018186803b1580156102f857600080fdfe6f7261636c65206e6f7420617661696c61626c65000000000000000000000000a165627a7a72305820bdbd6e9ea6a3baee45ee1b2a40a6ab3e42b0c28d5c764f604b1ab551b0ab26850029";
     
    // create new contract
    contract = web3.tpc.contract(priceProxyAbi);
    deploy = contract.new({
        data: priceProxyByteCode,
        from: account,
        gas: 4000000
    });
     
    // get the contract address (you may need to wait for the receipt to be available)
    priceProxyAddress = tpc.getTransactionReceipt(deploy.transactionHash).contractAddress;    
  4. Assign Price Oracle Aggregates to your ERC20 tokens on the Price Proxy.

    // instantiate the oracle proxy deployed above
    var priceProxy = web3.tpc.contract(priceProxyAbi).at(priceProxyAddress);
    
    // what tokens do we use
    var tokenWTPC = "0x4449d20a3dec996644c1fc453198ef6fe8497cf2";
    var tokenUSD = "0x6e4e462142c59b915ab80ee1ecb3339e2f299b69";
    
    // what price oracle aggregates we use
    var oracleTPC = "0x6e26076808d04df0c65553ead5a3a58793ead4e5";
    var oracleUSD = "0x8019db8a3ff1887d047f2dc1c7265ea8dab1ca80";
    
    // assign the oracles to tokens
    priceProxy.setAggregator(tokenWTPC, oracleTPC);
    priceProxy.setAggregator(tokenUSD, oracleUSD);
  5. Deploy Token Registry from this repository.

    /**
    * This deploys TechPay DeFi Tokens Registry
    */
    var registryAbi = JSON.parse('[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"TokenAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"TokenUpdated","type":"event"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokens","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"string","name":"logo","type":"string"},{"internalType":"address","name":"oracle","type":"address"},{"internalType":"uint8","name":"priceDecimals","type":"uint8"},{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"bool","name":"canDeposit","type":"bool"},{"internalType":"bool","name":"canMint","type":"bool"},{"internalType":"bool","name":"isTradable","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokensList","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tokensCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"priceDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"isActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"canDeposit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"canMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"canTrade","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"string","name":"_logo","type":"string"},{"internalType":"address","name":"_oracle","type":"address"},{"internalType":"uint8","name":"_priceDecimals","type":"uint8"},{"internalType":"bool","name":"_isActive","type":"bool"},{"internalType":"bool","name":"_canDeposit","type":"bool"},{"internalType":"bool","name":"_canMint","type":"bool"},{"internalType":"bool","name":"_isTradable","type":"bool"}],"name":"addToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"string","name":"_logo","type":"string"},{"internalType":"address","name":"_oracle","type":"address"},{"internalType":"uint8","name":"_priceDecimals","type":"uint8"},{"internalType":"bool","name":"_isActive","type":"bool"},{"internalType":"bool","name":"_canDeposit","type":"bool"},{"internalType":"bool","name":"_canMint","type":"bool"}],"name":"updateToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]');
    var registryByteCode = "0x6080604052611f4f806100136000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80639f8a13d711610097578063cefe0f2111610066578063cefe0f2114610354578063d75c1c4c1461039d578063e486033914610461578063f2fde38b14610658576100f5565b80639f8a13d7146102a1578063a64ed8ba146102d4578063c2ba4744146102ee578063c4d66de814610321576100f5565b8063607626a5116100d3578063607626a5146101ba578063715018a6146102895780638da5cb5b146102915780638f32d59b14610299576100f5565b80634bf0d331146100fa5780634d12e34e14610141578063559f05dc14610187575b600080fd5b61012d6004803603602081101561011057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661068b565b604080519115158252519081900360200190f35b61015e6004803603602081101561015757600080fd5b50356106d3565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61012d6004803603602081101561019d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610707565b61028760048036036101008110156101d157600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561020957600080fd5b82018360208201111561021b57600080fd5b8035906020019184600183028401116401000000008311171561023d57600080fd5b919350915073ffffffffffffffffffffffffffffffffffffffff8135169060ff6020820135169060408101351515906060810135151590608081013515159060a001351515610751565b005b610287611043565b61015e611125565b61012d611142565b61012d600480360360208110156102b757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611182565b6102dc6111c9565b60408051918252519081900360200190f35b61012d6004803603602081101561030457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111cf565b6102876004803603602081101561033757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611218565b6103876004803603602081101561036a57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611336565b6040805160ff9092168252519081900360200190f35b610287600480360360e08110156103b357600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156103eb57600080fd5b8201836020820111156103fd57600080fd5b8035906020019184600183028401116401000000008311171561041f57600080fd5b919350915073ffffffffffffffffffffffffffffffffffffffff8135169060ff602082013516906040810135151590606081013515159060800135151561137c565b6104946004803603602081101561047757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166117b9565b604051808c815260200180602001806020018b60ff1660ff168152602001806020018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018960ff1660ff1681526020018815151515815260200187151515158152602001861515151581526020018515151515815260200184810384528e818151815260200191508051906020019080838360005b83811015610551578181015183820152602001610539565b50505050905090810190601f16801561057e5780820380516001836020036101000a031916815260200191505b5084810383528d5181528d516020918201918f019080838360005b838110156105b1578181015183820152602001610599565b50505050905090810190601f1680156105de5780820380516001836020036101000a031916815260200191505b5084810382528b5181528b516020918201918d019080838360005b838110156106115781810151838201526020016105f9565b50505050905090810190601f16801561063e5780820380516001836020036101000a031916815260200191505b509e50505050505050505050505050505060405180910390f35b6102876004803603602081101561066e57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a97565b73ffffffffffffffffffffffffffffffffffffffff16600090815260666020526040902060050154760100000000000000000000000000000000000000000000900460ff1690565b606781815481106106e057fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b73ffffffffffffffffffffffffffffffffffffffff166000908152606660205260409020600501547801000000000000000000000000000000000000000000000000900460ff1690565b610759611142565b6107c457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff89166000908152606660205260409020541561085657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f746f6b656e20616c7265616479206b6e6f776e00000000000000000000000000604482015290519081900360640190fd5b60008973ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561089e57600080fd5b505afa1580156108b2573d6000803e3d6000fd5b505050506040513d60208110156108c857600080fd5b5051905060ff811661093b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f746f6b656e20646563696d616c7320696e76616c696400000000000000000000604482015290519081900360640190fd5b6067805460018101825560009182527f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6ae0180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8d16908117909155604080517f06fdde0300000000000000000000000000000000000000000000000000000000815290516060936306fdde039260048082019391829003018186803b1580156109fa57600080fd5b505afa158015610a0e573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526020811015610a5557600080fd5b8101908080516040519392919084640100000000821115610a7557600080fd5b908301906020820185811115610a8a57600080fd5b8251640100000000811182820188101715610aa457600080fd5b82525081516020918201929091019080838360005b83811015610ad1578181015183820152602001610ab9565b50505050905090810190601f168015610afe5780820380516001836020036101000a031916815260200191505b50604052505050905060405180610160016040528060678054905081526020018281526020018c73ffffffffffffffffffffffffffffffffffffffff166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015610b6a57600080fd5b505afa158015610b7e573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526020811015610bc557600080fd5b8101908080516040519392919084640100000000821115610be557600080fd5b908301906020820185811115610bfa57600080fd5b8251640100000000811182820188101715610c1457600080fd5b82525081516020918201929091019080838360005b83811015610c41578181015183820152602001610c29565b50505050905090810190601f168015610c6e5780820380516001836020036101000a031916815260200191505b5060405250505081526020018360ff1681526020018b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093855250505073ffffffffffffffffffffffffffffffffffffffff808c1660208085019190915260ff8c166040808601919091528b151560608601528a1515608086015289151560a086015288151560c090950194909452908f16825260668152919020825181558282015180519192610d3792600185019290910190611da2565b5060408201518051610d53916002840191602090910190611da2565b5060608201516003820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff90921691909117905560808201518051610da7916004840191602090910190611da2565b5060a0820151600591909101805460c084015160e0850151610100860151610120870151610140909701517fffffffffffffffffffffffff000000000000000000000000000000000000000090941673ffffffffffffffffffffffffffffffffffffffff968716177fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000060ff90941693909302929092177fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16750100000000000000000000000000000000000000000091151591909102177fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff1676010000000000000000000000000000000000000000000091151591909102177fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff167701000000000000000000000000000000000000000000000094151594909402939093177fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff1678010000000000000000000000000000000000000000000000009315159390930292909217909155606754604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920160208084018290528284528551928401929092528451938f16937f4af7419360b60cfcf01ac8a5c1487814e666a0af47877d73e82476772ac9150f9386939091829160608301919086019080838360005b83811015610ffb578181015183820152602001610fe3565b50505050905090810190601f1680156110285780820380516001836020036101000a031916815260200191505b50935050505060405180910390a25050505050505050505050565b61104b611142565b6110b657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60335460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60335473ffffffffffffffffffffffffffffffffffffffff165b90565b60335460009073ffffffffffffffffffffffffffffffffffffffff16611166611b16565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b73ffffffffffffffffffffffffffffffffffffffff166000908152606660205260409020600501547501000000000000000000000000000000000000000000900460ff1690565b60675490565b73ffffffffffffffffffffffffffffffffffffffff1660009081526066602052604090206005015477010000000000000000000000000000000000000000000000900460ff1690565b600054610100900460ff16806112315750611231611b1a565b8061123f575060005460ff16155b611294576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180611eed602e913960400191505060405180910390fd5b600054610100900460ff161580156112fa57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61130382611b20565b801561133257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b5050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526066602052604090206005015474010000000000000000000000000000000000000000900460ff1690565b611384611142565b6113ef57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff881660009081526066602052604090205461148057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f746f6b656e20756e6b6e6f776e00000000000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff881660009081526066602052604090206114b3906004018888611e20565b5084606660008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060050160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083606660008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060050160146101000a81548160ff021916908360ff16021790555082606660008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060050160156101000a81548160ff02191690831515021790555081606660008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060050160166101000a81548160ff02191690831515021790555080606660008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060050160176101000a81548160ff0219169083151502179055508773ffffffffffffffffffffffffffffffffffffffff167f7dfa4f44638df9ca9c035c37f4954edb0383135db7751b81208a86345775a159606660008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160405180806020018281038252838181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156117a15780601f10611776576101008083540402835291602001916117a1565b820191906000526020600020905b81548152906001019060200180831161178457829003601f168201915b50509250505060405180910390a25050505050505050565b6066602090815260009182526040918290208054600180830180548651600293821615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190911692909204601f8101869004860283018601909652858252919492939092908301828280156118745780601f1061184957610100808354040283529160200191611874565b820191906000526020600020905b81548152906001019060200180831161185757829003601f168201915b50505060028085018054604080516020601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010060018716150201909416959095049283018590048502810185019091528181529596959450909250908301828280156119245780601f106118f957610100808354040283529160200191611924565b820191906000526020600020905b81548152906001019060200180831161190757829003601f168201915b50505050600383015460048401805460408051602060026101006001861615027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f8101849004840282018401909252818152959660ff90941695939450908301828280156119dd5780601f106119b2576101008083540402835291602001916119dd565b820191906000526020600020905b8154815290600101906020018083116119c057829003601f168201915b5050506005909301549192505073ffffffffffffffffffffffffffffffffffffffff81169060ff7401000000000000000000000000000000000000000082048116917501000000000000000000000000000000000000000000810482169176010000000000000000000000000000000000000000000082048116917701000000000000000000000000000000000000000000000081048216917801000000000000000000000000000000000000000000000000909104168b565b611a9f611142565b611b0a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611b1381611ca8565b50565b3390565b303b1590565b600054610100900460ff1680611b395750611b39611b1a565b80611b47575060005460ff16155b611b9c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180611eed602e913960400191505060405180910390fd5b600054610100900460ff16158015611c0257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84811691909117918290556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3801561133257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555050565b73ffffffffffffffffffffffffffffffffffffffff8116611d14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611ec76026913960400191505060405180910390fd5b60335460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611de357805160ff1916838001178555611e10565b82800160010185558215611e10579182015b82811115611e10578251825591602001919060010190611df5565b50611e1c929150611eac565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611e7f578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00823516178555611e10565b82800160010185558215611e10579182015b82811115611e10578235825591602001919060010190611e91565b61113f91905b80821115611e1c5760008155600101611eb256fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a265627a7a72315820cc8aa5ea3e957183ef1a578e65adb7468c8575229eb3d6b517cbf94ad04ff90264736f6c63430005110032";
    
    // create new contract
    contract = web3.tpc.contract(registryAbi);
    deploy = contract.new({
    data: registryByteCode,
    from: account,
    gas: 4000000
    });
    
    // get the contract address (you may need to wait for the receipt to be available)
    registryAddress = tpc.getTransactionReceipt(deploy.transactionHash).contractAddress;
  6. Add your ERC20 tokens to the Token Registry.

    Please note we add two tokens with 18 digits price oracle precision. This can vary between different price oracles and deployments. The wTPC token cannot be minted inside the minter.

    // instantiate the token registry
    var tokenRegistry = web3.tpc.contract(registryAbi).at(registryAddress);
    
    // add tokens to the registry
    tokenRegistry.addToken(
            tokenWTPC,
            'https://www.techpay.io/assets/icons/TPC.svg',
            oracleTPC,
            18,
            true,
            true,
            false);
       
    tokenRegistry.addToken(
            tokenUSD,
            'https://cdn.worldvectorlogo.com/logos/usd-1.svg',
            oracleUSD,
            18,
            true,
            true,
            true);
  7. Deploy Address Provider from this repository.

    /**
     * This deploys TechPay DeFi Mint Address Provider
     */
    var adrProviderAbi = JSON.parse('[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"CollateralPoolChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"DebtPoolChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"LiquidationManagerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"MinterChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"PriceOracleChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"RewardDistributionChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"RewardTokenChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"TokenRegistryChanged","type":"event"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"}],"name":"getAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getPriceOracleProxy","outputs":[{"internalType":"contract IPriceOracleProxy","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setPriceOracleProxy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getTokenRegistry","outputs":[{"internalType":"contract ITechPayMintTokenRegistry","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setTokenRegistry","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getRewardDistribution","outputs":[{"internalType":"contract ITechPayMintRewardManager","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setRewardDistribution","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getRewardToken","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setRewardToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getTechPayLiquidationManager","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setTechPayLiquidationManager","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getTechPayMint","outputs":[{"internalType":"contract ITechPayMintBalanceGuard","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setTechPayMint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getCollateralPool","outputs":[{"internalType":"contract ITechPayDeFiTokenStorage","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setCollateralPool","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getDebtPool","outputs":[{"internalType":"contract ITechPayDeFiTokenStorage","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setDebtPool","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]');
    var adrProviderByteCode = "0x6080604052611349806100136000396000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c8063750cb008116100d85780638f32d59b1161008c578063cc653b9a11610066578063cc653b9a146103a0578063ded99c1b146103d3578063f2fde38b1461040657610182565b80638f32d59b14610349578063c4d66de814610365578063ca65c39e1461039857610182565b806384d9319e116100bd57806384d9319e146103065780638aee81271461030e5780638da5cb5b1461034157610182565b8063750cb008146102cb57806376af8b23146102fe57610182565b806321f8a7211161013a57806369940d791161011457806369940d79146102b3578063715018a6146102bb57806373c9641d146102c357610182565b806321f8a7211461023057806335a5af921461024d57806342ae86841461028057610182565b8063057838bd1161016b578063057838bd146101c05780630d68b761146101c85780631ba28878146101fd57610182565b806303ec357f14610187578063045bb7f8146101b8575b600080fd5b61018f610439565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61018f610469565b61018f610494565b6101fb600480360360208110156101de57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104bf565b005b6101fb6004803603602081101561021357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166105a8565b61018f6004803603602081101561024657600080fd5b5035610691565b6101fb6004803603602081101561026357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166106b9565b6101fb6004803603602081101561029657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166107a2565b61018f61088b565b6101fb6108b6565b61018f610998565b6101fb600480360360208110156102e157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166109c3565b61018f610aac565b61018f610ad7565b6101fb6004803603602081101561032457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610b02565b61018f610beb565b610351610c07565b604080519115158252519081900360200190f35b6101fb6004803603602081101561037b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610c47565b61018f610d65565b6101fb600480360360208110156103b657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610d90565b6101fb600480360360208110156103e957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610e79565b6101fb6004803603602081101561041c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f62565b60006104647f646562745f706f6f6c0000000000000000000000000000000000000000000000610691565b905090565b60006104647f70726963655f6f7261636c655f70726f78790000000000000000000000000000610691565b60006104647f746f6b656e5f7265676973747279000000000000000000000000000000000000610691565b6104c7610c07565b61053257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61055c7f7265776172645f646973747269627574696f6e0000000000000000000000000082610fe1565b6040805173ffffffffffffffffffffffffffffffffffffffff8316815290517ffe09426f22c44354b62f360c333309adadd6392ae248adc902f3006c7c4b92059181900360200190a150565b6105b0610c07565b61061b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6106457f636f6c6c61746572616c5f706f6f6c000000000000000000000000000000000082610fe1565b6040805173ffffffffffffffffffffffffffffffffffffffff8316815290517f9ee268d502b2200c71bbd3cba8222b4f501a7b505c684bd40423fd446bb29fad9181900360200190a150565b60009081526066602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6106c1610c07565b61072c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6107567f746f6b656e5f726567697374727900000000000000000000000000000000000082610fe1565b6040805173ffffffffffffffffffffffffffffffffffffffff8316815290517fb6f925ec7d36d613e5d1aa87c0de3ee16a0167e6bdfa2ea254e5fee9870a941e9181900360200190a150565b6107aa610c07565b61081557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61083f7f646562745f706f6f6c000000000000000000000000000000000000000000000082610fe1565b6040805173ffffffffffffffffffffffffffffffffffffffff8316815290517ff10b554a663200a2ae53269b5aeb591082984e03e47f76ec558f283c01b116d49181900360200190a150565b60006104647f65726332305f7265776172645f746f6b656e0000000000000000000000000000610691565b6108be610c07565b61092957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60335460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60006104647f636f6c6c61746572616c5f706f6f6c0000000000000000000000000000000000610691565b6109cb610c07565b610a3657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a607f746563687061795f6d696e74000000000000000000000000000000000000000082610fe1565b6040805173ffffffffffffffffffffffffffffffffffffffff8316815290517fb6b8f1859c5c352e5ffad07d0f77e384ac725512c015bd3a3ffc885831c8a4259181900360200190a150565b60006104647f746563687061795f6d696e740000000000000000000000000000000000000000610691565b60006104647f7265776172645f646973747269627574696f6e00000000000000000000000000610691565b610b0a610c07565b610b7557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610b9f7f65726332305f7265776172645f746f6b656e000000000000000000000000000082610fe1565b6040805173ffffffffffffffffffffffffffffffffffffffff8316815290517fb74d956cf6ec7842d08ebf0ab19ec03a88c1efd4a50ea4349d30f9c4ce512e989181900360200190a150565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60335460009073ffffffffffffffffffffffffffffffffffffffff16610c2b611034565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b600054610100900460ff1680610c605750610c60611038565b80610c6e575060005460ff16155b610cc3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806112e7602e913960400191505060405180910390fd5b600054610100900460ff16158015610d2957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b610d328261103e565b8015610d6157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b5050565b60006104647f6c69717569646174696f6e5f6d616e6167657200000000000000000000000000610691565b610d98610c07565b610e0357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610e2d7f70726963655f6f7261636c655f70726f7879000000000000000000000000000082610fe1565b6040805173ffffffffffffffffffffffffffffffffffffffff8316815290517fb36d86785c7d32b1ad714bb705e00e93eccc37b8cf47549043e61e10908ad2519181900360200190a150565b610e81610c07565b610eec57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610f167f6c69717569646174696f6e5f6d616e616765720000000000000000000000000082610fe1565b6040805173ffffffffffffffffffffffffffffffffffffffff8316815290517f45679938a8a9f8ca4f450e7d4b6dd36a4ea08e9dbcbae643c2b43cf493fcb4989181900360200190a150565b610f6a610c07565b610fd557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610fde816111c6565b50565b60009182526066602052604090912080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055565b3390565b303b1590565b600054610100900460ff16806110575750611057611038565b80611065575060005460ff16155b6110ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806112e7602e913960400191505060405180910390fd5b600054610100900460ff1615801561112057600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84811691909117918290556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a38015610d6157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555050565b73ffffffffffffffffffffffffffffffffffffffff8116611232576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806112c16026913960400191505060405180910390fd5b60335460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a265627a7a72315820964b5ef789b42a96bca4d3e808f09e9c5e387eaa228c82123028f6ec2893cc9964736f6c63430005110032";
    
    // create new contract
    contract = web3.tpc.contract(adrProviderAbi);
    deploy = contract.new({
        data: adrProviderByteCode,
        from: account,
        gas: 4000000
    });
    
    // get the contract address (you may need to wait for the receipt to be available)
    adrProviderAddress = tpc.getTransactionReceipt(deploy.transactionHash).contractAddress;   
  8. Add Price Oracle Proxy, Token Registry and special ERC20 tokens to the Address Provider.

    // instantiate the address provider
    var adrProvider = web3.tpc.contract(adrProviderAbi).at(adrProviderAddress);
    
    // assign addresses
    adrProvider.setPriceOracleProxy(priceProxy.address);
    adrProvider.setTokenRegistry(tokenRegistry.address);
      
    // add fee token and reward token to the address provider
    adrProvider.setFeeToken(tokenUSD);
    adrProvider.setRewardToken(tokenWTPC);
  9. Deploy Token Storage contracts for the Collateral and Debt management.

    /**
     * This deploys TechPay DeFi Mint Address Provider
     */
    var storagePoolAbi = JSON.parse('[{"constant":true,"inputs":[],"name":"addressProvider","outputs":[{"internalType":"contract ITechPayMintAddressProvider","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokens","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"valueDustAdjustment","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_addressProvider","type":"address"},{"internalType":"bool","name":"_dustAdt","type":"bool"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"tokenValue","outputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"total","outputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"totalOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"totalOfInc","outputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"totalOfDec","outputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"add","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"sub","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tokensCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getToken","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]');
    var storagePoolByteCode = "0x608060405234801561001057600080fd5b5061160b806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063660eab8311610097578063b203bb9911610066578063b203bb9914610340578063e4b50cb81461037b578063f182178314610398578063f7888aec146103d157610100565b8063660eab831461028f5780636eacd398146102d2578063912c267314610305578063a64ed8ba1461033857610100565b80634f64b2be116100d35780634f64b2be146101a9578063551f8e2a146101c657806355ceeb311461020957806365be454d1461024c57610100565b80632954018c146101055780632ddbd13a14610136578063400ada7514610150578063496a11401461018d575b600080fd5b61010d61040c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61013e610428565b60408051918252519081900360200190f35b61018b6004803603604081101561016657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013515156104d7565b005b61019561066a565b604080519115158252519081900360200190f35b61010d600480360360208110156101bf57600080fd5b503561068b565b61018b600480360360608110156101dc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356106bf565b61018b6004803603606081101561021f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135909116906040013561094b565b61013e6004803603606081101561026257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610bd6565b61013e600480360360608110156102a557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610bed565b61013e600480360360208110156102e857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610bfc565b61013e6004803603602081101561031b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610c0e565b61013e610c24565b61013e6004803603604081101561035657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610c2a565b61010d6004803603602081101561039157600080fd5b5035610c47565b61013e600480360360408110156103ae57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610c7e565b61013e600480360360408110156103e757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610f63565b60335473ffffffffffffffffffffffffffffffffffffffff1681565b6000805b6036548110156104d3576104c96104bc6036838154811061044957fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16603560006036868154811061048557fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902054610c7e565b839063ffffffff610f9b16565b915060010161042c565b5090565b600054610100900460ff16806104f057506104f0611016565b806104fe575060005460ff16155b610553576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806115a9602e913960400191505060405180910390fd5b600054610100900460ff161580156105b957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8516177fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000084151502179055801561066557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b505050565b60335474010000000000000000000000000000000000000000900460ff1681565b6036818154811061069857fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166376af8b236040518163ffffffff1660e01b815260040160206040518083038186803b15801561072757600080fd5b505afa15801561073b573d6000803e3d6000fd5b505050506040513d602081101561075157600080fd5b505173ffffffffffffffffffffffffffffffffffffffff1633148061081e5750603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ca65c39e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156107d957600080fd5b505afa1580156107ed573d6000803e3d6000fd5b505050506040513d602081101561080357600080fd5b505173ffffffffffffffffffffffffffffffffffffffff1633145b61088957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f746f6b656e2073746f7261676520616363657373207265737472696374656400604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8084166000908152603460209081526040808320938616835292905220546108cc908263ffffffff610f9b16565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152603460209081526040808320938716835292815282822093909355603590925290205461091c908263ffffffff610f9b16565b73ffffffffffffffffffffffffffffffffffffffff83166000908152603560205260409020556106658261101c565b603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166376af8b236040518163ffffffff1660e01b815260040160206040518083038186803b1580156109b357600080fd5b505afa1580156109c7573d6000803e3d6000fd5b505050506040513d60208110156109dd57600080fd5b505173ffffffffffffffffffffffffffffffffffffffff16331480610aaa5750603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ca65c39e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a6557600080fd5b505afa158015610a79573d6000803e3d6000fd5b505050506040513d6020811015610a8f57600080fd5b505173ffffffffffffffffffffffffffffffffffffffff1633145b610b1557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f746f6b656e2073746f7261676520616363657373207265737472696374656400604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff808416600090815260346020908152604080832093861683529290522054610b58908263ffffffff61110216565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526034602090815260408083209387168352928152828220939093556035909252902054610ba8908263ffffffff61110216565b73ffffffffffffffffffffffffffffffffffffffff9092166000908152603560205260409020919091555050565b6000610be58484600085611144565b949350505050565b6000610be58484846000611144565b60356020526000908152604090205481565b6000610c1e826000806000611144565b92915050565b60365490565b603460209081526000928352604080842090915290825290205481565b600060368281548110610c5657fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1692915050565b600081610c8d57506000610c1e565b603354604080517f045bb7f8000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169163045bb7f8916004808301926020929190829003018186803b158015610cf857600080fd5b505afa158015610d0c573d6000803e3d6000fd5b505050506040513d6020811015610d2257600080fd5b5051604080517f41976e0900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152915191909216916341976e09916024808301926020929190829003018186803b158015610d9457600080fd5b505afa158015610da8573d6000803e3d6000fd5b505050506040513d6020811015610dbe57600080fd5b5051603354604080517f057838bd000000000000000000000000000000000000000000000000000000008152905192935060009273ffffffffffffffffffffffffffffffffffffffff9092169163057838bd91600480820192602092909190829003018186803b158015610e3157600080fd5b505afa158015610e45573d6000803e3d6000fd5b505050506040513d6020811015610e5b57600080fd5b5051604080517fcefe0f2100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301529151919092169163cefe0f21916024808301926020929190829003018186803b158015610ecd57600080fd5b505afa158015610ee1573d6000803e3d6000fd5b505050506040513d6020811015610ef757600080fd5b505160ff16600a0a9050610f2181610f15868563ffffffff6113a216565b9063ffffffff61141516565b60335490935074010000000000000000000000000000000000000000900460ff1615610f5b57610f5883600163ffffffff610f9b16565b92505b505092915050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260346020908152604080832093909416825291909152205490565b60008282018381101561100f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b303b1590565b6000805b603654811015611087578273ffffffffffffffffffffffffffffffffffffffff166036828154811061104e57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16141561107f5760019150611087565b600101611020565b50806110fe57603680546001810182556000919091527f4a11f94e20a93c79f6ec743a1954ec4fc2c08429ae2122118bf234b2185c81b80180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84161790555b5050565b600061100f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611457565b6000805b603654811015611355576036818154811061115f57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff868116911614156112be576000611264846040518060400160405280601981526020017f746f6b656e2073756220657863656564732062616c616e63650000000000000081525061125788603460008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006036898154811061121957fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020549063ffffffff610f9b16565b919063ffffffff61145716565b90506112ae6112a16036848154811061127957fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1683610c7e565b849063ffffffff610f9b16565b925060009450600093505061134d565b61134a6104bc603683815481106112d157fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16603460008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006036868154811061048557fe5b91505b600101611148565b508215611379576113766113698585610c7e565b829063ffffffff610f9b16565b90505b8115610be55761139961138c8584610c7e565b829063ffffffff61110216565b95945050505050565b6000826113b157506000610c1e565b828202828482816113be57fe5b041461100f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806115886021913960400191505060405180910390fd5b600061100f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611508565b60008184841115611500576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156114c55781810151838201526020016114ad565b50505050905090810190601f1680156114f25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611571576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156114c55781810151838201526020016114ad565b50600083858161157d57fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a265627a7a72315820addb5751a4b98183221ca72cfae7d056c6ce303e77776bfb9c42c8adfdfbe85f64736f6c63430005110032";
    
    // ----------------------------------
    // create new contract for collateral
    // ----------------------------------
    contract = web3.tpc.contract(storagePoolAbi);
    deploy = contract.new(adrProvider.address, false, {
        data: storagePoolByteCode,
        from: account,
        gas: 4000000
    });
    
    // get the contract address (you may need to wait for the receipt to be available)
    collateralPoolAddress = tpc.getTransactionReceipt(deploy.transactionHash).contractAddress;
    
    // instantiate the collateral pool contract
    var collateralPool = web3.tpc.contract(storagePoolAbi).at(collateralPoolAddress);
    
    // ----------------------------
    // create new contract for debt
    // ----------------------------
    deploy = contract.new(adrProvider.address, true, {
        data: storagePoolByteCode,
        from: account,
        gas: 4000000
    });
    
    // get the contract address (you may need to wait for the receipt to be available)
    debtPoolAddress = tpc.getTransactionReceipt(deploy.transactionHash).contractAddress;
    
    // instantiate the debt pool contract
    var debtPool = web3.tpc.contract(storagePoolAbi).at(debtPoolAddress);
    
    // add pools to the address provider
    adrProvider.setCollateralPool(collateralPool.address);
    adrProvider.setDebtPool(debtPool.address);
  10. Deploy Reward Distribution from this repository.

     /**
      * This deploys TechPay DeFi Mint Reward Distribution
      */
     var rewardDistributionAbi = JSON.parse('[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rewardPerYear","type":"uint256"}],"name":"RateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"constant":true,"inputs":[],"name":"ERR_DEBT_EXCEEDED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_DEPOSIT_PROHIBITED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_DUST_DEBT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_LOW_ALLOWANCE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_LOW_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_LOW_BALANCE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_LOW_COLLATERAL_RATIO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_MINTING_PROHIBITED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_NOT_AUTHORIZED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_NO_COLLATERAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_NO_ERROR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_NO_REWARD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_NO_VALUE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_REWARDS_DEPLETED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_REWARDS_EARLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_REWARDS_NONE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_REWARD_CLAIM_REJECTED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_ZERO_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"addressProvider","outputs":[{"internalType":"contract ITechPayMintAddressProvider","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastRewardPush","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minRewardPushInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"mustRewardClaim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rewardApplicableUntil","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rewardClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"rewardEarned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardEpochEnds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardEpochLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardLastPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardPerTokenDecimalsCorrection","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardStash","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"rewardUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"rewardUpdateGlobal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rewardUpdated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"_addressProvider","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"mustRewardPush","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"rewardPush","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_perSecond","type":"uint256"}],"name":"rewardUpdateRate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"rewardCleanup","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"principalBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"principalBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardTokenAddress","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"rewardCanClaim","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"rewardIsEligible","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"}]');
     var rewardDistributionByteCode = "0x6080604052612341806100136000396000f3fe608060405234801561001057600080fd5b506004361061034c5760003560e01c80636e718e04116101bd578063bc99d6ae116100f9578063c7ea4889116100a2578063db16e0b51161007c578063db16e0b5146106ad578063ef24d9a1146106b5578063f2392c8d146106d2578063f2fde38b146107055761034c565b8063c7ea48891461066a578063cd3daf9d14610672578063da0a04321461067a5761034c565b8063c634dfaa116100d3578063c634dfaa146105fc578063c7222c721461062f578063c759df4e146106375761034c565b8063bc99d6ae146105b9578063c0464d45146105c1578063c4d66de8146105c95761034c565b80638f10369a116101665780639b7ea007116101405780639b7ea00714610599578063a664150a146105a1578063a83e53ac146105a9578063b76361c2146105b15761034c565b80638f10369a146105815780638f32d59b14610589578063911fc3f1146105915761034c565b80637b0a47ee116101975780637b0a47ee146105695780638c7b9980146105715780638da5cb5b146105795761034c565b80636e718e0414610551578063715018a61461055957806373a93af6146105615761034c565b80633c29a4621161028c5780636409f92111610235578063653a8da11161020f578063653a8da1146104c757806367fc176b146104fa57806369d1cb27146105025780636aee9c131461050a5761034c565b80636409f921146104af57806364631d9b146104b757806364dd213f146104bf5761034c565b8063485cc95511610266578063485cc9551461043957806348ebb08d14610474578063544bb473146104a75761034c565b80633c29a462146104215780633ce9b316146104295780634846e345146104315761034c565b8063185463a4116102f95780632954018c116102d35780632954018c146104015780632bfcc3731461040957806335052d6e14610411578063372ce3df146104195761034c565b8063185463a4146103e95780631ac919b0146103f157806320a0a0e9146103f95761034c565b8063101df8b51161032a578063101df8b51461037b578063125f9e331461038557806316ba6bf3146103b65761034c565b806304b62f29146103515780630a19dd331461036b5780630aff90bb14610373575b600080fd5b610359610738565b60408051918252519081900360200190f35b61035961073e565b610359610744565b61038361074a565b005b61038d6108a8565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610359600480360360208110156103cc57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610945565b610359610a16565b610359610a4b565b610359610a51565b61038d610a58565b610359610a74565b610359610a7a565b610359610a7f565b610359610a85565b610359610a8b565b610359610a91565b6103836004803603604081101561044f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610a97565b6103836004803603602081101561048a57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610bf6565b610359610c42565b610359610c48565b610359610d09565b610383610d15565b610359600480360360208110156104dd57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610d2d565b610359610d3f565b610359610d45565b61053d6004803603602081101561052057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610d4b565b604080519115158252519081900360200190f35b610359610e84565b610383610e8a565b610359610f6c565b610359610f72565b610359610f78565b61038d610f7e565b610359610f9a565b61053d610fa0565b610359610fe0565b610383610fe6565b610359611145565b61035961114b565b61035961124a565b610359611250565b610359611256565b610383600480360360208110156105df57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661125c565b6103596004803603602081101561061257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113e5565b6103596114ec565b6103836004803603602081101561064d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166114f2565b610359611642565b610359611648565b61053d6004803603602081101561069057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166116a0565b6103596117a7565b610383600480360360208110156106cb57600080fd5b50356117b5565b610359600480360360208110156106e857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661194a565b6103836004803603602081101561071b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661195c565b61100581565b610f0381565b61100081565b6000610754610c48565b905061100a8114156107c757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e6f2072657761726473206561726e6564000000000000000000000000000000604482015290519081900360640190fd5b61100b81141561083857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f72657761726420636c61696d2072656a65637465640000000000000000000000604482015290519081900360640190fd5b80156108a557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f756e6578706563746564206661696c7572650000000000000000000000000000604482015290519081900360640190fd5b50565b606c54604080517f69940d79000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff16916369940d79916004808301926020929190829003018186803b15801561091357600080fd5b505afa158015610927573d6000803e3d6000fd5b505050506040513d602081101561093d57600080fd5b505190505b90565b600061095082610d4b565b610980575073ffffffffffffffffffffffffffffffffffffffff81166000908152606b6020526040902054610a11565b73ffffffffffffffffffffffffffffffffffffffff82166000908152606b6020908152604080832054606a90925290912054610a0e9190610a0290670de0b6b3a7640000906109f6906109e1906109d5611648565b9063ffffffff6119d816565b6109ea886113e5565b9063ffffffff611a2316565b9063ffffffff611a9616565b9063ffffffff611ad816565b90505b919050565b606d54600090610a2e90610e1063ffffffff611ad816565b421015610a3e5750610f01610942565b610a46611b4c565b905090565b61100281565b6201518081565b606c5473ffffffffffffffffffffffffffffffffffffffff1681565b61100681565b600081565b61100981565b61100c81565b60675481565b61100b81565b600054610100900460ff1680610ab05750610ab0611c6b565b80610abe575060005460ff16155b610b13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806122b5602e913960400191505060405180910390fd5b600054610100900460ff16158015610b7957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b606c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8416179055610bc28361125c565b8015610bf157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b505050565b610bfe610d15565b610c0781610945565b73ffffffffffffffffffffffffffffffffffffffff9091166000908152606b6020908152604080832093909355606954606a90915291902055565b60695481565b6000610c5333610bf6565b336000908152606b6020526040902054610c70575061100a610942565b610c79336116a0565b610c86575061100b610942565b336000818152606b60205260408120805491905590610ccb9082610ca86108a8565b73ffffffffffffffffffffffffffffffffffffffff16919063ffffffff611c7116565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a2600091505090565b670de0b6b3a764000081565b610d1d611648565b606955610d286117a7565b606855565b606a6020526000908152604090205481565b610f0181565b61100881565b606c54604080517f76af8b23000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff16916376af8b23916004808301926020929190829003018186803b158015610db657600080fd5b505afa158015610dca573d6000803e3d6000fd5b505050506040513d6020811015610de057600080fd5b5051604080517f6aee9c1300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015291519190921691636aee9c13916024808301926020929190829003018186803b158015610e5257600080fd5b505afa158015610e66573d6000803e3d6000fd5b505050506040513d6020811015610e7c57600080fd5b505192915050565b60685481565b610e92610fa0565b610efd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60335460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b61100a81565b60665481565b61100781565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b606e5481565b60335460009073ffffffffffffffffffffffffffffffffffffffff16610fc4611cfe565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b61100381565b6000610ff0610a16565b9050610f0181141561106357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f746f6f206561726c7920666f7220612072657761726473207075736800000000604482015290519081900360640190fd5b610f028114156110d457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f6e6f207265776172647320756e6c6f636b656400000000000000000000000000604482015290519081900360640190fd5b610f0381141561083857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f72657761726473206465706c6574656400000000000000000000000000000000604482015290519081900360640190fd5b606d5481565b606c54604080517f03ec357f000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff16916303ec357f916004808301926020929190829003018186803b1580156111b657600080fd5b505afa1580156111ca573d6000803e3d6000fd5b505050506040513d60208110156111e057600080fd5b5051604080517f2ddbd13a000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff90921691632ddbd13a91600480820192602092909190829003018186803b15801561091357600080fd5b61100481565b610a0081565b610e1081565b600054610100900460ff16806112755750611275611c6b565b80611283575060005460ff16155b6112d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806122b5602e913960400191505060405180910390fd5b600054610100900460ff1615801561133e57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84811691909117918290556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a380156113e157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b5050565b606c54604080517f03ec357f000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff16916303ec357f916004808301926020929190829003018186803b15801561145057600080fd5b505afa158015611464573d6000803e3d6000fd5b505050506040513d602081101561147a57600080fd5b5051604080517f912c267300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301529151919092169163912c2673916024808301926020929190829003018186803b158015610e5257600080fd5b610f0281565b6114fa610fa0565b61156557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600061156f6108a8565b90506113e1828273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156115f257600080fd5b505afa158015611606573d6000803e3d6000fd5b505050506040513d602081101561161c57600080fd5b505173ffffffffffffffffffffffffffffffffffffffff8416919063ffffffff611c7116565b61100181565b60008061165361114b565b905080611664575050606954610942565b61169a61168b826109f6670de0b6b3a76400006109ea6066546109ea6068546109d56117a7565b6069549063ffffffff611ad816565b91505090565b606c54604080517f76af8b23000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff16916376af8b23916004808301926020929190829003018186803b15801561170b57600080fd5b505afa15801561171f573d6000803e3d6000fd5b505050506040513d602081101561173557600080fd5b5051604080517fda0a043200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301529151919092169163da0a0432916024808301926020929190829003018186803b158015610e5257600080fd5b6000610a4642606754611d02565b6117bd610fa0565b61182857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000811161189757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c696420726577617264207261746500000000000000000000000000604482015290519081900360640190fd5b610f036118a2611b4c565b141561190f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f62616c616e636520746f6f206c6f770000000000000000000000000000000000604482015290519081900360640190fd5b606e8190556040805182815290517fe65c987b2e4668e09ba867026921588005b2b2063607a1e7e7d91683c8f91b7b9181900360200190a150565b606b6020526000908152604090205481565b611964610fa0565b6119cf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6108a581611d18565b6000611a1a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611e12565b90505b92915050565b600082611a3257506000611a1d565b82820282848281611a3f57fe5b0414611a1a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806122946021913960400191505060405180910390fd5b6000611a1a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611ec3565b600082820183811015611a1a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000606d5460001415611b65575042606d556000610942565b6000611b82606e546109ea606d54426119d890919063ffffffff16565b905080611b9457610f02915050610942565b611b9c6108a8565b73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c1857600080fd5b505afa158015611c2c573d6000803e3d6000fd5b505050506040513d6020811015611c4257600080fd5b5051811115611c5657610f03915050610942565b42606d55611c6381611f42565b600091505090565b303b1590565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610bf1908490611fed565b3390565b6000818310611d115781611a1a565b5090919050565b73ffffffffffffffffffffffffffffffffffffffff8116611d84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061226e6026913960400191505060405180910390fd5b60335460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60008184841115611ebb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611e80578181015183820152602001611e68565b50505050905090810190601f168015611ead5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611f2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315611e80578181015183820152602001611e68565b506000838581611f3857fe5b0495945050505050565b611f4a610d15565b606754421015611f87576000611f716066546109ea426067546119d890919063ffffffff16565b9050611f83828263ffffffff611ad816565b9150505b611f9a816201518063ffffffff611a9616565b606655611fb0426201518063ffffffff611ad816565b606755426068556040805182815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a150565b61200c8273ffffffffffffffffffffffffffffffffffffffff16612231565b61207757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106120e057805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016120a3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612142576040519150601f19603f3d011682016040523d82523d6000602084013e612147565b606091505b5091509150816121b857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b80511561222b578080602001905160208110156121d457600080fd5b505161222b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806122e3602a913960400191505060405180910390fd5b50505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061226557508115155b94935050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820108c3bdec2afb8b3b140b2a72039e6c97d73b41495e2026470857413228ec76164736f6c63430005110032";
    
     // create new contract
     contract = web3.tpc.contract(rewardDistributionAbi);
     deploy = contract.new(adrProvider.address, {
         data: rewardDistributionByteCode,
         from: account,
         gas: 4000000
     });
        
     // get the contract address (you may need to wait for the receipt to be available)
     rewardDistributionAddress = tpc.getTransactionReceipt(deploy.transactionHash).contractAddress;
     
     // instantiate the reward distribution contract
     var rewardDistribution = web3.tpc.contract(rewardDistributionAbi).at(rewardDistributionAddress);
  11. Add the Reward Distribution to the Address Provider.

     adrProvider.setRewardDistribution(rewardDistribution.address);        
  12. Deploy TechPay Mint contract.

    /**
     * This deploys TechPay DeFi Mint Core Minter
     */
    var MintAbi = JSON.parse('[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"ratio4dec","type":"uint256"}],"name":"CollateralLowestDebtRatioChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"MinDebtValueChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fee4dec","type":"uint256"}],"name":"MintFeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Repaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"ratio4dec","type":"uint256"}],"name":"RewardEligibilityRatioChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"constant":true,"inputs":[],"name":"ERR_DEBT_EXCEEDED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_DEPOSIT_PROHIBITED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_DUST_DEBT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_LOW_ALLOWANCE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_LOW_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_LOW_BALANCE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_LOW_COLLATERAL_RATIO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_MINTING_PROHIBITED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_NOT_AUTHORIZED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_NO_COLLATERAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_NO_ERROR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_NO_REWARD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_NO_VALUE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_REWARDS_DEPLETED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_REWARDS_EARLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_REWARDS_NONE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_REWARD_CLAIM_REJECTED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERR_ZERO_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MintFee4dec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MintFeeDigitsCorrection","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"addressProvider","outputs":[{"internalType":"contract ITechPayMintAddressProvider","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_ratio4dec","type":"uint256"}],"name":"cfgSetLowestCollateralRatio","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_minDebtValue","type":"uint256"}],"name":"cfgSetMinDebtValue","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_fee4dec","type":"uint256"}],"name":"cfgSetMintFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_ratio4dec","type":"uint256"}],"name":"cfgSetRewardEligibilityRatio","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"collateralCanDecrease","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"collateralLowestDebtRatio4dec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"collateralRatioDecimalsCorrection","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"debtCanIncrease","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"feePool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_ratio","type":"uint256"}],"name":"maxToMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_ratio","type":"uint256"}],"name":"maxToWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minDebtValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_ratio","type":"uint256"}],"name":"minToDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_ratio","type":"uint256"}],"name":"mintMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mustDeposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mustMint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_ratio","type":"uint256"}],"name":"mustMintMax","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mustRepay","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"mustRepayMax","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mustWithdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_ratio","type":"uint256"}],"name":"mustWithdrawMax","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"repay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"repayMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"rewardCanClaim","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardEligibilityRatio4dec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"rewardIsEligible","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_ratio","type":"uint256"}],"name":"withdrawMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"_addressProvider","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getCollateralLowestDebtRatio4dec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getRewardEligibilityRatio4dec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getMintFee4dec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getMinDebtValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getCollateralPool","outputs":[{"internalType":"contract ITechPayDeFiTokenStorage","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getDebtPool","outputs":[{"internalType":"contract ITechPayDeFiTokenStorage","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"canDeposit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"canMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"checkCollateralCanDecrease","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"checkDebtCanIncrease","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_add","type":"uint256"}],"name":"debtValueOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_sub","type":"uint256"}],"name":"collateralValueOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_ratio","type":"uint256"}],"name":"getMaxToWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_ratio","type":"uint256"},{"internalType":"address","name":"collateralToken","type":"address"},{"internalType":"int256","name":"collateralDiff","type":"int256"},{"internalType":"address","name":"debtToken","type":"address"},{"internalType":"int256","name":"debtDiff","type":"int256"}],"name":"getMaxToWithdrawWithChanges","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_ratio","type":"uint256"}],"name":"getMaxToMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_ratio","type":"uint256"},{"internalType":"address","name":"collateralToken","type":"address"},{"internalType":"int256","name":"collateralDiff","type":"int256"},{"internalType":"address","name":"debtToken","type":"address"},{"internalType":"int256","name":"debtDiff","type":"int256"}],"name":"getMaxToMintWithChanges","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"rewardUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"getExtendedPrice","outputs":[{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_digits","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_destination","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"settleLiquidationBid","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]');
    var MintByteCode = "0x608060405261599a806100136000396000f3fe608060405234801561001057600080fd5b506004361061054a5760003560e01c80636aee9c13116102bc578063bcc2ff5111610186578063d6c010d7116100e3578063f1bd51ea11610097578063f3fef3a31161007c578063f3fef3a314610fbb578063f4305a9914610ff4578063fd26fef1146110375761054a565b8063f1bd51ea14610f6b578063f2fde38b14610f885761054a565b8063db3243f2116100c8578063db3243f214610eef578063dc2b18cc14610f28578063e69993ac14610aad5761054a565b8063d6c010d714610eb4578063da0a043214610ebc5761054a565b8063c7ea48891161013a578063d3f706341161011f578063d3f7063414610e4c578063d4ca4d7414610e69578063d65cb5aa14610eac5761054a565b8063c7ea488914610e11578063cc7b932714610e195761054a565b8063c43573db1161016b578063c43573db14610d77578063c4d66de814610dd6578063c7222c7214610e095761054a565b8063bcc2ff5114610d11578063c2ba474414610d445761054a565b80638f32d59b11610234578063a03a2689116101e8578063b36607e7116101cd578063b36607e714610cbe578063b76361c214610d01578063bc99d6ae14610d095761054a565b8063a03a268914610c73578063ab5b2f2214610cb65761054a565b806390c369591161021957806390c3695914610bef578063911fc3f114610c32578063a02bda7a14610c3a5761054a565b80638f32d59b14610ba4578063905ca24714610bac5761054a565b80638129fc1c1161028b578063893ebfd511610270578063893ebfd514610b5b5780638c7b998014610b945780638da5cb5b14610b9c5761054a565b80638129fc1c14610b10578063850e102f14610b185761054a565b80636aee9c1314610ac5578063715018a614610af857806373a93af614610b0057806373c9641d14610b085761054a565b80634764efb0116104185780635439f96b116103755780635a13fd771161032957806366b459811161030e57806366b4598114610aad57806367fc176b14610ab557806369d1cb2714610abd5761054a565b80635a13fd7714610a2757806361927e3414610a6a5761054a565b8063557c138b1161035a578063557c138b146109ad578063572f9225146109e657806359eb357014610a1f5761054a565b80635439f96b1461096257806354a36bcf1461096a5761054a565b80634abafc0a116103cc57806350fca4bd116103b157806350fca4bd1461090457806350fd96a81461090c57806351ce9561146109455761054a565b80634abafc0a146108b45780634bf0d331146108d15761054a565b80634846e345116103fd5780634846e3451461083e578063485cc9551461084657806348ebb08d146108815761054a565b80634764efb0146107ae57806347e7ef24146108055761054a565b80632954018c116104c6578063372ce3df1161047a5780633c29a4621161045f5780633c29a4621461073a57806340c10f191461074257806341976e091461077b5761054a565b8063372ce3df1461072a5780633b8b09b7146107325761054a565b80633182aeb1116104ab5780633182aeb11461067757806335052d6e146106d657806335870d2e146106de5761054a565b80632954018c146106675780632bfcc3731461066f5761054a565b80630feea7391161051d5780631ac919b0116105025780631ac919b0146105ed5780631e3eb86a146105f557806322867d781461062e5761054a565b80630feea739146105aa57806313ba1600146105e55761054a565b806303ec357f1461054f57806304b62f29146105805780630a19dd331461059a5780630aff90bb146105a2575b600080fd5b61055761106a565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610588611106565b60408051918252519081900360200190f35b61058861110c565b610588611112565b6105e3600480360360408110156105c057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611118565b005b6105886113c2565b6105886113c8565b6105e36004803603604081101561060b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356113ce565b6105886004803603604081101561064457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356113e5565b610557611476565b610588611492565b610588600480360360e081101561068d57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135821691604082013591606081013582169160808201359160a08101359091169060c00135611498565b6105886117ce565b610711600480360360208110156106f457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166117d3565b6040805192835260208301919091528051918290030190f35b610588611a49565b610588611a4f565b610588611a55565b6105886004803603604081101561075857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611a5b565b6105886004803603602081101561079157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a73565b6107f1600480360360608110156107c457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135611bac565b604080519115158252519081900360200190f35b6105886004803603604081101561081b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611bc3565b610588611bdb565b6105e36004803603604081101561085c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611be1565b6105e36004803603602081101561089757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611d4f565b6105e3600480360360208110156108ca57600080fd5b5035611e6f565b6107f1600480360360208110156108e757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611f1d565b610588612024565b6105886004803603604081101561092257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561202a565b6105e36004803603602081101561095b57600080fd5b5035612042565b6105886120f0565b6105886004803603606081101561098057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356120f6565b6105e3600480360360408110156109c357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135612103565b6105e3600480360360408110156109fc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356122e0565b61058861252e565b61058860048036036060811015610a3d57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135612534565b6105e360048036036060811015610a8057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356127dd565b6105886129a5565b6105886129ab565b6105886129b1565b6107f160048036036020811015610adb57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166129b7565b6105e36129d5565b610588612ab7565b610557612abd565b6105e3612b28565b61058860048036036060811015610b2e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135612c44565b6105e360048036036040811015610b7157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135612c51565b610588612c68565b610557612c6e565b6107f1612c8a565b6107f160048036036060811015610bc257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135612cca565b61058860048036036060811015610c0557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135612cdc565b610588612df1565b6105e360048036036040811015610c5057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135612df7565b6107f160048036036060811015610c8957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135613045565b610588613052565b61058860048036036060811015610cd457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135613058565b6105886131fe565b610588613204565b61058860048036036020811015610d2757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661320a565b6107f160048036036020811015610d5a57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16613299565b610588600480360360e0811015610d8d57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135821691604082013591606081013582169160808201359160a08101359091169060c001356133a0565b6105e360048036036020811015610dec57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166136ca565b610588613805565b61058861380b565b6105e360048036036020811015610e2f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16613811565b6105e360048036036020811015610e6257600080fd5b5035613acb565b61058860048036036060811015610e7f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135613b79565b610588613c97565b610588613c9d565b6107f160048036036020811015610ed257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16613ca3565b61058860048036036040811015610f0557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135613cb6565b61058860048036036060811015610f3e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135613cce565b6105e360048036036020811015610f8157600080fd5b5035613da8565b6105e360048036036020811015610f9e57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16613e56565b61058860048036036040811015610fd157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135613ed2565b6107f16004803603606081101561100a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135613eea565b6105886004803603602081101561104d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16613efc565b609e54604080517f03ec357f000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff16916303ec357f916004808301926020929190829003018186803b1580156110d557600080fd5b505afa1580156110e9573d6000803e3d6000fd5b505050506040513d60208110156110ff57600080fd5b5051905090565b61100581565b610f0381565b61100081565b6033805460010190819055600061112f8484613f0e565b90506110008114156111a257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6e6f6e2d7a65726f20616d6f756e742065787065637465640000000000000000604482015290519081900360640190fd5b61100281141561121357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f696e73756666696369656e7420636f6c6c61746572616c2062616c616e636500604482015290519081900360640190fd5b61100881141561128457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f746f6b656e20686173206e6f2076616c75650000000000000000000000000000604482015290519081900360640190fd5b6110058114156112df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806158a26025913960400191505060405180910390fd5b801561134c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f756e6578706563746564206661696c7572650000000000000000000000000000604482015290519081900360640190fd5b5060335481146113bd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b505050565b609d5481565b61100281565b6033805460010190819055600061112f8484614111565b60338054600101908190556000906113fd8484614127565b9150603354811461146f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5092915050565b609e5473ffffffffffffffffffffffffffffffffffffffff1681565b61100681565b6000331561150757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f766965772066756e6374696f6e206f6e6c790000000000000000000000000000604482015290519081900360640190fd5b60008413156115b657611518612abd565b604080517f551f8e2a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b811660048301528881166024830152604482018890529151929091169163551f8e2a9160648082019260009290919082900301818387803b15801561159957600080fd5b505af11580156115ad573d6000803e3d6000fd5b5050505061165f565b600084121561165f576115c7612abd565b604080517f55ceeb3100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015288811660248301526000888103604484015292519316926355ceeb319260648084019391929182900301818387803b15801561164657600080fd5b505af115801561165a573d6000803e3d6000fd5b505050505b600082131561170e5761167061106a565b604080517f551f8e2a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b811660048301528681166024830152604482018690529151929091169163551f8e2a9160648082019260009290919082900301818387803b1580156116f157600080fd5b505af1158015611705573d6000803e3d6000fd5b505050506117b7565b60008212156117b75761171f61106a565b604080517f55ceeb3100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015286811660248301526000868103604484015292519316926355ceeb319260648084019391929182900301818387803b15801561179e57600080fd5b505af11580156117b2573d6000803e3d6000fd5b505050505b6117c2888888613b79565b98975050505050505050565b600081565b600080609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663045bb7f86040518163ffffffff1660e01b815260040160206040518083038186803b15801561183e57600080fd5b505afa158015611852573d6000803e3d6000fd5b505050506040513d602081101561186857600080fd5b5051604080517f41976e0900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152915191909216916341976e09916024808301926020929190829003018186803b1580156118da57600080fd5b505afa1580156118ee573d6000803e3d6000fd5b505050506040513d602081101561190457600080fd5b5051609e54604080517f057838bd000000000000000000000000000000000000000000000000000000008152905192945073ffffffffffffffffffffffffffffffffffffffff9091169163057838bd91600480820192602092909190829003018186803b15801561197457600080fd5b505afa158015611988573d6000803e3d6000fd5b505050506040513d602081101561199e57600080fd5b5051604080517fcefe0f2100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301529151919092169163cefe0f21916024808301926020929190829003018186803b158015611a1057600080fd5b505afa158015611a24573d6000803e3d6000fd5b505050506040513d6020811015611a3a57600080fd5b505160ff16600a0a9050915091565b61100981565b609a5481565b61100c81565b60338054600101908190556000906113fd84846144fd565b609e54604080517f045bb7f8000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169163045bb7f8916004808301926020929190829003018186803b158015611ade57600080fd5b505afa158015611af2573d6000803e3d6000fd5b505050506040513d6020811015611b0857600080fd5b5051604080517f41976e0900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152915191909216916341976e09916024808301926020929190829003018186803b158015611b7a57600080fd5b505afa158015611b8e573d6000803e3d6000fd5b505050506040513d6020811015611ba457600080fd5b505192915050565b6000611bb9848484612cca565b90505b9392505050565b60338054600101908190556000906113fd848461486b565b61100b81565b600054610100900460ff1680611bfa5750611bfa614b23565b80611c08575060005460ff16155b611c5d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061590e602e913960400191505060405180910390fd5b600054610100900460ff16158015611cc357600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b609e80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8416179055611d0c836136ca565b611d14612b28565b611d1c612b28565b80156113bd57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166384d9319e6040518163ffffffff1660e01b815260040160206040518083038186803b158015611db757600080fd5b505afa158015611dcb573d6000803e3d6000fd5b505050506040513d6020811015611de157600080fd5b5051604080517f48ebb08d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152915191909216916348ebb08d91602480830192600092919082900301818387803b158015611e5457600080fd5b505af1158015611e68573d6000803e3d6000fd5b5050505050565b611e77612c8a565b611ee257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b609d8190556040805182815290517f098b15c44f691bd9d6bf314945624b4473716ccba34fee5e73ab4aef43ea3e809181900360200190a150565b609e54604080517f057838bd000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169163057838bd916004808301926020929190829003018186803b158015611f8857600080fd5b505afa158015611f9c573d6000803e3d6000fd5b505050506040513d6020811015611fb257600080fd5b5051604080517f4bf0d33100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015291519190921691634bf0d331916024808301926020929190829003018186803b158015611b7a57600080fd5b609b5481565b60338054600101908190556000906113fd8484614b29565b61204a612c8a565b6120b557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b609c8190556040805182815290517fe427e272b122e738fd867ac5defcedb2bc9362341166a49d793d8b230f75670c9181900360200190a150565b609c5481565b6000611bb9848484613b79565b6033805460010190819055600061211a8484614127565b905061100081141561218d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6e6f6e2d7a65726f20616d6f756e742065787065637465640000000000000000604482015290519081900360640190fd5b6110028114156121fe57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f696e73756666696369656e742064656274206f75747374616e64696e67000000604482015290519081900360640190fd5b61100381141561226f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f696e73756666696369656e7420616c6c6f77616e636500000000000000000000604482015290519081900360640190fd5b61100c8114156112df57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6475737420646562742076616c75650000000000000000000000000000000000604482015290519081900360640190fd5b603380546001019081905560006122f78484614b29565b905061100081141561236a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6e6f6e2d7a65726f20616d6f756e742065787065637465640000000000000000604482015290519081900360640190fd5b6110018114156123db57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f616d6f756e7420746f6f206c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b61100781141561244c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f6d696e74696e67206f662074686520746f6b656e2070726f6869626974656400604482015290519081900360640190fd5b6110088114156124bd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f746f6b656e20686173206e6f2076616c75650000000000000000000000000000604482015290519081900360640190fd5b61100581141561226f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f696e73756666696369656e7420636f6c6c61746572616c2076616c7565000000604482015290519081900360640190fd5b609b5490565b6000811580159061255a575073ffffffffffffffffffffffffffffffffffffffff831615155b156126a557609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373c9641d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156125c757600080fd5b505afa1580156125db573d6000803e3d6000fd5b505050506040513d60208110156125f157600080fd5b5051604080517f65be454d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152868116602483015260448201869052915191909216916365be454d916064808301926020929190829003018186803b15801561267257600080fd5b505afa158015612686573d6000803e3d6000fd5b505050506040513d602081101561269c57600080fd5b50519050611bbc565b609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373c9641d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561270d57600080fd5b505afa158015612721573d6000803e3d6000fd5b505050506040513d602081101561273757600080fd5b5051604080517f912c267300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301529151919092169163912c2673916024808301926020929190829003018186803b1580156127a957600080fd5b505afa1580156127bd573d6000803e3d6000fd5b505050506040513d60208110156127d357600080fd5b5051949350505050565b609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ca65c39e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561284557600080fd5b505afa158015612859573d6000803e3d6000fd5b505050506040513d602081101561286f57600080fd5b505173ffffffffffffffffffffffffffffffffffffffff1633146128f457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f746f6b656e2073746f7261676520616363657373207265737472696374656400604482015290519081900360640190fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561297b57600080fd5b505af115801561298f573d6000803e3d6000fd5b505050506040513d6020811015611e6857600080fd5b61271081565b610f0181565b61100881565b60006129cf8260008060006129ca61252e565b614b3f565b92915050565b6129dd612c8a565b612a4857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60675460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3606780547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b61100a81565b609e54604080517f73c9641d000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff16916373c9641d916004808301926020929190829003018186803b1580156110d557600080fd5b600054610100900460ff1680612b415750612b41614b23565b80612b4f575060005460ff16155b612ba4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061590e602e913960400191505060405180910390fd5b600054610100900460ff16158015612c0a57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b612c12614c37565b8015612c4157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b6000611bb9848484613cce565b603380546001019081905560006122f784846144fd565b61100781565b60675473ffffffffffffffffffffffffffffffffffffffff1690565b60675460009073ffffffffffffffffffffffffffffffffffffffff16612cae614d4f565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b6000611bb984846000856129ca613c97565b6000806000612cea856117d3565b915091508160001415612d5e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f636f6c6c61746572616c20746f6b656e20686173206e6f2076616c7565000000604482015290519081900360640190fd5b6000612d6c87600080613058565b90506000612d7c88600080612534565b90506000612d8a8388614d53565b9050818111612da157600095505050505050611bbc565b612de46001612dc087612dd888612dcc8585898b63ffffffff614d8916565b9063ffffffff614dcb16565b9063ffffffff614e3f16565b9063ffffffff614eb216565b9998505050505050505050565b61100381565b60338054600101908190556000612e0e848461486b565b9050611000811415612e8157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6e6f6e2d7a65726f20616d6f756e742065787065637465640000000000000000604482015290519081900360640190fd5b611006811415612ef257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f6465706f736974206f662074686520746f6b656e2070726f6869626974656400604482015290519081900360640190fd5b611002811415612f6357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f696e73756666696369656e7420746f6b656e2062616c616e6365000000000000604482015290519081900360640190fd5b611003811415612fd457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f696e73756666696369656e7420616c6c6f77616e636500000000000000000000604482015290519081900360640190fd5b6110088114156112df57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f746f6b656e20686173206e6f2076616c75650000000000000000000000000000604482015290519081900360640190fd5b6000611bb9848484613eea565b609d5490565b6000811580159061307e575073ffffffffffffffffffffffffffffffffffffffff831615155b1561319657609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166303ec357f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130eb57600080fd5b505afa1580156130ff573d6000803e3d6000fd5b505050506040513d602081101561311557600080fd5b5051604080517f660eab8300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301528681166024830152604482018690529151919092169163660eab83916064808301926020929190829003018186803b15801561267257600080fd5b609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166303ec357f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561270d57600080fd5b61100481565b610a0081565b603380546001019081905560009061322183614ef4565b9150603354811461329357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b50919050565b609e54604080517f057838bd000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169163057838bd916004808301926020929190829003018186803b15801561330457600080fd5b505afa158015613318573d6000803e3d6000fd5b505050506040513d602081101561332e57600080fd5b5051604080517fc2ba474400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301529151919092169163c2ba4744916024808301926020929190829003018186803b158015611b7a57600080fd5b6000331561340f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f766965772066756e6374696f6e206f6e6c790000000000000000000000000000604482015290519081900360640190fd5b60008413156134be57613420612abd565b604080517f551f8e2a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b811660048301528881166024830152604482018890529151929091169163551f8e2a9160648082019260009290919082900301818387803b1580156134a157600080fd5b505af11580156134b5573d6000803e3d6000fd5b50505050613567565b6000841215613567576134cf612abd565b604080517f55ceeb3100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015288811660248301526000888103604484015292519316926355ceeb319260648084019391929182900301818387803b15801561354e57600080fd5b505af1158015613562573d6000803e3d6000fd5b505050505b60008213156136165761357861106a565b604080517f551f8e2a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b811660048301528681166024830152604482018690529151929091169163551f8e2a9160648082019260009290919082900301818387803b1580156135f957600080fd5b505af115801561360d573d6000803e3d6000fd5b505050506136bf565b60008212156136bf5761362761106a565b604080517f55ceeb3100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015286811660248301526000868103604484015292519316926355ceeb319260648084019391929182900301818387803b1580156136a657600080fd5b505af11580156136ba573d6000803e3d6000fd5b505050505b6117c2888888613cce565b600054610100900460ff16806136e357506136e3614b23565b806136f1575060005460ff16155b613746576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061590e602e913960400191505060405180910390fd5b600054610100900460ff161580156137ac57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6137b58261505d565b617530609a5561c350609b556032609c55670de0b6b3a7640000609d55801561380157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b5050565b610f0281565b61100181565b6033805460010190819055600061382783614ef4565b905061100081141561389a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6e6f6e2d7a65726f20616d6f756e742065787065637465640000000000000000604482015290519081900360640190fd5b61100281141561390b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f696e73756666696369656e742064656274206f75747374616e64696e67000000604482015290519081900360640190fd5b61100381141561397c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f696e73756666696369656e7420616c6c6f77616e636500000000000000000000604482015290519081900360640190fd5b61100c8114156139ed57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6475737420646562742076616c75650000000000000000000000000000000000604482015290519081900360640190fd5b8015613a5a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f756e6578706563746564206661696c7572650000000000000000000000000000604482015290519081900360640190fd5b50603354811461380157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b613ad3612c8a565b613b3e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b609b8190556040805182815290517f3ec85924f12f4be0739c4a0a45218af5f95364180a8e6650aedaad068db44b799181900360200190a150565b6000806000613b87856117d3565b915091508160001415613bfb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f636f6c6c61746572616c20746f6b656e20686173206e6f2076616c7565000000604482015290519081900360640190fd5b6000613c0987600080613058565b90506000613c1988600080612534565b90506000613c278388614d53565b9050808211613c3e57600095505050505050611bbc565b6000613c5a88612dd8612710612dcc878763ffffffff614d8916565b905080613c705760009650505050505050611bbc565b613c8986612dd887612dcc85600163ffffffff614d8916565b9a9950505050505050505050565b609a5490565b609c5490565b60006129cf8260008060006129ca613c97565b60338054600101908190556000906113fd8484614111565b600080613cd9612abd565b604080517ff7888aec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015287811660248301529151929091169163f7888aec91604480820192602092909190829003018186803b158015613d5257600080fd5b505afa158015613d66573d6000803e3d6000fd5b505050506040513d6020811015613d7c57600080fd5b505190506000613d8d8686866151e5565b905080821015613d9f57509050611bbc565b95945050505050565b613db0612c8a565b613e1b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b609a8190556040805182815290517f03b166133cc99dd16eff1cc93a1a34996f2710564ca9563fe1ddd539293f3e689181900360200190a150565b613e5e612c8a565b613ec957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b612c41816152c2565b60338054600101908190556000906113fd8484613f0e565b6000611bb984848460006129ca613c97565b60666020526000908152604090205481565b600081613f1e57506110006129cf565b6000613f28612abd565b604080517ff7888aec00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff878116602483015291519293509083169163f7888aec91604480820192602092909190829003018186803b158015613fa157600080fd5b505afa158015613fb5573d6000803e3d6000fd5b505050506040513d6020811015613fcb57600080fd5b5051831115613fdf576110029150506129cf565b613fea338585613045565b613ff9576110059150506129cf565b61400233611d4f565b604080517f55ceeb3100000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8681166024830152604482018690529151918316916355ceeb319160648082019260009290919082900301818387803b15801561408057600080fd5b505af1158015614094573d6000803e3d6000fd5b506140ba9250505073ffffffffffffffffffffffffffffffffffffffff851633856153bc565b604080518481529051339173ffffffffffffffffffffffffffffffffffffffff8716917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb9181900360200190a35060009392505050565b6000611bbc83614122338686612c44565b613f0e565b60008161413757506110006129cf565b600061414161106a565b604080517ff7888aec00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff878116602483015291519293509083169163f7888aec91604480820192602092909190829003018186803b1580156141ba57600080fd5b505afa1580156141ce573d6000803e3d6000fd5b505050506040513d60208110156141e457600080fd5b50518311156141f8576110029150506129cf565b604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152336004820152306024820152905173ffffffffffffffffffffffffffffffffffffffff86169163dd62ed3e916044808301926020929190829003018186803b15801561426a57600080fd5b505afa15801561427e573d6000803e3d6000fd5b505050506040513d602081101561429457600080fd5b50518311156142a8576110039150506129cf565b604080517f65be454d00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff86811660248301526044820186905291516000928416916365be454d916064808301926020929190829003018186803b15801561432657600080fd5b505afa15801561433a573d6000803e3d6000fd5b505050506040513d602081101561435057600080fd5b5051905080158015906143695750614366613052565b81105b1561437a5761100c925050506129cf565b604080517f79cc679000000000000000000000000000000000000000000000000000000000815233600482015260248101869052905173ffffffffffffffffffffffffffffffffffffffff8716916379cc679091604480830192600092919082900301818387803b1580156143ee57600080fd5b505af1158015614402573d6000803e3d6000fd5b5050505061440f33611d4f565b604080517f55ceeb3100000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8781166024830152604482018790529151918416916355ceeb319160648082019260009290919082900301818387803b15801561448d57600080fd5b505af11580156144a1573d6000803e3d6000fd5b505060408051878152905133935073ffffffffffffffffffffffffffffffffffffffff891692507f0a3fbbea70e93f2daafa3102f5c9a1b8315e6d7a1e43e4bc020bc1162327470a9181900360200190a3506000949350505050565b60008161450d57506110006129cf565b61451683613299565b61452357506110076129cf565b61452c83611a73565b61453957506110086129cf565b614544338484611bac565b61455157506110056129cf565b60006145766001612dc0612710612dd8614569613c9d565b889063ffffffff614e3f16565b905082811061458a576110019150506129cf565b600061459461106a565b604080517f660eab8300000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff88811660248301526044820188905291519293506000929184169163660eab8391606480820192602092909190829003018186803b15801561461757600080fd5b505afa15801561462b573d6000803e3d6000fd5b505050506040513d602081101561464157600080fd5b5051905061464d613052565b8110156146615761100c93505050506129cf565b61466a33611d4f565b604080517f551f8e2a00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff88811660248301526044820188905291519184169163551f8e2a9160648082019260009290919082900301818387803b1580156146e857600080fd5b505af11580156146fc573d6000803e3d6000fd5b50505073ffffffffffffffffffffffffffffffffffffffff871660009081526066602052604090205461473691508463ffffffff614dcb16565b73ffffffffffffffffffffffffffffffffffffffff87166000818152606660205260409020919091556340c10f1933614775888763ffffffff614d8916565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156147de57600080fd5b505af11580156147f2573d6000803e3d6000fd5b505050506040513d602081101561480857600080fd5b505060408051868152602081018590528151339273ffffffffffffffffffffffffffffffffffffffff8a16927f03f17d66ad3bf18e9412eb06582908831508cdb9b8da9cddb1431f645a5b8632929081900390910190a350600095945050505050565b60008161487b57506110006129cf565b61488483611f1d565b61489157506110066129cf565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff8516916370a08231916024808301926020929190829003018186803b1580156148fd57600080fd5b505afa158015614911573d6000803e3d6000fd5b505050506040513d602081101561492757600080fd5b505182111561493957506110026129cf565b604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152336004820152306024820152905173ffffffffffffffffffffffffffffffffffffffff85169163dd62ed3e916044808301926020929190829003018186803b1580156149ab57600080fd5b505afa1580156149bf573d6000803e3d6000fd5b505050506040513d60208110156149d557600080fd5b50518211156149e757506110036129cf565b6149f083611a73565b6149fd57506110086129cf565b614a0633611d4f565b614a2e73ffffffffffffffffffffffffffffffffffffffff841633308563ffffffff61544916565b614a36612abd565b604080517f551f8e2a00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8681166024830152604482018690529151929091169163551f8e2a9160648082019260009290919082900301818387803b158015614ab557600080fd5b505af1158015614ac9573d6000803e3d6000fd5b505060408051858152905133935073ffffffffffffffffffffffffffffffffffffffff871692507f8752a472e571a816aea92eec8dae9baf628e840f4929fbcc2d155e6233ff68a79181900360200190a350600092915050565b303b1590565b6000611bbc83614b3a3386866120f6565b6144fd565b6000614b49612abd565b604080517ff7888aec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff898116600483015288811660248301529151929091169163f7888aec91604480820192602092909190829003018186803b158015614bc257600080fd5b505afa158015614bd6573d6000803e3d6000fd5b505050506040513d6020811015614bec57600080fd5b5051841115614bfd57506000613d9f565b6000614c0a878786613058565b90506000614c19888888612534565b90506000614c278386614d53565b9091101598975050505050505050565b600054610100900460ff1680614c505750614c50614b23565b80614c5e575060005460ff16155b614cb3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061590e602e913960400191505060405180910390fd5b600054610100900460ff16158015614d1957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b60016033558015612c4157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b3390565b600080614d6c612710612dd8868663ffffffff614e3f16565b9050612710830615611bbc57611bb981600163ffffffff614dcb16565b6000611bbc83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506154e4565b600082820183811015611bbc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082614e4e575060006129cf565b82820282848281614e5b57fe5b0414611bbc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806158ed6021913960400191505060405180910390fd5b6000611bbc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615595565b600080614eff61106a565b604080517ff7888aec00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff86811660248301529151929091169163f7888aec91604480820192602092909190829003018186803b158015614f7657600080fd5b505afa158015614f8a573d6000803e3d6000fd5b505050506040513d6020811015614fa057600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152336004820152905191925060009173ffffffffffffffffffffffffffffffffffffffff8616916370a08231916024808301926020929190829003018186803b15801561501457600080fd5b505afa158015615028573d6000803e3d6000fd5b505050506040513d602081101561503e57600080fd5b50519050615055846150508484615614565b614127565b949350505050565b600054610100900460ff16806150765750615076614b23565b80615084575060005460ff16155b6150d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061590e602e913960400191505060405180910390fd5b600054610100900460ff1615801561513f57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b606780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84811691909117918290556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3801561380157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555050565b60008060006151f3856117d3565b91509150816000141561526757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f636f6c6c61746572616c20746f6b656e20686173206e6f2076616c7565000000604482015290519081900360640190fd5b600061527587600080613058565b9050600061528588600080612534565b905060006152938388614d53565b90508082116152aa57600095505050505050611bbc565b612de485612dd886612dcc868663ffffffff614d8916565b73ffffffffffffffffffffffffffffffffffffffff811661532e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806158c76026913960400191505060405180910390fd5b60675460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3606780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526113bd90849061562a565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526154de90859061562a565b50505050565b6000818484111561558d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561555257818101518382015260200161553a565b50505050905090810190601f16801561557f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836155fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561555257818101518382015260200161553a565b50600083858161560a57fe5b0495945050505050565b60008183106156235781611bbc565b5090919050565b6156498273ffffffffffffffffffffffffffffffffffffffff16615868565b6156b457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061571d57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016156e0565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461577f576040519150601f19603f3d011682016040523d82523d6000602084013e615784565b606091505b5091509150816157f557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156154de5780806020019051602081101561581157600080fd5b50516154de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a81526020018061593c602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061505557505015159291505056fe696e73756666696369656e7420636f6c6c61746572616c2076616c75652072656d61696e734f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820a71cd13727d0f84d622280b6280d807d0b0b8c2f7d0c7a4b35378de091585d6664736f6c63430005110032";
    
    // create new contract
    contract = web3.tpc.contract(MintAbi);
    deploy = contract.new(adrProvider.address, {
        data: MintByteCode,
        from: account,
        gas: 4000000
    });
    
    // get the contract address (you may need to wait for the receipt to be available)
    MintAddress = tpc.getTransactionReceipt(deploy.transactionHash).contractAddress;
    
    // instantiate the Mint contract
    var Mint = web3.tpc.contract(MintAbi).at(MintAddress);
  13. Add TechPay Mint to the Address Provider.

        // set the minter address
        adrProvider.setTechPayMint(Mint.address);
  14. Enable minter role on the ERC20 tokens for Mint.

    // we will configure ERC20 tokens
    var erc20abi = JSON.parse('[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]');
    
    // set USD
    var tUSD = web3.tpc.contract(erc20abi).at(tokenUSD);
    tUSD.addMinter(adrProvider.getTechPayMint());

About

Minting part of the DeFi ecosystem

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published