{"compiler":{"version":"0.6.8+commit.0bbfe453"},"language":"Solidity","output":{"abi":[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":false,"internalType":"uint256","name":"celoAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"savingsAmount","type":"uint256"}],"name":"Deposited","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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousVoter","type":"address"},{"indexed":true,"internalType":"address","name":"newVoter","type":"address"}],"name":"VoterAuthorized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"celoAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"savingsAmount","type":"uint256"}],"name":"WithdrawCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"celoAmount","type":"uint256"}],"name":"WithdrawFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"savingsAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"celoAmount","type":"uint256"}],"name":"WithdrawStarted","type":"event"},{"inputs":[],"name":"_voter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"authorizeVoteSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"voter","type":"address"}],"name":"authorizeVoterProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"celoAmount","type":"uint256"}],"name":"celoToSavings","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deposit","outputs":[{"internalType":"uint256","name":"toMint","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"pendingWithdrawals","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"group","type":"address"}],"name":"proxyActivate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"lesser","type":"uint256"},{"internalType":"uint256","name":"greater","type":"uint256"}],"name":"proxyGovernanceRevokeUpvote","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint256","name":"lesser","type":"uint256"},{"internalType":"uint256","name":"greater","type":"uint256"}],"name":"proxyGovernanceUpvote","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"enum Governance.VoteValue","name":"value","type":"uint8"}],"name":"proxyGovernanceVote","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"group","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"lesser","type":"address"},{"internalType":"address","name":"greater","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"proxyRevokeActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"group","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"lesser","type":"address"},{"internalType":"address","name":"greater","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"proxyRevokePending","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"group","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"lesser","type":"address"},{"internalType":"address","name":"greater","type":"address"}],"name":"proxyVote","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"savingsAmount","type":"uint256"}],"name":"savingsToCELO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"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"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"indexGlobal","type":"uint256"}],"name":"withdrawCancel","outputs":[{"internalType":"uint256","name":"toMint","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"indexGlobal","type":"uint256"}],"name":"withdrawFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"savingsAmount","type":"uint256"},{"internalType":"address","name":"lesserAfterPendingRevoke","type":"address"},{"internalType":"address","name":"greaterAfterPendingRevoke","type":"address"},{"internalType":"address","name":"lesserAfterActiveRevoke","type":"address"},{"internalType":"address","name":"greaterAfterActiveRevoke","type":"address"}],"name":"withdrawStart","outputs":[{"internalType":"uint256","name":"toWithdraw","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}],"devdoc":{"methods":{"allowance(address,address)":{"details":"See {IERC20-allowance}."},"approve(address,uint256)":{"details":"See {IERC20-approve}.     * Requirements:     * - `spender` cannot be the zero address."},"authorizeVoteSigner(address,uint8,bytes32,bytes32)":{"details":"Vote Signer authorization exists only as a means of a potential escape-hatch if some sort of really unexpected issue occurs. By default, it is expected that there will be no authorized vote signer, and a voting contract will be configured using .authorizeVoterProxy call instead.","params":{"r":"{v, r, s} proof-of-key possession signature.","s":"{v, r, s} proof-of-key possession signature.","signer":"address to authorize as a signer.","v":"{v, r, s} proof-of-key possession signature."}},"authorizeVoterProxy(address)":{"params":{"voter":"address of the voter contract to authorize."}},"balanceOf(address)":{"details":"See {IERC20-balanceOf}."},"celoToSavings(uint256)":{"params":{"celoAmount":"amount of CELO tokens."},"returns":{"_0":"amount of sCELO tokens."}},"decimals()":{"details":"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`).     * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called.     * NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}."},"decreaseAllowance(address,uint256)":{"details":"Atomically decreases the allowance granted to `spender` by the caller.     * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}.     * Emits an {Approval} event indicating the updated allowance.     * Requirements:     * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."},"deposit()":{"returns":{"toMint":"Amount of sCELO tokens minted."}},"increaseAllowance(address,uint256)":{"details":"Atomically increases the allowance granted to `spender` by the caller.     * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}.     * Emits an {Approval} event indicating the updated allowance.     * Requirements:     * - `spender` cannot be the zero address."},"name()":{"details":"Returns the name of the token."},"owner()":{"details":"Returns the address of the current owner."},"pendingWithdrawals(address)":{"details":"Returns (values[], timestamps[]) of all pending withdrawals for given address."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner.     * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."},"savingsToCELO(uint256)":{"params":{"savingsAmount":"amount of sCELO tokens."},"returns":{"_0":"amount of CELO tokens."}},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalSupply()":{"details":"See {IERC20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IERC20-transfer}.     * Requirements:     * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`."},"transferFrom(address,address,uint256)":{"details":"See {IERC20-transferFrom}.     * Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20};     * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."},"withdrawCancel(uint256,uint256)":{"params":{"index":"index of pending withdrawal to finish as returned by .pendingWithdrawals() call.","indexGlobal":"index of matching pending withdrawal as returned by lockedGold.getPendingWithdrawals() call."},"returns":{"toMint":"amount of sCELO tokens returned to the caller."}},"withdrawFinish(uint256,uint256)":{"params":{"index":"index of pending withdrawal to finish as returned by .pendingWithdrawals() call.","indexGlobal":"index of matching pending withdrawal as returned by lockedGold.getPendingWithdrawals() call."},"returns":{"_0":"amount of CELO tokens withdrawn."}},"withdrawStart(uint256,address,address,address,address)":{"details":"Since only nonvoting CELO can be unlocked, withdrawStart might have to call Election.revoke* calls to revoke currently cast votes. To keep this call simple, maximum amount of CELO that can be unlocked in single call is: `nonvoting locked CELO + total votes for last voted group`. This way, withdrawStart call will only revoke votes for a single group at most, making it simpler overall. \t/// lesser.../greater... parameters are needed to perform Election.revokePending and Election.revokeActive calls. See Election contract for more details. lesser.../greater... arguments are for last voted group by this contract, since revoking only happens for the last voted group. \t/// Note that it is possible for this call to fail due to accidental race conditions if lesser.../greater... parameters no longer match due to changes in overall voting ranking.","returns":{"toWithdraw":"amount of CELO tokens that will be withdrawn."}}},"title":"SavingsCELO contract"},"userdoc":{"methods":{"authorizeVoteSigner(address,uint8,bytes32,bytes32)":{"notice":"Authorizes new vote signer that can manage voting for all of contract's locked CELO. {v, r, s} constitutes proof-of-key-possession signature of signer for this contract address."},"authorizeVoterProxy(address)":{"notice":"Authorizes another contract to perform voting on behalf of SavingsCELO."},"celoToSavings(uint256)":{"notice":"Returns amount of SavingsCELO tokens that can be received for depositing celoAmount CELO tokens."},"deposit()":{"notice":"Deposits CELO to the contract in exchange of SavingsCELO (sCELO) tokens."},"savingsToCELO(uint256)":{"notice":"Returns amount of CELO that can be claimed for savingsAmount SavingsCELO tokens."},"withdrawCancel(uint256,uint256)":{"notice":"Cancels withdraw process, re-locking CELO back in the contract and returning SavingsCELO tokens back to the caller. At the time of re-locking, SavingsCELO can be more valuable compared to when .withdrawStart was called. Thus caller might receive less SavingsCELO compared to what was supplied to .withdrawStart."},"withdrawFinish(uint256,uint256)":{"notice":"Finishes withdraw process, transfering unlocked CELO back to the caller."},"withdrawStart(uint256,address,address,address,address)":{"notice":"Starts withdraw process for savingsAmount SavingsCELO tokens."}}}},"settings":{"compilationTarget":{"/Users/zviad/src/savingscelo/contracts/SavingsCELO.sol":"SavingsCELO"},"evmVersion":"istanbul","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":false,"runs":200},"remappings":[]},"sources":{"/Users/zviad/src/savingscelo/contracts/SavingsCELO.sol":{"keccak256":"0x8aa3e35d73f9a117296a90467e6a4955f09f66d6d363a790256ac53c8d36706d","license":"MIT","urls":["bzz-raw://8748c19ababc0cb2e530f91bdf53334d5ecee9ab89f3a9c1a3fd24e2a2968970","dweb:/ipfs/Qmchy2iTfhzng5ZHKfDwk2bTs9e3wk5NiXtuevgYP9qL3x"]},"/Users/zviad/src/savingscelo/contracts/UsingRegistry.sol":{"keccak256":"0xb53076a5a1a00a6f757a4377619bda59c6642094c5d4109e7c5114e55058f2d2","license":"MIT","urls":["bzz-raw://dbfef8f2a513c09876ac4a11f933bcfe1b7e6a2913fa721fdb36726bedacea49","dweb:/ipfs/QmS4wFkFGgfyn1ZnMLjfPf5NTbWE7HdN5eGfCNp7rHxczw"]},"/Users/zviad/src/savingscelo/contracts/interfaces/IAccounts.sol":{"keccak256":"0x3747894511c8db97230dab3d435d9b09668a657ac2b581159e7b4e95cb4aef69","license":"MIT","urls":["bzz-raw://5591edf9b25a488d6c3e23cce8994a3e25e537353853b42d36e47d37f218d741","dweb:/ipfs/Qmdzij72zLnmSHUY1NKLqjGLFdzW4oYa6jdSesJ17a6P9s"]},"/Users/zviad/src/savingscelo/contracts/interfaces/IElection.sol":{"keccak256":"0xf45fb39dec0fb7b478ce287bd32d014a8d76604248c95b45ef7f0d0b4dcc7ea0","license":"MIT","urls":["bzz-raw://8c443dcb8b0a597b10d3530de4bab79fa2faba511a415d7854108b1c687ee09f","dweb:/ipfs/QmeiCk9L51BGns9Ga6LVYQ35FwD3da7F3KLSZEKQSntirt"]},"/Users/zviad/src/savingscelo/contracts/interfaces/IExchange.sol":{"keccak256":"0x6ba2b1cbdd06600bd9224eca67cbb04ed972fce3f66d012f910cd2e880b37574","license":"MIT","urls":["bzz-raw://86a37faa4ab5a5febd2b73a1e408b41bf8b3ebeaa72a87dbfa23595fe973bed8","dweb:/ipfs/QmbHfJ9EzpbWhqojXARCuS3P16BQmgXDa7xG1qZz3KdwT3"]},"/Users/zviad/src/savingscelo/contracts/interfaces/IGovernance.sol":{"keccak256":"0xe831761c9ea2b91a2d42e82e2e182740c288472838706ea31bb6a9d517f2ca08","license":"MIT","urls":["bzz-raw://40e67e58be01ebad55d40f5ec6367cf03d6f7b90dd973cd0c22346404db707f4","dweb:/ipfs/QmfQRf3cWT3nX5szsZ3ZjTV9rJsyVhu7H9KMNAh4xD6aLN"]},"/Users/zviad/src/savingscelo/contracts/interfaces/ILockedGold.sol":{"keccak256":"0x06bebde1dc7e6bb8e7c9cd48ddc054fcde7e8f5c06fca721471fd34dfad7ac2a","license":"MIT","urls":["bzz-raw://5a412a813eb8bfd84e5958c9d42e3792aa07a05436b352b0aa5de1002fa0403d","dweb:/ipfs/QmVhDNLj2QdmC89KLiqybzrA1uvymTwmYJN2nEvuG77y6i"]},"/Users/zviad/src/savingscelo/contracts/interfaces/IRegistry.sol":{"keccak256":"0xcc51b0bbe7d244ad2a169a6c24a2ae9722deb2a2cb780a997720d535278fc1d4","license":"MIT","urls":["bzz-raw://c7953c6d57ba6ddbdc4f8c86dbda31a2563528184fba972382ac8e37eddc210b","dweb:/ipfs/Qmdf1dkEwba7hMxz87NVJM3P2QPXX3KnYooxV9zJjVNSYh"]},"/Users/zviad/src/savingscelo/contracts/interfaces/IVoterProxy.sol":{"keccak256":"0x895118c1acaba439c9dea30391e540bc6bfd5ae5df475bcd1bcadfcacb94972c","license":"MIT","urls":["bzz-raw://02fbe2c34fe8dd7dfc3dca6ee60addf64dd3ad051b3334c36e5dcdf4305652a1","dweb:/ipfs/QmZY5dTJYANBtbYEr3eLivxJdXYXiPhWrgrgfXBfdxBTXk"]},"@openzeppelin/contracts/GSN/Context.sol":{"keccak256":"0xdb26cbf4d028490f49831a7865c2fe1b28db44b535ca8d343785a3b768aae183","license":"MIT","urls":["bzz-raw://840b14ce0315c47d49ba328f1f9fa7654ded1c9e1559e6c5e777a7b2dc28bf0a","dweb:/ipfs/QmTLLabn4wcfGro9LEmUXUN2nwKqZSotXMvjDCLXEnLtZP"]},"@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0x4bd6402ca6b3419008c2b482aff54e66836e8cb4eba2680e42ac5884ae6424fc","license":"MIT","urls":["bzz-raw://8f9f711fb8d0d92aeea1c327e3845d13ca1fa8f142e47f8723cd5b3106fb29a3","dweb:/ipfs/QmVQUReDW9f4zGqhizwHnyU8EntMs95tbASdqkGncnikba"]},"@openzeppelin/contracts/math/SafeMath.sol":{"keccak256":"0x9a9cf02622cd7a64261b10534fc3260449da25c98c9e96d1b4ae8110a20e5806","license":"MIT","urls":["bzz-raw://2df142592d1dc267d9549049ee3317fa190d2f87eaa565f86ab05ec83f7ab8f5","dweb:/ipfs/QmSkJtcfWo7c42KnL5hho6GFxK6HRNV91XABx1P7xDtfLV"]},"@openzeppelin/contracts/token/ERC20/ERC20.sol":{"keccak256":"0x91e0bd6a6762d2a1700dab0849de8422611355100576c4beef1e80d82a4104a0","license":"MIT","urls":["bzz-raw://73bbd77af0a8b07255d2ffa20728bcf13b116007c9ddac5d37046cfabb0e1e02","dweb:/ipfs/QmRgZgWCWCSMTTaok6o4QvWA6MgB4goS8qpb3sN7bAvaZ9"]},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0x5c26b39d26f7ed489e555d955dcd3e01872972e71fdd1528e93ec164e4f23385","license":"MIT","urls":["bzz-raw://efdc632af6960cf865dbc113665ea1f5b90eab75cc40ec062b2f6ae6da582017","dweb:/ipfs/QmfAZFDuG62vxmAN9DnXApv7e7PMzPqi4RkqqZHLMSQiY5"]},"@openzeppelin/contracts/utils/Address.sol":{"keccak256":"0xf5fa8cbdffa5ef8be49b246b5628facc30b71707e78a45d80d93b64eff3fe390","license":"MIT","urls":["bzz-raw://774e78a9ff32792cc95db4d2ceaf3a7965bb7f0bea5e6cb7cff182b450d44b37","dweb:/ipfs/QmRRMC4uj7eAcLW7chynA3sNEYULMFazdLwQHKHQPyzAbA"]}},"version":1}