From 3c6aa8f0896401bf4a589fea1907e6447cf0ffb0 Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Thu, 1 Aug 2019 20:29:01 +0200 Subject: [PATCH 01/33] Export initialiseDeposit, empty test --- client/src/Deposit.js | 2 +- client/test/DepositTest.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client/src/Deposit.js b/client/src/Deposit.js index 77dd4a8b..1cf1d542 100644 --- a/client/src/Deposit.js +++ b/client/src/Deposit.js @@ -35,7 +35,7 @@ export async function createDeposit() { // PAGE 2: PUT A BOND -async function initializeDeposit(depositAddress) { +export async function initializeDeposit(depositAddress) { // TODO: Implement: // 1. Call deposit to create new keep // 2. Watch for ECDSAKeepCreated event from ECDSAKeepFactory contract diff --git a/client/test/DepositTest.js b/client/test/DepositTest.js index 8afd36ba..5878d2b0 100644 --- a/client/test/DepositTest.js +++ b/client/test/DepositTest.js @@ -1,6 +1,6 @@ const Web3 = require('web3') -import { createDeposit, setDefaults } from '../src' +import { createDeposit, setDefaults, initializeDeposit } from '../src' import { setElectrumConfig } from '../src/FundingProof'; import { @@ -40,5 +40,8 @@ describe("Ethereum helpers", async () => { expect(await deposit.getCurrentState()).to.eq.BN('1') }) + it.only('#initializeDeposit', async () => { + await initializeDeposit() + }) }) \ No newline at end of file From 7069859ca3cc03373b4841c6614f04c7fa401612 Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Thu, 1 Aug 2019 21:54:51 +0200 Subject: [PATCH 02/33] Implement getDepositBTCPublicKey and test --- client/src/Deposit.js | 56 ++++++++++++++++++++++++++++++++++---- client/test/DepositTest.js | 11 ++++---- 2 files changed, 57 insertions(+), 10 deletions(-) diff --git a/client/src/Deposit.js b/client/src/Deposit.js index 1cf1d542..a8756f42 100644 --- a/client/src/Deposit.js +++ b/client/src/Deposit.js @@ -2,7 +2,8 @@ import { TBTCSystem, TBTCToken, KeepBridge, - DepositFactory + DepositFactory, + Deposit } from './eth/contracts' export async function createDeposit() { @@ -36,8 +37,53 @@ export async function createDeposit() { // PAGE 2: PUT A BOND export async function initializeDeposit(depositAddress) { - // TODO: Implement: - // 1. Call deposit to create new keep - // 2. Watch for ECDSAKeepCreated event from ECDSAKeepFactory contract - // 3. call get public key } + +export async function waitDepositBTCPublicKey(depositAddress) { + const tbtcSystem = await TBTCSystem.deployed() + + return await new Promise((res, rej) => { + tbtcSystem.RegisteredPubkey({ _depositContractAddress: depositAddress }).on('data', function(data) { + console.log(data) + res(data) + // https://docs.google.com/document/d/1ekLFGnMsjDIRkjGPifbxHcJeUYLCEvhHISPCl5H1E6s/edit?usp=sharing + }) + + setTimeout(rej, 15000) + }) +} + +// getDepositBTCPublicKey calls tBTC to fetch signer's public key from the keep dedicated +// for the deposit. +export async function getDepositBTCPublicKey(depositAddress) { + const tbtcSystem = await TBTCSystem.deployed() + + // 1. Request it from the deposit + const deposit = await Deposit.at(depositAddress) + + console.log(`Call getPublicKey for deposit [${deposit.address}]`) + + let result + try { + result = await deposit.retrieveSignerPubkey() + } catch(err) { + console.error(`retrieveSignerPubkey failed: ${err}`) + } + + // 2. Parse the logs to get it + const eventList = await tbtcSystem.getPastEvents( + 'RegisteredPubkey', + { + fromBlock: '0', + toBlock: 'latest', + filter: { _depositContractAddress: depositAddress } + } + ) + + const publicKeyX = eventList[0].args._signingGroupPubkeyX + const publicKeyY = eventList[0].args._signingGroupPubkeyY + + console.log(`Registered public key:\nX: ${publicKeyX}\nY: ${publicKeyY}`) + + return [publicKeyX, publicKeyY] +} \ No newline at end of file diff --git a/client/test/DepositTest.js b/client/test/DepositTest.js index 5878d2b0..665815fd 100644 --- a/client/test/DepositTest.js +++ b/client/test/DepositTest.js @@ -1,6 +1,6 @@ const Web3 = require('web3') -import { createDeposit, setDefaults, initializeDeposit } from '../src' +import { createDeposit, setDefaults, initializeDeposit, getDepositBTCPublicKey, waitDepositBTCPublicKey } from '../src' import { setElectrumConfig } from '../src/FundingProof'; import { @@ -40,8 +40,9 @@ describe("Ethereum helpers", async () => { expect(await deposit.getCurrentState()).to.eq.BN('1') }) - it.only('#initializeDeposit', async () => { - await initializeDeposit() - }) - + it('#getDepositBTCPublicKey', async () => { + const depositAddress = await createDeposit() + let key = await getDepositBTCPublicKey(depositAddress) + expect(key).to.be.of.length(2); + }) }) \ No newline at end of file From bbcf7d71757f724d48c6f75104215e9ad5d2f2fa Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Fri, 2 Aug 2019 18:16:58 +0200 Subject: [PATCH 03/33] Now converting key to BTC address --- client/src/Deposit.js | 21 +++++++++++++++------ client/test/DepositTest.js | 4 ++-- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/client/src/Deposit.js b/client/src/Deposit.js index a8756f42..17b8d181 100644 --- a/client/src/Deposit.js +++ b/client/src/Deposit.js @@ -6,6 +6,11 @@ import { Deposit } from './eth/contracts' +import { + publicKeyToP2WPKHaddress, + Network +} from '../../lib/tbtc-helpers/src/Address' + export async function createDeposit() { const tbtcSystem = await TBTCSystem.deployed() const tbtcToken = await TBTCToken.deployed() @@ -35,10 +40,6 @@ export async function createDeposit() { -// PAGE 2: PUT A BOND -export async function initializeDeposit(depositAddress) { -} - export async function waitDepositBTCPublicKey(depositAddress) { const tbtcSystem = await TBTCSystem.deployed() @@ -46,7 +47,6 @@ export async function waitDepositBTCPublicKey(depositAddress) { tbtcSystem.RegisteredPubkey({ _depositContractAddress: depositAddress }).on('data', function(data) { console.log(data) res(data) - // https://docs.google.com/document/d/1ekLFGnMsjDIRkjGPifbxHcJeUYLCEvhHISPCl5H1E6s/edit?usp=sharing }) setTimeout(rej, 15000) @@ -71,6 +71,7 @@ export async function getDepositBTCPublicKey(depositAddress) { } // 2. Parse the logs to get it + // we can't get this from result.logs, since it's emitted in another contract const eventList = await tbtcSystem.getPastEvents( 'RegisteredPubkey', { @@ -80,10 +81,18 @@ export async function getDepositBTCPublicKey(depositAddress) { } ) + if(eventList.length == 0) { + throw new Error(`couldn't find RegisteredPubkey event for deposit address: ${depositAddress}`) + } + const publicKeyX = eventList[0].args._signingGroupPubkeyX const publicKeyY = eventList[0].args._signingGroupPubkeyY console.log(`Registered public key:\nX: ${publicKeyX}\nY: ${publicKeyY}`) - return [publicKeyX, publicKeyY] + const address = publicKeyToP2WPKHaddress( + `${publicKeyX.slice(2)}${publicKeyY.slice(2)}`, + Network.testnet + ) + return address } \ No newline at end of file diff --git a/client/test/DepositTest.js b/client/test/DepositTest.js index 665815fd..059e0fac 100644 --- a/client/test/DepositTest.js +++ b/client/test/DepositTest.js @@ -43,6 +43,6 @@ describe("Ethereum helpers", async () => { it('#getDepositBTCPublicKey', async () => { const depositAddress = await createDeposit() let key = await getDepositBTCPublicKey(depositAddress) - expect(key).to.be.of.length(2); - }) + expect(key.substring(0, 2)).to.equal('tb') + }) }) \ No newline at end of file From 2d82278c3f2a7541ba319aeb1ba65de7b6e7d530 Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Mon, 5 Aug 2019 18:01:49 +0200 Subject: [PATCH 04/33] Merge artifact addresses --- client/src/eth/artifacts/Deposit.json | 32 +++++++++++++++++++- client/src/eth/artifacts/DepositFactory.json | 20 +++++++++++- client/src/eth/artifacts/KeepBridge.json | 20 +++++++++++- client/src/eth/artifacts/TBTCSystem.json | 20 +++++++++++- client/src/eth/artifacts/TBTCToken.json | 20 +++++++++++- 5 files changed, 107 insertions(+), 5 deletions(-) diff --git a/client/src/eth/artifacts/Deposit.json b/client/src/eth/artifacts/Deposit.json index 04125e7f..62e8119e 100644 --- a/client/src/eth/artifacts/Deposit.json +++ b/client/src/eth/artifacts/Deposit.json @@ -11658,10 +11658,40 @@ }, "address": "0x02D73EC532945Cff99D90349bc258ccCe60D7F25", "transactionHash": "0x93f8ba3fa36f76f9075b06a49994dcad0703990dae71e6d6b95bd4d39fc9ad20" + }, + "1564683807489": { + "events": {}, + "links": { + "DepositLiquidation": "0xffAD451eeeEd2A987dc7f8E13F9Ce582c15B48b2", + "DepositRedemption": "0x3cbF0B80d1741D1988f06E9B47ECa8d0f197b1C9", + "DepositFunding": "0x6931051ecF0B9960489931E077192E6581f5E7aD" + }, + "address": "0x6b9a7B45030b98020149e4Aa5088Ea3d7080c31A", + "transactionHash": "0x911371d7f02a84455dd9737627b1f2059cb9914b61cfbf0c422d8e3de554a6c6" + }, + "1564760269629": { + "events": {}, + "links": { + "DepositLiquidation": "0x469eE32957cAFA45e0DC798f43ACb1fCeEA2525a", + "DepositRedemption": "0x72b80ddE9DEF987f6875bEbE8Af58031004981e5", + "DepositFunding": "0xaBf84fC9eB5860e2090E23DcED70332F6b34C739" + }, + "address": "0xca23003d71eb4cC6147e8F57bD823E4a73725662", + "transactionHash": "0xc1102d07066bf2e546458766679654c2341aae24f3af4ed66df4883528ea0f01" + }, + "1565004617282": { + "events": {}, + "links": { + "DepositLiquidation": "0xA85c5aE027F05a870727c663cB3C80D6A388A671", + "DepositRedemption": "0x5514b26d9E13148E223711667AEd57f45b4bE314", + "DepositFunding": "0x1522092EAcfF8B9D6d1Bd6F1d7503feC7a45e97F" + }, + "address": "0x84038e475934842CCd4E8825e85392AC5da65421", + "transactionHash": "0xa52b8f9f479c3201d282cdbb7727119f60fbc60969d06e60fedae3f33570bf90" } }, "schemaVersion": "3.0.10", - "updatedAt": "2019-08-01T17:39:26.866Z", + "updatedAt": "2019-08-05T11:32:37.522Z", "devdoc": { "methods": { "createNewDeposit(address,address,address,uint256,uint256)": { diff --git a/client/src/eth/artifacts/DepositFactory.json b/client/src/eth/artifacts/DepositFactory.json index 132df834..9ae7b292 100644 --- a/client/src/eth/artifacts/DepositFactory.json +++ b/client/src/eth/artifacts/DepositFactory.json @@ -1835,10 +1835,28 @@ "links": {}, "address": "0xbf56839b300d12c58266692E75f02E8e37805aA6", "transactionHash": "0x51b48b9b74b5e8f091b38e7559ba1348f00a7d11653cc6b94151f431498b6de4" + }, + "1564683807489": { + "events": {}, + "links": {}, + "address": "0xabdEfb58990CF5668b40Eae002D7D1Dd34c774Fd", + "transactionHash": "0x72e8cfb114c16fc8d9cacb1d5d8aa35c6f9dd4ee981220c6445559fed617146c" + }, + "1564760269629": { + "events": {}, + "links": {}, + "address": "0xC834A5c11FF3698761cbA4C30D2aa8DAa7e09e64", + "transactionHash": "0x17298695df4c60ea999de5aa06e74b2bb836a260b575d42c9db8f6f40753aba7" + }, + "1565004617282": { + "events": {}, + "links": {}, + "address": "0x0E5a721fCF43564A295FF36802068BedB4d81da5", + "transactionHash": "0x3d753f42249628303c4ef8e38425a43ee84f9223f08776250c340a7a36089bd6" } }, "schemaVersion": "3.0.10", - "updatedAt": "2019-08-01T17:39:26.898Z", + "updatedAt": "2019-08-05T11:32:37.619Z", "devdoc": { "details": "We avoid redeployment of deposit contract by using the clone factory. Proxy delegates calls to Deposit and therefore does not affect deposit state. This means that we only need to deploy the deposit contracts once. The factory provides clean state for every new deposit clone.", "methods": { diff --git a/client/src/eth/artifacts/KeepBridge.json b/client/src/eth/artifacts/KeepBridge.json index 0b62f353..08555071 100644 --- a/client/src/eth/artifacts/KeepBridge.json +++ b/client/src/eth/artifacts/KeepBridge.json @@ -4602,10 +4602,28 @@ "links": {}, "address": "0xBB4697203e20675Db05158989f490FcfeC69Edba", "transactionHash": "0x8c500c79f2851c16bd960ab7bbaf417fc8e4a41888e7d7618da38cebd7225f04" + }, + "1564683807489": { + "events": {}, + "links": {}, + "address": "0x3b2948640107649eBa71b81cc14fb4a55E56b1E1", + "transactionHash": "0xe0a745056b91b0a58c2467ab125ca8ee052fc5ae9777a1121856970360ada1dd" + }, + "1564760269629": { + "events": {}, + "links": {}, + "address": "0x312aB52C844F4B8ff00F84da79FF51F58AD5a6F2", + "transactionHash": "0x2e1adf877b149d4d1af318970dd90875d5e23a58ceb972325333abab270c824a" + }, + "1565004617282": { + "events": {}, + "links": {}, + "address": "0x292f95916E5d69868D86695B2f6a208E0B5Bb496", + "transactionHash": "0x3fa22643ca42ffed942d7e0b077f7680e94a6d4cd838fce4a09776832a23adf2" } }, "schemaVersion": "3.0.10", - "updatedAt": "2019-08-01T17:39:26.893Z", + "updatedAt": "2019-08-05T11:32:37.593Z", "devdoc": { "methods": {} }, diff --git a/client/src/eth/artifacts/TBTCSystem.json b/client/src/eth/artifacts/TBTCSystem.json index fb7c531d..c9399669 100644 --- a/client/src/eth/artifacts/TBTCSystem.json +++ b/client/src/eth/artifacts/TBTCSystem.json @@ -5453,10 +5453,28 @@ "links": {}, "address": "0xda1b22d14924b27e10F092E1BbdFa2B09c7781A2", "transactionHash": "0x58370f569d0f2dfb848dda503b74f8ca1ee1202e774e7944bdfd2e78155af42e" + }, + "1564683807489": { + "events": {}, + "links": {}, + "address": "0x1f2D6C927E3B272DDb7977Cccc077a09e9Fc7b72", + "transactionHash": "0x42a3442c4250ba43473823f10d835bba146babbce19b25f9cc41db1fce0be501" + }, + "1564760269629": { + "events": {}, + "links": {}, + "address": "0x06ac073E32E6d2965365511D6eD95141f14505cb", + "transactionHash": "0x53c55186180e38d99146df553b7faf141f7ab37cf25d2cd1093d16e776c242a2" + }, + "1565004617282": { + "events": {}, + "links": {}, + "address": "0xB68aBD2FF8977CcDf9F4c13E20BF1A942762e220", + "transactionHash": "0x98f21eb00042487e648515067ca2b10cf3ecce0fcfac40c787432f5c7ff3ae65" } }, "schemaVersion": "3.0.10", - "updatedAt": "2019-08-01T17:39:26.888Z", + "updatedAt": "2019-08-05T11:32:37.553Z", "devdoc": { "methods": { "approvedToLog(address)": { diff --git a/client/src/eth/artifacts/TBTCToken.json b/client/src/eth/artifacts/TBTCToken.json index 63c7114a..db952be9 100644 --- a/client/src/eth/artifacts/TBTCToken.json +++ b/client/src/eth/artifacts/TBTCToken.json @@ -2007,10 +2007,28 @@ "links": {}, "address": "0xe1B1F60A39b43b744bef3501e4cBF9428F5A1B2D", "transactionHash": "0x6f9ee30843c82f3bdf300aaa5c0a02ed1e9f239cd073f1c87e61e7c83c710a78" + }, + "1564683807489": { + "events": {}, + "links": {}, + "address": "0x0233316b87755747078456F781cB94F45Ac81310", + "transactionHash": "0x98abc1378648766725a9b00f5dd165ce0e9e6554d37576877368f4cd9a5ae8ca" + }, + "1564760269629": { + "events": {}, + "links": {}, + "address": "0xD6eE633A52704b7AFc314E4206E9739Ab01F18D1", + "transactionHash": "0x8b5ee9a36cbd4410ad1e8fafc7b6fe9c97840e8a011f54814f8a4fc70f64f2ac" + }, + "1565004617282": { + "events": {}, + "links": {}, + "address": "0x695d617432F994666034346B4b21aEd9Cb91adBC", + "transactionHash": "0x5525b2d955abbe5b039bcc474c78d24cbe08336a42a0997a6920943b0054edba" } }, "schemaVersion": "3.0.10", - "updatedAt": "2019-08-01T17:39:26.896Z", + "updatedAt": "2019-08-05T11:32:37.613Z", "devdoc": { "methods": { "allowance(address,address)": { From 10a57fa762a7c7d029561122deb3c95c70eb6bf9 Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Mon, 5 Aug 2019 18:20:35 +0200 Subject: [PATCH 05/33] Simpler try/catch --- client/src/Deposit.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/client/src/Deposit.js b/client/src/Deposit.js index 17b8d181..25f54eda 100644 --- a/client/src/Deposit.js +++ b/client/src/Deposit.js @@ -63,12 +63,10 @@ export async function getDepositBTCPublicKey(depositAddress) { console.log(`Call getPublicKey for deposit [${deposit.address}]`) - let result - try { - result = await deposit.retrieveSignerPubkey() - } catch(err) { - console.error(`retrieveSignerPubkey failed: ${err}`) - } + let result = await deposit.retrieveSignerPubkey() + .catch((err)=> { + console.error(`retrieveSignerPubkey failed: ${err}`) + }) // 2. Parse the logs to get it // we can't get this from result.logs, since it's emitted in another contract From 9ce980f4e309c1a7cab80e75180642c185c83f86 Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Mon, 5 Aug 2019 18:29:20 +0200 Subject: [PATCH 06/33] Doc getDepositBTCPublicKey --- client/src/Deposit.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/client/src/Deposit.js b/client/src/Deposit.js index 25f54eda..fa31702d 100644 --- a/client/src/Deposit.js +++ b/client/src/Deposit.js @@ -45,7 +45,7 @@ export async function waitDepositBTCPublicKey(depositAddress) { return await new Promise((res, rej) => { tbtcSystem.RegisteredPubkey({ _depositContractAddress: depositAddress }).on('data', function(data) { - console.log(data) + console.log(`Registered public key for deposit ${depositAddress}:\nX: ${publicKeyX}\nY: ${publicKeyY}`) res(data) }) @@ -53,8 +53,11 @@ export async function waitDepositBTCPublicKey(depositAddress) { }) } -// getDepositBTCPublicKey calls tBTC to fetch signer's public key from the keep dedicated -// for the deposit. +/** + * Requests a Bitcoin public key for a Deposit and returns it as a Bitcoin address + * @param {*} depositAddress the address of a Deposit contract + * @returns a bech32-encoded Bitcoin address + */ export async function getDepositBTCPublicKey(depositAddress) { const tbtcSystem = await TBTCSystem.deployed() @@ -86,7 +89,7 @@ export async function getDepositBTCPublicKey(depositAddress) { const publicKeyX = eventList[0].args._signingGroupPubkeyX const publicKeyY = eventList[0].args._signingGroupPubkeyY - console.log(`Registered public key:\nX: ${publicKeyX}\nY: ${publicKeyY}`) + console.log(`Registered public key for deposit ${depositAddress}:\nX: ${publicKeyX}\nY: ${publicKeyY}`) const address = publicKeyToP2WPKHaddress( `${publicKeyX.slice(2)}${publicKeyY.slice(2)}`, From 328bc85cd64c1c637cc082f4bb5699b01499ce3a Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Mon, 5 Aug 2019 18:32:38 +0200 Subject: [PATCH 07/33] Doc watchForDepositBTCPublicKey --- client/src/Deposit.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client/src/Deposit.js b/client/src/Deposit.js index fa31702d..c218ec72 100644 --- a/client/src/Deposit.js +++ b/client/src/Deposit.js @@ -39,8 +39,12 @@ export async function createDeposit() { } - -export async function waitDepositBTCPublicKey(depositAddress) { +// A complement to getDepositBTCPublicKey. +// We don't use this function yet, because we are only on testnet +// On testnet, there is a race between us getting the deposit address +// and keep-tecdsa submitting the key, before we can start listening for it +// Leaving it here for future. +async function watchForDepositBTCPublicKey(depositAddress) { const tbtcSystem = await TBTCSystem.deployed() return await new Promise((res, rej) => { From 3982aadf508274b5921287d0aaee1dec0f9e5076 Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Mon, 5 Aug 2019 18:36:12 +0200 Subject: [PATCH 08/33] Add type to param doc --- client/src/Deposit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/Deposit.js b/client/src/Deposit.js index c218ec72..aca97a57 100644 --- a/client/src/Deposit.js +++ b/client/src/Deposit.js @@ -59,7 +59,7 @@ async function watchForDepositBTCPublicKey(depositAddress) { /** * Requests a Bitcoin public key for a Deposit and returns it as a Bitcoin address - * @param {*} depositAddress the address of a Deposit contract + * @param {string} depositAddress the address of a Deposit contract * @returns a bech32-encoded Bitcoin address */ export async function getDepositBTCPublicKey(depositAddress) { From f9a1350bb9e75ced0c18f1a45588d5d24ca7a68c Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 13:54:28 +0200 Subject: [PATCH 09/33] Manual linting --- client/src/Deposit.js | 4 +--- client/test/DepositTest.js | 6 +----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/client/src/Deposit.js b/client/src/Deposit.js index 30c95e56..fc19f139 100644 --- a/client/src/Deposit.js +++ b/client/src/Deposit.js @@ -9,7 +9,7 @@ import { import { publicKeyToP2WPKHaddress, Network -} from '../../lib/tbtc-helpers/src/Address' +} from 'tbtc-helpers/src/Address' /** * Creates a new deposit and returns its address @@ -38,11 +38,9 @@ export async function createDeposit() { }) const depositAddress = logs[0].args.depositCloneAddress - return depositAddress } - // A complement to getDepositBTCPublicKey. // We don't use this function yet, because we are only on testnet // On testnet, there is a race between us getting the deposit address diff --git a/client/test/DepositTest.js b/client/test/DepositTest.js index ea09ee74..22c86e95 100644 --- a/client/test/DepositTest.js +++ b/client/test/DepositTest.js @@ -1,12 +1,8 @@ const Web3 = require('web3') -import { createDeposit, setDefaults, initializeDeposit, getDepositBTCPublicKey, waitDepositBTCPublicKey } from '../src' -import { setElectrumConfig } from '../src/FundingProof'; +import { createDeposit, setDefaults, getDepositBTCPublicKey } from '../src' import { - TBTCSystem, - TBTCToken, - KeepBridge, Deposit } from '../src/eth/contracts' From 511bcd2ce6ab9ccafb436167bd1dec2eb9459d28 Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 13:59:58 +0200 Subject: [PATCH 10/33] Refactor getDepositBtcAddress --- client/src/Deposit.js | 63 ------------------------- client/src/FundingTransaction.js | 79 +++++++++++++++++++++++++++----- 2 files changed, 67 insertions(+), 75 deletions(-) diff --git a/client/src/Deposit.js b/client/src/Deposit.js index fc19f139..fea4cdcd 100644 --- a/client/src/Deposit.js +++ b/client/src/Deposit.js @@ -39,67 +39,4 @@ export async function createDeposit() { const depositAddress = logs[0].args.depositCloneAddress return depositAddress -} - -// A complement to getDepositBTCPublicKey. -// We don't use this function yet, because we are only on testnet -// On testnet, there is a race between us getting the deposit address -// and keep-tecdsa submitting the key, before we can start listening for it -// Leaving it here for future. -async function watchForDepositBTCPublicKey(depositAddress) { - const tbtcSystem = await TBTCSystem.deployed() - - return await new Promise((res, rej) => { - tbtcSystem.RegisteredPubkey({ _depositContractAddress: depositAddress }).on('data', function(data) { - console.log(`Registered public key for deposit ${depositAddress}:\nX: ${publicKeyX}\nY: ${publicKeyY}`) - res(data) - }) - - setTimeout(rej, 15000) - }) -} - -/** - * Requests a Bitcoin public key for a Deposit and returns it as a Bitcoin address - * @param {string} depositAddress the address of a Deposit contract - * @returns a bech32-encoded Bitcoin address - */ -export async function getDepositBTCPublicKey(depositAddress) { - const tbtcSystem = await TBTCSystem.deployed() - - // 1. Request it from the deposit - const deposit = await Deposit.at(depositAddress) - - console.log(`Call getPublicKey for deposit [${deposit.address}]`) - - let result = await deposit.retrieveSignerPubkey() - .catch((err)=> { - console.error(`retrieveSignerPubkey failed: ${err}`) - }) - - // 2. Parse the logs to get it - // we can't get this from result.logs, since it's emitted in another contract - const eventList = await tbtcSystem.getPastEvents( - 'RegisteredPubkey', - { - fromBlock: '0', - toBlock: 'latest', - filter: { _depositContractAddress: depositAddress } - } - ) - - if(eventList.length == 0) { - throw new Error(`couldn't find RegisteredPubkey event for deposit address: ${depositAddress}`) - } - - const publicKeyX = eventList[0].args._signingGroupPubkeyX - const publicKeyY = eventList[0].args._signingGroupPubkeyY - - console.log(`Registered public key for deposit ${depositAddress}:\nX: ${publicKeyX}\nY: ${publicKeyY}`) - - const address = publicKeyToP2WPKHaddress( - `${publicKeyX.slice(2)}${publicKeyY.slice(2)}`, - Network.testnet - ) - return address } \ No newline at end of file diff --git a/client/src/FundingTransaction.js b/client/src/FundingTransaction.js index bdb0a9d9..b3387904 100644 --- a/client/src/FundingTransaction.js +++ b/client/src/FundingTransaction.js @@ -1,24 +1,79 @@ -// PAGE 3: Pay BTC -async function getAddress(depositAddress) { - // TODO: Implement: - // 1. Get keep public key from the deposit - // 2. Calculate P2WPKH address from the key +import { Network, publicKeyToP2WPKHaddress } from 'tbtc-helpers/src/Address'; +import { Deposit, TBTCSystem } from './eth/contracts'; + +/** + * Requests a Bitcoin public key for a Deposit and returns it as a Bitcoin address + * @param {string} depositAddress the address of a Deposit contract + * @returns a bech32-encoded Bitcoin address, generated from a SegWit P2WPKH script + */ +export async function getDepositBtcAddress(depositAddress) { + const tbtcSystem = await TBTCSystem.deployed() + + // 1. Request it from the deposit + const deposit = await Deposit.at(depositAddress) + + console.log(`Call getPublicKey for deposit [${deposit.address}]`) + + let result = await deposit.retrieveSignerPubkey() + .catch((err)=> { + console.error(`retrieveSignerPubkey failed: ${err}`) + }) + + // 2. Parse the logs to get it + // we can't get this from result.logs, since it's emitted in another contract + const eventList = await tbtcSystem.getPastEvents( + 'RegisteredPubkey', + { + fromBlock: '0', + toBlock: 'latest', + filter: { _depositContractAddress: depositAddress } + } + ) + + if(eventList.length == 0) { + throw new Error(`couldn't find RegisteredPubkey event for deposit address: ${depositAddress}`) + } + + const publicKeyX = eventList[0].args._signingGroupPubkeyX + const publicKeyY = eventList[0].args._signingGroupPubkeyY + + console.log(`Registered public key for deposit ${depositAddress}:\nX: ${publicKeyX}\nY: ${publicKeyY}`) + + const address = publicKeyToP2WPKHaddress( + `${publicKeyX.slice(2)}${publicKeyY.slice(2)}`, + Network.testnet + ) + return address +} + +// A complement to getDepositBTCPublicKey. +// We don't use this function yet, because we are only on testnet +// On testnet, there is a race between us getting the deposit address +// and keep-tecdsa submitting the key, before we can start listening for it +// Leaving it here for future. +async function watchForDepositBtcAddress(depositAddress) { + const tbtcSystem = await TBTCSystem.deployed() + + return await new Promise((res, rej) => { + tbtcSystem.RegisteredPubkey({ _depositContractAddress: depositAddress }).on('data', function(data) { + console.log(`Registered public key for deposit ${depositAddress}:\nX: ${publicKeyX}\nY: ${publicKeyY}`) + res(data) + }) + + setTimeout(rej, 15000) + }) } // Transition from PAGE 3 to PAGE 4 // 1. Wait for transaction on chain // 2. Return transaction ID -async function getFundingTransactionID(electrumConfig, bitcoinAddress) { +export async function getFundingTransactionID(electrumConfig, bitcoinAddress) { // TODO: Implement } // PAGE 4. WAITING FOR CONFIRMATIONS -async function waitForConfirmations(transactionID) { +export async function waitForConfirmations(transactionID) { // TODO: Implement: // 1. Wait for required number of confirmations for the transaction // 2. Monitor confirmations on the chain and return when ready -} - -module.exports = { - getAddress, getFundingTransactionID, waitForConfirmations, -} +} \ No newline at end of file From cdb5023c9d4a693ec00bb4cfa92a44b4b62c861d Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 14:05:13 +0200 Subject: [PATCH 11/33] Better self-doc'ing code for hex values in events --- client/src/FundingTransaction.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/FundingTransaction.js b/client/src/FundingTransaction.js index b3387904..b2d9f56e 100644 --- a/client/src/FundingTransaction.js +++ b/client/src/FundingTransaction.js @@ -34,13 +34,15 @@ export async function getDepositBtcAddress(depositAddress) { throw new Error(`couldn't find RegisteredPubkey event for deposit address: ${depositAddress}`) } - const publicKeyX = eventList[0].args._signingGroupPubkeyX - const publicKeyY = eventList[0].args._signingGroupPubkeyY + let publicKeyX = eventList[0].args._signingGroupPubkeyX + let publicKeyY = eventList[0].args._signingGroupPubkeyY + publicKeyX = publicKeyX.replace('0x', '') + publicKeyY = publicKeyY.replace('0x', '') console.log(`Registered public key for deposit ${depositAddress}:\nX: ${publicKeyX}\nY: ${publicKeyY}`) const address = publicKeyToP2WPKHaddress( - `${publicKeyX.slice(2)}${publicKeyY.slice(2)}`, + `${publicKeyX}${publicKeyY}`, Network.testnet ) return address From e6e238eec7acd63cc5aaadab084d7fb3c653b24c Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 14:09:02 +0200 Subject: [PATCH 12/33] Refactor test to match new names --- client/src/index.js | 1 + client/test/DepositTest.js | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/src/index.js b/client/src/index.js index 69bda090..ef98e1d0 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -1,2 +1,3 @@ export * from './Deposit' +export * from './FundingTransaction' export * from './eth/contracts' \ No newline at end of file diff --git a/client/test/DepositTest.js b/client/test/DepositTest.js index 22c86e95..1a64527f 100644 --- a/client/test/DepositTest.js +++ b/client/test/DepositTest.js @@ -1,6 +1,6 @@ const Web3 = require('web3') -import { createDeposit, setDefaults, getDepositBTCPublicKey } from '../src' +import { createDeposit, setDefaults, getDepositBtcAddress } from '../src' import { Deposit @@ -33,9 +33,9 @@ describe("Ethereum helpers", async () => { expect(await deposit.getCurrentState()).to.eq.BN('1') }) - it('#getDepositBTCPublicKey', async () => { + it('#getDepositBtcAddress', async () => { const depositAddress = await createDeposit() - let key = await getDepositBTCPublicKey(depositAddress) - expect(key.substring(0, 2)).to.equal('tb') + const btcAddress = await getDepositBtcAddress(depositAddress) + expect(btcAddress.substring(0, 2)).to.equal('tb') }) }) \ No newline at end of file From 51b586ff44e9d9ae89d8b151f1def06aba6c09c4 Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 14:13:09 +0200 Subject: [PATCH 13/33] Clearer comments --- client/src/FundingTransaction.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/src/FundingTransaction.js b/client/src/FundingTransaction.js index b2d9f56e..c69ec402 100644 --- a/client/src/FundingTransaction.js +++ b/client/src/FundingTransaction.js @@ -9,7 +9,7 @@ import { Deposit, TBTCSystem } from './eth/contracts'; export async function getDepositBtcAddress(depositAddress) { const tbtcSystem = await TBTCSystem.deployed() - // 1. Request it from the deposit + // 1. Request public key from the deposit const deposit = await Deposit.at(depositAddress) console.log(`Call getPublicKey for deposit [${deposit.address}]`) @@ -19,8 +19,9 @@ export async function getDepositBtcAddress(depositAddress) { console.error(`retrieveSignerPubkey failed: ${err}`) }) - // 2. Parse the logs to get it - // we can't get this from result.logs, since it's emitted in another contract + // 2. Parse the logs to get the public key + // since the public key event is emitted in another contract, we + // can't get this from result.logs const eventList = await tbtcSystem.getPastEvents( 'RegisteredPubkey', { From 339f4493c13036f5905a3c9c6d97070fc82fe36a Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 14:19:16 +0200 Subject: [PATCH 14/33] Comments on error handling --- client/src/FundingTransaction.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/src/FundingTransaction.js b/client/src/FundingTransaction.js index c69ec402..4bdfd451 100644 --- a/client/src/FundingTransaction.js +++ b/client/src/FundingTransaction.js @@ -16,6 +16,9 @@ export async function getDepositBtcAddress(depositAddress) { let result = await deposit.retrieveSignerPubkey() .catch((err)=> { + // This can happen when the public key was already retrieved before + // and we may succeed to get it with tbtcSystem.getPastEvents in the following lines + // TODO: there may be other errors that this allows to pass, refactor in future console.error(`retrieveSignerPubkey failed: ${err}`) }) @@ -42,11 +45,11 @@ export async function getDepositBtcAddress(depositAddress) { console.log(`Registered public key for deposit ${depositAddress}:\nX: ${publicKeyX}\nY: ${publicKeyY}`) - const address = publicKeyToP2WPKHaddress( + const btcAddress = publicKeyToP2WPKHaddress( `${publicKeyX}${publicKeyY}`, Network.testnet ) - return address + return btcAddress } // A complement to getDepositBTCPublicKey. From 801c02ca622cd03a631de71b8142408ff705087a Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 16:11:10 +0200 Subject: [PATCH 15/33] Organise imports --- client/src/Deposit.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/client/src/Deposit.js b/client/src/Deposit.js index fea4cdcd..46e3bf0e 100644 --- a/client/src/Deposit.js +++ b/client/src/Deposit.js @@ -1,15 +1,4 @@ -import { - TBTCSystem, - TBTCToken, - KeepBridge, - DepositFactory, - Deposit -} from './eth/contracts' - -import { - publicKeyToP2WPKHaddress, - Network -} from 'tbtc-helpers/src/Address' +import { DepositFactory, KeepBridge, TBTCSystem, TBTCToken } from './eth/contracts'; /** * Creates a new deposit and returns its address From 62beb66d5cfba9d87bd2a84f3ce7f963a3bf384b Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 16:12:35 +0200 Subject: [PATCH 16/33] Remove redundant code --- client/src/FundingTransaction.js | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/client/src/FundingTransaction.js b/client/src/FundingTransaction.js index 4bdfd451..271d7a17 100644 --- a/client/src/FundingTransaction.js +++ b/client/src/FundingTransaction.js @@ -14,7 +14,7 @@ export async function getDepositBtcAddress(depositAddress) { console.log(`Call getPublicKey for deposit [${deposit.address}]`) - let result = await deposit.retrieveSignerPubkey() + await deposit.retrieveSignerPubkey() .catch((err)=> { // This can happen when the public key was already retrieved before // and we may succeed to get it with tbtcSystem.getPastEvents in the following lines @@ -52,24 +52,6 @@ export async function getDepositBtcAddress(depositAddress) { return btcAddress } -// A complement to getDepositBTCPublicKey. -// We don't use this function yet, because we are only on testnet -// On testnet, there is a race between us getting the deposit address -// and keep-tecdsa submitting the key, before we can start listening for it -// Leaving it here for future. -async function watchForDepositBtcAddress(depositAddress) { - const tbtcSystem = await TBTCSystem.deployed() - - return await new Promise((res, rej) => { - tbtcSystem.RegisteredPubkey({ _depositContractAddress: depositAddress }).on('data', function(data) { - console.log(`Registered public key for deposit ${depositAddress}:\nX: ${publicKeyX}\nY: ${publicKeyY}`) - res(data) - }) - - setTimeout(rej, 15000) - }) -} - // Transition from PAGE 3 to PAGE 4 // 1. Wait for transaction on chain // 2. Return transaction ID From d0212525939b65cbdd693ad29f83728ac56f09b0 Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 16:12:39 +0200 Subject: [PATCH 17/33] Fix doc format --- client/src/FundingTransaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/FundingTransaction.js b/client/src/FundingTransaction.js index 271d7a17..382a14e0 100644 --- a/client/src/FundingTransaction.js +++ b/client/src/FundingTransaction.js @@ -4,7 +4,7 @@ import { Deposit, TBTCSystem } from './eth/contracts'; /** * Requests a Bitcoin public key for a Deposit and returns it as a Bitcoin address * @param {string} depositAddress the address of a Deposit contract - * @returns a bech32-encoded Bitcoin address, generated from a SegWit P2WPKH script + * @return {string} a bech32-encoded Bitcoin address, generated from a SegWit P2WPKH script */ export async function getDepositBtcAddress(depositAddress) { const tbtcSystem = await TBTCSystem.deployed() From 567c7d2f05af71ae7fdba669b671628fe71461fe Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 16:13:33 +0200 Subject: [PATCH 18/33] Remove artifacts --- client/src/eth/artifacts/Deposit.json | 11923 ----------------- client/src/eth/artifacts/DepositFactory.json | 1891 --- client/src/eth/artifacts/KeepBridge.json | 4633 ------- client/src/eth/artifacts/TBTCSystem.json | 5599 -------- client/src/eth/artifacts/TBTCToken.json | 2094 --- 5 files changed, 26140 deletions(-) delete mode 100644 client/src/eth/artifacts/Deposit.json delete mode 100644 client/src/eth/artifacts/DepositFactory.json delete mode 100644 client/src/eth/artifacts/KeepBridge.json delete mode 100644 client/src/eth/artifacts/TBTCSystem.json delete mode 100644 client/src/eth/artifacts/TBTCToken.json diff --git a/client/src/eth/artifacts/Deposit.json b/client/src/eth/artifacts/Deposit.json deleted file mode 100644 index 62e8119e..00000000 --- a/client/src/eth/artifacts/Deposit.json +++ /dev/null @@ -1,11923 +0,0 @@ -{ - "contractName": "Deposit", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": true, - "inputs": [], - "name": "getCurrentState", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_TBTCSystem", - "type": "address" - }, - { - "name": "_TBTCToken", - "type": "address" - }, - { - "name": "_KeepBridge", - "type": "address" - }, - { - "name": "_m", - "type": "uint256" - }, - { - "name": "_n", - "type": "uint256" - } - ], - "name": "createNewDeposit", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_outputValueBytes", - "type": "bytes8" - }, - { - "name": "_requesterPKH", - "type": "bytes20" - } - ], - "name": "requestRedemption", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_v", - "type": "uint8" - }, - { - "name": "_r", - "type": "bytes32" - }, - { - "name": "_s", - "type": "bytes32" - } - ], - "name": "provideRedemptionSignature", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_previousOutputValueBytes", - "type": "bytes8" - }, - { - "name": "_newOutputValueBytes", - "type": "bytes8" - } - ], - "name": "increaseRedemptionFee", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_bitcoinTx", - "type": "bytes" - }, - { - "name": "_merkleProof", - "type": "bytes" - }, - { - "name": "_index", - "type": "uint256" - }, - { - "name": "_bitcoinHeaders", - "type": "bytes" - } - ], - "name": "provideRedemptionProof", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "notifySignatureTimeout", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "notifyRedemptionProofTimeout", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "notifySignerSetupFailure", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "retrieveSignerPubkey", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "notifyFundingTimeout", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_v", - "type": "uint8" - }, - { - "name": "_r", - "type": "bytes32" - }, - { - "name": "_s", - "type": "bytes32" - }, - { - "name": "_signedDigest", - "type": "bytes32" - }, - { - "name": "_preimage", - "type": "bytes" - } - ], - "name": "provideFundingECDSAFraudProof", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "notifyFraudFundingTimeout", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_txVersion", - "type": "bytes" - }, - { - "name": "_txInputVector", - "type": "bytes" - }, - { - "name": "_txOutputVector", - "type": "bytes" - }, - { - "name": "_txLocktime", - "type": "bytes" - }, - { - "name": "_fundingOutputIndex", - "type": "uint8" - }, - { - "name": "_merkleProof", - "type": "bytes" - }, - { - "name": "_txIndexInBlock", - "type": "uint256" - }, - { - "name": "_bitcoinHeaders", - "type": "bytes" - } - ], - "name": "provideFraudBTCFundingProof", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_txVersion", - "type": "bytes" - }, - { - "name": "_txInputVector", - "type": "bytes" - }, - { - "name": "_txOutputVector", - "type": "bytes" - }, - { - "name": "_txLocktime", - "type": "bytes" - }, - { - "name": "_fundingOutputIndex", - "type": "uint8" - }, - { - "name": "_merkleProof", - "type": "bytes" - }, - { - "name": "_txIndexInBlock", - "type": "uint256" - }, - { - "name": "_bitcoinHeaders", - "type": "bytes" - } - ], - "name": "provideBTCFundingProof", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_v", - "type": "uint8" - }, - { - "name": "_r", - "type": "bytes32" - }, - { - "name": "_s", - "type": "bytes32" - }, - { - "name": "_signedDigest", - "type": "bytes32" - }, - { - "name": "_preimage", - "type": "bytes" - } - ], - "name": "provideECDSAFraudProof", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_bitcoinTx", - "type": "bytes" - }, - { - "name": "_merkleProof", - "type": "bytes" - }, - { - "name": "_index", - "type": "uint256" - }, - { - "name": "_bitcoinHeaders", - "type": "bytes" - } - ], - "name": "provideSPVFraudProof", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "purchaseSignerBondsAtAuction", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "notifyCourtesyCall", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exitCourtesyCall", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "notifyUndercollateralizedLiquidation", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "notifyCourtesyTimeout", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "notifyDepositExpiryCourtesyCall", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.10+commit.5a6ea5b1\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[],\"name\":\"notifyFundingTimeout\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"exitCourtesyCall\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"purchaseSignerBondsAtAuction\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_v\",\"type\":\"uint8\"},{\"name\":\"_r\",\"type\":\"bytes32\"},{\"name\":\"_s\",\"type\":\"bytes32\"},{\"name\":\"_signedDigest\",\"type\":\"bytes32\"},{\"name\":\"_preimage\",\"type\":\"bytes\"}],\"name\":\"provideFundingECDSAFraudProof\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"notifyRedemptionProofTimeout\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurrentState\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"notifyCourtesyTimeout\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_outputValueBytes\",\"type\":\"bytes8\"},{\"name\":\"_requesterPKH\",\"type\":\"bytes20\"}],\"name\":\"requestRedemption\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_bitcoinTx\",\"type\":\"bytes\"},{\"name\":\"_merkleProof\",\"type\":\"bytes\"},{\"name\":\"_index\",\"type\":\"uint256\"},{\"name\":\"_bitcoinHeaders\",\"type\":\"bytes\"}],\"name\":\"provideRedemptionProof\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"notifySignatureTimeout\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"notifyDepositExpiryCourtesyCall\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"notifyCourtesyCall\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_previousOutputValueBytes\",\"type\":\"bytes8\"},{\"name\":\"_newOutputValueBytes\",\"type\":\"bytes8\"}],\"name\":\"increaseRedemptionFee\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txVersion\",\"type\":\"bytes\"},{\"name\":\"_txInputVector\",\"type\":\"bytes\"},{\"name\":\"_txOutputVector\",\"type\":\"bytes\"},{\"name\":\"_txLocktime\",\"type\":\"bytes\"},{\"name\":\"_fundingOutputIndex\",\"type\":\"uint8\"},{\"name\":\"_merkleProof\",\"type\":\"bytes\"},{\"name\":\"_txIndexInBlock\",\"type\":\"uint256\"},{\"name\":\"_bitcoinHeaders\",\"type\":\"bytes\"}],\"name\":\"provideFraudBTCFundingProof\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"notifyUndercollateralizedLiquidation\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_bitcoinTx\",\"type\":\"bytes\"},{\"name\":\"_merkleProof\",\"type\":\"bytes\"},{\"name\":\"_index\",\"type\":\"uint256\"},{\"name\":\"_bitcoinHeaders\",\"type\":\"bytes\"}],\"name\":\"provideSPVFraudProof\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"notifyFraudFundingTimeout\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_v\",\"type\":\"uint8\"},{\"name\":\"_r\",\"type\":\"bytes32\"},{\"name\":\"_s\",\"type\":\"bytes32\"}],\"name\":\"provideRedemptionSignature\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_v\",\"type\":\"uint8\"},{\"name\":\"_r\",\"type\":\"bytes32\"},{\"name\":\"_s\",\"type\":\"bytes32\"},{\"name\":\"_signedDigest\",\"type\":\"bytes32\"},{\"name\":\"_preimage\",\"type\":\"bytes\"}],\"name\":\"provideECDSAFraudProof\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_TBTCSystem\",\"type\":\"address\"},{\"name\":\"_TBTCToken\",\"type\":\"address\"},{\"name\":\"_KeepBridge\",\"type\":\"address\"},{\"name\":\"_m\",\"type\":\"uint256\"},{\"name\":\"_n\",\"type\":\"uint256\"}],\"name\":\"createNewDeposit\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"notifySignerSetupFailure\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"retrieveSignerPubkey\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txVersion\",\"type\":\"bytes\"},{\"name\":\"_txInputVector\",\"type\":\"bytes\"},{\"name\":\"_txOutputVector\",\"type\":\"bytes\"},{\"name\":\"_txLocktime\",\"type\":\"bytes\"},{\"name\":\"_fundingOutputIndex\",\"type\":\"uint8\"},{\"name\":\"_merkleProof\",\"type\":\"bytes\"},{\"name\":\"_txIndexInBlock\",\"type\":\"uint256\"},{\"name\":\"_bitcoinHeaders\",\"type\":\"bytes\"}],\"name\":\"provideBTCFundingProof\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"}],\"devdoc\":{\"methods\":{\"createNewDeposit(address,address,address,uint256,uint256)\":{\"details\":\"This should be called by an approved contract, not a developer\",\"params\":{\"_m\":\"n for m-of-n\"},\"return\":\"True if successful, otherwise revert\"},\"exitCourtesyCall()\":{\"details\":\"Only callable if collateral is sufficient and the deposit is not expiring\",\"return\":\"True if successful, otherwise revert\"},\"getCurrentState()\":{\"details\":\"We implement this because contracts don't handle foreign enums well\",\"return\":\"The 0-indexed state from the DepositStates enum\"},\"increaseRedemptionFee(bytes8,bytes8)\":{\"details\":\"This sends us back to AWAITING_WITHDRAWAL_SIGNATURE\",\"params\":{\"_newOutputValueBytes\":\"The new output's value\",\"_previousOutputValueBytes\":\"The previous output's value\"},\"return\":\"True if successful, False if prevented by timeout, otherwise revert\"},\"notifyCourtesyCall()\":{\"details\":\"Calls out to the system for oracle info\",\"return\":\"True if successful, otherwise revert\"},\"notifyCourtesyTimeout()\":{\"details\":\"This is treated as an abort, rather than fraud\",\"return\":\"True if successful, otherwise revert\"},\"notifyDepositExpiryCourtesyCall()\":{\"details\":\"This initiates a courtesy call\",\"return\":\"True if successful, otherwise revert\"},\"notifyFraudFundingTimeout()\":{\"details\":\"This is not a funder fault. The signers have faulted, so the funder shouldn't fund\",\"return\":\"True if successful, otherwise revert\"},\"notifyFundingTimeout()\":{\"details\":\"This is considered a funder fault, and we revoke their bond\",\"return\":\"True if successful, otherwise revert\"},\"notifyRedemptionProofTimeout()\":{\"details\":\"This is considered fraud, and is punished\",\"return\":\"True if successful, otherwise revert\"},\"notifySignatureTimeout()\":{\"details\":\"This is considered fraud, and is punished\",\"return\":\"True if successful, otherwise revert\"},\"notifySignerSetupFailure()\":{\"details\":\"We rely on the keep system punishes the signers in this case\",\"return\":\"True if successful, otherwise revert\"},\"notifyUndercollateralizedLiquidation()\":{\"details\":\"Calls out to the system for oracle info\",\"return\":\"True if successful, otherwise revert\"},\"provideBTCFundingProof(bytes,bytes,bytes,bytes,uint8,bytes,uint256,bytes)\":{\"details\":\"Takes a pre-parsed transaction and calculates values needed to verify funding\",\"params\":{\"_bitcoinHeaders\":\"Single bytestring of 80-byte bitcoin headers, lowest height first\",\"_fundingOutputIndex\":\"Index of funding output in _txOutputVector (0-indexed)\",\"_merkleProof\":\"The merkle proof of transaction inclusion in a block\",\"_txIndexInBlock\":\"Transaction index in the block (1-indexed)\",\"_txInputVector\":\"All transaction inputs prepended by the number of inputs encoded as a VarInt, max 0xFC(252) inputs\",\"_txLocktime\":\"Final 4 bytes of the transaction\",\"_txOutputVector\":\"All transaction outputs prepended by the number of outputs encoded as a VarInt, max 0xFC(252) outputs\",\"_txVersion\":\"Transaction version number (4-byte LE)\"},\"return\":\"True if no errors are thrown\"},\"provideECDSAFraudProof(uint8,bytes32,bytes32,bytes32,bytes)\":{\"details\":\"ECDSA is NOT SECURE unless you verify the digest\",\"params\":{\"_preimage\":\"The sha256 preimage of the digest\",\"_r\":\"Signature R value\",\"_s\":\"Signature S value\",\"_signedDigest\":\"The digest signed by the signature vrs tuple\",\"_v\":\"Signature recovery value\"},\"return\":\"True if successful, otherwise revert\"},\"provideFraudBTCFundingProof(bytes,bytes,bytes,bytes,uint8,bytes,uint256,bytes)\":{\"details\":\"Takes a pre-parsed transaction and calculates values needed to verify funding\",\"params\":{\"_bitcoinHeaders\":\"Single bytestring of 80-byte bitcoin headers, lowest height first\",\"_fundingOutputIndex\":\"Index of funding output in _txOutputVector (0-indexed)\",\"_merkleProof\":\"The merkle proof of transaction inclusion in a block\",\"_txIndexInBlock\":\"Transaction index in the block (1-indexed)\",\"_txInputVector\":\"All transaction inputs prepended by the number of inputs encoded as a VarInt, max 0xFC(252) inputs\",\"_txLocktime\":\"Final 4 bytes of the transaction\",\"_txOutputVector\":\"All transaction outputs prepended by the number of outputs encoded as a VarInt, max 0xFC(252) outputs\",\"_txVersion\":\"Transaction version number (4-byte LE)\"},\"return\":\"True if no errors are thrown\"},\"provideFundingECDSAFraudProof(uint8,bytes32,bytes32,bytes32,bytes)\":{\"details\":\"ECDSA is NOT SECURE unless you verify the digest\",\"params\":{\"_preimage\":\"The sha256 preimage of the digest\",\"_r\":\"Signature R value\",\"_s\":\"Signature S value\",\"_signedDigest\":\"The digest signed by the signature vrs tuple\",\"_v\":\"Signature recovery value\"},\"return\":\"True if successful, otherwise revert\"},\"provideRedemptionProof(bytes,bytes,uint256,bytes)\":{\"details\":\"The signers will be penalized if this is not called\",\"params\":{\"_bitcoinHeaders\":\"An array of tightly-packed bitcoin headers\",\"_bitcoinTx\":\"The bitcoin tx that purportedly contain the redemption output\",\"_index\":\"The index of the tx in the Bitcoin block (1-indexed)\",\"_merkleProof\":\"The merkle proof of inclusion of the tx in the bitcoin block\"},\"return\":\"True if successful, otherwise revert\"},\"provideRedemptionSignature(uint8,bytes32,bytes32)\":{\"details\":\"The signers will be penalized if this (or provideRedemptionProof) is not called\",\"params\":{\"_r\":\"Signature R value\",\"_s\":\"Signature S value\",\"_v\":\"Signature recovery value\"},\"return\":\"True if successful, False if prevented by timeout, otherwise revert\"},\"provideSPVFraudProof(bytes,bytes,uint256,bytes)\":{\"details\":\"We strong prefer ECDSA fraud proofs\",\"params\":{\"_bitcoinHeaders\":\"An array of tightly-packed bitcoin headers\",\"_bitcoinTx\":\"The bitcoin tx that purportedly contains the funding output\",\"_index\":\"The index of the tx in the Bitcoin block (1-indexed)\",\"_merkleProof\":\"The merkle proof of inclusion of the tx in the bitcoin block\"},\"return\":\"True if successful, otherwise revert\"},\"purchaseSignerBondsAtAuction()\":{\"details\":\"For interface, reading auctionValue will give a past value. the current is better\",\"return\":\"True if successful, revert otherwise\"},\"requestRedemption(bytes8,bytes20)\":{\"details\":\"The redeemer specifies details about the Bitcoin redemption tx\",\"params\":{\"_outputValueBytes\":\"The 8-byte LE output size\",\"_requesterPKH\":\"The 20-byte Bitcoin pubkeyhash to which to send funds\"},\"return\":\"True if successful, otherwise revert\"},\"retrieveSignerPubkey()\":{\"details\":\"We store the pubkey as 2 bytestrings, X and Y.\",\"return\":\"True if successful, otherwise revert\"}}},\"userdoc\":{\"methods\":{\"createNewDeposit(address,address,address,uint256,uint256)\":{\"notice\":\"The system can spin up a new deposit\"},\"exitCourtesyCall()\":{\"notice\":\"Goes from courtesy call to active\"},\"getCurrentState()\":{\"notice\":\"Get the integer representing the current state\"},\"increaseRedemptionFee(bytes8,bytes8)\":{\"notice\":\"Anyone may notify the contract that a fee bump is needed\"},\"notifyCourtesyCall()\":{\"notice\":\"Notify the contract that the signers are undercollateralized\"},\"notifyCourtesyTimeout()\":{\"notice\":\"Notifies the contract that the courtesy period has elapsed\"},\"notifyDepositExpiryCourtesyCall()\":{\"notice\":\"Notifies the contract that its term limit has been reached\"},\"notifyFraudFundingTimeout()\":{\"notice\":\"Anyone may notify the contract no funding proof was submitted during funding fraud\"},\"notifyFundingTimeout()\":{\"notice\":\"Anyone may notify the contract that the funder has failed to send BTC\"},\"notifyRedemptionProofTimeout()\":{\"notice\":\"Anyone may notify the contract that the signers have failed to produce a redemption proof\"},\"notifySignatureTimeout()\":{\"notice\":\"Anyone may notify the contract that the signers have failed to produce a signature\"},\"notifySignerSetupFailure()\":{\"notice\":\"Anyone may notify the contract that signing group setup has timed out\"},\"notifyUndercollateralizedLiquidation()\":{\"notice\":\"Notify the contract that the signers are undercollateralized\"},\"provideBTCFundingProof(bytes,bytes,bytes,bytes,uint8,bytes,uint256,bytes)\":{\"notice\":\"Anyone may notify the deposit of a funding proof to activate the deposit This is the happy-path of the funding flow. It means that we have succeeded\"},\"provideECDSAFraudProof(uint8,bytes32,bytes32,bytes32,bytes)\":{\"notice\":\"Anyone can provide a signature that was not requested to prove fraud\"},\"provideFundingECDSAFraudProof(uint8,bytes32,bytes32,bytes32,bytes)\":{\"notice\":\"Anyone can provide a signature that was not requested to prove fraud during funding\"},\"provideRedemptionProof(bytes,bytes,uint256,bytes)\":{\"notice\":\"Anyone may provide a withdrawal proof to prove redemption\"},\"provideRedemptionSignature(uint8,bytes32,bytes32)\":{\"notice\":\"Anyone may provide a withdrawal signature if it was requested\"},\"provideSPVFraudProof(bytes,bytes,uint256,bytes)\":{\"notice\":\"Anyone may notify the deposit of fraud via an SPV proof\"},\"purchaseSignerBondsAtAuction()\":{\"notice\":\" LIQUIDATION Closes an auction and purchases the signer bonds. Payout to buyer, funder, then signers if not fraud\"},\"requestRedemption(bytes8,bytes20)\":{\"notice\":\"Anyone can request redemption\"},\"retrieveSignerPubkey()\":{\"notice\":\"we poll the Keep contract to retrieve our pubkey\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/Deposit.sol\":\"Deposit\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/DepositLog.sol\":{\"keccak256\":\"0xbef5c1473925ff0d33942d3c2a2b0a78694ef760070d0d1ca6dbd059279e071a\",\"urls\":[\"bzzr://80bf4dcd38161beb7b037b1550a30d7a0637df0b7b7b4a61dd233a3124ef37b9\",\"dweb:/ipfs/QmVQpCv5j9PkkhSwTe8EZ4hjaVYxXDVHu4QwC6ZeFsLVe7\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/Deposit.sol\":{\"keccak256\":\"0x8deef2395253bc60f6dc85432a0ad3c857150c8b0b32fddbb79599b178ca3849\",\"urls\":[\"bzzr://54890c85f8061e4d73e643102a90f8f42766fc9d5bd07db4b6c920faf50167d4\",\"dweb:/ipfs/QmSfzTU5kAa2jbxgHdTcfCpmgZiKoVnfDatdpY3McrL3sJ\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/DepositFunding.sol\":{\"keccak256\":\"0xbf545094a4d5d60427cac3fd57990933277bdcca676c35c7a32f4d3d304b9a76\",\"urls\":[\"bzzr://49c650902d21ed439222d9871ef238a9bc82bc26cbccbc14fb40f6ce2b251846\",\"dweb:/ipfs/QmX5ypv6s8y5Apbu6xFnPxSaSEvsoBNsWJ63Ht2cQk8WCJ\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/DepositLiquidation.sol\":{\"keccak256\":\"0xf2deaa076ecda3087efe2486a4b34baf7ec849745416cc3ac50e73a5109d9558\",\"urls\":[\"bzzr://48db1b92575b95a9be6854c03b9ee44daee26d21f1c20ea742470623a42cf390\",\"dweb:/ipfs/QmaRrHRE6YgLjznyQHsxbmu6AJR5kFmM1cWQH3roWtYACg\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/DepositRedemption.sol\":{\"keccak256\":\"0x258d2c3bb0c57e38a83e52b5a37a6579af2871954718593008a93e417a1830e9\",\"urls\":[\"bzzr://b337a89d36fb3938c2d7bad882c5f9a693952cfd123d181741e925a15a75d31e\",\"dweb:/ipfs/QmQGa1LjpZkqf379Tf1gmMJHhA3jrbUVpUFNcvrpAg1h8o\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/DepositStates.sol\":{\"keccak256\":\"0xbeea5c039fd45c8a21ae3955218510b8ab1c4cd3a3f72a342f3a595abf46e96b\",\"urls\":[\"bzzr://b3c128900d39699e61d3801cd95d63735c51bffb3b7759e403396495fbd1638d\",\"dweb:/ipfs/QmaVLgGAtsyjkZENqU3aSZ4dxN1bXYqxKAeSfNhvTGQULQ\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/DepositUtils.sol\":{\"keccak256\":\"0x729f0e54e9422ac8c714a5c0a30dbb0263e7dfe055c8c75aec6e5b2ffff0927b\",\"urls\":[\"bzzr://9daaed148f08a5f5f7892c7e41d990d9148c688ad938ffa2d7fc8777a42c5a5f\",\"dweb:/ipfs/QmWp3oMVPbeWHdD5WSmzopGS2NJBfto18fR2Se8CecEDp3\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/OutsourceDepositLogging.sol\":{\"keccak256\":\"0xa8de2bf39162a382765dfd40a358af160181278cf1c5e295eb33bc7b9372131b\",\"urls\":[\"bzzr://bbdcfdb344fb100125e1e31e56333a2a434d4ccffef09a456c4e7b4b37be6c04\",\"dweb:/ipfs/QmQxEPsR5htQQEEgvaU3EFsRrfk8pwfNYTkV7oA8bwACKF\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/TBTCConstants.sol\":{\"keccak256\":\"0xe6bdaf587542ac8d1b070ad001825a7727e6838a9cb7f95254b642717f0a173b\",\"urls\":[\"bzzr://f434115daa5b403b772284b690bb9231f83a3f82a7249526bfe040494dbd69c0\",\"dweb:/ipfs/QmPc6yhC3H3wEsBTmG93nMDmycg9bfvTDYgU3cYYa9i491\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/IERC721.sol\":{\"keccak256\":\"0xd2e386ce780b175d8975d09ec8c60a66cabc91022dd19c1c23816b7941036fbc\",\"urls\":[\"bzzr://01d95810573347b0dffcd534cce8c3ff3d19daa211ec9069a484d584a1aa0653\",\"dweb:/ipfs/QmXCWZ4Z5Jfbq9k6BqDQiBctUtdqSVtFTtBhK8Nd9rSjkJ\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/IKeep.sol\":{\"keccak256\":\"0xaf7030cfb935478c97a8788bb27d7ec8a0e5356341558c2ede3f2119bc53c4f9\",\"urls\":[\"bzzr://e6b50d2077cfc221a47cfd505af039d3fa683b0b461421c2a777f47697be0103\",\"dweb:/ipfs/QmbBsVBDD2652786kJHR6A4DXjuAdx3GHHL6FtiJJe8yo3\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/ITBTCSystem.sol\":{\"keccak256\":\"0x848a4d3ef289d9932e969f99a353c575a96f3f30474363a74537f56591738393\",\"urls\":[\"bzzr://eda27ecc511bf98fd3a7036b63e11f2807d02d4bfeaf6d946e380b1a6dffe114\",\"dweb:/ipfs/QmWUsXW5UkjykcgfUgd8fA6MR8G342xpCvX4mYfhW5atgV\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/system/TBTCToken.sol\":{\"keccak256\":\"0x53f22f54c0030dceb3692314ae6d31f65a9300acb45ebb54cb0ddcf7cee9031a\",\"urls\":[\"bzzr://9ee867d700826112da33036fbb96da8848d12c20f437c1f798e895ffcb5dd71b\",\"dweb:/ipfs/Qmb5J4wNccMSBBu8uFDrQxbcTBjBQ88DtuUnsppy5qSgyk\"]},\"bitcoin-spv/contracts/BTCUtils.sol\":{\"keccak256\":\"0xb5ceddefcc85490aa6958e157d6a191a2689d95909b6c47b5257c0c4b86518d4\",\"urls\":[\"bzzr://dfc6f51453a1eb2211907a5e02dbd1a74413357c77cd1a9650d577ff05f3a9d2\",\"dweb:/ipfs/Qma9Gv3VCMFVsTGjfEQhpPjAiBvhrBgHAXyJZcragLoCXY\"]},\"bitcoin-spv/contracts/BytesLib.sol\":{\"keccak256\":\"0x03247b95034ca087f9d66fbc974b0554e10d77329c6a469a0390db42ab40027a\",\"urls\":[\"bzzr://7167d0a93ec0d79682e4e3d85be67b554cce0c1a1b0f231745a2fa2a6912b078\",\"dweb:/ipfs/QmQpPxSfKcT94pG3mAJL1Dy3qVX23nacju4bVC6SSENLtc\"]},\"bitcoin-spv/contracts/SafeMath.sol\":{\"keccak256\":\"0x2e9c328d73914b46c49780207e7f1560ad94a56608e548757233a2a8ee98b8d9\",\"urls\":[\"bzzr://19d1a36d045b0d72d0750ca569f2dea9f6d7f1dffa9ae6123af86684e81e5bc4\",\"dweb:/ipfs/QmfNDFWTfFksjQ5eA5amWFvcZ6KypuyRP186JvyD3fRqe4\"]},\"bitcoin-spv/contracts/SigCheck.sol\":{\"keccak256\":\"0xd8f8e7fe91df8f983202ab1e16d10991a3de72c80fa36568861c43f82b81a7ac\",\"urls\":[\"bzzr://bad8518b27958da8c0995bf75ae2133ccf55c3dbed0da02f59697cca02956fa8\",\"dweb:/ipfs/QmNY6jvXVDeED46ykbtCVkQfWgwyRkmPktHAjNr1H8A9Wn\"]},\"bitcoin-spv/contracts/ValidateSPV.sol\":{\"keccak256\":\"0xc458b1297a2d0d86aa31d3ad1a6a580702cb2950e7b575b86c17da63a5e2acc4\",\"urls\":[\"bzzr://0384d8405c1de0f006384c53eabce3156507f5b91aa33a09cbcd36d29e58c620\",\"dweb:/ipfs/QmPoTf9UomhY4c4nWwBMVgz6Zg1RFQn7hREeE6BDJieyiZ\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\",\"dweb:/ipfs/QmV3yVktya1s617QmuzQR2CfuJgUi3dR2xEZY9ecmqZ2G1\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\",\"dweb:/ipfs/QmcyytaLs7zFdb4Uu7C5PmQRhQdB3wA3fUdkV6mkYfdDFH\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0xc61b3603089b09a730d8ca72e9133a496cc4405da40e9b87c12f073245d774bf\",\"urls\":[\"bzzr://f280f38d5ab6e1b89fd898ccd3901054a56572c141d91d30302e2db1db4cc6ff\",\"dweb:/ipfs/QmbtwNwAJEehWWL7yGGyyMoenQvcqtz91pqLgQPpLRoLYC\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\",\"dweb:/ipfs/QmP5NaEwZthQeM2ESz4WTT3osrP7jhbvu7ocbttBi2JAw6\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50611da6806100206000396000f3fe6080604052600436106101405760003560e01c806396aab311116100b6578063c41595591161006f578063c415955914610a84578063d5eef97114610abd578063e64bc82914610b89578063e6d6aaba14610bcb578063ea3db25014610be0578063eba12c5a14610bf557610140565b806396aab311146104e85780639894d734146104fd5780639e8a681514610539578063b4bd2e7a14610897578063b66f261a146108ac578063c1b8736814610a6f57610140565b8063378aa70111610108578063378aa7011461027657806372ed2b4a1461029d5780637d18eed9146102b2578063861ac012146102fb5780638a68db65146104be578063902d2ead146104d357610140565b806306d6bf1a14610142578063287b32e51461016b5780632c735daa146101805780632d0994421461019557806334cf528314610261575b005b34801561014e57600080fd5b50610157610f53565b604080519115158252519081900360200190f35b34801561017757600080fd5b50610157610fc5565b34801561018c57600080fd5b50610157611018565b3480156101a157600080fd5b50610157600480360360a08110156101b857600080fd5b60ff8235169160208101359160408201359160608101359181019060a081016080820135600160201b8111156101ed57600080fd5b8201836020820111156101ff57600080fd5b803590602001918460018302840111600160201b8311171561022057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061106b945050505050565b34801561026d57600080fd5b50610157611172565b34801561028257600080fd5b5061028b6111c5565b60408051918252519081900360200190f35b3480156102a957600080fd5b506101576111d5565b3480156102be57600080fd5b50610157600480360360408110156102d557600080fd5b5080356001600160c01b03191690602001356bffffffffffffffffffffffff1916611228565b34801561030757600080fd5b506101576004803603608081101561031e57600080fd5b810190602081018135600160201b81111561033857600080fd5b82018360208201111561034a57600080fd5b803590602001918460018302840111600160201b8311171561036b57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156103bd57600080fd5b8201836020820111156103cf57600080fd5b803590602001918460018302840111600160201b831117156103f057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092958435959094909350604081019250602001359050600160201b81111561044a57600080fd5b82018360208201111561045c57600080fd5b803590602001918460018302840111600160201b8311171561047d57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506112c1945050505050565b3480156104ca57600080fd5b50610157611477565b3480156104df57600080fd5b506101576114ca565b3480156104f457600080fd5b5061015761151d565b34801561050957600080fd5b506101576004803603604081101561052057600080fd5b506001600160c01b031981358116916020013516611570565b34801561054557600080fd5b50610157600480360361010081101561055d57600080fd5b810190602081018135600160201b81111561057757600080fd5b82018360208201111561058957600080fd5b803590602001918460018302840111600160201b831117156105aa57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156105fc57600080fd5b82018360208201111561060e57600080fd5b803590602001918460018302840111600160201b8311171561062f57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561068157600080fd5b82018360208201111561069357600080fd5b803590602001918460018302840111600160201b831117156106b457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561070657600080fd5b82018360208201111561071857600080fd5b803590602001918460018302840111600160201b8311171561073957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929560ff853516959094909350604081019250602001359050600160201b81111561079657600080fd5b8201836020820111156107a857600080fd5b803590602001918460018302840111600160201b831117156107c957600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092958435959094909350604081019250602001359050600160201b81111561082357600080fd5b82018360208201111561083557600080fd5b803590602001918460018302840111600160201b8311171561085657600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061160f945050505050565b3480156108a357600080fd5b50610157611923565b3480156108b857600080fd5b50610157600480360360808110156108cf57600080fd5b810190602081018135600160201b8111156108e957600080fd5b8201836020820111156108fb57600080fd5b803590602001918460018302840111600160201b8311171561091c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561096e57600080fd5b82018360208201111561098057600080fd5b803590602001918460018302840111600160201b831117156109a157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092958435959094909350604081019250602001359050600160201b8111156109fb57600080fd5b820183602082011115610a0d57600080fd5b803590602001918460018302840111600160201b83111715610a2e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611976945050505050565b348015610a7b57600080fd5b506101576119f8565b348015610a9057600080fd5b5061015760048036036060811015610aa757600080fd5b5060ff8135169060208101359060400135611a4b565b348015610ac957600080fd5b50610157600480360360a0811015610ae057600080fd5b60ff8235169160208101359160408201359160608101359181019060a081016080820135600160201b811115610b1557600080fd5b820183602082011115610b2757600080fd5b803590602001918460018302840111600160201b83111715610b4857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611ad7945050505050565b610157600480360360a0811015610b9f57600080fd5b506001600160a01b03813581169160208101358216916040820135169060608101359060800135611b6a565b348015610bd757600080fd5b50610157611c2d565b348015610bec57600080fd5b50610157611c80565b348015610c0157600080fd5b506101576004803603610100811015610c1957600080fd5b810190602081018135600160201b811115610c3357600080fd5b820183602082011115610c4557600080fd5b803590602001918460018302840111600160201b83111715610c6657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610cb857600080fd5b820183602082011115610cca57600080fd5b803590602001918460018302840111600160201b83111715610ceb57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610d3d57600080fd5b820183602082011115610d4f57600080fd5b803590602001918460018302840111600160201b83111715610d7057600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610dc257600080fd5b820183602082011115610dd457600080fd5b803590602001918460018302840111600160201b83111715610df557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929560ff853516959094909350604081019250602001359050600160201b811115610e5257600080fd5b820183602082011115610e6457600080fd5b803590602001918460018302840111600160201b83111715610e8557600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092958435959094909350604081019250602001359050600160201b811115610edf57600080fd5b820183602082011115610ef157600080fd5b803590602001918460018302840111600160201b83111715610f1257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611cd3945050505050565b60008073__DepositFunding________________________63490f787190916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b505af4158015610fba573d6000803e3d6000fd5b505050506001905090565b60008073__DepositLiquidation____________________633bd675c890916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60008073__DepositLiquidation____________________632ea8450690916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60008073__DepositFunding________________________63fb12d9df909188888888886040518763ffffffff1660e01b8152600401808781526020018660ff1660ff16815260200185815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156110ff5781810151838201526020016110e7565b50505050905090810190601f16801561112c5780820380516001836020036101000a031916815260200191505b5097505050505050505060006040518083038186803b15801561114e57600080fd5b505af4158015611162573d6000803e3d6000fd5b5060019998505050505050505050565b60008073__DepositRedemption_____________________63cd53895490916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b600254600160a01b900460ff1690565b60008073__DepositLiquidation____________________63a43c845b90916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60408051637544b12560e11b81526000600482018190526001600160c01b0319851660248301526bffffffffffffffffffffffff1984166044830152915173__DepositRedemption_____________________9163ea89624a9160648083019286929190829003018186803b1580156112a057600080fd5b505af41580156112b4573d6000803e3d6000fd5b5060019695505050505050565b60008073__DepositRedemption_____________________63eec163b89091878787876040518663ffffffff1660e01b815260040180868152602001806020018060200185815260200180602001848103845288818151815260200191508051906020019080838360005b8381101561134457818101518382015260200161132c565b50505050905090810190601f1680156113715780820380516001836020036101000a031916815260200191505b50848103835287518152875160209182019189019080838360005b838110156113a457818101518382015260200161138c565b50505050905090810190601f1680156113d15780820380516001836020036101000a031916815260200191505b50848103825285518152855160209182019187019080838360005b838110156114045781810151838201526020016113ec565b50505050905090810190601f1680156114315780820380516001836020036101000a031916815260200191505b509850505050505050505060006040518083038186803b15801561145457600080fd5b505af4158015611468573d6000803e3d6000fd5b50600198975050505050505050565b60008073__DepositRedemption_____________________635976635790916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60008073__DepositLiquidation____________________63c396a1f490916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60008073__DepositLiquidation____________________63a221542190916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60408051632d0c21bf60e01b81526000600482018190526001600160c01b0319808616602484015284166044830152915173__DepositRedemption_____________________91632d0c21bf916064808301926020929190829003018186803b1580156115dc57600080fd5b505af41580156115f0573d6000803e3d6000fd5b505050506040513d602081101561160657600080fd5b50519392505050565b60008073__DepositFunding________________________63811cc3a190918b8b8b8b8b8b8b8b6040518a63ffffffff1660e01b8152600401808a8152602001806020018060200180602001806020018960ff1660ff168152602001806020018881526020018060200187810387528f818151815260200191508051906020019080838360005b838110156116ae578181015183820152602001611696565b50505050905090810190601f1680156116db5780820380516001836020036101000a031916815260200191505b5087810386528e818151815260200191508051906020019080838360005b838110156117115781810151838201526020016116f9565b50505050905090810190601f16801561173e5780820380516001836020036101000a031916815260200191505b5087810385528d5181528d516020918201918f019080838360005b83811015611771578181015183820152602001611759565b50505050905090810190601f16801561179e5780820380516001836020036101000a031916815260200191505b5087810384528c5181528c516020918201918e019080838360005b838110156117d15781810151838201526020016117b9565b50505050905090810190601f1680156117fe5780820380516001836020036101000a031916815260200191505b5087810383528a5181528a516020918201918c019080838360005b83811015611831578181015183820152602001611819565b50505050905090810190601f16801561185e5780820380516001836020036101000a031916815260200191505b5087810382528851815288516020918201918a019080838360005b83811015611891578181015183820152602001611879565b50505050905090810190601f1680156118be5780820380516001836020036101000a031916815260200191505b509f5050505050505050505050505050505060206040518083038186803b1580156118e857600080fd5b505af41580156118fc573d6000803e3d6000fd5b505050506040513d602081101561191257600080fd5b5060019a9950505050505050505050565b60008073__DepositLiquidation____________________6393a3866490916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60008073__DepositLiquidation____________________6310e0b6c39091878787876040518663ffffffff1660e01b815260040180868152602001806020018060200185815260200180602001848103845288818151815260200191508051906020019080838360008381101561134457818101518382015260200161132c565b60008073__DepositFunding________________________635347b1de90916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60408051631e3435d560e11b815260006004820181905260ff861660248301526044820185905260648201849052915173__DepositRedemption_____________________91633c686baa9160848083019286929190829003018186803b158015611ab557600080fd5b505af4158015611ac9573d6000803e3d6000fd5b506001979650505050505050565b60008073__DepositLiquidation____________________634941676c909188888888886040518763ffffffff1660e01b8152600401808781526020018660ff1660ff1681526020018581526020018481526020018381526020018060200182810382528381815181526020019150805190602001908083836000838110156110ff5781810151838201526020016110e7565b600080546001600160a01b038088166001600160a01b0319928316178355600180548883169084161790556002805491871691909216179055604080516309ab65f560e01b8152600481018390526024810185905260448101849052905173__DepositFunding________________________916309ab65f5916064808301926020929190829003018186803b158015611c0357600080fd5b505af4158015611c17573d6000803e3d6000fd5b505050506040513d6020811015611ac957600080fd5b60008073__DepositFunding________________________63cd40cc6490916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60008073__DepositFunding________________________63bb21d02490916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60008073__DepositFunding________________________6351bad39790918b8b8b8b8b8b8b8b6040518a63ffffffff1660e01b8152600401808a8152602001806020018060200180602001806020018960ff1660ff168152602001806020018881526020018060200187810387528f81815181526020019150805190602001908083836000838110156116ae57818101518382015260200161169656fea265627a7a7230582023b51d68cec6757094f14f141b9bbd5bd75f51a943fe9b6d61b76f795d7e97af64736f6c634300050a0032", - "deployedBytecode": "0x6080604052600436106101405760003560e01c806396aab311116100b6578063c41595591161006f578063c415955914610a84578063d5eef97114610abd578063e64bc82914610b89578063e6d6aaba14610bcb578063ea3db25014610be0578063eba12c5a14610bf557610140565b806396aab311146104e85780639894d734146104fd5780639e8a681514610539578063b4bd2e7a14610897578063b66f261a146108ac578063c1b8736814610a6f57610140565b8063378aa70111610108578063378aa7011461027657806372ed2b4a1461029d5780637d18eed9146102b2578063861ac012146102fb5780638a68db65146104be578063902d2ead146104d357610140565b806306d6bf1a14610142578063287b32e51461016b5780632c735daa146101805780632d0994421461019557806334cf528314610261575b005b34801561014e57600080fd5b50610157610f53565b604080519115158252519081900360200190f35b34801561017757600080fd5b50610157610fc5565b34801561018c57600080fd5b50610157611018565b3480156101a157600080fd5b50610157600480360360a08110156101b857600080fd5b60ff8235169160208101359160408201359160608101359181019060a081016080820135600160201b8111156101ed57600080fd5b8201836020820111156101ff57600080fd5b803590602001918460018302840111600160201b8311171561022057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061106b945050505050565b34801561026d57600080fd5b50610157611172565b34801561028257600080fd5b5061028b6111c5565b60408051918252519081900360200190f35b3480156102a957600080fd5b506101576111d5565b3480156102be57600080fd5b50610157600480360360408110156102d557600080fd5b5080356001600160c01b03191690602001356bffffffffffffffffffffffff1916611228565b34801561030757600080fd5b506101576004803603608081101561031e57600080fd5b810190602081018135600160201b81111561033857600080fd5b82018360208201111561034a57600080fd5b803590602001918460018302840111600160201b8311171561036b57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156103bd57600080fd5b8201836020820111156103cf57600080fd5b803590602001918460018302840111600160201b831117156103f057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092958435959094909350604081019250602001359050600160201b81111561044a57600080fd5b82018360208201111561045c57600080fd5b803590602001918460018302840111600160201b8311171561047d57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506112c1945050505050565b3480156104ca57600080fd5b50610157611477565b3480156104df57600080fd5b506101576114ca565b3480156104f457600080fd5b5061015761151d565b34801561050957600080fd5b506101576004803603604081101561052057600080fd5b506001600160c01b031981358116916020013516611570565b34801561054557600080fd5b50610157600480360361010081101561055d57600080fd5b810190602081018135600160201b81111561057757600080fd5b82018360208201111561058957600080fd5b803590602001918460018302840111600160201b831117156105aa57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156105fc57600080fd5b82018360208201111561060e57600080fd5b803590602001918460018302840111600160201b8311171561062f57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561068157600080fd5b82018360208201111561069357600080fd5b803590602001918460018302840111600160201b831117156106b457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561070657600080fd5b82018360208201111561071857600080fd5b803590602001918460018302840111600160201b8311171561073957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929560ff853516959094909350604081019250602001359050600160201b81111561079657600080fd5b8201836020820111156107a857600080fd5b803590602001918460018302840111600160201b831117156107c957600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092958435959094909350604081019250602001359050600160201b81111561082357600080fd5b82018360208201111561083557600080fd5b803590602001918460018302840111600160201b8311171561085657600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061160f945050505050565b3480156108a357600080fd5b50610157611923565b3480156108b857600080fd5b50610157600480360360808110156108cf57600080fd5b810190602081018135600160201b8111156108e957600080fd5b8201836020820111156108fb57600080fd5b803590602001918460018302840111600160201b8311171561091c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561096e57600080fd5b82018360208201111561098057600080fd5b803590602001918460018302840111600160201b831117156109a157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092958435959094909350604081019250602001359050600160201b8111156109fb57600080fd5b820183602082011115610a0d57600080fd5b803590602001918460018302840111600160201b83111715610a2e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611976945050505050565b348015610a7b57600080fd5b506101576119f8565b348015610a9057600080fd5b5061015760048036036060811015610aa757600080fd5b5060ff8135169060208101359060400135611a4b565b348015610ac957600080fd5b50610157600480360360a0811015610ae057600080fd5b60ff8235169160208101359160408201359160608101359181019060a081016080820135600160201b811115610b1557600080fd5b820183602082011115610b2757600080fd5b803590602001918460018302840111600160201b83111715610b4857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611ad7945050505050565b610157600480360360a0811015610b9f57600080fd5b506001600160a01b03813581169160208101358216916040820135169060608101359060800135611b6a565b348015610bd757600080fd5b50610157611c2d565b348015610bec57600080fd5b50610157611c80565b348015610c0157600080fd5b506101576004803603610100811015610c1957600080fd5b810190602081018135600160201b811115610c3357600080fd5b820183602082011115610c4557600080fd5b803590602001918460018302840111600160201b83111715610c6657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610cb857600080fd5b820183602082011115610cca57600080fd5b803590602001918460018302840111600160201b83111715610ceb57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610d3d57600080fd5b820183602082011115610d4f57600080fd5b803590602001918460018302840111600160201b83111715610d7057600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610dc257600080fd5b820183602082011115610dd457600080fd5b803590602001918460018302840111600160201b83111715610df557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929560ff853516959094909350604081019250602001359050600160201b811115610e5257600080fd5b820183602082011115610e6457600080fd5b803590602001918460018302840111600160201b83111715610e8557600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092958435959094909350604081019250602001359050600160201b811115610edf57600080fd5b820183602082011115610ef157600080fd5b803590602001918460018302840111600160201b83111715610f1257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611cd3945050505050565b60008073__DepositFunding________________________63490f787190916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b505af4158015610fba573d6000803e3d6000fd5b505050506001905090565b60008073__DepositLiquidation____________________633bd675c890916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60008073__DepositLiquidation____________________632ea8450690916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60008073__DepositFunding________________________63fb12d9df909188888888886040518763ffffffff1660e01b8152600401808781526020018660ff1660ff16815260200185815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156110ff5781810151838201526020016110e7565b50505050905090810190601f16801561112c5780820380516001836020036101000a031916815260200191505b5097505050505050505060006040518083038186803b15801561114e57600080fd5b505af4158015611162573d6000803e3d6000fd5b5060019998505050505050505050565b60008073__DepositRedemption_____________________63cd53895490916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b600254600160a01b900460ff1690565b60008073__DepositLiquidation____________________63a43c845b90916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60408051637544b12560e11b81526000600482018190526001600160c01b0319851660248301526bffffffffffffffffffffffff1984166044830152915173__DepositRedemption_____________________9163ea89624a9160648083019286929190829003018186803b1580156112a057600080fd5b505af41580156112b4573d6000803e3d6000fd5b5060019695505050505050565b60008073__DepositRedemption_____________________63eec163b89091878787876040518663ffffffff1660e01b815260040180868152602001806020018060200185815260200180602001848103845288818151815260200191508051906020019080838360005b8381101561134457818101518382015260200161132c565b50505050905090810190601f1680156113715780820380516001836020036101000a031916815260200191505b50848103835287518152875160209182019189019080838360005b838110156113a457818101518382015260200161138c565b50505050905090810190601f1680156113d15780820380516001836020036101000a031916815260200191505b50848103825285518152855160209182019187019080838360005b838110156114045781810151838201526020016113ec565b50505050905090810190601f1680156114315780820380516001836020036101000a031916815260200191505b509850505050505050505060006040518083038186803b15801561145457600080fd5b505af4158015611468573d6000803e3d6000fd5b50600198975050505050505050565b60008073__DepositRedemption_____________________635976635790916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60008073__DepositLiquidation____________________63c396a1f490916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60008073__DepositLiquidation____________________63a221542190916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60408051632d0c21bf60e01b81526000600482018190526001600160c01b0319808616602484015284166044830152915173__DepositRedemption_____________________91632d0c21bf916064808301926020929190829003018186803b1580156115dc57600080fd5b505af41580156115f0573d6000803e3d6000fd5b505050506040513d602081101561160657600080fd5b50519392505050565b60008073__DepositFunding________________________63811cc3a190918b8b8b8b8b8b8b8b6040518a63ffffffff1660e01b8152600401808a8152602001806020018060200180602001806020018960ff1660ff168152602001806020018881526020018060200187810387528f818151815260200191508051906020019080838360005b838110156116ae578181015183820152602001611696565b50505050905090810190601f1680156116db5780820380516001836020036101000a031916815260200191505b5087810386528e818151815260200191508051906020019080838360005b838110156117115781810151838201526020016116f9565b50505050905090810190601f16801561173e5780820380516001836020036101000a031916815260200191505b5087810385528d5181528d516020918201918f019080838360005b83811015611771578181015183820152602001611759565b50505050905090810190601f16801561179e5780820380516001836020036101000a031916815260200191505b5087810384528c5181528c516020918201918e019080838360005b838110156117d15781810151838201526020016117b9565b50505050905090810190601f1680156117fe5780820380516001836020036101000a031916815260200191505b5087810383528a5181528a516020918201918c019080838360005b83811015611831578181015183820152602001611819565b50505050905090810190601f16801561185e5780820380516001836020036101000a031916815260200191505b5087810382528851815288516020918201918a019080838360005b83811015611891578181015183820152602001611879565b50505050905090810190601f1680156118be5780820380516001836020036101000a031916815260200191505b509f5050505050505050505050505050505060206040518083038186803b1580156118e857600080fd5b505af41580156118fc573d6000803e3d6000fd5b505050506040513d602081101561191257600080fd5b5060019a9950505050505050505050565b60008073__DepositLiquidation____________________6393a3866490916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60008073__DepositLiquidation____________________6310e0b6c39091878787876040518663ffffffff1660e01b815260040180868152602001806020018060200185815260200180602001848103845288818151815260200191508051906020019080838360008381101561134457818101518382015260200161132c565b60008073__DepositFunding________________________635347b1de90916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60408051631e3435d560e11b815260006004820181905260ff861660248301526044820185905260648201849052915173__DepositRedemption_____________________91633c686baa9160848083019286929190829003018186803b158015611ab557600080fd5b505af4158015611ac9573d6000803e3d6000fd5b506001979650505050505050565b60008073__DepositLiquidation____________________634941676c909188888888886040518763ffffffff1660e01b8152600401808781526020018660ff1660ff1681526020018581526020018481526020018381526020018060200182810382528381815181526020019150805190602001908083836000838110156110ff5781810151838201526020016110e7565b600080546001600160a01b038088166001600160a01b0319928316178355600180548883169084161790556002805491871691909216179055604080516309ab65f560e01b8152600481018390526024810185905260448101849052905173__DepositFunding________________________916309ab65f5916064808301926020929190829003018186803b158015611c0357600080fd5b505af4158015611c17573d6000803e3d6000fd5b505050506040513d6020811015611ac957600080fd5b60008073__DepositFunding________________________63cd40cc6490916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60008073__DepositFunding________________________63bb21d02490916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fa657600080fd5b60008073__DepositFunding________________________6351bad39790918b8b8b8b8b8b8b8b6040518a63ffffffff1660e01b8152600401808a8152602001806020018060200180602001806020018960ff1660ff168152602001806020018881526020018060200187810387528f81815181526020019150805190602001908083836000838110156116ae57818101518382015260200161169656fea265627a7a7230582023b51d68cec6757094f14f141b9bbd5bd75f51a943fe9b6d61b76f795d7e97af64736f6c634300050a0032", - "sourceMap": "249:14876:2:-;;;654:24;8:9:-1;5:2;;;30:1;27;20:12;5:2;654:24:2;249:14876;;;;;;", - "deployedSourceMap": "249:14876:2:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6238:119;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6238:119:2;;;:::i;:::-;;;;;;;;;;;;;;;;;;13993:111;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13993:111:2;;;:::i;13328:135::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13328:135:2;;;:::i;6929:298::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6929:298:2;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;6929:298:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;6929:298:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;6929:298:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;6929:298:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;6929:298:2;;-1:-1:-1;6929:298:2;;-1:-1:-1;;;;;6929:298:2:i;5132:135::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5132:135:2;;;:::i;944:107::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;944:107:2;;;:::i;:::-;;;;;;;;;;;;;;;;14668:121;;8:9:-1;5:2;;;30:1;27;20:12;5:2;14668:121:2;;;:::i;2139:214::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2139:214:2;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2139:214:2;;-1:-1:-1;;;;;;2139:214:2;;;;;-1:-1:-1;;2139:214:2;;:::i;4240:306::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4240:306:2;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;4240:306:2;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;4240:306:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4240:306:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;4240:306:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;4240:306:2;;;;;;;;-1:-1:-1;4240:306:2;;-1:-1:-1;;;;;5:28;;2:2;;;46:1;43;36:12;2:2;4240:306:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4240:306:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;4240:306:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;4240:306:2;;;;;;;;;-1:-1:-1;4240:306:2;;;;-1:-1:-1;4240:306:2;;;;-1:-1:-1;;;;5:28;;2:2;;;46:1;43;36:12;2:2;4240:306:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4240:306:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;4240:306:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;4240:306:2;;-1:-1:-1;4240:306:2;;-1:-1:-1;;;;;4240:306:2:i;4774:123::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4774:123:2;;;:::i;14982:141::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;14982:141:2;;;:::i;13667:115::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13667:115:2;;;:::i;3407:237::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3407:237:2;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;;3407:237:2;;;;;;;;;;:::i;8782:651::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8782:651:2;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;8782:651:2;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;8782:651:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;8782:651:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;8782:651:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;8782:651:2;;;;;;;;-1:-1:-1;8782:651:2;;-1:-1:-1;;;;;5:28;;2:2;;;46:1;43;36:12;2:2;8782:651:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;8782:651:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;8782:651:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;8782:651:2;;;;;;;;-1:-1:-1;8782:651:2;;-1:-1:-1;;;;;5:28;;2:2;;;46:1;43;36:12;2:2;8782:651:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;8782:651:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;8782:651:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;8782:651:2;;;;;;;;-1:-1:-1;8782:651:2;;-1:-1:-1;;;;;5:28;;2:2;;;46:1;43;36:12;2:2;8782:651:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;8782:651:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;8782:651:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;8782:651:2;;;;;;;;;;;-1:-1:-1;8782:651:2;;;;-1:-1:-1;8782:651:2;;;;-1:-1:-1;;;;5:28;;2:2;;;46:1;43;36:12;2:2;8782:651:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;8782:651:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;8782:651:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;8782:651:2;;;;;;;;;-1:-1:-1;8782:651:2;;;;-1:-1:-1;8782:651:2;;;;-1:-1:-1;;;;5:28;;2:2;;;46:1;43;36:12;2:2;8782:651:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;8782:651:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;8782:651:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;8782:651:2;;-1:-1:-1;8782:651:2;;-1:-1:-1;;;;;8782:651:2:i;14308:151::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;14308:151:2;;;:::i;12703:302::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;12703:302:2;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;12703:302:2;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;12703:302:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;12703:302:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;12703:302:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;12703:302:2;;;;;;;;-1:-1:-1;12703:302:2;;-1:-1:-1;;;;;5:28;;2:2;;;46:1;43;36:12;2:2;12703:302:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;12703:302:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;12703:302:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;12703:302:2;;;;;;;;;-1:-1:-1;12703:302:2;;;;-1:-1:-1;12703:302:2;;;;-1:-1:-1;;;;5:28;;2:2;;;46:1;43;36:12;2:2;12703:302:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;12703:302:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;12703:302:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;12703:302:2;;-1:-1:-1;12703:302:2;;-1:-1:-1;;;;;12703:302:2:i;7496:129::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7496:129:2;;;:::i;2750:203::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2750:203:2;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2750:203:2;;;;;;;;;;;;;;:::i;11843:284::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11843:284:2;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;11843:284:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;11843:284:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;11843:284:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;11843:284:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;11843:284:2;;-1:-1:-1;11843:284:2;;-1:-1:-1;;;;;11843:284:2:i;1373:370::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;1373:370:2;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;5536:127::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5536:127:2;;;:::i;5886:119::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5886:119:2;;;:::i;10617:641::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10617:641:2;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;10617:641:2;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;10617:641:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;10617:641:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;10617:641:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;10617:641:2;;;;;;;;-1:-1:-1;10617:641:2;;-1:-1:-1;;;;;5:28;;2:2;;;46:1;43;36:12;2:2;10617:641:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;10617:641:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;10617:641:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;10617:641:2;;;;;;;;-1:-1:-1;10617:641:2;;-1:-1:-1;;;;;5:28;;2:2;;;46:1;43;36:12;2:2;10617:641:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;10617:641:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;10617:641:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;10617:641:2;;;;;;;;-1:-1:-1;10617:641:2;;-1:-1:-1;;;;;5:28;;2:2;;;46:1;43;36:12;2:2;10617:641:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;10617:641:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;10617:641:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;10617:641:2;;;;;;;;;;;-1:-1:-1;10617:641:2;;;;-1:-1:-1;10617:641:2;;;;-1:-1:-1;;;;5:28;;2:2;;;46:1;43;36:12;2:2;10617:641:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;10617:641:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;10617:641:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;10617:641:2;;;;;;;;;-1:-1:-1;10617:641:2;;;;-1:-1:-1;10617:641:2;;;;-1:-1:-1;;;;5:28;;2:2;;;46:1;43;36:12;2:2;10617:641:2;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;10617:641:2;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;10617:641:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;10617:641:2;;-1:-1:-1;10617:641:2;;-1:-1:-1;;;;;10617:641:2:i;6238:119::-;6286:4;6302;:25;;;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6302:27:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6302:27:2;;;;6346:4;6339:11;;6238:119;:::o;13993:111::-;14037:4;14053;:21;;;;:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;13328:135:2;13384:4;13400;:33;;;;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;6929:298:2;7111:4;7127;:34;;;;7162:2;7166;7170;7174:13;7189:9;7127:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;7127:72:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7127:72:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;7216:4:2;;6929:298;-1:-1:-1;;;;;;;;;6929:298:2:o;5132:135::-;5188:4;5204;:33;;;;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;944:107:2;1026:17;;-1:-1:-1;;;1026:17:2;;;;;944:107::o;14668:121::-;14717:4;14733;:26;;;;:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;2139:214:2;2269:56;;;-1:-1:-1;;;2269:56:2;;2253:4;2269:56;;;;;;-1:-1:-1;;;;;;2269:56:2;;;;;;-1:-1:-1;;2269:56:2;;;;;;;;:22;;;;:56;;;;;2253:4;;2269:56;;;;;;;:22;:56;;;5:2:-1;;;;30:1;27;20:12;5:2;2269:56:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;2342:4:2;;2139:214;-1:-1:-1;;;;;;2139:214:2:o;4240:306::-;4424:4;4440;:27;;;;4468:10;4480:12;4494:6;4502:15;4440:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4440:78:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4440:78:2;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4440:78:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4440:78:2;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4440:78:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4440:78:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;4535:4:2;;4240:306;-1:-1:-1;;;;;;;;4240:306:2:o;4774:123::-;4824:4;4840;:27;;;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;14982:141:2;15041:4;15057;:36;;;;:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;13667:115:2;13713:4;13729;:23;;;;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;3407:237:2;3562:75;;;-1:-1:-1;;;3562:75:2;;3539:4;3562:75;;;;;;-1:-1:-1;;;;;;3562:75:2;;;;;;;;;;;;;;;:26;;;;:75;;;;;;;;;;;;;;:26;:75;;;5:2:-1;;;;30:1;27;20:12;5:2;3562:75:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3562:75:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3562:75:2;;3407:237;-1:-1:-1;;;3407:237:2:o;8782:651::-;9124:4;9140;:32;;;;9186:10;9210:14;9238:15;9267:11;9292:19;9325:12;9351:15;9380;9140:265;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;9140:265:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;9140:265:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9140:265:2;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;9140:265:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9140:265:2;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;9140:265:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9140:265:2;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;9140:265:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9140:265:2;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;9140:265:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9140:265:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9140:265:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9422:4:2;;8782:651;-1:-1:-1;;;;;;;;;;8782:651:2:o;14308:151::-;14372:4;14388;:41;;;;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;12703:302:2;12885:4;12901;:25;;;;12927:10;12939:12;12953:6;12961:15;12901:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;7496:129:2;7549:4;7565;:30;;;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;2750:203:2;2882:43;;;-1:-1:-1;;;2882:43:2;;2866:4;2882:43;;;;;;;;;;;;;;;;;;;;;;;;;;;:31;;;;:43;;;;;2866:4;;2882:43;;;;;;;:31;:43;;;5:2:-1;;;;30:1;27;20:12;5:2;2882:43:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;2942:4:2;;2750:203;-1:-1:-1;;;;;;;2750:203:2:o;11843:284::-;12018:4;12034;:27;;;;12062:2;12066;12070;12074:13;12089:9;12034:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;1373:370:2;1555:4;1571:29;;-1:-1:-1;;;;;1571:29:2;;;-1:-1:-1;;;;;;1571:29:2;;;;;;;1610:27;;;;;;;;;;;1647:15;:29;;;;;;;;;;;;1686;;;-1:-1:-1;;;1686:29:2;;;;;;;;;;;;;;;;;;;;;;:21;;;;:29;;;;;;;;;;;;;;:21;:29;;;5:2:-1;;;;30:1;27;20:12;5:2;1686:29:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1686:29:2;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;5536:127:2;5588:4;5604;:29;;;;:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5886:119:2;5934:4;5950;:25;;;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;10617:641:2;10954:4;10970;:27;;;;11011:10;11035:14;11063:15;11092:11;11117:19;11150:12;11176:15;11205;10970:260;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;", - "source": "pragma solidity ^0.5.10;\n\nimport {DepositLiquidation} from \"./DepositLiquidation.sol\";\nimport {DepositUtils} from \"./DepositUtils.sol\";\nimport {DepositFunding} from \"./DepositFunding.sol\";\nimport {DepositRedemption} from \"./DepositRedemption.sol\";\n\ncontract Deposit {\n\n using DepositRedemption for DepositUtils.Deposit;\n using DepositFunding for DepositUtils.Deposit;\n using DepositLiquidation for DepositUtils.Deposit;\n using DepositUtils for DepositUtils.Deposit;\n\n DepositUtils.Deposit self;\n\n // We separate the constructor from createNewDeposit to make proxy factories easier\n /* solium-disable-next-line no-empty-blocks */\n constructor () public {}\n\n function () external payable {}\n\n /// @notice Get the integer representing the current state\n /// @dev We implement this because contracts don't handle foreign enums well\n /// @return The 0-indexed state from the DepositStates enum\n function getCurrentState() public view returns (uint256) {\n return uint256(self.currentState);\n }\n\n // THIS IS THE INIT FUNCTION\n /// @notice The system can spin up a new deposit\n /// @dev This should be called by an approved contract, not a developer\n /// @param _m m for m-of-n\n /// @param _m n for m-of-n\n /// @return True if successful, otherwise revert\n function createNewDeposit(\n address _TBTCSystem,\n address _TBTCToken,\n address _KeepBridge,\n uint256 _m,\n uint256 _n\n ) public payable returns (bool) {\n self.TBTCSystem = _TBTCSystem;\n self.TBTCToken = _TBTCToken;\n self.KeepBridge = _KeepBridge;\n self.createNewDeposit(_m, _n);\n return true;\n }\n\n /// @notice Anyone can request redemption\n /// @dev The redeemer specifies details about the Bitcoin redemption tx\n /// @param _outputValueBytes The 8-byte LE output size\n /// @param _requesterPKH The 20-byte Bitcoin pubkeyhash to which to send funds\n /// @return True if successful, otherwise revert\n function requestRedemption(\n bytes8 _outputValueBytes,\n bytes20 _requesterPKH\n ) public returns (bool) {\n self.requestRedemption(_outputValueBytes, _requesterPKH);\n return true;\n }\n\n /// @notice Anyone may provide a withdrawal signature if it was requested\n /// @dev The signers will be penalized if this (or provideRedemptionProof) is not called\n /// @param _v Signature recovery value\n /// @param _r Signature R value\n /// @param _s Signature S value\n /// @return True if successful, False if prevented by timeout, otherwise revert\n function provideRedemptionSignature(\n uint8 _v,\n bytes32 _r,\n bytes32 _s\n ) public returns (bool) {\n self.provideRedemptionSignature(_v, _r, _s);\n return true;\n }\n\n /// @notice Anyone may notify the contract that a fee bump is needed\n /// @dev This sends us back to AWAITING_WITHDRAWAL_SIGNATURE\n /// @param _previousOutputValueBytes The previous output's value\n /// @param _newOutputValueBytes The new output's value\n /// @return True if successful, False if prevented by timeout, otherwise revert\n function increaseRedemptionFee(\n bytes8 _previousOutputValueBytes,\n bytes8 _newOutputValueBytes\n ) public returns (bool) {\n return self.increaseRedemptionFee(_previousOutputValueBytes, _newOutputValueBytes);\n }\n\n /// @notice Anyone may provide a withdrawal proof to prove redemption\n /// @dev The signers will be penalized if this is not called\n /// @param _bitcoinTx The bitcoin tx that purportedly contain the redemption output\n /// @param _merkleProof The merkle proof of inclusion of the tx in the bitcoin block\n /// @param _index The index of the tx in the Bitcoin block (1-indexed)\n /// @param _bitcoinHeaders An array of tightly-packed bitcoin headers\n /// @return True if successful, otherwise revert\n function provideRedemptionProof(\n bytes memory _bitcoinTx,\n bytes memory _merkleProof,\n uint256 _index,\n bytes memory _bitcoinHeaders\n ) public returns (bool) {\n self.provideRedemptionProof(_bitcoinTx, _merkleProof, _index, _bitcoinHeaders);\n return true;\n }\n\n /// @notice Anyone may notify the contract that the signers have failed to produce a signature\n /// @dev This is considered fraud, and is punished\n /// @return True if successful, otherwise revert\n function notifySignatureTimeout() public returns (bool) {\n self.notifySignatureTimeout();\n return true;\n }\n\n /// @notice Anyone may notify the contract that the signers have failed to produce a redemption proof\n /// @dev This is considered fraud, and is punished\n /// @return True if successful, otherwise revert\n function notifyRedemptionProofTimeout() public returns (bool) {\n self.notifyRedemptionProofTimeout();\n return true;\n }\n\n //\n // FUNDING FLOW\n //\n\n /// @notice Anyone may notify the contract that signing group setup has timed out\n /// @dev We rely on the keep system punishes the signers in this case\n /// @return True if successful, otherwise revert\n function notifySignerSetupFailure() public returns (bool) {\n self.notifySignerSetupFailure();\n return true;\n }\n\n /// @notice we poll the Keep contract to retrieve our pubkey\n /// @dev We store the pubkey as 2 bytestrings, X and Y.\n /// @return True if successful, otherwise revert\n function retrieveSignerPubkey() public returns (bool) {\n self.retrieveSignerPubkey();\n return true;\n }\n\n /// @notice Anyone may notify the contract that the funder has failed to send BTC\n /// @dev This is considered a funder fault, and we revoke their bond\n /// @return True if successful, otherwise revert\n function notifyFundingTimeout() public returns (bool) {\n self.notifyFundingTimeout();\n return true;\n }\n\n /// @notice Anyone can provide a signature that was not requested to prove fraud during funding\n /// @dev ECDSA is NOT SECURE unless you verify the digest\n /// @param _v Signature recovery value\n /// @param _r Signature R value\n /// @param _s Signature S value\n /// @param _signedDigest The digest signed by the signature vrs tuple\n /// @param _preimage The sha256 preimage of the digest\n /// @return True if successful, otherwise revert\n function provideFundingECDSAFraudProof(\n uint8 _v,\n bytes32 _r,\n bytes32 _s,\n bytes32 _signedDigest,\n bytes memory _preimage\n ) public returns (bool) {\n self.provideFundingECDSAFraudProof(_v, _r, _s, _signedDigest, _preimage);\n return true;\n }\n\n /// @notice Anyone may notify the contract no funding proof was submitted during funding fraud\n /// @dev This is not a funder fault. The signers have faulted, so the funder shouldn't fund\n /// @return True if successful, otherwise revert\n function notifyFraudFundingTimeout() public returns (bool) {\n self.notifyFraudFundingTimeout();\n return true;\n }\n\n /// @notice Anyone may notify the deposit of a funding proof during funding fraud\n // We reward the funder the entire bond if this occurs\n /// @dev Takes a pre-parsed transaction and calculates values needed to verify funding\n /// @param _txVersion Transaction version number (4-byte LE)\n /// @param _txInputVector All transaction inputs prepended by the number of inputs encoded as a VarInt, max 0xFC(252) inputs\n /// @param _txOutputVector All transaction outputs prepended by the number of outputs encoded as a VarInt, max 0xFC(252) outputs\n /// @param _txLocktime Final 4 bytes of the transaction\n /// @param _fundingOutputIndex Index of funding output in _txOutputVector (0-indexed)\n /// @param _merkleProof The merkle proof of transaction inclusion in a block\n /// @param _txIndexInBlock Transaction index in the block (1-indexed)\n /// @param _bitcoinHeaders Single bytestring of 80-byte bitcoin headers, lowest height first\n /// @return True if no errors are thrown\n function provideFraudBTCFundingProof(\n bytes memory _txVersion,\n bytes memory _txInputVector,\n bytes memory _txOutputVector,\n bytes memory _txLocktime,\n uint8 _fundingOutputIndex,\n bytes memory _merkleProof,\n uint256 _txIndexInBlock,\n bytes memory _bitcoinHeaders\n ) public returns (bool) {\n self.provideFraudBTCFundingProof(\n _txVersion,\n _txInputVector,\n _txOutputVector,\n _txLocktime,\n _fundingOutputIndex,\n _merkleProof,\n _txIndexInBlock,\n _bitcoinHeaders\n );\n return true;\n }\n\n /// @notice Anyone may notify the deposit of a funding proof to activate the deposit\n /// This is the happy-path of the funding flow. It means that we have succeeded\n /// @dev Takes a pre-parsed transaction and calculates values needed to verify funding\n /// @param _txVersion Transaction version number (4-byte LE)\n /// @param _txInputVector All transaction inputs prepended by the number of inputs encoded as a VarInt, max 0xFC(252) inputs\n /// @param _txOutputVector All transaction outputs prepended by the number of outputs encoded as a VarInt, max 0xFC(252) outputs\n /// @param _txLocktime Final 4 bytes of the transaction\n /// @param _fundingOutputIndex Index of funding output in _txOutputVector (0-indexed)\n /// @param _merkleProof The merkle proof of transaction inclusion in a block\n /// @param _txIndexInBlock Transaction index in the block (1-indexed)\n /// @param _bitcoinHeaders Single bytestring of 80-byte bitcoin headers, lowest height first\n /// @return True if no errors are thrown\n function provideBTCFundingProof(\n bytes memory _txVersion,\n bytes memory _txInputVector,\n bytes memory _txOutputVector,\n bytes memory _txLocktime,\n uint8 _fundingOutputIndex,\n bytes memory _merkleProof,\n uint256 _txIndexInBlock,\n bytes memory _bitcoinHeaders\n ) public returns (bool) {\n self.provideBTCFundingProof(\n _txVersion,\n _txInputVector,\n _txOutputVector,\n _txLocktime,\n _fundingOutputIndex,\n _merkleProof,\n _txIndexInBlock,\n _bitcoinHeaders\n );\n return true;\n }\n\n //\n // FRAUD\n //\n\n /// @notice Anyone can provide a signature that was not requested to prove fraud\n /// @dev ECDSA is NOT SECURE unless you verify the digest\n /// @param _v Signature recovery value\n /// @param _r Signature R value\n /// @param _s Signature S value\n /// @param _signedDigest The digest signed by the signature vrs tuple\n /// @param _preimage The sha256 preimage of the digest\n /// @return True if successful, otherwise revert\n function provideECDSAFraudProof(\n uint8 _v,\n bytes32 _r,\n bytes32 _s,\n bytes32 _signedDigest,\n bytes memory _preimage\n ) public returns (bool) {\n self.provideECDSAFraudProof(_v, _r, _s, _signedDigest, _preimage);\n return true;\n }\n\n /// @notice Anyone may notify the deposit of fraud via an SPV proof\n /// @dev We strong prefer ECDSA fraud proofs\n /// @param _bitcoinTx The bitcoin tx that purportedly contains the funding output\n /// @param _merkleProof The merkle proof of inclusion of the tx in the bitcoin block\n /// @param _index The index of the tx in the Bitcoin block (1-indexed)\n /// @param _bitcoinHeaders An array of tightly-packed bitcoin headers\n /// @return True if successful, otherwise revert\n function provideSPVFraudProof(\n bytes memory _bitcoinTx,\n bytes memory _merkleProof,\n uint256 _index,\n bytes memory _bitcoinHeaders\n ) public returns (bool) {\n self.provideSPVFraudProof(_bitcoinTx, _merkleProof, _index, _bitcoinHeaders);\n return true;\n }\n\n ///\n /// LIQUIDATION\n ///\n\n /// @notice Closes an auction and purchases the signer bonds. Payout to buyer, funder, then signers if not fraud\n /// @dev For interface, reading auctionValue will give a past value. the current is better\n /// @return True if successful, revert otherwise\n function purchaseSignerBondsAtAuction() public returns (bool) {\n self.purchaseSignerBondsAtAuction();\n return true;\n }\n\n /// @notice Notify the contract that the signers are undercollateralized\n /// @dev Calls out to the system for oracle info\n /// @return True if successful, otherwise revert\n function notifyCourtesyCall() public returns (bool) {\n self.notifyCourtesyCall();\n return true;\n }\n\n /// @notice Goes from courtesy call to active\n /// @dev Only callable if collateral is sufficient and the deposit is not expiring\n /// @return True if successful, otherwise revert\n function exitCourtesyCall() public returns (bool) {\n self.exitCourtesyCall();\n return true;\n }\n\n /// @notice Notify the contract that the signers are undercollateralized\n /// @dev Calls out to the system for oracle info\n /// @return True if successful, otherwise revert\n function notifyUndercollateralizedLiquidation() public returns (bool) {\n self.notifyUndercollateralizedLiquidation();\n return true;\n }\n\n /// @notice Notifies the contract that the courtesy period has elapsed\n /// @dev This is treated as an abort, rather than fraud\n /// @return True if successful, otherwise revert\n function notifyCourtesyTimeout() public returns (bool) {\n self.notifyCourtesyTimeout();\n return true;\n }\n\n /// @notice Notifies the contract that its term limit has been reached\n /// @dev This initiates a courtesy call\n /// @return True if successful, otherwise revert\n function notifyDepositExpiryCourtesyCall() public returns (bool) {\n self.notifyDepositExpiryCourtesyCall();\n return true;\n }\n}\n", - "sourcePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/Deposit.sol", - "ast": { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/Deposit.sol", - "exportedSymbols": { - "Deposit": [ - 965 - ] - }, - "id": 966, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 487, - "literals": [ - "solidity", - "^", - "0.5", - ".10" - ], - "nodeType": "PragmaDirective", - "src": "0:24:2" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/DepositLiquidation.sol", - "file": "./DepositLiquidation.sol", - "id": 489, - "nodeType": "ImportDirective", - "scope": 966, - "sourceUnit": 2636, - "src": "26:60:2", - "symbolAliases": [ - { - "foreign": 488, - "local": null - } - ], - "unitAlias": "" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/DepositUtils.sol", - "file": "./DepositUtils.sol", - "id": 491, - "nodeType": "ImportDirective", - "scope": 966, - "sourceUnit": 4996, - "src": "87:48:2", - "symbolAliases": [ - { - "foreign": 490, - "local": null - } - ], - "unitAlias": "" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/DepositFunding.sol", - "file": "./DepositFunding.sol", - "id": 493, - "nodeType": "ImportDirective", - "scope": 966, - "sourceUnit": 1799, - "src": "136:52:2", - "symbolAliases": [ - { - "foreign": 492, - "local": null - } - ], - "unitAlias": "" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/DepositRedemption.sol", - "file": "./DepositRedemption.sol", - "id": 495, - "nodeType": "ImportDirective", - "scope": 966, - "sourceUnit": 3401, - "src": "189:58:2", - "symbolAliases": [ - { - "foreign": 494, - "local": null - } - ], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 965, - "linearizedBaseContracts": [ - 965 - ], - "name": "Deposit", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 498, - "libraryName": { - "contractScope": null, - "id": 496, - "name": "DepositRedemption", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3400, - "src": "279:17:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_DepositRedemption_$3400", - "typeString": "library DepositRedemption" - } - }, - "nodeType": "UsingForDirective", - "src": "273:49:2", - "typeName": { - "contractScope": null, - "id": 497, - "name": "DepositUtils.Deposit", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4035, - "src": "301:20:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage_ptr", - "typeString": "struct DepositUtils.Deposit" - } - } - }, - { - "id": 501, - "libraryName": { - "contractScope": null, - "id": 499, - "name": "DepositFunding", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1798, - "src": "333:14:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_DepositFunding_$1798", - "typeString": "library DepositFunding" - } - }, - "nodeType": "UsingForDirective", - "src": "327:46:2", - "typeName": { - "contractScope": null, - "id": 500, - "name": "DepositUtils.Deposit", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4035, - "src": "352:20:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage_ptr", - "typeString": "struct DepositUtils.Deposit" - } - } - }, - { - "id": 504, - "libraryName": { - "contractScope": null, - "id": 502, - "name": "DepositLiquidation", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2635, - "src": "384:18:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_DepositLiquidation_$2635", - "typeString": "library DepositLiquidation" - } - }, - "nodeType": "UsingForDirective", - "src": "378:50:2", - "typeName": { - "contractScope": null, - "id": 503, - "name": "DepositUtils.Deposit", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4035, - "src": "407:20:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage_ptr", - "typeString": "struct DepositUtils.Deposit" - } - } - }, - { - "id": 507, - "libraryName": { - "contractScope": null, - "id": 505, - "name": "DepositUtils", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4995, - "src": "439:12:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_DepositUtils_$4995", - "typeString": "library DepositUtils" - } - }, - "nodeType": "UsingForDirective", - "src": "433:44:2", - "typeName": { - "contractScope": null, - "id": 506, - "name": "DepositUtils.Deposit", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4035, - "src": "456:20:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage_ptr", - "typeString": "struct DepositUtils.Deposit" - } - } - }, - { - "constant": false, - "id": 509, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 965, - "src": "483:25:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit" - }, - "typeName": { - "contractScope": null, - "id": 508, - "name": "DepositUtils.Deposit", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4035, - "src": "483:20:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage_ptr", - "typeString": "struct DepositUtils.Deposit" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": { - "id": 512, - "nodeType": "Block", - "src": "676:2:2", - "statements": [] - }, - "documentation": null, - "id": 513, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 510, - "nodeType": "ParameterList", - "parameters": [], - "src": "666:2:2" - }, - "returnParameters": { - "id": 511, - "nodeType": "ParameterList", - "parameters": [], - "src": "676:0:2" - }, - "scope": 965, - "src": "654:24:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 516, - "nodeType": "Block", - "src": "713:2:2", - "statements": [] - }, - "documentation": null, - "id": 517, - "implemented": true, - "kind": "fallback", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 514, - "nodeType": "ParameterList", - "parameters": [], - "src": "693:2:2" - }, - "returnParameters": { - "id": 515, - "nodeType": "ParameterList", - "parameters": [], - "src": "713:0:2" - }, - "scope": 965, - "src": "684:31:2", - "stateMutability": "payable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 527, - "nodeType": "Block", - "src": "1001:50:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 523, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "1026:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 524, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "currentState", - "nodeType": "MemberAccess", - "referencedDeclaration": 4004, - "src": "1026:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 522, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1018:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 525, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1018:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 521, - "id": 526, - "nodeType": "Return", - "src": "1011:33:2" - } - ] - }, - "documentation": "@notice Get the integer representing the current state\n @dev We implement this because contracts don't handle foreign enums well\n @return The 0-indexed state from the DepositStates enum", - "id": 528, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getCurrentState", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 518, - "nodeType": "ParameterList", - "parameters": [], - "src": "968:2:2" - }, - "returnParameters": { - "id": 521, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 520, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 528, - "src": "992:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 519, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "992:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "991:9:2" - }, - "scope": 965, - "src": "944:107:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 570, - "nodeType": "Block", - "src": "1561:182:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 543, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "1571:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 545, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "TBTCSystem", - "nodeType": "MemberAccess", - "referencedDeclaration": 3998, - "src": "1571:15:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 546, - "name": "_TBTCSystem", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 530, - "src": "1589:11:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1571:29:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 548, - "nodeType": "ExpressionStatement", - "src": "1571:29:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 553, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 549, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "1610:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 551, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "TBTCToken", - "nodeType": "MemberAccess", - "referencedDeclaration": 4000, - "src": "1610:14:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 552, - "name": "_TBTCToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 532, - "src": "1627:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1610:27:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 554, - "nodeType": "ExpressionStatement", - "src": "1610:27:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 555, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "1647:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 557, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "KeepBridge", - "nodeType": "MemberAccess", - "referencedDeclaration": 4002, - "src": "1647:15:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 558, - "name": "_KeepBridge", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 534, - "src": "1665:11:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1647:29:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 560, - "nodeType": "ExpressionStatement", - "src": "1647:29:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 564, - "name": "_m", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 536, - "src": "1708:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 565, - "name": "_n", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 538, - "src": "1712:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 561, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "1686:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 563, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "createNewDeposit", - "nodeType": "MemberAccess", - "referencedDeclaration": 1162, - "src": "1686:21:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,uint256,uint256) returns (bool)" - } - }, - "id": 566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1686:29:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 567, - "nodeType": "ExpressionStatement", - "src": "1686:29:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 568, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1732:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 542, - "id": 569, - "nodeType": "Return", - "src": "1725:11:2" - } - ] - }, - "documentation": "@notice The system can spin up a new deposit\n @dev This should be called by an approved contract, not a developer\n @param _m m for m-of-n\n @param _m n for m-of-n\n @return True if successful, otherwise revert", - "id": 571, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "createNewDeposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 539, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 530, - "name": "_TBTCSystem", - "nodeType": "VariableDeclaration", - "scope": 571, - "src": "1408:19:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 529, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1408:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 532, - "name": "_TBTCToken", - "nodeType": "VariableDeclaration", - "scope": 571, - "src": "1437:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 531, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1437:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 534, - "name": "_KeepBridge", - "nodeType": "VariableDeclaration", - "scope": 571, - "src": "1465:19:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 533, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1465:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 536, - "name": "_m", - "nodeType": "VariableDeclaration", - "scope": 571, - "src": "1494:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 535, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1494:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 538, - "name": "_n", - "nodeType": "VariableDeclaration", - "scope": 571, - "src": "1514:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 537, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1514:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1398:132:2" - }, - "returnParameters": { - "id": 542, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 541, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 571, - "src": "1555:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 540, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1555:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1554:6:2" - }, - "scope": 965, - "src": "1373:370:2", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 589, - "nodeType": "Block", - "src": "2259:94:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 583, - "name": "_outputValueBytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 573, - "src": "2292:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - } - }, - { - "argumentTypes": null, - "id": 584, - "name": "_requesterPKH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 575, - "src": "2311:13:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes20", - "typeString": "bytes20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - }, - { - "typeIdentifier": "t_bytes20", - "typeString": "bytes20" - } - ], - "expression": { - "argumentTypes": null, - "id": 580, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "2269:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 582, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "requestRedemption", - "nodeType": "MemberAccess", - "referencedDeclaration": 2947, - "src": "2269:22:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_bytes8_$_t_bytes20_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,bytes8,bytes20)" - } - }, - "id": 585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2269:56:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 586, - "nodeType": "ExpressionStatement", - "src": "2269:56:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 587, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2342:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 579, - "id": 588, - "nodeType": "Return", - "src": "2335:11:2" - } - ] - }, - "documentation": "@notice Anyone can request redemption\n @dev The redeemer specifies details about the Bitcoin redemption tx\n @param _outputValueBytes The 8-byte LE output size\n @param _requesterPKH The 20-byte Bitcoin pubkeyhash to which to send funds\n @return True if successful, otherwise revert", - "id": 590, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "requestRedemption", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 576, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 573, - "name": "_outputValueBytes", - "nodeType": "VariableDeclaration", - "scope": 590, - "src": "2175:24:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - }, - "typeName": { - "id": 572, - "name": "bytes8", - "nodeType": "ElementaryTypeName", - "src": "2175:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 575, - "name": "_requesterPKH", - "nodeType": "VariableDeclaration", - "scope": 590, - "src": "2209:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes20", - "typeString": "bytes20" - }, - "typeName": { - "id": 574, - "name": "bytes20", - "nodeType": "ElementaryTypeName", - "src": "2209:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes20", - "typeString": "bytes20" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2165:71:2" - }, - "returnParameters": { - "id": 579, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 578, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 590, - "src": "2253:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 577, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2253:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2252:6:2" - }, - "scope": 965, - "src": "2139:214:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 611, - "nodeType": "Block", - "src": "2872:81:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 604, - "name": "_v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 592, - "src": "2914:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 605, - "name": "_r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 594, - "src": "2918:2:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 606, - "name": "_s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "2922:2:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 601, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "2882:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 603, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "provideRedemptionSignature", - "nodeType": "MemberAccess", - "referencedDeclaration": 2994, - "src": "2882:31:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,uint8,bytes32,bytes32)" - } - }, - "id": 607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2882:43:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 608, - "nodeType": "ExpressionStatement", - "src": "2882:43:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 609, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2942:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 600, - "id": 610, - "nodeType": "Return", - "src": "2935:11:2" - } - ] - }, - "documentation": "@notice Anyone may provide a withdrawal signature if it was requested\n @dev The signers will be penalized if this (or provideRedemptionProof) is not called\n @param _v Signature recovery value\n @param _r Signature R value\n @param _s Signature S value\n @return True if successful, False if prevented by timeout, otherwise revert", - "id": 612, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "provideRedemptionSignature", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 597, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 592, - "name": "_v", - "nodeType": "VariableDeclaration", - "scope": 612, - "src": "2795:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 591, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "2795:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 594, - "name": "_r", - "nodeType": "VariableDeclaration", - "scope": 612, - "src": "2813:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 593, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2813:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 596, - "name": "_s", - "nodeType": "VariableDeclaration", - "scope": 612, - "src": "2833:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 595, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2833:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2785:64:2" - }, - "returnParameters": { - "id": 600, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 599, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 612, - "src": "2866:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 598, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2866:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2865:6:2" - }, - "scope": 965, - "src": "2750:203:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 627, - "nodeType": "Block", - "src": "3545:99:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 623, - "name": "_previousOutputValueBytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 614, - "src": "3589:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - } - }, - { - "argumentTypes": null, - "id": 624, - "name": "_newOutputValueBytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 616, - "src": "3616:20:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - }, - { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - } - ], - "expression": { - "argumentTypes": null, - "id": 621, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "3562:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 622, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "increaseRedemptionFee", - "nodeType": "MemberAccess", - "referencedDeclaration": 3097, - "src": "3562:26:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_bytes8_$_t_bytes8_$returns$_t_bool_$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,bytes8,bytes8) returns (bool)" - } - }, - "id": 625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3562:75:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 620, - "id": 626, - "nodeType": "Return", - "src": "3555:82:2" - } - ] - }, - "documentation": "@notice Anyone may notify the contract that a fee bump is needed\n @dev This sends us back to AWAITING_WITHDRAWAL_SIGNATURE\n @param _previousOutputValueBytes The previous output's value\n @param _newOutputValueBytes The new output's value\n @return True if successful, False if prevented by timeout, otherwise revert", - "id": 628, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "increaseRedemptionFee", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 617, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 614, - "name": "_previousOutputValueBytes", - "nodeType": "VariableDeclaration", - "scope": 628, - "src": "3447:32:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - }, - "typeName": { - "id": 613, - "name": "bytes8", - "nodeType": "ElementaryTypeName", - "src": "3447:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 616, - "name": "_newOutputValueBytes", - "nodeType": "VariableDeclaration", - "scope": 628, - "src": "3489:27:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - }, - "typeName": { - "id": 615, - "name": "bytes8", - "nodeType": "ElementaryTypeName", - "src": "3489:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3437:85:2" - }, - "returnParameters": { - "id": 620, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 619, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 628, - "src": "3539:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 618, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3539:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3538:6:2" - }, - "scope": 965, - "src": "3407:237:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 652, - "nodeType": "Block", - "src": "4430:116:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 644, - "name": "_bitcoinTx", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 630, - "src": "4468:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 645, - "name": "_merkleProof", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 632, - "src": "4480:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 646, - "name": "_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 634, - "src": "4494:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 647, - "name": "_bitcoinHeaders", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 636, - "src": "4502:15:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 641, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "4440:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 643, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "provideRedemptionProof", - "nodeType": "MemberAccess", - "referencedDeclaration": 3247, - "src": "4440:27:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,bytes memory,bytes memory,uint256,bytes memory)" - } - }, - "id": 648, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4440:78:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 649, - "nodeType": "ExpressionStatement", - "src": "4440:78:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 650, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4535:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 640, - "id": 651, - "nodeType": "Return", - "src": "4528:11:2" - } - ] - }, - "documentation": "@notice Anyone may provide a withdrawal proof to prove redemption\n @dev The signers will be penalized if this is not called\n @param _bitcoinTx The bitcoin tx that purportedly contain the redemption output\n @param _merkleProof The merkle proof of inclusion of the tx in the bitcoin block\n @param _index The index of the tx in the Bitcoin block (1-indexed)\n @param _bitcoinHeaders An array of tightly-packed bitcoin headers\n @return True if successful, otherwise revert", - "id": 653, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "provideRedemptionProof", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 637, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 630, - "name": "_bitcoinTx", - "nodeType": "VariableDeclaration", - "scope": 653, - "src": "4281:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 629, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4281:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 632, - "name": "_merkleProof", - "nodeType": "VariableDeclaration", - "scope": 653, - "src": "4314:25:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 631, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4314:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 634, - "name": "_index", - "nodeType": "VariableDeclaration", - "scope": 653, - "src": "4349:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 633, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4349:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 636, - "name": "_bitcoinHeaders", - "nodeType": "VariableDeclaration", - "scope": 653, - "src": "4373:28:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 635, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4373:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4271:136:2" - }, - "returnParameters": { - "id": 640, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 639, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 653, - "src": "4424:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 638, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4424:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4423:6:2" - }, - "scope": 965, - "src": "4240:306:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 665, - "nodeType": "Block", - "src": "4830:67:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 658, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "4840:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 660, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "notifySignatureTimeout", - "nodeType": "MemberAccess", - "referencedDeclaration": 3368, - "src": "4840:27:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4840:29:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 662, - "nodeType": "ExpressionStatement", - "src": "4840:29:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4886:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 657, - "id": 664, - "nodeType": "Return", - "src": "4879:11:2" - } - ] - }, - "documentation": "@notice Anyone may notify the contract that the signers have failed to produce a signature\n @dev This is considered fraud, and is punished\n @return True if successful, otherwise revert", - "id": 666, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "notifySignatureTimeout", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 654, - "nodeType": "ParameterList", - "parameters": [], - "src": "4805:2:2" - }, - "returnParameters": { - "id": 657, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 656, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 666, - "src": "4824:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 655, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4824:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4823:6:2" - }, - "scope": 965, - "src": "4774:123:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 678, - "nodeType": "Block", - "src": "5194:73:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 671, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "5204:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 673, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "notifyRedemptionProofTimeout", - "nodeType": "MemberAccess", - "referencedDeclaration": 3399, - "src": "5204:33:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5204:35:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 675, - "nodeType": "ExpressionStatement", - "src": "5204:35:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5256:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 670, - "id": 677, - "nodeType": "Return", - "src": "5249:11:2" - } - ] - }, - "documentation": "@notice Anyone may notify the contract that the signers have failed to produce a redemption proof\n @dev This is considered fraud, and is punished\n @return True if successful, otherwise revert", - "id": 679, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "notifyRedemptionProofTimeout", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 667, - "nodeType": "ParameterList", - "parameters": [], - "src": "5169:2:2" - }, - "returnParameters": { - "id": 670, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 669, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 679, - "src": "5188:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 668, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5188:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5187:6:2" - }, - "scope": 965, - "src": "5132:135:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 691, - "nodeType": "Block", - "src": "5594:69:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 684, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "5604:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 686, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "notifySignerSetupFailure", - "nodeType": "MemberAccess", - "referencedDeclaration": 1350, - "src": "5604:29:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 687, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5604:31:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 688, - "nodeType": "ExpressionStatement", - "src": "5604:31:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 689, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5652:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 683, - "id": 690, - "nodeType": "Return", - "src": "5645:11:2" - } - ] - }, - "documentation": "@notice Anyone may notify the contract that signing group setup has timed out\n @dev We rely on the keep system punishes the signers in this case\n @return True if successful, otherwise revert", - "id": 692, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "notifySignerSetupFailure", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 680, - "nodeType": "ParameterList", - "parameters": [], - "src": "5569:2:2" - }, - "returnParameters": { - "id": 683, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 682, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 692, - "src": "5588:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 681, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5588:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5587:6:2" - }, - "scope": 965, - "src": "5536:127:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 704, - "nodeType": "Block", - "src": "5940:65:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 697, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "5950:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 699, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "retrieveSignerPubkey", - "nodeType": "MemberAccess", - "referencedDeclaration": 1431, - "src": "5950:25:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5950:27:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 701, - "nodeType": "ExpressionStatement", - "src": "5950:27:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 702, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5994:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 696, - "id": 703, - "nodeType": "Return", - "src": "5987:11:2" - } - ] - }, - "documentation": "@notice we poll the Keep contract to retrieve our pubkey\n @dev We store the pubkey as 2 bytestrings, X and Y.\n @return True if successful, otherwise revert", - "id": 705, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "retrieveSignerPubkey", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 693, - "nodeType": "ParameterList", - "parameters": [], - "src": "5915:2:2" - }, - "returnParameters": { - "id": 696, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 695, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 705, - "src": "5934:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 694, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5934:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5933:6:2" - }, - "scope": 965, - "src": "5886:119:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 717, - "nodeType": "Block", - "src": "6292:65:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 710, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "6302:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 712, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "notifyFundingTimeout", - "nodeType": "MemberAccess", - "referencedDeclaration": 1475, - "src": "6302:25:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6302:27:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 714, - "nodeType": "ExpressionStatement", - "src": "6302:27:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 715, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6346:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 709, - "id": 716, - "nodeType": "Return", - "src": "6339:11:2" - } - ] - }, - "documentation": "@notice Anyone may notify the contract that the funder has failed to send BTC\n @dev This is considered a funder fault, and we revoke their bond\n @return True if successful, otherwise revert", - "id": 718, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "notifyFundingTimeout", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 706, - "nodeType": "ParameterList", - "parameters": [], - "src": "6267:2:2" - }, - "returnParameters": { - "id": 709, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 708, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 718, - "src": "6286:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 707, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6286:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6285:6:2" - }, - "scope": 965, - "src": "6238:119:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 745, - "nodeType": "Block", - "src": "7117:110:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 736, - "name": "_v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 720, - "src": "7162:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 737, - "name": "_r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 722, - "src": "7166:2:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 738, - "name": "_s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 724, - "src": "7170:2:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 739, - "name": "_signedDigest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 726, - "src": "7174:13:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 740, - "name": "_preimage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 728, - "src": "7189:9:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 733, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "7127:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 735, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "provideFundingECDSAFraudProof", - "nodeType": "MemberAccess", - "referencedDeclaration": 1567, - "src": "7127:34:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_uint8_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,uint8,bytes32,bytes32,bytes32,bytes memory)" - } - }, - "id": 741, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7127:72:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 742, - "nodeType": "ExpressionStatement", - "src": "7127:72:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7216:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 732, - "id": 744, - "nodeType": "Return", - "src": "7209:11:2" - } - ] - }, - "documentation": "@notice Anyone can provide a signature that was not requested to prove fraud during funding\n @dev ECDSA is NOT SECURE unless you verify the digest\n @param _v Signature recovery value\n @param _r Signature R value\n @param _s Signature S value\n @param _signedDigest The digest signed by the signature vrs tuple\n @param _preimage The sha256 preimage of the digest\n @return True if successful, otherwise revert", - "id": 746, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "provideFundingECDSAFraudProof", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 729, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 720, - "name": "_v", - "nodeType": "VariableDeclaration", - "scope": 746, - "src": "6977:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 719, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "6977:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 722, - "name": "_r", - "nodeType": "VariableDeclaration", - "scope": 746, - "src": "6995:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 721, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6995:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 724, - "name": "_s", - "nodeType": "VariableDeclaration", - "scope": 746, - "src": "7015:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 723, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7015:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 726, - "name": "_signedDigest", - "nodeType": "VariableDeclaration", - "scope": 746, - "src": "7035:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 725, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7035:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 728, - "name": "_preimage", - "nodeType": "VariableDeclaration", - "scope": 746, - "src": "7066:22:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 727, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "7066:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6967:127:2" - }, - "returnParameters": { - "id": 732, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 731, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 746, - "src": "7111:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 730, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7111:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7110:6:2" - }, - "scope": 965, - "src": "6929:298:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 758, - "nodeType": "Block", - "src": "7555:70:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 751, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "7565:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 753, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "notifyFraudFundingTimeout", - "nodeType": "MemberAccess", - "referencedDeclaration": 1611, - "src": "7565:30:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7565:32:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 755, - "nodeType": "ExpressionStatement", - "src": "7565:32:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 756, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7614:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 750, - "id": 757, - "nodeType": "Return", - "src": "7607:11:2" - } - ] - }, - "documentation": "@notice Anyone may notify the contract no funding proof was submitted during funding fraud\n @dev This is not a funder fault. The signers have faulted, so the funder shouldn't fund\n @return True if successful, otherwise revert", - "id": 759, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "notifyFraudFundingTimeout", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 747, - "nodeType": "ParameterList", - "parameters": [], - "src": "7530:2:2" - }, - "returnParameters": { - "id": 750, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 749, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 759, - "src": "7549:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 748, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7549:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7548:6:2" - }, - "scope": 965, - "src": "7496:129:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 795, - "nodeType": "Block", - "src": "9130:303:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 783, - "name": "_txVersion", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "9186:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 784, - "name": "_txInputVector", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 763, - "src": "9210:14:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 785, - "name": "_txOutputVector", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 765, - "src": "9238:15:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 786, - "name": "_txLocktime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 767, - "src": "9267:11:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 787, - "name": "_fundingOutputIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 769, - "src": "9292:19:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 788, - "name": "_merkleProof", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 771, - "src": "9325:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 789, - "name": "_txIndexInBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 773, - "src": "9351:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 790, - "name": "_bitcoinHeaders", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 775, - "src": "9380:15:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 780, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "9140:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 782, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "provideFraudBTCFundingProof", - "nodeType": "MemberAccess", - "referencedDeclaration": 1684, - "src": "9140:32:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_uint8_$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,bytes memory,bytes memory,bytes memory,bytes memory,uint8,bytes memory,uint256,bytes memory) returns (bool)" - } - }, - "id": 791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9140:265:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 792, - "nodeType": "ExpressionStatement", - "src": "9140:265:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 793, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9422:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 779, - "id": 794, - "nodeType": "Return", - "src": "9415:11:2" - } - ] - }, - "documentation": "@dev Takes a pre-parsed transaction and calculates values needed to verify funding\n @param _txVersion Transaction version number (4-byte LE)\n @param _txInputVector All transaction inputs prepended by the number of inputs encoded as a VarInt, max 0xFC(252) inputs\n @param _txOutputVector All transaction outputs prepended by the number of outputs encoded as a VarInt, max 0xFC(252) outputs\n @param _txLocktime Final 4 bytes of the transaction\n @param _fundingOutputIndex Index of funding output in _txOutputVector (0-indexed)\n @param _merkleProof The merkle proof of transaction inclusion in a block\n @param _txIndexInBlock Transaction index in the block (1-indexed)\n @param _bitcoinHeaders Single bytestring of 80-byte bitcoin headers, lowest height first\n @return True if no errors are thrown", - "id": 796, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "provideFraudBTCFundingProof", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 776, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 761, - "name": "_txVersion", - "nodeType": "VariableDeclaration", - "scope": 796, - "src": "8828:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 760, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8828:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 763, - "name": "_txInputVector", - "nodeType": "VariableDeclaration", - "scope": 796, - "src": "8861:27:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 762, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8861:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 765, - "name": "_txOutputVector", - "nodeType": "VariableDeclaration", - "scope": 796, - "src": "8898:28:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 764, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8898:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 767, - "name": "_txLocktime", - "nodeType": "VariableDeclaration", - "scope": 796, - "src": "8936:24:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 766, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8936:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 769, - "name": "_fundingOutputIndex", - "nodeType": "VariableDeclaration", - "scope": 796, - "src": "8970:25:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 768, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "8970:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 771, - "name": "_merkleProof", - "nodeType": "VariableDeclaration", - "scope": 796, - "src": "9005:25:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 770, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9005:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 773, - "name": "_txIndexInBlock", - "nodeType": "VariableDeclaration", - "scope": 796, - "src": "9040:23:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 772, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9040:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 775, - "name": "_bitcoinHeaders", - "nodeType": "VariableDeclaration", - "scope": 796, - "src": "9073:28:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 774, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9073:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8818:289:2" - }, - "returnParameters": { - "id": 779, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 778, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 796, - "src": "9124:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 777, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9124:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9123:6:2" - }, - "scope": 965, - "src": "8782:651:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 832, - "nodeType": "Block", - "src": "10960:298:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 820, - "name": "_txVersion", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 798, - "src": "11011:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 821, - "name": "_txInputVector", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 800, - "src": "11035:14:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 822, - "name": "_txOutputVector", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 802, - "src": "11063:15:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 823, - "name": "_txLocktime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 804, - "src": "11092:11:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 824, - "name": "_fundingOutputIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 806, - "src": "11117:19:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 825, - "name": "_merkleProof", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 808, - "src": "11150:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 826, - "name": "_txIndexInBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 810, - "src": "11176:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 827, - "name": "_bitcoinHeaders", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 812, - "src": "11205:15:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 817, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "10970:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 819, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "provideBTCFundingProof", - "nodeType": "MemberAccess", - "referencedDeclaration": 1797, - "src": "10970:27:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_uint8_$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,bytes memory,bytes memory,bytes memory,bytes memory,uint8,bytes memory,uint256,bytes memory) returns (bool)" - } - }, - "id": 828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10970:260:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 829, - "nodeType": "ExpressionStatement", - "src": "10970:260:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 830, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11247:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 816, - "id": 831, - "nodeType": "Return", - "src": "11240:11:2" - } - ] - }, - "documentation": "@notice Anyone may notify the deposit of a funding proof to activate the deposit\n This is the happy-path of the funding flow. It means that we have succeeded\n @dev Takes a pre-parsed transaction and calculates values needed to verify funding\n @param _txVersion Transaction version number (4-byte LE)\n @param _txInputVector All transaction inputs prepended by the number of inputs encoded as a VarInt, max 0xFC(252) inputs\n @param _txOutputVector All transaction outputs prepended by the number of outputs encoded as a VarInt, max 0xFC(252) outputs\n @param _txLocktime Final 4 bytes of the transaction\n @param _fundingOutputIndex Index of funding output in _txOutputVector (0-indexed)\n @param _merkleProof The merkle proof of transaction inclusion in a block\n @param _txIndexInBlock Transaction index in the block (1-indexed)\n @param _bitcoinHeaders Single bytestring of 80-byte bitcoin headers, lowest height first\n @return True if no errors are thrown", - "id": 833, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "provideBTCFundingProof", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 813, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 798, - "name": "_txVersion", - "nodeType": "VariableDeclaration", - "scope": 833, - "src": "10658:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 797, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10658:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 800, - "name": "_txInputVector", - "nodeType": "VariableDeclaration", - "scope": 833, - "src": "10691:27:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 799, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10691:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 802, - "name": "_txOutputVector", - "nodeType": "VariableDeclaration", - "scope": 833, - "src": "10728:28:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 801, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10728:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 804, - "name": "_txLocktime", - "nodeType": "VariableDeclaration", - "scope": 833, - "src": "10766:24:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 803, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10766:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 806, - "name": "_fundingOutputIndex", - "nodeType": "VariableDeclaration", - "scope": 833, - "src": "10800:25:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 805, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "10800:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 808, - "name": "_merkleProof", - "nodeType": "VariableDeclaration", - "scope": 833, - "src": "10835:25:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 807, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10835:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 810, - "name": "_txIndexInBlock", - "nodeType": "VariableDeclaration", - "scope": 833, - "src": "10870:23:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 809, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10870:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 812, - "name": "_bitcoinHeaders", - "nodeType": "VariableDeclaration", - "scope": 833, - "src": "10903:28:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 811, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10903:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10648:289:2" - }, - "returnParameters": { - "id": 816, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 815, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 833, - "src": "10954:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 814, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10954:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10953:6:2" - }, - "scope": 965, - "src": "10617:641:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 860, - "nodeType": "Block", - "src": "12024:103:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 851, - "name": "_v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 835, - "src": "12062:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 852, - "name": "_r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 837, - "src": "12066:2:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 853, - "name": "_s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 839, - "src": "12070:2:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 854, - "name": "_signedDigest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 841, - "src": "12074:13:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 855, - "name": "_preimage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 843, - "src": "12089:9:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 848, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "12034:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 850, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "provideECDSAFraudProof", - "nodeType": "MemberAccess", - "referencedDeclaration": 2160, - "src": "12034:27:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_uint8_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,uint8,bytes32,bytes32,bytes32,bytes memory)" - } - }, - "id": 856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12034:65:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 857, - "nodeType": "ExpressionStatement", - "src": "12034:65:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12116:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 847, - "id": 859, - "nodeType": "Return", - "src": "12109:11:2" - } - ] - }, - "documentation": "@notice Anyone can provide a signature that was not requested to prove fraud\n @dev ECDSA is NOT SECURE unless you verify the digest\n @param _v Signature recovery value\n @param _r Signature R value\n @param _s Signature S value\n @param _signedDigest The digest signed by the signature vrs tuple\n @param _preimage The sha256 preimage of the digest\n @return True if successful, otherwise revert", - "id": 861, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "provideECDSAFraudProof", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 844, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 835, - "name": "_v", - "nodeType": "VariableDeclaration", - "scope": 861, - "src": "11884:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 834, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "11884:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 837, - "name": "_r", - "nodeType": "VariableDeclaration", - "scope": 861, - "src": "11902:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 836, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11902:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 839, - "name": "_s", - "nodeType": "VariableDeclaration", - "scope": 861, - "src": "11922:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 838, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11922:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 841, - "name": "_signedDigest", - "nodeType": "VariableDeclaration", - "scope": 861, - "src": "11942:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 840, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11942:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 843, - "name": "_preimage", - "nodeType": "VariableDeclaration", - "scope": 861, - "src": "11973:22:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 842, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11973:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11874:127:2" - }, - "returnParameters": { - "id": 847, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 846, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 861, - "src": "12018:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 845, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12018:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12017:6:2" - }, - "scope": 965, - "src": "11843:284:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 885, - "nodeType": "Block", - "src": "12891:114:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 877, - "name": "_bitcoinTx", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 863, - "src": "12927:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 878, - "name": "_merkleProof", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 865, - "src": "12939:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 879, - "name": "_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 867, - "src": "12953:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 880, - "name": "_bitcoinHeaders", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 869, - "src": "12961:15:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 874, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "12901:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 876, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "provideSPVFraudProof", - "nodeType": "MemberAccess", - "referencedDeclaration": 2336, - "src": "12901:25:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,bytes memory,bytes memory,uint256,bytes memory)" - } - }, - "id": 881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12901:76:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 882, - "nodeType": "ExpressionStatement", - "src": "12901:76:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 883, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12994:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 873, - "id": 884, - "nodeType": "Return", - "src": "12987:11:2" - } - ] - }, - "documentation": "@notice Anyone may notify the deposit of fraud via an SPV proof\n @dev We strong prefer ECDSA fraud proofs\n @param _bitcoinTx The bitcoin tx that purportedly contains the funding output\n @param _merkleProof The merkle proof of inclusion of the tx in the bitcoin block\n @param _index The index of the tx in the Bitcoin block (1-indexed)\n @param _bitcoinHeaders An array of tightly-packed bitcoin headers\n @return True if successful, otherwise revert", - "id": 886, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "provideSPVFraudProof", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 870, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 863, - "name": "_bitcoinTx", - "nodeType": "VariableDeclaration", - "scope": 886, - "src": "12742:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 862, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12742:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 865, - "name": "_merkleProof", - "nodeType": "VariableDeclaration", - "scope": 886, - "src": "12775:25:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 864, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12775:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 867, - "name": "_index", - "nodeType": "VariableDeclaration", - "scope": 886, - "src": "12810:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 866, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12810:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 869, - "name": "_bitcoinHeaders", - "nodeType": "VariableDeclaration", - "scope": 886, - "src": "12834:28:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 868, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12834:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12732:136:2" - }, - "returnParameters": { - "id": 873, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 872, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 886, - "src": "12885:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 871, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12885:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12884:6:2" - }, - "scope": 965, - "src": "12703:302:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 898, - "nodeType": "Block", - "src": "13390:73:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 891, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "13400:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 893, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "purchaseSignerBondsAtAuction", - "nodeType": "MemberAccess", - "referencedDeclaration": 2445, - "src": "13400:33:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 894, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13400:35:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 895, - "nodeType": "ExpressionStatement", - "src": "13400:35:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 896, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13452:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 890, - "id": 897, - "nodeType": "Return", - "src": "13445:11:2" - } - ] - }, - "documentation": "\n LIQUIDATION\n\n\n @notice Closes an auction and purchases the signer bonds. Payout to buyer, funder, then signers if not fraud\n @dev For interface, reading auctionValue will give a past value. the current is better\n @return True if successful, revert otherwise", - "id": 899, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "purchaseSignerBondsAtAuction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 887, - "nodeType": "ParameterList", - "parameters": [], - "src": "13365:2:2" - }, - "returnParameters": { - "id": 890, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 889, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 899, - "src": "13384:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 888, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13384:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13383:6:2" - }, - "scope": 965, - "src": "13328:135:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 911, - "nodeType": "Block", - "src": "13719:63:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 904, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "13729:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 906, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "notifyCourtesyCall", - "nodeType": "MemberAccess", - "referencedDeclaration": 2486, - "src": "13729:23:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 907, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13729:25:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 908, - "nodeType": "ExpressionStatement", - "src": "13729:25:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 909, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13771:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 903, - "id": 910, - "nodeType": "Return", - "src": "13764:11:2" - } - ] - }, - "documentation": "@notice Notify the contract that the signers are undercollateralized\n @dev Calls out to the system for oracle info\n @return True if successful, otherwise revert", - "id": 912, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "notifyCourtesyCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 900, - "nodeType": "ParameterList", - "parameters": [], - "src": "13694:2:2" - }, - "returnParameters": { - "id": 903, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 902, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 912, - "src": "13713:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 901, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13713:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13712:6:2" - }, - "scope": 965, - "src": "13667:115:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 924, - "nodeType": "Block", - "src": "14043:61:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 917, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "14053:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 919, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "exitCourtesyCall", - "nodeType": "MemberAccess", - "referencedDeclaration": 2533, - "src": "14053:21:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14053:23:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 921, - "nodeType": "ExpressionStatement", - "src": "14053:23:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 922, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14093:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 916, - "id": 923, - "nodeType": "Return", - "src": "14086:11:2" - } - ] - }, - "documentation": "@notice Goes from courtesy call to active\n @dev Only callable if collateral is sufficient and the deposit is not expiring\n @return True if successful, otherwise revert", - "id": 925, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exitCourtesyCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 913, - "nodeType": "ParameterList", - "parameters": [], - "src": "14018:2:2" - }, - "returnParameters": { - "id": 916, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 915, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 925, - "src": "14037:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 914, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14037:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14036:6:2" - }, - "scope": 965, - "src": "13993:111:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 937, - "nodeType": "Block", - "src": "14378:81:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 930, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "14388:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 932, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "notifyUndercollateralizedLiquidation", - "nodeType": "MemberAccess", - "referencedDeclaration": 2561, - "src": "14388:41:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14388:43:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 934, - "nodeType": "ExpressionStatement", - "src": "14388:43:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 935, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14448:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 929, - "id": 936, - "nodeType": "Return", - "src": "14441:11:2" - } - ] - }, - "documentation": "@notice Notify the contract that the signers are undercollateralized\n @dev Calls out to the system for oracle info\n @return True if successful, otherwise revert", - "id": 938, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "notifyUndercollateralizedLiquidation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 926, - "nodeType": "ParameterList", - "parameters": [], - "src": "14353:2:2" - }, - "returnParameters": { - "id": 929, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 928, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "14372:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 927, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14372:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14371:6:2" - }, - "scope": 965, - "src": "14308:151:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 950, - "nodeType": "Block", - "src": "14723:66:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 943, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "14733:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 945, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "notifyCourtesyTimeout", - "nodeType": "MemberAccess", - "referencedDeclaration": 2591, - "src": "14733:26:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14733:28:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 947, - "nodeType": "ExpressionStatement", - "src": "14733:28:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 948, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14778:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 942, - "id": 949, - "nodeType": "Return", - "src": "14771:11:2" - } - ] - }, - "documentation": "@notice Notifies the contract that the courtesy period has elapsed\n @dev This is treated as an abort, rather than fraud\n @return True if successful, otherwise revert", - "id": 951, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "notifyCourtesyTimeout", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 939, - "nodeType": "ParameterList", - "parameters": [], - "src": "14698:2:2" - }, - "returnParameters": { - "id": 942, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 941, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 951, - "src": "14717:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 940, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14717:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14716:6:2" - }, - "scope": 965, - "src": "14668:121:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 963, - "nodeType": "Block", - "src": "15047:76:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 956, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "15057:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 958, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "notifyDepositExpiryCourtesyCall", - "nodeType": "MemberAccess", - "referencedDeclaration": 2634, - "src": "15057:36:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 959, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15057:38:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 960, - "nodeType": "ExpressionStatement", - "src": "15057:38:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 961, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15112:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 955, - "id": 962, - "nodeType": "Return", - "src": "15105:11:2" - } - ] - }, - "documentation": "@notice Notifies the contract that its term limit has been reached\n @dev This initiates a courtesy call\n @return True if successful, otherwise revert", - "id": 964, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "notifyDepositExpiryCourtesyCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 952, - "nodeType": "ParameterList", - "parameters": [], - "src": "15022:2:2" - }, - "returnParameters": { - "id": 955, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 954, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 964, - "src": "15041:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 953, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "15041:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15040:6:2" - }, - "scope": 965, - "src": "14982:141:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 966, - "src": "249:14876:2" - } - ], - "src": "0:15126:2" - }, - "legacyAST": { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/Deposit.sol", - "exportedSymbols": { - "Deposit": [ - 965 - ] - }, - "id": 966, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 487, - "literals": [ - "solidity", - "^", - "0.5", - ".10" - ], - "nodeType": "PragmaDirective", - "src": "0:24:2" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/DepositLiquidation.sol", - "file": "./DepositLiquidation.sol", - "id": 489, - "nodeType": "ImportDirective", - "scope": 966, - "sourceUnit": 2636, - "src": "26:60:2", - "symbolAliases": [ - { - "foreign": 488, - "local": null - } - ], - "unitAlias": "" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/DepositUtils.sol", - "file": "./DepositUtils.sol", - "id": 491, - "nodeType": "ImportDirective", - "scope": 966, - "sourceUnit": 4996, - "src": "87:48:2", - "symbolAliases": [ - { - "foreign": 490, - "local": null - } - ], - "unitAlias": "" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/DepositFunding.sol", - "file": "./DepositFunding.sol", - "id": 493, - "nodeType": "ImportDirective", - "scope": 966, - "sourceUnit": 1799, - "src": "136:52:2", - "symbolAliases": [ - { - "foreign": 492, - "local": null - } - ], - "unitAlias": "" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/DepositRedemption.sol", - "file": "./DepositRedemption.sol", - "id": 495, - "nodeType": "ImportDirective", - "scope": 966, - "sourceUnit": 3401, - "src": "189:58:2", - "symbolAliases": [ - { - "foreign": 494, - "local": null - } - ], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 965, - "linearizedBaseContracts": [ - 965 - ], - "name": "Deposit", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 498, - "libraryName": { - "contractScope": null, - "id": 496, - "name": "DepositRedemption", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3400, - "src": "279:17:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_DepositRedemption_$3400", - "typeString": "library DepositRedemption" - } - }, - "nodeType": "UsingForDirective", - "src": "273:49:2", - "typeName": { - "contractScope": null, - "id": 497, - "name": "DepositUtils.Deposit", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4035, - "src": "301:20:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage_ptr", - "typeString": "struct DepositUtils.Deposit" - } - } - }, - { - "id": 501, - "libraryName": { - "contractScope": null, - "id": 499, - "name": "DepositFunding", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1798, - "src": "333:14:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_DepositFunding_$1798", - "typeString": "library DepositFunding" - } - }, - "nodeType": "UsingForDirective", - "src": "327:46:2", - "typeName": { - "contractScope": null, - "id": 500, - "name": "DepositUtils.Deposit", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4035, - "src": "352:20:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage_ptr", - "typeString": "struct DepositUtils.Deposit" - } - } - }, - { - "id": 504, - "libraryName": { - "contractScope": null, - "id": 502, - "name": "DepositLiquidation", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2635, - "src": "384:18:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_DepositLiquidation_$2635", - "typeString": "library DepositLiquidation" - } - }, - "nodeType": "UsingForDirective", - "src": "378:50:2", - "typeName": { - "contractScope": null, - "id": 503, - "name": "DepositUtils.Deposit", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4035, - "src": "407:20:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage_ptr", - "typeString": "struct DepositUtils.Deposit" - } - } - }, - { - "id": 507, - "libraryName": { - "contractScope": null, - "id": 505, - "name": "DepositUtils", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4995, - "src": "439:12:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_DepositUtils_$4995", - "typeString": "library DepositUtils" - } - }, - "nodeType": "UsingForDirective", - "src": "433:44:2", - "typeName": { - "contractScope": null, - "id": 506, - "name": "DepositUtils.Deposit", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4035, - "src": "456:20:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage_ptr", - "typeString": "struct DepositUtils.Deposit" - } - } - }, - { - "constant": false, - "id": 509, - "name": "self", - "nodeType": "VariableDeclaration", - "scope": 965, - "src": "483:25:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit" - }, - "typeName": { - "contractScope": null, - "id": 508, - "name": "DepositUtils.Deposit", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4035, - "src": "483:20:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage_ptr", - "typeString": "struct DepositUtils.Deposit" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": { - "id": 512, - "nodeType": "Block", - "src": "676:2:2", - "statements": [] - }, - "documentation": null, - "id": 513, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 510, - "nodeType": "ParameterList", - "parameters": [], - "src": "666:2:2" - }, - "returnParameters": { - "id": 511, - "nodeType": "ParameterList", - "parameters": [], - "src": "676:0:2" - }, - "scope": 965, - "src": "654:24:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 516, - "nodeType": "Block", - "src": "713:2:2", - "statements": [] - }, - "documentation": null, - "id": 517, - "implemented": true, - "kind": "fallback", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 514, - "nodeType": "ParameterList", - "parameters": [], - "src": "693:2:2" - }, - "returnParameters": { - "id": 515, - "nodeType": "ParameterList", - "parameters": [], - "src": "713:0:2" - }, - "scope": 965, - "src": "684:31:2", - "stateMutability": "payable", - "superFunction": null, - "visibility": "external" - }, - { - "body": { - "id": 527, - "nodeType": "Block", - "src": "1001:50:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 523, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "1026:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 524, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "currentState", - "nodeType": "MemberAccess", - "referencedDeclaration": 4004, - "src": "1026:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 522, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1018:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 525, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1018:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 521, - "id": 526, - "nodeType": "Return", - "src": "1011:33:2" - } - ] - }, - "documentation": "@notice Get the integer representing the current state\n @dev We implement this because contracts don't handle foreign enums well\n @return The 0-indexed state from the DepositStates enum", - "id": 528, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getCurrentState", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 518, - "nodeType": "ParameterList", - "parameters": [], - "src": "968:2:2" - }, - "returnParameters": { - "id": 521, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 520, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 528, - "src": "992:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 519, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "992:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "991:9:2" - }, - "scope": 965, - "src": "944:107:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 570, - "nodeType": "Block", - "src": "1561:182:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 543, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "1571:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 545, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "TBTCSystem", - "nodeType": "MemberAccess", - "referencedDeclaration": 3998, - "src": "1571:15:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 546, - "name": "_TBTCSystem", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 530, - "src": "1589:11:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1571:29:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 548, - "nodeType": "ExpressionStatement", - "src": "1571:29:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 553, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 549, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "1610:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 551, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "TBTCToken", - "nodeType": "MemberAccess", - "referencedDeclaration": 4000, - "src": "1610:14:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 552, - "name": "_TBTCToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 532, - "src": "1627:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1610:27:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 554, - "nodeType": "ExpressionStatement", - "src": "1610:27:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 555, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "1647:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 557, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "KeepBridge", - "nodeType": "MemberAccess", - "referencedDeclaration": 4002, - "src": "1647:15:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 558, - "name": "_KeepBridge", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 534, - "src": "1665:11:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1647:29:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 560, - "nodeType": "ExpressionStatement", - "src": "1647:29:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 564, - "name": "_m", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 536, - "src": "1708:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 565, - "name": "_n", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 538, - "src": "1712:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 561, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "1686:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 563, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "createNewDeposit", - "nodeType": "MemberAccess", - "referencedDeclaration": 1162, - "src": "1686:21:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,uint256,uint256) returns (bool)" - } - }, - "id": 566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1686:29:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 567, - "nodeType": "ExpressionStatement", - "src": "1686:29:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 568, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1732:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 542, - "id": 569, - "nodeType": "Return", - "src": "1725:11:2" - } - ] - }, - "documentation": "@notice The system can spin up a new deposit\n @dev This should be called by an approved contract, not a developer\n @param _m m for m-of-n\n @param _m n for m-of-n\n @return True if successful, otherwise revert", - "id": 571, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "createNewDeposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 539, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 530, - "name": "_TBTCSystem", - "nodeType": "VariableDeclaration", - "scope": 571, - "src": "1408:19:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 529, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1408:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 532, - "name": "_TBTCToken", - "nodeType": "VariableDeclaration", - "scope": 571, - "src": "1437:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 531, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1437:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 534, - "name": "_KeepBridge", - "nodeType": "VariableDeclaration", - "scope": 571, - "src": "1465:19:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 533, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1465:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 536, - "name": "_m", - "nodeType": "VariableDeclaration", - "scope": 571, - "src": "1494:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 535, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1494:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 538, - "name": "_n", - "nodeType": "VariableDeclaration", - "scope": 571, - "src": "1514:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 537, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1514:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1398:132:2" - }, - "returnParameters": { - "id": 542, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 541, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 571, - "src": "1555:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 540, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1555:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1554:6:2" - }, - "scope": 965, - "src": "1373:370:2", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 589, - "nodeType": "Block", - "src": "2259:94:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 583, - "name": "_outputValueBytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 573, - "src": "2292:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - } - }, - { - "argumentTypes": null, - "id": 584, - "name": "_requesterPKH", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 575, - "src": "2311:13:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes20", - "typeString": "bytes20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - }, - { - "typeIdentifier": "t_bytes20", - "typeString": "bytes20" - } - ], - "expression": { - "argumentTypes": null, - "id": 580, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "2269:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 582, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "requestRedemption", - "nodeType": "MemberAccess", - "referencedDeclaration": 2947, - "src": "2269:22:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_bytes8_$_t_bytes20_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,bytes8,bytes20)" - } - }, - "id": 585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2269:56:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 586, - "nodeType": "ExpressionStatement", - "src": "2269:56:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 587, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2342:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 579, - "id": 588, - "nodeType": "Return", - "src": "2335:11:2" - } - ] - }, - "documentation": "@notice Anyone can request redemption\n @dev The redeemer specifies details about the Bitcoin redemption tx\n @param _outputValueBytes The 8-byte LE output size\n @param _requesterPKH The 20-byte Bitcoin pubkeyhash to which to send funds\n @return True if successful, otherwise revert", - "id": 590, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "requestRedemption", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 576, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 573, - "name": "_outputValueBytes", - "nodeType": "VariableDeclaration", - "scope": 590, - "src": "2175:24:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - }, - "typeName": { - "id": 572, - "name": "bytes8", - "nodeType": "ElementaryTypeName", - "src": "2175:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 575, - "name": "_requesterPKH", - "nodeType": "VariableDeclaration", - "scope": 590, - "src": "2209:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes20", - "typeString": "bytes20" - }, - "typeName": { - "id": 574, - "name": "bytes20", - "nodeType": "ElementaryTypeName", - "src": "2209:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes20", - "typeString": "bytes20" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2165:71:2" - }, - "returnParameters": { - "id": 579, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 578, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 590, - "src": "2253:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 577, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2253:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2252:6:2" - }, - "scope": 965, - "src": "2139:214:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 611, - "nodeType": "Block", - "src": "2872:81:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 604, - "name": "_v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 592, - "src": "2914:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 605, - "name": "_r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 594, - "src": "2918:2:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 606, - "name": "_s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "2922:2:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 601, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "2882:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 603, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "provideRedemptionSignature", - "nodeType": "MemberAccess", - "referencedDeclaration": 2994, - "src": "2882:31:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,uint8,bytes32,bytes32)" - } - }, - "id": 607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2882:43:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 608, - "nodeType": "ExpressionStatement", - "src": "2882:43:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 609, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2942:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 600, - "id": 610, - "nodeType": "Return", - "src": "2935:11:2" - } - ] - }, - "documentation": "@notice Anyone may provide a withdrawal signature if it was requested\n @dev The signers will be penalized if this (or provideRedemptionProof) is not called\n @param _v Signature recovery value\n @param _r Signature R value\n @param _s Signature S value\n @return True if successful, False if prevented by timeout, otherwise revert", - "id": 612, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "provideRedemptionSignature", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 597, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 592, - "name": "_v", - "nodeType": "VariableDeclaration", - "scope": 612, - "src": "2795:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 591, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "2795:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 594, - "name": "_r", - "nodeType": "VariableDeclaration", - "scope": 612, - "src": "2813:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 593, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2813:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 596, - "name": "_s", - "nodeType": "VariableDeclaration", - "scope": 612, - "src": "2833:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 595, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2833:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2785:64:2" - }, - "returnParameters": { - "id": 600, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 599, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 612, - "src": "2866:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 598, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2866:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2865:6:2" - }, - "scope": 965, - "src": "2750:203:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 627, - "nodeType": "Block", - "src": "3545:99:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 623, - "name": "_previousOutputValueBytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 614, - "src": "3589:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - } - }, - { - "argumentTypes": null, - "id": 624, - "name": "_newOutputValueBytes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 616, - "src": "3616:20:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - }, - { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - } - ], - "expression": { - "argumentTypes": null, - "id": 621, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "3562:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 622, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "increaseRedemptionFee", - "nodeType": "MemberAccess", - "referencedDeclaration": 3097, - "src": "3562:26:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_bytes8_$_t_bytes8_$returns$_t_bool_$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,bytes8,bytes8) returns (bool)" - } - }, - "id": 625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3562:75:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 620, - "id": 626, - "nodeType": "Return", - "src": "3555:82:2" - } - ] - }, - "documentation": "@notice Anyone may notify the contract that a fee bump is needed\n @dev This sends us back to AWAITING_WITHDRAWAL_SIGNATURE\n @param _previousOutputValueBytes The previous output's value\n @param _newOutputValueBytes The new output's value\n @return True if successful, False if prevented by timeout, otherwise revert", - "id": 628, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "increaseRedemptionFee", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 617, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 614, - "name": "_previousOutputValueBytes", - "nodeType": "VariableDeclaration", - "scope": 628, - "src": "3447:32:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - }, - "typeName": { - "id": 613, - "name": "bytes8", - "nodeType": "ElementaryTypeName", - "src": "3447:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 616, - "name": "_newOutputValueBytes", - "nodeType": "VariableDeclaration", - "scope": 628, - "src": "3489:27:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - }, - "typeName": { - "id": 615, - "name": "bytes8", - "nodeType": "ElementaryTypeName", - "src": "3489:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes8", - "typeString": "bytes8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3437:85:2" - }, - "returnParameters": { - "id": 620, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 619, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 628, - "src": "3539:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 618, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3539:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3538:6:2" - }, - "scope": 965, - "src": "3407:237:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 652, - "nodeType": "Block", - "src": "4430:116:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 644, - "name": "_bitcoinTx", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 630, - "src": "4468:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 645, - "name": "_merkleProof", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 632, - "src": "4480:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 646, - "name": "_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 634, - "src": "4494:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 647, - "name": "_bitcoinHeaders", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 636, - "src": "4502:15:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 641, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "4440:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 643, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "provideRedemptionProof", - "nodeType": "MemberAccess", - "referencedDeclaration": 3247, - "src": "4440:27:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,bytes memory,bytes memory,uint256,bytes memory)" - } - }, - "id": 648, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4440:78:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 649, - "nodeType": "ExpressionStatement", - "src": "4440:78:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 650, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4535:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 640, - "id": 651, - "nodeType": "Return", - "src": "4528:11:2" - } - ] - }, - "documentation": "@notice Anyone may provide a withdrawal proof to prove redemption\n @dev The signers will be penalized if this is not called\n @param _bitcoinTx The bitcoin tx that purportedly contain the redemption output\n @param _merkleProof The merkle proof of inclusion of the tx in the bitcoin block\n @param _index The index of the tx in the Bitcoin block (1-indexed)\n @param _bitcoinHeaders An array of tightly-packed bitcoin headers\n @return True if successful, otherwise revert", - "id": 653, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "provideRedemptionProof", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 637, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 630, - "name": "_bitcoinTx", - "nodeType": "VariableDeclaration", - "scope": 653, - "src": "4281:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 629, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4281:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 632, - "name": "_merkleProof", - "nodeType": "VariableDeclaration", - "scope": 653, - "src": "4314:25:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 631, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4314:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 634, - "name": "_index", - "nodeType": "VariableDeclaration", - "scope": 653, - "src": "4349:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 633, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4349:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 636, - "name": "_bitcoinHeaders", - "nodeType": "VariableDeclaration", - "scope": 653, - "src": "4373:28:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 635, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4373:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4271:136:2" - }, - "returnParameters": { - "id": 640, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 639, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 653, - "src": "4424:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 638, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4424:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4423:6:2" - }, - "scope": 965, - "src": "4240:306:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 665, - "nodeType": "Block", - "src": "4830:67:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 658, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "4840:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 660, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "notifySignatureTimeout", - "nodeType": "MemberAccess", - "referencedDeclaration": 3368, - "src": "4840:27:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4840:29:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 662, - "nodeType": "ExpressionStatement", - "src": "4840:29:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4886:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 657, - "id": 664, - "nodeType": "Return", - "src": "4879:11:2" - } - ] - }, - "documentation": "@notice Anyone may notify the contract that the signers have failed to produce a signature\n @dev This is considered fraud, and is punished\n @return True if successful, otherwise revert", - "id": 666, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "notifySignatureTimeout", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 654, - "nodeType": "ParameterList", - "parameters": [], - "src": "4805:2:2" - }, - "returnParameters": { - "id": 657, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 656, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 666, - "src": "4824:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 655, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4824:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4823:6:2" - }, - "scope": 965, - "src": "4774:123:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 678, - "nodeType": "Block", - "src": "5194:73:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 671, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "5204:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 673, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "notifyRedemptionProofTimeout", - "nodeType": "MemberAccess", - "referencedDeclaration": 3399, - "src": "5204:33:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 674, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5204:35:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 675, - "nodeType": "ExpressionStatement", - "src": "5204:35:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5256:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 670, - "id": 677, - "nodeType": "Return", - "src": "5249:11:2" - } - ] - }, - "documentation": "@notice Anyone may notify the contract that the signers have failed to produce a redemption proof\n @dev This is considered fraud, and is punished\n @return True if successful, otherwise revert", - "id": 679, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "notifyRedemptionProofTimeout", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 667, - "nodeType": "ParameterList", - "parameters": [], - "src": "5169:2:2" - }, - "returnParameters": { - "id": 670, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 669, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 679, - "src": "5188:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 668, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5188:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5187:6:2" - }, - "scope": 965, - "src": "5132:135:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 691, - "nodeType": "Block", - "src": "5594:69:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 684, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "5604:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 686, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "notifySignerSetupFailure", - "nodeType": "MemberAccess", - "referencedDeclaration": 1350, - "src": "5604:29:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 687, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5604:31:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 688, - "nodeType": "ExpressionStatement", - "src": "5604:31:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 689, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5652:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 683, - "id": 690, - "nodeType": "Return", - "src": "5645:11:2" - } - ] - }, - "documentation": "@notice Anyone may notify the contract that signing group setup has timed out\n @dev We rely on the keep system punishes the signers in this case\n @return True if successful, otherwise revert", - "id": 692, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "notifySignerSetupFailure", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 680, - "nodeType": "ParameterList", - "parameters": [], - "src": "5569:2:2" - }, - "returnParameters": { - "id": 683, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 682, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 692, - "src": "5588:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 681, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5588:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5587:6:2" - }, - "scope": 965, - "src": "5536:127:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 704, - "nodeType": "Block", - "src": "5940:65:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 697, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "5950:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 699, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "retrieveSignerPubkey", - "nodeType": "MemberAccess", - "referencedDeclaration": 1431, - "src": "5950:25:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5950:27:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 701, - "nodeType": "ExpressionStatement", - "src": "5950:27:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 702, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5994:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 696, - "id": 703, - "nodeType": "Return", - "src": "5987:11:2" - } - ] - }, - "documentation": "@notice we poll the Keep contract to retrieve our pubkey\n @dev We store the pubkey as 2 bytestrings, X and Y.\n @return True if successful, otherwise revert", - "id": 705, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "retrieveSignerPubkey", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 693, - "nodeType": "ParameterList", - "parameters": [], - "src": "5915:2:2" - }, - "returnParameters": { - "id": 696, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 695, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 705, - "src": "5934:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 694, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "5934:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5933:6:2" - }, - "scope": 965, - "src": "5886:119:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 717, - "nodeType": "Block", - "src": "6292:65:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 710, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "6302:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 712, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "notifyFundingTimeout", - "nodeType": "MemberAccess", - "referencedDeclaration": 1475, - "src": "6302:25:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6302:27:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 714, - "nodeType": "ExpressionStatement", - "src": "6302:27:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 715, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6346:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 709, - "id": 716, - "nodeType": "Return", - "src": "6339:11:2" - } - ] - }, - "documentation": "@notice Anyone may notify the contract that the funder has failed to send BTC\n @dev This is considered a funder fault, and we revoke their bond\n @return True if successful, otherwise revert", - "id": 718, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "notifyFundingTimeout", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 706, - "nodeType": "ParameterList", - "parameters": [], - "src": "6267:2:2" - }, - "returnParameters": { - "id": 709, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 708, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 718, - "src": "6286:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 707, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6286:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6285:6:2" - }, - "scope": 965, - "src": "6238:119:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 745, - "nodeType": "Block", - "src": "7117:110:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 736, - "name": "_v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 720, - "src": "7162:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 737, - "name": "_r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 722, - "src": "7166:2:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 738, - "name": "_s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 724, - "src": "7170:2:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 739, - "name": "_signedDigest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 726, - "src": "7174:13:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 740, - "name": "_preimage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 728, - "src": "7189:9:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 733, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "7127:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 735, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "provideFundingECDSAFraudProof", - "nodeType": "MemberAccess", - "referencedDeclaration": 1567, - "src": "7127:34:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_uint8_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,uint8,bytes32,bytes32,bytes32,bytes memory)" - } - }, - "id": 741, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7127:72:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 742, - "nodeType": "ExpressionStatement", - "src": "7127:72:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 743, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7216:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 732, - "id": 744, - "nodeType": "Return", - "src": "7209:11:2" - } - ] - }, - "documentation": "@notice Anyone can provide a signature that was not requested to prove fraud during funding\n @dev ECDSA is NOT SECURE unless you verify the digest\n @param _v Signature recovery value\n @param _r Signature R value\n @param _s Signature S value\n @param _signedDigest The digest signed by the signature vrs tuple\n @param _preimage The sha256 preimage of the digest\n @return True if successful, otherwise revert", - "id": 746, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "provideFundingECDSAFraudProof", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 729, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 720, - "name": "_v", - "nodeType": "VariableDeclaration", - "scope": 746, - "src": "6977:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 719, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "6977:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 722, - "name": "_r", - "nodeType": "VariableDeclaration", - "scope": 746, - "src": "6995:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 721, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6995:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 724, - "name": "_s", - "nodeType": "VariableDeclaration", - "scope": 746, - "src": "7015:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 723, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7015:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 726, - "name": "_signedDigest", - "nodeType": "VariableDeclaration", - "scope": 746, - "src": "7035:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 725, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7035:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 728, - "name": "_preimage", - "nodeType": "VariableDeclaration", - "scope": 746, - "src": "7066:22:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 727, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "7066:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6967:127:2" - }, - "returnParameters": { - "id": 732, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 731, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 746, - "src": "7111:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 730, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7111:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7110:6:2" - }, - "scope": 965, - "src": "6929:298:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 758, - "nodeType": "Block", - "src": "7555:70:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 751, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "7565:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 753, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "notifyFraudFundingTimeout", - "nodeType": "MemberAccess", - "referencedDeclaration": 1611, - "src": "7565:30:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7565:32:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 755, - "nodeType": "ExpressionStatement", - "src": "7565:32:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 756, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7614:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 750, - "id": 757, - "nodeType": "Return", - "src": "7607:11:2" - } - ] - }, - "documentation": "@notice Anyone may notify the contract no funding proof was submitted during funding fraud\n @dev This is not a funder fault. The signers have faulted, so the funder shouldn't fund\n @return True if successful, otherwise revert", - "id": 759, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "notifyFraudFundingTimeout", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 747, - "nodeType": "ParameterList", - "parameters": [], - "src": "7530:2:2" - }, - "returnParameters": { - "id": 750, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 749, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 759, - "src": "7549:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 748, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7549:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7548:6:2" - }, - "scope": 965, - "src": "7496:129:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 795, - "nodeType": "Block", - "src": "9130:303:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 783, - "name": "_txVersion", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "9186:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 784, - "name": "_txInputVector", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 763, - "src": "9210:14:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 785, - "name": "_txOutputVector", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 765, - "src": "9238:15:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 786, - "name": "_txLocktime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 767, - "src": "9267:11:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 787, - "name": "_fundingOutputIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 769, - "src": "9292:19:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 788, - "name": "_merkleProof", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 771, - "src": "9325:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 789, - "name": "_txIndexInBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 773, - "src": "9351:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 790, - "name": "_bitcoinHeaders", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 775, - "src": "9380:15:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 780, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "9140:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 782, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "provideFraudBTCFundingProof", - "nodeType": "MemberAccess", - "referencedDeclaration": 1684, - "src": "9140:32:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_uint8_$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,bytes memory,bytes memory,bytes memory,bytes memory,uint8,bytes memory,uint256,bytes memory) returns (bool)" - } - }, - "id": 791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9140:265:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 792, - "nodeType": "ExpressionStatement", - "src": "9140:265:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 793, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9422:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 779, - "id": 794, - "nodeType": "Return", - "src": "9415:11:2" - } - ] - }, - "documentation": "@dev Takes a pre-parsed transaction and calculates values needed to verify funding\n @param _txVersion Transaction version number (4-byte LE)\n @param _txInputVector All transaction inputs prepended by the number of inputs encoded as a VarInt, max 0xFC(252) inputs\n @param _txOutputVector All transaction outputs prepended by the number of outputs encoded as a VarInt, max 0xFC(252) outputs\n @param _txLocktime Final 4 bytes of the transaction\n @param _fundingOutputIndex Index of funding output in _txOutputVector (0-indexed)\n @param _merkleProof The merkle proof of transaction inclusion in a block\n @param _txIndexInBlock Transaction index in the block (1-indexed)\n @param _bitcoinHeaders Single bytestring of 80-byte bitcoin headers, lowest height first\n @return True if no errors are thrown", - "id": 796, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "provideFraudBTCFundingProof", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 776, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 761, - "name": "_txVersion", - "nodeType": "VariableDeclaration", - "scope": 796, - "src": "8828:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 760, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8828:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 763, - "name": "_txInputVector", - "nodeType": "VariableDeclaration", - "scope": 796, - "src": "8861:27:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 762, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8861:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 765, - "name": "_txOutputVector", - "nodeType": "VariableDeclaration", - "scope": 796, - "src": "8898:28:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 764, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8898:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 767, - "name": "_txLocktime", - "nodeType": "VariableDeclaration", - "scope": 796, - "src": "8936:24:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 766, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "8936:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 769, - "name": "_fundingOutputIndex", - "nodeType": "VariableDeclaration", - "scope": 796, - "src": "8970:25:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 768, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "8970:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 771, - "name": "_merkleProof", - "nodeType": "VariableDeclaration", - "scope": 796, - "src": "9005:25:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 770, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9005:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 773, - "name": "_txIndexInBlock", - "nodeType": "VariableDeclaration", - "scope": 796, - "src": "9040:23:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 772, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "9040:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 775, - "name": "_bitcoinHeaders", - "nodeType": "VariableDeclaration", - "scope": 796, - "src": "9073:28:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 774, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "9073:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8818:289:2" - }, - "returnParameters": { - "id": 779, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 778, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 796, - "src": "9124:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 777, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9124:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9123:6:2" - }, - "scope": 965, - "src": "8782:651:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 832, - "nodeType": "Block", - "src": "10960:298:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 820, - "name": "_txVersion", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 798, - "src": "11011:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 821, - "name": "_txInputVector", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 800, - "src": "11035:14:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 822, - "name": "_txOutputVector", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 802, - "src": "11063:15:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 823, - "name": "_txLocktime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 804, - "src": "11092:11:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 824, - "name": "_fundingOutputIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 806, - "src": "11117:19:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 825, - "name": "_merkleProof", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 808, - "src": "11150:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 826, - "name": "_txIndexInBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 810, - "src": "11176:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 827, - "name": "_bitcoinHeaders", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 812, - "src": "11205:15:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 817, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "10970:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 819, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "provideBTCFundingProof", - "nodeType": "MemberAccess", - "referencedDeclaration": 1797, - "src": "10970:27:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_uint8_$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,bytes memory,bytes memory,bytes memory,bytes memory,uint8,bytes memory,uint256,bytes memory) returns (bool)" - } - }, - "id": 828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10970:260:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 829, - "nodeType": "ExpressionStatement", - "src": "10970:260:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 830, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11247:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 816, - "id": 831, - "nodeType": "Return", - "src": "11240:11:2" - } - ] - }, - "documentation": "@notice Anyone may notify the deposit of a funding proof to activate the deposit\n This is the happy-path of the funding flow. It means that we have succeeded\n @dev Takes a pre-parsed transaction and calculates values needed to verify funding\n @param _txVersion Transaction version number (4-byte LE)\n @param _txInputVector All transaction inputs prepended by the number of inputs encoded as a VarInt, max 0xFC(252) inputs\n @param _txOutputVector All transaction outputs prepended by the number of outputs encoded as a VarInt, max 0xFC(252) outputs\n @param _txLocktime Final 4 bytes of the transaction\n @param _fundingOutputIndex Index of funding output in _txOutputVector (0-indexed)\n @param _merkleProof The merkle proof of transaction inclusion in a block\n @param _txIndexInBlock Transaction index in the block (1-indexed)\n @param _bitcoinHeaders Single bytestring of 80-byte bitcoin headers, lowest height first\n @return True if no errors are thrown", - "id": 833, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "provideBTCFundingProof", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 813, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 798, - "name": "_txVersion", - "nodeType": "VariableDeclaration", - "scope": 833, - "src": "10658:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 797, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10658:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 800, - "name": "_txInputVector", - "nodeType": "VariableDeclaration", - "scope": 833, - "src": "10691:27:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 799, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10691:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 802, - "name": "_txOutputVector", - "nodeType": "VariableDeclaration", - "scope": 833, - "src": "10728:28:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 801, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10728:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 804, - "name": "_txLocktime", - "nodeType": "VariableDeclaration", - "scope": 833, - "src": "10766:24:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 803, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10766:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 806, - "name": "_fundingOutputIndex", - "nodeType": "VariableDeclaration", - "scope": 833, - "src": "10800:25:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 805, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "10800:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 808, - "name": "_merkleProof", - "nodeType": "VariableDeclaration", - "scope": 833, - "src": "10835:25:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 807, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10835:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 810, - "name": "_txIndexInBlock", - "nodeType": "VariableDeclaration", - "scope": 833, - "src": "10870:23:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 809, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "10870:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 812, - "name": "_bitcoinHeaders", - "nodeType": "VariableDeclaration", - "scope": 833, - "src": "10903:28:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 811, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "10903:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10648:289:2" - }, - "returnParameters": { - "id": 816, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 815, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 833, - "src": "10954:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 814, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10954:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10953:6:2" - }, - "scope": 965, - "src": "10617:641:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 860, - "nodeType": "Block", - "src": "12024:103:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 851, - "name": "_v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 835, - "src": "12062:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 852, - "name": "_r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 837, - "src": "12066:2:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 853, - "name": "_s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 839, - "src": "12070:2:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 854, - "name": "_signedDigest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 841, - "src": "12074:13:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 855, - "name": "_preimage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 843, - "src": "12089:9:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 848, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "12034:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 850, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "provideECDSAFraudProof", - "nodeType": "MemberAccess", - "referencedDeclaration": 2160, - "src": "12034:27:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_uint8_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,uint8,bytes32,bytes32,bytes32,bytes memory)" - } - }, - "id": 856, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12034:65:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 857, - "nodeType": "ExpressionStatement", - "src": "12034:65:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12116:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 847, - "id": 859, - "nodeType": "Return", - "src": "12109:11:2" - } - ] - }, - "documentation": "@notice Anyone can provide a signature that was not requested to prove fraud\n @dev ECDSA is NOT SECURE unless you verify the digest\n @param _v Signature recovery value\n @param _r Signature R value\n @param _s Signature S value\n @param _signedDigest The digest signed by the signature vrs tuple\n @param _preimage The sha256 preimage of the digest\n @return True if successful, otherwise revert", - "id": 861, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "provideECDSAFraudProof", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 844, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 835, - "name": "_v", - "nodeType": "VariableDeclaration", - "scope": 861, - "src": "11884:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 834, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "11884:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 837, - "name": "_r", - "nodeType": "VariableDeclaration", - "scope": 861, - "src": "11902:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 836, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11902:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 839, - "name": "_s", - "nodeType": "VariableDeclaration", - "scope": 861, - "src": "11922:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 838, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11922:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 841, - "name": "_signedDigest", - "nodeType": "VariableDeclaration", - "scope": 861, - "src": "11942:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 840, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11942:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 843, - "name": "_preimage", - "nodeType": "VariableDeclaration", - "scope": 861, - "src": "11973:22:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 842, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11973:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11874:127:2" - }, - "returnParameters": { - "id": 847, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 846, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 861, - "src": "12018:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 845, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12018:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12017:6:2" - }, - "scope": 965, - "src": "11843:284:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 885, - "nodeType": "Block", - "src": "12891:114:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 877, - "name": "_bitcoinTx", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 863, - "src": "12927:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 878, - "name": "_merkleProof", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 865, - "src": "12939:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 879, - "name": "_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 867, - "src": "12953:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 880, - "name": "_bitcoinHeaders", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 869, - "src": "12961:15:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 874, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "12901:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 876, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "provideSPVFraudProof", - "nodeType": "MemberAccess", - "referencedDeclaration": 2336, - "src": "12901:25:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer,bytes memory,bytes memory,uint256,bytes memory)" - } - }, - "id": 881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12901:76:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 882, - "nodeType": "ExpressionStatement", - "src": "12901:76:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 883, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12994:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 873, - "id": 884, - "nodeType": "Return", - "src": "12987:11:2" - } - ] - }, - "documentation": "@notice Anyone may notify the deposit of fraud via an SPV proof\n @dev We strong prefer ECDSA fraud proofs\n @param _bitcoinTx The bitcoin tx that purportedly contains the funding output\n @param _merkleProof The merkle proof of inclusion of the tx in the bitcoin block\n @param _index The index of the tx in the Bitcoin block (1-indexed)\n @param _bitcoinHeaders An array of tightly-packed bitcoin headers\n @return True if successful, otherwise revert", - "id": 886, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "provideSPVFraudProof", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 870, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 863, - "name": "_bitcoinTx", - "nodeType": "VariableDeclaration", - "scope": 886, - "src": "12742:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 862, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12742:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 865, - "name": "_merkleProof", - "nodeType": "VariableDeclaration", - "scope": 886, - "src": "12775:25:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 864, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12775:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 867, - "name": "_index", - "nodeType": "VariableDeclaration", - "scope": 886, - "src": "12810:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 866, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12810:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 869, - "name": "_bitcoinHeaders", - "nodeType": "VariableDeclaration", - "scope": 886, - "src": "12834:28:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 868, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12834:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12732:136:2" - }, - "returnParameters": { - "id": 873, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 872, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 886, - "src": "12885:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 871, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "12885:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12884:6:2" - }, - "scope": 965, - "src": "12703:302:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 898, - "nodeType": "Block", - "src": "13390:73:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 891, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "13400:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 893, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "purchaseSignerBondsAtAuction", - "nodeType": "MemberAccess", - "referencedDeclaration": 2445, - "src": "13400:33:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 894, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13400:35:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 895, - "nodeType": "ExpressionStatement", - "src": "13400:35:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 896, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13452:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 890, - "id": 897, - "nodeType": "Return", - "src": "13445:11:2" - } - ] - }, - "documentation": "\n LIQUIDATION\n\n\n @notice Closes an auction and purchases the signer bonds. Payout to buyer, funder, then signers if not fraud\n @dev For interface, reading auctionValue will give a past value. the current is better\n @return True if successful, revert otherwise", - "id": 899, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "purchaseSignerBondsAtAuction", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 887, - "nodeType": "ParameterList", - "parameters": [], - "src": "13365:2:2" - }, - "returnParameters": { - "id": 890, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 889, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 899, - "src": "13384:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 888, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13384:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13383:6:2" - }, - "scope": 965, - "src": "13328:135:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 911, - "nodeType": "Block", - "src": "13719:63:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 904, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "13729:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 906, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "notifyCourtesyCall", - "nodeType": "MemberAccess", - "referencedDeclaration": 2486, - "src": "13729:23:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 907, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13729:25:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 908, - "nodeType": "ExpressionStatement", - "src": "13729:25:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 909, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13771:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 903, - "id": 910, - "nodeType": "Return", - "src": "13764:11:2" - } - ] - }, - "documentation": "@notice Notify the contract that the signers are undercollateralized\n @dev Calls out to the system for oracle info\n @return True if successful, otherwise revert", - "id": 912, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "notifyCourtesyCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 900, - "nodeType": "ParameterList", - "parameters": [], - "src": "13694:2:2" - }, - "returnParameters": { - "id": 903, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 902, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 912, - "src": "13713:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 901, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "13713:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13712:6:2" - }, - "scope": 965, - "src": "13667:115:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 924, - "nodeType": "Block", - "src": "14043:61:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 917, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "14053:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 919, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "exitCourtesyCall", - "nodeType": "MemberAccess", - "referencedDeclaration": 2533, - "src": "14053:21:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 920, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14053:23:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 921, - "nodeType": "ExpressionStatement", - "src": "14053:23:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 922, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14093:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 916, - "id": 923, - "nodeType": "Return", - "src": "14086:11:2" - } - ] - }, - "documentation": "@notice Goes from courtesy call to active\n @dev Only callable if collateral is sufficient and the deposit is not expiring\n @return True if successful, otherwise revert", - "id": 925, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exitCourtesyCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 913, - "nodeType": "ParameterList", - "parameters": [], - "src": "14018:2:2" - }, - "returnParameters": { - "id": 916, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 915, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 925, - "src": "14037:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 914, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14037:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14036:6:2" - }, - "scope": 965, - "src": "13993:111:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 937, - "nodeType": "Block", - "src": "14378:81:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 930, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "14388:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 932, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "notifyUndercollateralizedLiquidation", - "nodeType": "MemberAccess", - "referencedDeclaration": 2561, - "src": "14388:41:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14388:43:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 934, - "nodeType": "ExpressionStatement", - "src": "14388:43:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 935, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14448:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 929, - "id": 936, - "nodeType": "Return", - "src": "14441:11:2" - } - ] - }, - "documentation": "@notice Notify the contract that the signers are undercollateralized\n @dev Calls out to the system for oracle info\n @return True if successful, otherwise revert", - "id": 938, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "notifyUndercollateralizedLiquidation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 926, - "nodeType": "ParameterList", - "parameters": [], - "src": "14353:2:2" - }, - "returnParameters": { - "id": 929, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 928, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 938, - "src": "14372:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 927, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14372:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14371:6:2" - }, - "scope": 965, - "src": "14308:151:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 950, - "nodeType": "Block", - "src": "14723:66:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 943, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "14733:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 945, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "notifyCourtesyTimeout", - "nodeType": "MemberAccess", - "referencedDeclaration": 2591, - "src": "14733:26:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14733:28:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 947, - "nodeType": "ExpressionStatement", - "src": "14733:28:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 948, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14778:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 942, - "id": 949, - "nodeType": "Return", - "src": "14771:11:2" - } - ] - }, - "documentation": "@notice Notifies the contract that the courtesy period has elapsed\n @dev This is treated as an abort, rather than fraud\n @return True if successful, otherwise revert", - "id": 951, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "notifyCourtesyTimeout", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 939, - "nodeType": "ParameterList", - "parameters": [], - "src": "14698:2:2" - }, - "returnParameters": { - "id": 942, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 941, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 951, - "src": "14717:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 940, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "14717:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14716:6:2" - }, - "scope": 965, - "src": "14668:121:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 963, - "nodeType": "Block", - "src": "15047:76:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 956, - "name": "self", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 509, - "src": "15057:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deposit_$4035_storage", - "typeString": "struct DepositUtils.Deposit storage ref" - } - }, - "id": 958, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "notifyDepositExpiryCourtesyCall", - "nodeType": "MemberAccess", - "referencedDeclaration": 2634, - "src": "15057:36:2", - "typeDescriptions": { - "typeIdentifier": "t_function_delegatecall_nonpayable$_t_struct$_Deposit_$4035_storage_ptr_$returns$__$bound_to$_t_struct$_Deposit_$4035_storage_ptr_$", - "typeString": "function (struct DepositUtils.Deposit storage pointer)" - } - }, - "id": 959, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15057:38:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 960, - "nodeType": "ExpressionStatement", - "src": "15057:38:2" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 961, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15112:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 955, - "id": 962, - "nodeType": "Return", - "src": "15105:11:2" - } - ] - }, - "documentation": "@notice Notifies the contract that its term limit has been reached\n @dev This initiates a courtesy call\n @return True if successful, otherwise revert", - "id": 964, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "notifyDepositExpiryCourtesyCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 952, - "nodeType": "ParameterList", - "parameters": [], - "src": "15022:2:2" - }, - "returnParameters": { - "id": 955, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 954, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 964, - "src": "15041:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 953, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "15041:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "15040:6:2" - }, - "scope": 965, - "src": "14982:141:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 966, - "src": "249:14876:2" - } - ], - "src": "0:15126:2" - }, - "compiler": { - "name": "solc", - "version": "0.5.10+commit.5a6ea5b1.Emscripten.clang" - }, - "networks": { - "1563533123569": { - "events": {}, - "links": { - "DepositLiquidation": "0x70Ca19Cc6c7172B5c317B77aACA24A8b77760ccd", - "DepositRedemption": "0xdC26A9CeD8ab85FB15bEc13E98ECbA4371F945f6", - "DepositFunding": "0xa7cB6ad6d4BCc9d52061Da3E38112aE5ff55fD85" - }, - "address": "0x209a5a56fE5863E9b0F2952DA249ad093377f4C5", - "transactionHash": "0xa0aad34739f7a9412274efdc35656c326de67f33afa5f4f39f3497b8fb5ea810" - }, - "1564486898078": { - "events": {}, - "links": { - "DepositLiquidation": "0x12C0EdA54b55557fd92052DDED162DfAD1184eae", - "DepositRedemption": "0xE8208de8E602E6612640e2C819592BdC4Ea00Ebd", - "DepositFunding": "0x2b53a5C9F2bd2e91F6568E4100D0EE776a9491dc" - }, - "address": "0x8E78B832aF0fe4372a5C6d02ebc79B09412A93dd", - "transactionHash": "0x3222311b9aa822e1f7ef83e99b9a89f5d21aef27b61795f80b81babe64772325" - }, - "1564576405726": { - "events": {}, - "links": { - "DepositLiquidation": "0x6b5092d9605F5E4DbA5de1ce73bE37CCBb5Ef756", - "DepositRedemption": "0x5d61B54C4e88EB6f6f9D5458Bf019418B7Ca7a27", - "DepositFunding": "0xd55Cc7DB3FD6166588953c2ce32718C6EAE7ee25" - }, - "address": "0x39C51906205D859824B8aD62dca3f7203521cdD5", - "transactionHash": "0x34915458f7ffb9ecb1eb96b4573cfa2c7f6a358fa8951f6a76a0215e71878e0d" - }, - "1564669548315": { - "events": {}, - "links": { - "DepositLiquidation": "0x8Df8d444979ac6097bE40BA2bC87b9308ac86292", - "DepositRedemption": "0x23AC9b97b92619620bFb2AC73f00D1f263d7d434", - "DepositFunding": "0xEAdb4537E4c4b5FeC8A3213a4B7Ab410ea385fa0" - }, - "address": "0x02D73EC532945Cff99D90349bc258ccCe60D7F25", - "transactionHash": "0x93f8ba3fa36f76f9075b06a49994dcad0703990dae71e6d6b95bd4d39fc9ad20" - }, - "1564683807489": { - "events": {}, - "links": { - "DepositLiquidation": "0xffAD451eeeEd2A987dc7f8E13F9Ce582c15B48b2", - "DepositRedemption": "0x3cbF0B80d1741D1988f06E9B47ECa8d0f197b1C9", - "DepositFunding": "0x6931051ecF0B9960489931E077192E6581f5E7aD" - }, - "address": "0x6b9a7B45030b98020149e4Aa5088Ea3d7080c31A", - "transactionHash": "0x911371d7f02a84455dd9737627b1f2059cb9914b61cfbf0c422d8e3de554a6c6" - }, - "1564760269629": { - "events": {}, - "links": { - "DepositLiquidation": "0x469eE32957cAFA45e0DC798f43ACb1fCeEA2525a", - "DepositRedemption": "0x72b80ddE9DEF987f6875bEbE8Af58031004981e5", - "DepositFunding": "0xaBf84fC9eB5860e2090E23DcED70332F6b34C739" - }, - "address": "0xca23003d71eb4cC6147e8F57bD823E4a73725662", - "transactionHash": "0xc1102d07066bf2e546458766679654c2341aae24f3af4ed66df4883528ea0f01" - }, - "1565004617282": { - "events": {}, - "links": { - "DepositLiquidation": "0xA85c5aE027F05a870727c663cB3C80D6A388A671", - "DepositRedemption": "0x5514b26d9E13148E223711667AEd57f45b4bE314", - "DepositFunding": "0x1522092EAcfF8B9D6d1Bd6F1d7503feC7a45e97F" - }, - "address": "0x84038e475934842CCd4E8825e85392AC5da65421", - "transactionHash": "0xa52b8f9f479c3201d282cdbb7727119f60fbc60969d06e60fedae3f33570bf90" - } - }, - "schemaVersion": "3.0.10", - "updatedAt": "2019-08-05T11:32:37.522Z", - "devdoc": { - "methods": { - "createNewDeposit(address,address,address,uint256,uint256)": { - "details": "This should be called by an approved contract, not a developer", - "params": { - "_m": "n for m-of-n" - }, - "return": "True if successful, otherwise revert" - }, - "exitCourtesyCall()": { - "details": "Only callable if collateral is sufficient and the deposit is not expiring", - "return": "True if successful, otherwise revert" - }, - "getCurrentState()": { - "details": "We implement this because contracts don't handle foreign enums well", - "return": "The 0-indexed state from the DepositStates enum" - }, - "increaseRedemptionFee(bytes8,bytes8)": { - "details": "This sends us back to AWAITING_WITHDRAWAL_SIGNATURE", - "params": { - "_newOutputValueBytes": "The new output's value", - "_previousOutputValueBytes": "The previous output's value" - }, - "return": "True if successful, False if prevented by timeout, otherwise revert" - }, - "notifyCourtesyCall()": { - "details": "Calls out to the system for oracle info", - "return": "True if successful, otherwise revert" - }, - "notifyCourtesyTimeout()": { - "details": "This is treated as an abort, rather than fraud", - "return": "True if successful, otherwise revert" - }, - "notifyDepositExpiryCourtesyCall()": { - "details": "This initiates a courtesy call", - "return": "True if successful, otherwise revert" - }, - "notifyFraudFundingTimeout()": { - "details": "This is not a funder fault. The signers have faulted, so the funder shouldn't fund", - "return": "True if successful, otherwise revert" - }, - "notifyFundingTimeout()": { - "details": "This is considered a funder fault, and we revoke their bond", - "return": "True if successful, otherwise revert" - }, - "notifyRedemptionProofTimeout()": { - "details": "This is considered fraud, and is punished", - "return": "True if successful, otherwise revert" - }, - "notifySignatureTimeout()": { - "details": "This is considered fraud, and is punished", - "return": "True if successful, otherwise revert" - }, - "notifySignerSetupFailure()": { - "details": "We rely on the keep system punishes the signers in this case", - "return": "True if successful, otherwise revert" - }, - "notifyUndercollateralizedLiquidation()": { - "details": "Calls out to the system for oracle info", - "return": "True if successful, otherwise revert" - }, - "provideBTCFundingProof(bytes,bytes,bytes,bytes,uint8,bytes,uint256,bytes)": { - "details": "Takes a pre-parsed transaction and calculates values needed to verify funding", - "params": { - "_bitcoinHeaders": "Single bytestring of 80-byte bitcoin headers, lowest height first", - "_fundingOutputIndex": "Index of funding output in _txOutputVector (0-indexed)", - "_merkleProof": "The merkle proof of transaction inclusion in a block", - "_txIndexInBlock": "Transaction index in the block (1-indexed)", - "_txInputVector": "All transaction inputs prepended by the number of inputs encoded as a VarInt, max 0xFC(252) inputs", - "_txLocktime": "Final 4 bytes of the transaction", - "_txOutputVector": "All transaction outputs prepended by the number of outputs encoded as a VarInt, max 0xFC(252) outputs", - "_txVersion": "Transaction version number (4-byte LE)" - }, - "return": "True if no errors are thrown" - }, - "provideECDSAFraudProof(uint8,bytes32,bytes32,bytes32,bytes)": { - "details": "ECDSA is NOT SECURE unless you verify the digest", - "params": { - "_preimage": "The sha256 preimage of the digest", - "_r": "Signature R value", - "_s": "Signature S value", - "_signedDigest": "The digest signed by the signature vrs tuple", - "_v": "Signature recovery value" - }, - "return": "True if successful, otherwise revert" - }, - "provideFraudBTCFundingProof(bytes,bytes,bytes,bytes,uint8,bytes,uint256,bytes)": { - "details": "Takes a pre-parsed transaction and calculates values needed to verify funding", - "params": { - "_bitcoinHeaders": "Single bytestring of 80-byte bitcoin headers, lowest height first", - "_fundingOutputIndex": "Index of funding output in _txOutputVector (0-indexed)", - "_merkleProof": "The merkle proof of transaction inclusion in a block", - "_txIndexInBlock": "Transaction index in the block (1-indexed)", - "_txInputVector": "All transaction inputs prepended by the number of inputs encoded as a VarInt, max 0xFC(252) inputs", - "_txLocktime": "Final 4 bytes of the transaction", - "_txOutputVector": "All transaction outputs prepended by the number of outputs encoded as a VarInt, max 0xFC(252) outputs", - "_txVersion": "Transaction version number (4-byte LE)" - }, - "return": "True if no errors are thrown" - }, - "provideFundingECDSAFraudProof(uint8,bytes32,bytes32,bytes32,bytes)": { - "details": "ECDSA is NOT SECURE unless you verify the digest", - "params": { - "_preimage": "The sha256 preimage of the digest", - "_r": "Signature R value", - "_s": "Signature S value", - "_signedDigest": "The digest signed by the signature vrs tuple", - "_v": "Signature recovery value" - }, - "return": "True if successful, otherwise revert" - }, - "provideRedemptionProof(bytes,bytes,uint256,bytes)": { - "details": "The signers will be penalized if this is not called", - "params": { - "_bitcoinHeaders": "An array of tightly-packed bitcoin headers", - "_bitcoinTx": "The bitcoin tx that purportedly contain the redemption output", - "_index": "The index of the tx in the Bitcoin block (1-indexed)", - "_merkleProof": "The merkle proof of inclusion of the tx in the bitcoin block" - }, - "return": "True if successful, otherwise revert" - }, - "provideRedemptionSignature(uint8,bytes32,bytes32)": { - "details": "The signers will be penalized if this (or provideRedemptionProof) is not called", - "params": { - "_r": "Signature R value", - "_s": "Signature S value", - "_v": "Signature recovery value" - }, - "return": "True if successful, False if prevented by timeout, otherwise revert" - }, - "provideSPVFraudProof(bytes,bytes,uint256,bytes)": { - "details": "We strong prefer ECDSA fraud proofs", - "params": { - "_bitcoinHeaders": "An array of tightly-packed bitcoin headers", - "_bitcoinTx": "The bitcoin tx that purportedly contains the funding output", - "_index": "The index of the tx in the Bitcoin block (1-indexed)", - "_merkleProof": "The merkle proof of inclusion of the tx in the bitcoin block" - }, - "return": "True if successful, otherwise revert" - }, - "purchaseSignerBondsAtAuction()": { - "details": "For interface, reading auctionValue will give a past value. the current is better", - "return": "True if successful, revert otherwise" - }, - "requestRedemption(bytes8,bytes20)": { - "details": "The redeemer specifies details about the Bitcoin redemption tx", - "params": { - "_outputValueBytes": "The 8-byte LE output size", - "_requesterPKH": "The 20-byte Bitcoin pubkeyhash to which to send funds" - }, - "return": "True if successful, otherwise revert" - }, - "retrieveSignerPubkey()": { - "details": "We store the pubkey as 2 bytestrings, X and Y.", - "return": "True if successful, otherwise revert" - } - } - }, - "userdoc": { - "methods": { - "createNewDeposit(address,address,address,uint256,uint256)": { - "notice": "The system can spin up a new deposit" - }, - "exitCourtesyCall()": { - "notice": "Goes from courtesy call to active" - }, - "getCurrentState()": { - "notice": "Get the integer representing the current state" - }, - "increaseRedemptionFee(bytes8,bytes8)": { - "notice": "Anyone may notify the contract that a fee bump is needed" - }, - "notifyCourtesyCall()": { - "notice": "Notify the contract that the signers are undercollateralized" - }, - "notifyCourtesyTimeout()": { - "notice": "Notifies the contract that the courtesy period has elapsed" - }, - "notifyDepositExpiryCourtesyCall()": { - "notice": "Notifies the contract that its term limit has been reached" - }, - "notifyFraudFundingTimeout()": { - "notice": "Anyone may notify the contract no funding proof was submitted during funding fraud" - }, - "notifyFundingTimeout()": { - "notice": "Anyone may notify the contract that the funder has failed to send BTC" - }, - "notifyRedemptionProofTimeout()": { - "notice": "Anyone may notify the contract that the signers have failed to produce a redemption proof" - }, - "notifySignatureTimeout()": { - "notice": "Anyone may notify the contract that the signers have failed to produce a signature" - }, - "notifySignerSetupFailure()": { - "notice": "Anyone may notify the contract that signing group setup has timed out" - }, - "notifyUndercollateralizedLiquidation()": { - "notice": "Notify the contract that the signers are undercollateralized" - }, - "provideBTCFundingProof(bytes,bytes,bytes,bytes,uint8,bytes,uint256,bytes)": { - "notice": "Anyone may notify the deposit of a funding proof to activate the deposit This is the happy-path of the funding flow. It means that we have succeeded" - }, - "provideECDSAFraudProof(uint8,bytes32,bytes32,bytes32,bytes)": { - "notice": "Anyone can provide a signature that was not requested to prove fraud" - }, - "provideFundingECDSAFraudProof(uint8,bytes32,bytes32,bytes32,bytes)": { - "notice": "Anyone can provide a signature that was not requested to prove fraud during funding" - }, - "provideRedemptionProof(bytes,bytes,uint256,bytes)": { - "notice": "Anyone may provide a withdrawal proof to prove redemption" - }, - "provideRedemptionSignature(uint8,bytes32,bytes32)": { - "notice": "Anyone may provide a withdrawal signature if it was requested" - }, - "provideSPVFraudProof(bytes,bytes,uint256,bytes)": { - "notice": "Anyone may notify the deposit of fraud via an SPV proof" - }, - "purchaseSignerBondsAtAuction()": { - "notice": " LIQUIDATION Closes an auction and purchases the signer bonds. Payout to buyer, funder, then signers if not fraud" - }, - "requestRedemption(bytes8,bytes20)": { - "notice": "Anyone can request redemption" - }, - "retrieveSignerPubkey()": { - "notice": "we poll the Keep contract to retrieve our pubkey" - } - } - } -} \ No newline at end of file diff --git a/client/src/eth/artifacts/DepositFactory.json b/client/src/eth/artifacts/DepositFactory.json deleted file mode 100644 index 9ae7b292..00000000 --- a/client/src/eth/artifacts/DepositFactory.json +++ /dev/null @@ -1,1891 +0,0 @@ -{ - "contractName": "DepositFactory", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "masterDepositAddress", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "name": "_masterDepositAddress", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "depositCloneAddress", - "type": "address" - } - ], - "name": "DepositCloneCreated", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "name": "_TBTCSystem", - "type": "address" - }, - { - "name": "_TBTCToken", - "type": "address" - }, - { - "name": "_KeepBridge", - "type": "address" - }, - { - "name": "_keepThreshold", - "type": "uint256" - }, - { - "name": "_keepSize", - "type": "uint256" - } - ], - "name": "createDeposit", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.10+commit.5a6ea5b1\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"masterDepositAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_TBTCSystem\",\"type\":\"address\"},{\"name\":\"_TBTCToken\",\"type\":\"address\"},{\"name\":\"_KeepBridge\",\"type\":\"address\"},{\"name\":\"_keepThreshold\",\"type\":\"uint256\"},{\"name\":\"_keepSize\",\"type\":\"uint256\"}],\"name\":\"createDeposit\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_masterDepositAddress\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"depositCloneAddress\",\"type\":\"address\"}],\"name\":\"DepositCloneCreated\",\"type\":\"event\"}],\"devdoc\":{\"details\":\"We avoid redeployment of deposit contract by using the clone factory. Proxy delegates calls to Deposit and therefore does not affect deposit state. This means that we only need to deploy the deposit contracts once. The factory provides clean state for every new deposit clone.\",\"methods\":{\"constructor\":{\"details\":\"Set the master deposit contract address on contract initialization\",\"params\":{\"_masterDepositAddress\":\"The address of the master deposit contract\"}},\"createDeposit(address,address,address,uint256,uint256)\":{\"details\":\"Calls createNewDeposit from deposit contract as init method. We don't offer pure createClone, meaning that the only way to create a clone is by also calling createNewDeposit() Deposits created this way will never pass by state 0 (START)\",\"params\":{\"_KeepBridge\":\"Address of Keep Bridge contract\",\"_TBTCSystem\":\"Address of system contract\",\"_TBTCToken\":\"Address of TBTC token contract\",\"_keepSize\":\"Number of all members in a keep\",\"_keepThreshold\":\"Minimum number of honest keep members\"},\"return\":\"True if successful, otherwise revert\"}},\"title\":\"Deposit Factory\"},\"userdoc\":{\"methods\":{\"createDeposit(address,address,address,uint256,uint256)\":{\"notice\":\"Creates a new deposit instance\"}},\"notice\":\"Factory for the creation of new deposit clones.\"}},\"settings\":{\"compilationTarget\":{\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/proxy/DepositFactory.sol\":\"DepositFactory\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/DepositLog.sol\":{\"keccak256\":\"0xbef5c1473925ff0d33942d3c2a2b0a78694ef760070d0d1ca6dbd059279e071a\",\"urls\":[\"bzzr://80bf4dcd38161beb7b037b1550a30d7a0637df0b7b7b4a61dd233a3124ef37b9\",\"dweb:/ipfs/QmVQpCv5j9PkkhSwTe8EZ4hjaVYxXDVHu4QwC6ZeFsLVe7\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/Deposit.sol\":{\"keccak256\":\"0x8deef2395253bc60f6dc85432a0ad3c857150c8b0b32fddbb79599b178ca3849\",\"urls\":[\"bzzr://54890c85f8061e4d73e643102a90f8f42766fc9d5bd07db4b6c920faf50167d4\",\"dweb:/ipfs/QmSfzTU5kAa2jbxgHdTcfCpmgZiKoVnfDatdpY3McrL3sJ\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/DepositFunding.sol\":{\"keccak256\":\"0xbf545094a4d5d60427cac3fd57990933277bdcca676c35c7a32f4d3d304b9a76\",\"urls\":[\"bzzr://49c650902d21ed439222d9871ef238a9bc82bc26cbccbc14fb40f6ce2b251846\",\"dweb:/ipfs/QmX5ypv6s8y5Apbu6xFnPxSaSEvsoBNsWJ63Ht2cQk8WCJ\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/DepositLiquidation.sol\":{\"keccak256\":\"0xf2deaa076ecda3087efe2486a4b34baf7ec849745416cc3ac50e73a5109d9558\",\"urls\":[\"bzzr://48db1b92575b95a9be6854c03b9ee44daee26d21f1c20ea742470623a42cf390\",\"dweb:/ipfs/QmaRrHRE6YgLjznyQHsxbmu6AJR5kFmM1cWQH3roWtYACg\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/DepositRedemption.sol\":{\"keccak256\":\"0x258d2c3bb0c57e38a83e52b5a37a6579af2871954718593008a93e417a1830e9\",\"urls\":[\"bzzr://b337a89d36fb3938c2d7bad882c5f9a693952cfd123d181741e925a15a75d31e\",\"dweb:/ipfs/QmQGa1LjpZkqf379Tf1gmMJHhA3jrbUVpUFNcvrpAg1h8o\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/DepositStates.sol\":{\"keccak256\":\"0xbeea5c039fd45c8a21ae3955218510b8ab1c4cd3a3f72a342f3a595abf46e96b\",\"urls\":[\"bzzr://b3c128900d39699e61d3801cd95d63735c51bffb3b7759e403396495fbd1638d\",\"dweb:/ipfs/QmaVLgGAtsyjkZENqU3aSZ4dxN1bXYqxKAeSfNhvTGQULQ\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/DepositUtils.sol\":{\"keccak256\":\"0x729f0e54e9422ac8c714a5c0a30dbb0263e7dfe055c8c75aec6e5b2ffff0927b\",\"urls\":[\"bzzr://9daaed148f08a5f5f7892c7e41d990d9148c688ad938ffa2d7fc8777a42c5a5f\",\"dweb:/ipfs/QmWp3oMVPbeWHdD5WSmzopGS2NJBfto18fR2Se8CecEDp3\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/OutsourceDepositLogging.sol\":{\"keccak256\":\"0xa8de2bf39162a382765dfd40a358af160181278cf1c5e295eb33bc7b9372131b\",\"urls\":[\"bzzr://bbdcfdb344fb100125e1e31e56333a2a434d4ccffef09a456c4e7b4b37be6c04\",\"dweb:/ipfs/QmQxEPsR5htQQEEgvaU3EFsRrfk8pwfNYTkV7oA8bwACKF\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/TBTCConstants.sol\":{\"keccak256\":\"0xe6bdaf587542ac8d1b070ad001825a7727e6838a9cb7f95254b642717f0a173b\",\"urls\":[\"bzzr://f434115daa5b403b772284b690bb9231f83a3f82a7249526bfe040494dbd69c0\",\"dweb:/ipfs/QmPc6yhC3H3wEsBTmG93nMDmycg9bfvTDYgU3cYYa9i491\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/IERC721.sol\":{\"keccak256\":\"0xd2e386ce780b175d8975d09ec8c60a66cabc91022dd19c1c23816b7941036fbc\",\"urls\":[\"bzzr://01d95810573347b0dffcd534cce8c3ff3d19daa211ec9069a484d584a1aa0653\",\"dweb:/ipfs/QmXCWZ4Z5Jfbq9k6BqDQiBctUtdqSVtFTtBhK8Nd9rSjkJ\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/IKeep.sol\":{\"keccak256\":\"0xaf7030cfb935478c97a8788bb27d7ec8a0e5356341558c2ede3f2119bc53c4f9\",\"urls\":[\"bzzr://e6b50d2077cfc221a47cfd505af039d3fa683b0b461421c2a777f47697be0103\",\"dweb:/ipfs/QmbBsVBDD2652786kJHR6A4DXjuAdx3GHHL6FtiJJe8yo3\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/ITBTCSystem.sol\":{\"keccak256\":\"0x848a4d3ef289d9932e969f99a353c575a96f3f30474363a74537f56591738393\",\"urls\":[\"bzzr://eda27ecc511bf98fd3a7036b63e11f2807d02d4bfeaf6d946e380b1a6dffe114\",\"dweb:/ipfs/QmWUsXW5UkjykcgfUgd8fA6MR8G342xpCvX4mYfhW5atgV\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/proxy/CloneFactory.sol\":{\"keccak256\":\"0x4d190076feac8835266df10f2334cef57529d7913ad45f40f6307bd877443414\",\"urls\":[\"bzzr://25f4ef7a8fc08e64c0d69f59d93f41559f4fb96acc2c48f21d125a817fcc1a2d\",\"dweb:/ipfs/QmafkJuPi9ot4WvaVQejibfujcMpe7nJEXKeTzY434czZ7\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/proxy/DepositFactory.sol\":{\"keccak256\":\"0xb65d1d7ad0dee9a981662f1435b9c39cdbf52c6c083a7b0b2df0406e77bd0c47\",\"urls\":[\"bzzr://c4e2a9de05323ef9ffcc3b4ad02a06717e7768c4ec49f9ab38b4d0676bde1c38\",\"dweb:/ipfs/QmVRSeUUs4W7VsQ8SYXtoAwyXt964mJsE8v8g2YSppG7zG\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/system/TBTCToken.sol\":{\"keccak256\":\"0x53f22f54c0030dceb3692314ae6d31f65a9300acb45ebb54cb0ddcf7cee9031a\",\"urls\":[\"bzzr://9ee867d700826112da33036fbb96da8848d12c20f437c1f798e895ffcb5dd71b\",\"dweb:/ipfs/Qmb5J4wNccMSBBu8uFDrQxbcTBjBQ88DtuUnsppy5qSgyk\"]},\"bitcoin-spv/contracts/BTCUtils.sol\":{\"keccak256\":\"0xb5ceddefcc85490aa6958e157d6a191a2689d95909b6c47b5257c0c4b86518d4\",\"urls\":[\"bzzr://dfc6f51453a1eb2211907a5e02dbd1a74413357c77cd1a9650d577ff05f3a9d2\",\"dweb:/ipfs/Qma9Gv3VCMFVsTGjfEQhpPjAiBvhrBgHAXyJZcragLoCXY\"]},\"bitcoin-spv/contracts/BytesLib.sol\":{\"keccak256\":\"0x03247b95034ca087f9d66fbc974b0554e10d77329c6a469a0390db42ab40027a\",\"urls\":[\"bzzr://7167d0a93ec0d79682e4e3d85be67b554cce0c1a1b0f231745a2fa2a6912b078\",\"dweb:/ipfs/QmQpPxSfKcT94pG3mAJL1Dy3qVX23nacju4bVC6SSENLtc\"]},\"bitcoin-spv/contracts/SafeMath.sol\":{\"keccak256\":\"0x2e9c328d73914b46c49780207e7f1560ad94a56608e548757233a2a8ee98b8d9\",\"urls\":[\"bzzr://19d1a36d045b0d72d0750ca569f2dea9f6d7f1dffa9ae6123af86684e81e5bc4\",\"dweb:/ipfs/QmfNDFWTfFksjQ5eA5amWFvcZ6KypuyRP186JvyD3fRqe4\"]},\"bitcoin-spv/contracts/SigCheck.sol\":{\"keccak256\":\"0xd8f8e7fe91df8f983202ab1e16d10991a3de72c80fa36568861c43f82b81a7ac\",\"urls\":[\"bzzr://bad8518b27958da8c0995bf75ae2133ccf55c3dbed0da02f59697cca02956fa8\",\"dweb:/ipfs/QmNY6jvXVDeED46ykbtCVkQfWgwyRkmPktHAjNr1H8A9Wn\"]},\"bitcoin-spv/contracts/ValidateSPV.sol\":{\"keccak256\":\"0xc458b1297a2d0d86aa31d3ad1a6a580702cb2950e7b575b86c17da63a5e2acc4\",\"urls\":[\"bzzr://0384d8405c1de0f006384c53eabce3156507f5b91aa33a09cbcd36d29e58c620\",\"dweb:/ipfs/QmPoTf9UomhY4c4nWwBMVgz6Zg1RFQn7hREeE6BDJieyiZ\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\",\"dweb:/ipfs/QmV3yVktya1s617QmuzQR2CfuJgUi3dR2xEZY9ecmqZ2G1\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\",\"dweb:/ipfs/QmcyytaLs7zFdb4Uu7C5PmQRhQdB3wA3fUdkV6mkYfdDFH\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0xc61b3603089b09a730d8ca72e9133a496cc4405da40e9b87c12f073245d774bf\",\"urls\":[\"bzzr://f280f38d5ab6e1b89fd898ccd3901054a56572c141d91d30302e2db1db4cc6ff\",\"dweb:/ipfs/QmbtwNwAJEehWWL7yGGyyMoenQvcqtz91pqLgQPpLRoLYC\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\",\"dweb:/ipfs/QmP5NaEwZthQeM2ESz4WTT3osrP7jhbvu7ocbttBi2JAw6\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516102933803806102938339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b031990921691909117905561022e806100656000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80639da1e2441461003b578063f791940e1461005f575b600080fd5b6100436100a1565b604080516001600160a01b039092168252519081900360200190f35b610043600480360360a081101561007557600080fd5b506001600160a01b038135811691602081013582169160408201351690606081013590608001356100b0565b6000546001600160a01b031681565b6000805481906100c8906001600160a01b03166101a7565b6040805163e64bc82960e01b81526001600160a01b038a8116600483015289811660248301528881166044830152606482018890526084820187905291519293509083169163e64bc8299160a4808201926020929091908290030181600087803b15801561013557600080fd5b505af1158015610149573d6000803e3d6000fd5b505050506040513d602081101561015f57600080fd5b5050604080516001600160a01b038316815290517f1d6e7961301df0f19b325bf7669f5b932069b5ad8f9b71292351c7bed17cf4f19181900360200190a19695505050505050565b6000808260601b9050604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528160148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f094935050505056fea265627a7a723058202b60e201c9d10af915e428593eb689feae9cb76df0e99e32a462b6125222956b64736f6c634300050a0032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80639da1e2441461003b578063f791940e1461005f575b600080fd5b6100436100a1565b604080516001600160a01b039092168252519081900360200190f35b610043600480360360a081101561007557600080fd5b506001600160a01b038135811691602081013582169160408201351690606081013590608001356100b0565b6000546001600160a01b031681565b6000805481906100c8906001600160a01b03166101a7565b6040805163e64bc82960e01b81526001600160a01b038a8116600483015289811660248301528881166044830152606482018890526084820187905291519293509083169163e64bc8299160a4808201926020929091908290030181600087803b15801561013557600080fd5b505af1158015610149573d6000803e3d6000fd5b505050506040513d602081101561015f57600080fd5b5050604080516001600160a01b038316815290517f1d6e7961301df0f19b325bf7669f5b932069b5ad8f9b71292351c7bed17cf4f19181900360200190a19695505050505050565b6000808260601b9050604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528160148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f094935050505056fea265627a7a723058202b60e201c9d10af915e428593eb689feae9cb76df0e99e32a462b6125222956b64736f6c634300050a0032", - "sourceMap": "474:1888:17:-;;;956:111;8:9:-1;5:2;;;30:1;27;20:12;5:2;956:111:17;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;956:111:17;1016:20;:44;;-1:-1:-1;;;;;1016:44:17;;;-1:-1:-1;;;;;;1016:44:17;;;;;;;;;474:1888;;;;;;", - "deployedSourceMap": "474:1888:17:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;474:1888:17;;;;;;;;;;;;;;;;;;;;;;;;629:35;;;:::i;:::-;;;;-1:-1:-1;;;;;629:35:17;;;;;;;;;;;;;;1879:481;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;1879:481:17;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;629:35::-;;;-1:-1:-1;;;;;629:35:17;;:::o;1879:481::-;2069:7;2123:20;;2069:7;;2111:33;;-1:-1:-1;;;;;2123:20:17;2111:11;:33::i;:::-;2154:121;;;-1:-1:-1;;;2154:121:17;;-1:-1:-1;;;;;2154:121:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2088:56;;-1:-1:-1;2154:56:17;;;;;;:121;;;;;;;;;;;;;;;-1:-1:-1;2154:56:17;:121;;;5:2:-1;;;;30:1;27;20:12;5:2;2154:121:17;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2154:121:17;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;2291:33:17;;;-1:-1:-1;;;;;2291:33:17;;;;;;;;;;;2154:121;2291:33;;;2341:12;1879:481;-1:-1:-1;;;;;;1879:481:17:o;1497:441:16:-;1552:14;1574:19;1604:6;1596:15;;1574:37;;1653:4;1647:11;-1:-1:-1;;;1672:5:16;1665:81;1778:11;1771:4;1764:5;1760:16;1753:37;-1:-1:-1;;;1815:4:16;1808:5;1804:16;1797:92;1923:4;1916:5;1913:1;1906:22;1896:32;1626:308;-1:-1:-1;;;;1626:308:16:o", - "source": "pragma solidity ^0.5.10;\n\nimport \"./CloneFactory.sol\";\nimport \"../deposit/Deposit.sol\";\n\n/// @title Deposit Factory\n/// @notice Factory for the creation of new deposit clones.\n/// @dev We avoid redeployment of deposit contract by using the clone factory.\n/// Proxy delegates calls to Deposit and therefore does not affect deposit state.\n/// This means that we only need to deploy the deposit contracts once.\n/// The factory provides clean state for every new deposit clone.\ncontract DepositFactory is CloneFactory{\n\n // Holds the address of the deposit contract\n // which will be used as a master contract for cloning.\n address public masterDepositAddress;\n\n event DepositCloneCreated(address depositCloneAddress);\n\n /// @dev Set the master deposit contract address\n /// on contract initialization\n /// @param _masterDepositAddress The address of the master deposit contract\n constructor(address _masterDepositAddress) public {\n masterDepositAddress = _masterDepositAddress;\n }\n\n /// @notice Creates a new deposit instance\n /// @dev Calls createNewDeposit from deposit contract as init method.\n /// We don't offer pure createClone, meaning that the only way\n /// to create a clone is by also calling createNewDeposit()\n /// Deposits created this way will never pass by state 0 (START)\n /// @param _TBTCSystem Address of system contract\n /// @param _TBTCToken Address of TBTC token contract\n /// @param _KeepBridge Address of Keep Bridge contract\n /// @param _keepThreshold Minimum number of honest keep members\n /// @param _keepSize Number of all members in a keep\n /// @return True if successful, otherwise revert\n function createDeposit (\n address _TBTCSystem,\n address _TBTCToken,\n address _KeepBridge,\n uint256 _keepThreshold,\n uint256 _keepSize\n ) public returns(address) {\n address cloneAddress = createClone(masterDepositAddress);\n Deposit(address(uint160(cloneAddress))).createNewDeposit(_TBTCSystem, _TBTCToken, _KeepBridge, _keepThreshold, _keepSize);\n\n emit DepositCloneCreated(cloneAddress);\n return cloneAddress;\n }\n}", - "sourcePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/proxy/DepositFactory.sol", - "ast": { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/proxy/DepositFactory.sol", - "exportedSymbols": { - "DepositFactory": [ - 6128 - ] - }, - "id": 6129, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 6064, - "literals": [ - "solidity", - "^", - "0.5", - ".10" - ], - "nodeType": "PragmaDirective", - "src": "0:24:17" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/proxy/CloneFactory.sol", - "file": "./CloneFactory.sol", - "id": 6065, - "nodeType": "ImportDirective", - "scope": 6129, - "sourceUnit": 6063, - "src": "26:28:17", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/Deposit.sol", - "file": "../deposit/Deposit.sol", - "id": 6066, - "nodeType": "ImportDirective", - "scope": 6129, - "sourceUnit": 966, - "src": "55:32:17", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6067, - "name": "CloneFactory", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6062, - "src": "501:12:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_CloneFactory_$6062", - "typeString": "contract CloneFactory" - } - }, - "id": 6068, - "nodeType": "InheritanceSpecifier", - "src": "501:12:17" - } - ], - "contractDependencies": [ - 6062 - ], - "contractKind": "contract", - "documentation": "@title Deposit Factory\n @notice Factory for the creation of new deposit clones.\n @dev We avoid redeployment of deposit contract by using the clone factory.\n Proxy delegates calls to Deposit and therefore does not affect deposit state.\n This means that we only need to deploy the deposit contracts once.\n The factory provides clean state for every new deposit clone.", - "fullyImplemented": true, - "id": 6128, - "linearizedBaseContracts": [ - 6128, - 6062 - ], - "name": "DepositFactory", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 6070, - "name": "masterDepositAddress", - "nodeType": "VariableDeclaration", - "scope": 6128, - "src": "629:35:17", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6069, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "629:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 6074, - "name": "DepositCloneCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 6073, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6072, - "indexed": false, - "name": "depositCloneAddress", - "nodeType": "VariableDeclaration", - "scope": 6074, - "src": "697:27:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6071, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "697:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "696:29:17" - }, - "src": "671:55:17" - }, - { - "body": { - "id": 6083, - "nodeType": "Block", - "src": "1006:61:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6079, - "name": "masterDepositAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6070, - "src": "1016:20:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6080, - "name": "_masterDepositAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6076, - "src": "1039:21:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1016:44:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6082, - "nodeType": "ExpressionStatement", - "src": "1016:44:17" - } - ] - }, - "documentation": "@dev Set the master deposit contract address\n on contract initialization\n @param _masterDepositAddress The address of the master deposit contract", - "id": 6084, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6077, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6076, - "name": "_masterDepositAddress", - "nodeType": "VariableDeclaration", - "scope": 6084, - "src": "968:29:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6075, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "968:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "967:31:17" - }, - "returnParameters": { - "id": 6078, - "nodeType": "ParameterList", - "parameters": [], - "src": "1006:0:17" - }, - "scope": 6128, - "src": "956:111:17", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6126, - "nodeType": "Block", - "src": "2078:282:17", - "statements": [ - { - "assignments": [ - 6100 - ], - "declarations": [ - { - "constant": false, - "id": 6100, - "name": "cloneAddress", - "nodeType": "VariableDeclaration", - "scope": 6126, - "src": "2088:20:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6099, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2088:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6104, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6102, - "name": "masterDepositAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6070, - "src": "2123:20:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6101, - "name": "createClone", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6044, - "src": "2111:11:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_address_$", - "typeString": "function (address) returns (address)" - } - }, - "id": 6103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2111:33:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2088:56:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6113, - "name": "_TBTCSystem", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6086, - "src": "2211:11:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6114, - "name": "_TBTCToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6088, - "src": "2224:10:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6115, - "name": "_KeepBridge", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6090, - "src": "2236:11:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6116, - "name": "_keepThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6092, - "src": "2249:14:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 6117, - "name": "_keepSize", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6094, - "src": "2265:9:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6108, - "name": "cloneAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6100, - "src": "2178:12:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6107, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2170:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 6109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2170:21:17", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 6106, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2162:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6110, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2162:30:17", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6105, - "name": "Deposit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "2154:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Deposit_$965_$", - "typeString": "type(contract Deposit)" - } - }, - "id": 6111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2154:39:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Deposit_$965", - "typeString": "contract Deposit" - } - }, - "id": 6112, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "createNewDeposit", - "nodeType": "MemberAccess", - "referencedDeclaration": 571, - "src": "2154:56:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,address,uint256,uint256) payable external returns (bool)" - } - }, - "id": 6118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2154:121:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 6119, - "nodeType": "ExpressionStatement", - "src": "2154:121:17" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6121, - "name": "cloneAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6100, - "src": "2311:12:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6120, - "name": "DepositCloneCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6074, - "src": "2291:19:17", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 6122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2291:33:17", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6123, - "nodeType": "EmitStatement", - "src": "2286:38:17" - }, - { - "expression": { - "argumentTypes": null, - "id": 6124, - "name": "cloneAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6100, - "src": "2341:12:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 6098, - "id": 6125, - "nodeType": "Return", - "src": "2334:19:17" - } - ] - }, - "documentation": "@notice Creates a new deposit instance\n @dev Calls createNewDeposit from deposit contract as init method.\n We don't offer pure createClone, meaning that the only way\n to create a clone is by also calling createNewDeposit()\n Deposits created this way will never pass by state 0 (START)\n @param _TBTCSystem Address of system contract\n @param _TBTCToken Address of TBTC token contract\n @param _KeepBridge Address of Keep Bridge contract\n @param _keepThreshold Minimum number of honest keep members\n @param _keepSize Number of all members in a keep\n @return True if successful, otherwise revert", - "id": 6127, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "createDeposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6095, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6086, - "name": "_TBTCSystem", - "nodeType": "VariableDeclaration", - "scope": 6127, - "src": "1912:19:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6085, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1912:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6088, - "name": "_TBTCToken", - "nodeType": "VariableDeclaration", - "scope": 6127, - "src": "1941:18:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6087, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1941:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6090, - "name": "_KeepBridge", - "nodeType": "VariableDeclaration", - "scope": 6127, - "src": "1969:19:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6089, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1969:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6092, - "name": "_keepThreshold", - "nodeType": "VariableDeclaration", - "scope": 6127, - "src": "1998:22:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6091, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1998:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6094, - "name": "_keepSize", - "nodeType": "VariableDeclaration", - "scope": 6127, - "src": "2030:17:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6093, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2030:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1902:151:17" - }, - "returnParameters": { - "id": 6098, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6097, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6127, - "src": "2069:7:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6096, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2069:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2068:9:17" - }, - "scope": 6128, - "src": "1879:481:17", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 6129, - "src": "474:1888:17" - } - ], - "src": "0:2362:17" - }, - "legacyAST": { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/proxy/DepositFactory.sol", - "exportedSymbols": { - "DepositFactory": [ - 6128 - ] - }, - "id": 6129, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 6064, - "literals": [ - "solidity", - "^", - "0.5", - ".10" - ], - "nodeType": "PragmaDirective", - "src": "0:24:17" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/proxy/CloneFactory.sol", - "file": "./CloneFactory.sol", - "id": 6065, - "nodeType": "ImportDirective", - "scope": 6129, - "sourceUnit": 6063, - "src": "26:28:17", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/deposit/Deposit.sol", - "file": "../deposit/Deposit.sol", - "id": 6066, - "nodeType": "ImportDirective", - "scope": 6129, - "sourceUnit": 966, - "src": "55:32:17", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6067, - "name": "CloneFactory", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6062, - "src": "501:12:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_CloneFactory_$6062", - "typeString": "contract CloneFactory" - } - }, - "id": 6068, - "nodeType": "InheritanceSpecifier", - "src": "501:12:17" - } - ], - "contractDependencies": [ - 6062 - ], - "contractKind": "contract", - "documentation": "@title Deposit Factory\n @notice Factory for the creation of new deposit clones.\n @dev We avoid redeployment of deposit contract by using the clone factory.\n Proxy delegates calls to Deposit and therefore does not affect deposit state.\n This means that we only need to deploy the deposit contracts once.\n The factory provides clean state for every new deposit clone.", - "fullyImplemented": true, - "id": 6128, - "linearizedBaseContracts": [ - 6128, - 6062 - ], - "name": "DepositFactory", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 6070, - "name": "masterDepositAddress", - "nodeType": "VariableDeclaration", - "scope": 6128, - "src": "629:35:17", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6069, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "629:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 6074, - "name": "DepositCloneCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 6073, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6072, - "indexed": false, - "name": "depositCloneAddress", - "nodeType": "VariableDeclaration", - "scope": 6074, - "src": "697:27:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6071, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "697:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "696:29:17" - }, - "src": "671:55:17" - }, - { - "body": { - "id": 6083, - "nodeType": "Block", - "src": "1006:61:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6079, - "name": "masterDepositAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6070, - "src": "1016:20:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6080, - "name": "_masterDepositAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6076, - "src": "1039:21:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1016:44:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6082, - "nodeType": "ExpressionStatement", - "src": "1016:44:17" - } - ] - }, - "documentation": "@dev Set the master deposit contract address\n on contract initialization\n @param _masterDepositAddress The address of the master deposit contract", - "id": 6084, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6077, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6076, - "name": "_masterDepositAddress", - "nodeType": "VariableDeclaration", - "scope": 6084, - "src": "968:29:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6075, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "968:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "967:31:17" - }, - "returnParameters": { - "id": 6078, - "nodeType": "ParameterList", - "parameters": [], - "src": "1006:0:17" - }, - "scope": 6128, - "src": "956:111:17", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6126, - "nodeType": "Block", - "src": "2078:282:17", - "statements": [ - { - "assignments": [ - 6100 - ], - "declarations": [ - { - "constant": false, - "id": 6100, - "name": "cloneAddress", - "nodeType": "VariableDeclaration", - "scope": 6126, - "src": "2088:20:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6099, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2088:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 6104, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6102, - "name": "masterDepositAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6070, - "src": "2123:20:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6101, - "name": "createClone", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6044, - "src": "2111:11:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_address_$", - "typeString": "function (address) returns (address)" - } - }, - "id": 6103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2111:33:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2088:56:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6113, - "name": "_TBTCSystem", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6086, - "src": "2211:11:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6114, - "name": "_TBTCToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6088, - "src": "2224:10:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6115, - "name": "_KeepBridge", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6090, - "src": "2236:11:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6116, - "name": "_keepThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6092, - "src": "2249:14:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 6117, - "name": "_keepSize", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6094, - "src": "2265:9:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6108, - "name": "cloneAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6100, - "src": "2178:12:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6107, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2170:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 6109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2170:21:17", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 6106, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2162:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6110, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2162:30:17", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 6105, - "name": "Deposit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "2154:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Deposit_$965_$", - "typeString": "type(contract Deposit)" - } - }, - "id": 6111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2154:39:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Deposit_$965", - "typeString": "contract Deposit" - } - }, - "id": 6112, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "createNewDeposit", - "nodeType": "MemberAccess", - "referencedDeclaration": 571, - "src": "2154:56:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,address,uint256,uint256) payable external returns (bool)" - } - }, - "id": 6118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2154:121:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 6119, - "nodeType": "ExpressionStatement", - "src": "2154:121:17" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6121, - "name": "cloneAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6100, - "src": "2311:12:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 6120, - "name": "DepositCloneCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6074, - "src": "2291:19:17", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 6122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2291:33:17", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6123, - "nodeType": "EmitStatement", - "src": "2286:38:17" - }, - { - "expression": { - "argumentTypes": null, - "id": 6124, - "name": "cloneAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6100, - "src": "2341:12:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 6098, - "id": 6125, - "nodeType": "Return", - "src": "2334:19:17" - } - ] - }, - "documentation": "@notice Creates a new deposit instance\n @dev Calls createNewDeposit from deposit contract as init method.\n We don't offer pure createClone, meaning that the only way\n to create a clone is by also calling createNewDeposit()\n Deposits created this way will never pass by state 0 (START)\n @param _TBTCSystem Address of system contract\n @param _TBTCToken Address of TBTC token contract\n @param _KeepBridge Address of Keep Bridge contract\n @param _keepThreshold Minimum number of honest keep members\n @param _keepSize Number of all members in a keep\n @return True if successful, otherwise revert", - "id": 6127, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "createDeposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6095, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6086, - "name": "_TBTCSystem", - "nodeType": "VariableDeclaration", - "scope": 6127, - "src": "1912:19:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6085, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1912:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6088, - "name": "_TBTCToken", - "nodeType": "VariableDeclaration", - "scope": 6127, - "src": "1941:18:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6087, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1941:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6090, - "name": "_KeepBridge", - "nodeType": "VariableDeclaration", - "scope": 6127, - "src": "1969:19:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6089, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1969:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6092, - "name": "_keepThreshold", - "nodeType": "VariableDeclaration", - "scope": 6127, - "src": "1998:22:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6091, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1998:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6094, - "name": "_keepSize", - "nodeType": "VariableDeclaration", - "scope": 6127, - "src": "2030:17:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6093, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2030:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1902:151:17" - }, - "returnParameters": { - "id": 6098, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6097, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6127, - "src": "2069:7:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6096, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2069:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2068:9:17" - }, - "scope": 6128, - "src": "1879:481:17", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 6129, - "src": "474:1888:17" - } - ], - "src": "0:2362:17" - }, - "compiler": { - "name": "solc", - "version": "0.5.10+commit.5a6ea5b1.Emscripten.clang" - }, - "networks": { - "1564486898078": { - "events": {}, - "links": {}, - "address": "0x3c4f0E8AB75d7Ab97995eE51F725E2A4333101c2", - "transactionHash": "0x61b5d523baadb077093dd1f4a1abbe8bf50342b56cbe22f7767aa53cd1d38d02" - }, - "1564576405726": { - "events": {}, - "links": {}, - "address": "0xc70EC2Ec9DC4C536ef887b2BbaABCd0f13d41173", - "transactionHash": "0xd1a2dda2e65b66830f478c26c89d74fd288a64824dfc1bb9b3e7ab156eb7aa22" - }, - "1564669548315": { - "events": {}, - "links": {}, - "address": "0xbf56839b300d12c58266692E75f02E8e37805aA6", - "transactionHash": "0x51b48b9b74b5e8f091b38e7559ba1348f00a7d11653cc6b94151f431498b6de4" - }, - "1564683807489": { - "events": {}, - "links": {}, - "address": "0xabdEfb58990CF5668b40Eae002D7D1Dd34c774Fd", - "transactionHash": "0x72e8cfb114c16fc8d9cacb1d5d8aa35c6f9dd4ee981220c6445559fed617146c" - }, - "1564760269629": { - "events": {}, - "links": {}, - "address": "0xC834A5c11FF3698761cbA4C30D2aa8DAa7e09e64", - "transactionHash": "0x17298695df4c60ea999de5aa06e74b2bb836a260b575d42c9db8f6f40753aba7" - }, - "1565004617282": { - "events": {}, - "links": {}, - "address": "0x0E5a721fCF43564A295FF36802068BedB4d81da5", - "transactionHash": "0x3d753f42249628303c4ef8e38425a43ee84f9223f08776250c340a7a36089bd6" - } - }, - "schemaVersion": "3.0.10", - "updatedAt": "2019-08-05T11:32:37.619Z", - "devdoc": { - "details": "We avoid redeployment of deposit contract by using the clone factory. Proxy delegates calls to Deposit and therefore does not affect deposit state. This means that we only need to deploy the deposit contracts once. The factory provides clean state for every new deposit clone.", - "methods": { - "constructor": { - "details": "Set the master deposit contract address on contract initialization", - "params": { - "_masterDepositAddress": "The address of the master deposit contract" - } - }, - "createDeposit(address,address,address,uint256,uint256)": { - "details": "Calls createNewDeposit from deposit contract as init method. We don't offer pure createClone, meaning that the only way to create a clone is by also calling createNewDeposit() Deposits created this way will never pass by state 0 (START)", - "params": { - "_KeepBridge": "Address of Keep Bridge contract", - "_TBTCSystem": "Address of system contract", - "_TBTCToken": "Address of TBTC token contract", - "_keepSize": "Number of all members in a keep", - "_keepThreshold": "Minimum number of honest keep members" - }, - "return": "True if successful, otherwise revert" - } - }, - "title": "Deposit Factory" - }, - "userdoc": { - "methods": { - "createDeposit(address,address,address,uint256,uint256)": { - "notice": "Creates a new deposit instance" - } - }, - "notice": "Factory for the creation of new deposit clones." - } -} \ No newline at end of file diff --git a/client/src/eth/artifacts/KeepBridge.json b/client/src/eth/artifacts/KeepBridge.json deleted file mode 100644 index 08555071..00000000 --- a/client/src/eth/artifacts/KeepBridge.json +++ /dev/null @@ -1,4633 +0,0 @@ -{ - "contractName": "KeepBridge", - "abi": [ - { - "constant": true, - "inputs": [ - { - "name": "_keepAddress", - "type": "address" - }, - { - "name": "_digest", - "type": "bytes32" - } - ], - "name": "wasDigestApprovedForSigning", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_keepAddress", - "type": "address" - }, - { - "name": "_digest", - "type": "bytes32" - } - ], - "name": "approveDigest", - "outputs": [ - { - "name": "_success", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_keepAddress", - "type": "address" - }, - { - "name": "_v", - "type": "uint8" - }, - { - "name": "_r", - "type": "bytes32" - }, - { - "name": "_s", - "type": "bytes32" - }, - { - "name": "_signedDigest", - "type": "bytes32" - }, - { - "name": "_preimage", - "type": "bytes" - } - ], - "name": "submitSignatureFraud", - "outputs": [ - { - "name": "_isFraud", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_keepAddress", - "type": "address" - } - ], - "name": "distributeEthToKeepGroup", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_keepAddress", - "type": "address" - }, - { - "name": "_asset", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "distributeERC20ToKeepGroup", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_m", - "type": "uint256" - }, - { - "name": "_n", - "type": "uint256" - } - ], - "name": "requestNewKeep", - "outputs": [ - { - "name": "_keepAddress", - "type": "address" - } - ], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_keepAddress", - "type": "address" - } - ], - "name": "getKeepPubkey", - "outputs": [ - { - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_keepAddress", - "type": "address" - } - ], - "name": "checkBondAmount", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_keepAddress", - "type": "address" - } - ], - "name": "seizeSignerBonds", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_keepRegistry", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.10+commit.5a6ea5b1\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"_keepAddress\",\"type\":\"address\"}],\"name\":\"distributeEthToKeepGroup\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_keepAddress\",\"type\":\"address\"}],\"name\":\"getKeepPubkey\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_keepAddress\",\"type\":\"address\"}],\"name\":\"checkBondAmount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_keepAddress\",\"type\":\"address\"},{\"name\":\"_digest\",\"type\":\"bytes32\"}],\"name\":\"approveDigest\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_keepAddress\",\"type\":\"address\"},{\"name\":\"_digest\",\"type\":\"bytes32\"}],\"name\":\"wasDigestApprovedForSigning\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_keepAddress\",\"type\":\"address\"},{\"name\":\"_asset\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"distributeERC20ToKeepGroup\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_keepRegistry\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_keepAddress\",\"type\":\"address\"}],\"name\":\"seizeSignerBonds\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_m\",\"type\":\"uint256\"},{\"name\":\"_n\",\"type\":\"uint256\"}],\"name\":\"requestNewKeep\",\"outputs\":[{\"name\":\"_keepAddress\",\"type\":\"address\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_keepAddress\",\"type\":\"address\"},{\"name\":\"_v\",\"type\":\"uint8\"},{\"name\":\"_r\",\"type\":\"bytes32\"},{\"name\":\"_s\",\"type\":\"bytes32\"},{\"name\":\"_signedDigest\",\"type\":\"bytes32\"},{\"name\":\"_preimage\",\"type\":\"bytes\"}],\"name\":\"submitSignatureFraud\",\"outputs\":[{\"name\":\"_isFraud\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/KeepBridge.sol\":\"KeepBridge\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/IKeep.sol\":{\"keccak256\":\"0xaf7030cfb935478c97a8788bb27d7ec8a0e5356341558c2ede3f2119bc53c4f9\",\"urls\":[\"bzzr://e6b50d2077cfc221a47cfd505af039d3fa683b0b461421c2a777f47697be0103\",\"dweb:/ipfs/QmbBsVBDD2652786kJHR6A4DXjuAdx3GHHL6FtiJJe8yo3\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/KeepBridge.sol\":{\"keccak256\":\"0x2e3af534f153efd60d9a7c08db114c1b5fa31c4998b345d6f65af40cd63c6d92\",\"urls\":[\"bzzr://f4b0a0bee2abc11bedb7ce6db483080332b4bf1905737d9013638e70e6966d8d\",\"dweb:/ipfs/QmPLT1VEwFbzXbSdeHUVzr33TmCYQorPN8TunRzMQZRcEd\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506105eb806100206000396000f3fe6080604052600436106100905760003560e01c8063b595b79a11610059578063b595b79a14610208578063c4d66de81461024b578063ce72b18314610280578063dafd59b2146102a3578063e951993e146102e257610090565b8062d1e7851461009557806310e03529146100cf57806324965202146101775780633bc2b388146101ac5780634889419d146101e5575b600080fd5b6100bb600480360360208110156100ab57600080fd5b50356001600160a01b031661038a565b604080519115158252519081900360200190f35b3480156100db57600080fd5b50610102600480360360208110156100f257600080fd5b50356001600160a01b0316610390565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561013c578181015183820152602001610124565b50505050905090810190601f1680156101695780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018357600080fd5b5061019a600480360360208110156100ab57600080fd5b60408051918252519081900360200190f35b3480156101b857600080fd5b506100bb600480360360408110156101cf57600080fd5b506001600160a01b038135169060200135610459565b3480156101f157600080fd5b5061019a600480360360408110156101cf57600080fd5b34801561021457600080fd5b506100bb6004803603606081101561022b57600080fd5b506001600160a01b03813581169160208101359091169060400135610461565b34801561025757600080fd5b5061027e6004803603602081101561026e57600080fd5b50356001600160a01b031661046a565b005b34801561028c57600080fd5b506100bb600480360360208110156100ab57600080fd5b6102c6600480360360408110156102b957600080fd5b508035906020013561048c565b604080516001600160a01b039092168252519081900360200190f35b3480156102ee57600080fd5b506100bb600480360360c081101561030557600080fd5b6001600160a01b038235169160ff602082013516916040820135916060810135916080820135919081019060c0810160a082013564010000000081111561034b57600080fd5b82018360208201111561035d57600080fd5b8035906020019184600183028401116401000000008311171561037f57600080fd5b5090925090506105a9565b50600090565b6060816001600160a01b0316632e3344526040518163ffffffff1660e01b815260040160006040518083038186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561040857600080fd5b81019080805164010000000081111561042057600080fd5b8201602081018481111561043357600080fd5b815164010000000081118282018710171561044d57600080fd5b50909695505050505050565b600092915050565b60009392505050565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080546040805163b2bd5b6d60e01b81526020600482018190526009602483015268045434453414b6565760bc1b6044830152915184936001600160a01b03169263b2bd5b6d9260648082019391829003018186803b1580156104ef57600080fd5b505afa158015610503573d6000803e3d6000fd5b505050506040513d602081101561051957600080fd5b50516040805163d485782760e01b8152600481018690526024810187905233604482015290519192506001600160a01b0383169163d4857827916064808201926020929091908290030181600087803b15801561057557600080fd5b505af1158015610589573d6000803e3d6000fd5b505050506040513d602081101561059f57600080fd5b5051949350505050565b600097965050505050505056fea265627a7a723058203aab08db905bda6b49ecee0e78443f9fa1e1b5f11cf80558eeda909467b9895864736f6c634300050a0032", - "deployedBytecode": "0x6080604052600436106100905760003560e01c8063b595b79a11610059578063b595b79a14610208578063c4d66de81461024b578063ce72b18314610280578063dafd59b2146102a3578063e951993e146102e257610090565b8062d1e7851461009557806310e03529146100cf57806324965202146101775780633bc2b388146101ac5780634889419d146101e5575b600080fd5b6100bb600480360360208110156100ab57600080fd5b50356001600160a01b031661038a565b604080519115158252519081900360200190f35b3480156100db57600080fd5b50610102600480360360208110156100f257600080fd5b50356001600160a01b0316610390565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561013c578181015183820152602001610124565b50505050905090810190601f1680156101695780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018357600080fd5b5061019a600480360360208110156100ab57600080fd5b60408051918252519081900360200190f35b3480156101b857600080fd5b506100bb600480360360408110156101cf57600080fd5b506001600160a01b038135169060200135610459565b3480156101f157600080fd5b5061019a600480360360408110156101cf57600080fd5b34801561021457600080fd5b506100bb6004803603606081101561022b57600080fd5b506001600160a01b03813581169160208101359091169060400135610461565b34801561025757600080fd5b5061027e6004803603602081101561026e57600080fd5b50356001600160a01b031661046a565b005b34801561028c57600080fd5b506100bb600480360360208110156100ab57600080fd5b6102c6600480360360408110156102b957600080fd5b508035906020013561048c565b604080516001600160a01b039092168252519081900360200190f35b3480156102ee57600080fd5b506100bb600480360360c081101561030557600080fd5b6001600160a01b038235169160ff602082013516916040820135916060810135916080820135919081019060c0810160a082013564010000000081111561034b57600080fd5b82018360208201111561035d57600080fd5b8035906020019184600183028401116401000000008311171561037f57600080fd5b5090925090506105a9565b50600090565b6060816001600160a01b0316632e3344526040518163ffffffff1660e01b815260040160006040518083038186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561040857600080fd5b81019080805164010000000081111561042057600080fd5b8201602081018481111561043357600080fd5b815164010000000081118282018710171561044d57600080fd5b50909695505050505050565b600092915050565b60009392505050565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080546040805163b2bd5b6d60e01b81526020600482018190526009602483015268045434453414b6565760bc1b6044830152915184936001600160a01b03169263b2bd5b6d9260648082019391829003018186803b1580156104ef57600080fd5b505afa158015610503573d6000803e3d6000fd5b505050506040513d602081101561051957600080fd5b50516040805163d485782760e01b8152600481018690526024810187905233604482015290519192506001600160a01b0383169163d4857827916064808201926020929091908290030181600087803b15801561057557600080fd5b505af1158015610589573d6000803e3d6000fd5b505050506040513d602081101561059f57600080fd5b5051949350505050565b600097965050505050505056fea265627a7a723058203aab08db905bda6b49ecee0e78443f9fa1e1b5f11cf80558eeda909467b9895864736f6c634300050a0032", - "sourceMap": "62:2025:14:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;62:2025:14;;;;;;;", - "deployedSourceMap": "62:2025:14:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;732:142;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;732:142:14;-1:-1:-1;;;;;732:142:14;;:::i;:::-;;;;;;;;;;;;;;;;;;1490:143;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1490:143:14;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1490:143:14;-1:-1:-1;;;;;1490:143:14;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1490:143:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1696:129;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1696:129:14;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;1696:129:14;;;;;;;;;;;;;;;;289:152;;8:9:-1;5:2;;;30:1;27;20:12;5:2;289:152:14;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;289:152:14;;;;;;;;:::i;124:158::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;124:158:14;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;880:168:14;;8:9:-1;5:2;;;30:1;27;20:12;5:2;880:168:14;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;880:168:14;;;;;;;;;;;;;;;;;:::i;1990:95::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1990:95:14;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1990:95:14;-1:-1:-1;;;;;1990:95:14;;:::i;:::-;;1831:126;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1831:126:14;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;1054:303:14;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1054:303:14;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;1054:303:14;;;;;;;;;;;;;;447:279;;8:9:-1;5:2;;;30:1;27;20:12;5:2;447:279:14;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;447:279:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;447:279:14;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;447:279:14;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;447:279:14;;-1:-1:-1;447:279:14;-1:-1:-1;447:279:14;:::i;732:142::-;-1:-1:-1;814:4:14;;732:142::o;1490:143::-;1558:12;1598;-1:-1:-1;;;;;1588:36:14;;:38;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1588:38:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1588:38:14;;;;;;39:16:-1;36:1;17:17;2:54;101:4;1588:38:14;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;13:2;5:11;;2:2;;;29:1;26;19:12;2:2;1588:38:14;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;-1:-1;1588:38:14;;1490:143;-1:-1:-1;;;;;;1490:143:14:o;289:152::-;369:13;289:152;;;;:::o;880:168::-;988:4;880:168;;;;;:::o;1990:95::-;2050:12;:28;;-1:-1:-1;;;;;;2050:28:14;-1:-1:-1;;;;;2050:28:14;;;;;;;;;;1990:95::o;1054:303::-;1128:20;1200:12;;1187:62;;;-1:-1:-1;;;1187:62:14;;;;;;;;;;;;;;-1:-1:-1;;;1187:62:14;;;;;;1128:20;;-1:-1:-1;;;;;1200:12:14;;1187:49;;:62;;;;;;;;;;;1200:12;1187:62;;;5:2:-1;;;;30:1;27;20:12;5:2;1187:62:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1187:62:14;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1187:62:14;1275:75;;;-1:-1:-1;;;1275:75:14;;;;;;;;;;;;;;1339:10;1275:75;;;;;;1187:62;;-1:-1:-1;;;;;;1275:56:14;;;;;:75;;;;;1187:62;;1275:75;;;;;;;;-1:-1:-1;1275:56:14;:75;;;5:2:-1;;;;30:1;27;20:12;5:2;1275:75:14;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1275:75:14;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1275:75:14;;1054:303;-1:-1:-1;;;;1054:303:14:o;447:279::-;654:13;447:279;;;;;;;;;:::o", - "source": "pragma solidity ^0.5.10;\n\nimport {IKeep} from \"./IKeep.sol\";\n\ncontract KeepBridge is IKeep {\n address keepRegistry;\n\n function wasDigestApprovedForSigning(address _keepAddress, bytes32 _digest) external view returns (uint256){\n //TODO: Implement\n return 0;\n }\n\n\n function approveDigest(address _keepAddress, bytes32 _digest) external returns (bool _success){\n //TODO: Implement\n return _success;\n }\n\n function submitSignatureFraud(\n address _keepAddress,\n uint8 _v,\n bytes32 _r,\n bytes32 _s,\n bytes32 _signedDigest,\n bytes calldata _preimage\n ) external returns (bool _isFraud){\n //TODO: Implement\n return _isFraud;\n }\n\n function distributeEthToKeepGroup(address _keepAddress) external payable returns (bool){\n //TODO: Implement\n return false;\n }\n\n function distributeERC20ToKeepGroup(address _keepAddress, address _asset, uint256 _value) external returns (bool){\n //TODO: Implement\n return false;\n }\n\n function requestNewKeep(uint256 _m, uint256 _n) external payable returns (address _keepAddress){\n address keepVendorAddress = KeepRegistry(keepRegistry)\n .getVendor(\"ECDSAKeep\");\n\n _keepAddress = ECDSAKeepVendor(keepVendorAddress)\n .openKeep(_n,_m, msg.sender);\n }\n\n // get the result of a keep formation\n // should return a 64 byte packed pubkey (x and y)\n // error if not ready yet\n function getKeepPubkey(address _keepAddress) external view returns (bytes memory){\n return ECDSAKeep(_keepAddress).getPublicKey();\n }\n\n\n // returns the amount of the keep's ETH bond in wei\n function checkBondAmount(address _keepAddress) external view returns (uint256){\n //TODO: Implement\n return 0;\n }\n\n function seizeSignerBonds(address _keepAddress) external returns (bool){\n //TODO: Implement\n return false;\n }\n\n //TODO: add: onlyOwner\n function initialize(address _keepRegistry) public {\n keepRegistry = _keepRegistry;\n }\n}\n\n/// @notice Interface for communication with `KeepRegistry` contract\n/// @dev It allows to call a function without the need of low-level call\ninterface KeepRegistry {\n /// @notice Get a keep vendor contract address for a keep type.\n /// @param _keepType Keep type.\n /// @return Keep vendor contract address.\n function getVendor(string calldata _keepType) external view returns (address);\n}\n\n/// @notice Interface for communication with `ECDSAKeepVendor` contract\n/// @dev It allows to call a function without the need of low-level call\ninterface ECDSAKeepVendor {\n /// @notice Open a new ECDSA keep.\n /// @param _groupSize Number of members in the keep.\n /// @param _honestThreshold Minimum number of honest keep members.\n /// @param _owner Address of the keep owner.\n /// @return Opened keep address.\n function openKeep(\n uint256 _groupSize,\n uint256 _honestThreshold,\n address _owner\n ) external payable returns (address keepAddress);\n}\n\n/// @notice Interface for communication with `ECDSAKeep` contract\n/// @dev It allows to call a function without the need of low-level call\ninterface ECDSAKeep {\n /// @notice Returns the keep signer's public key.\n /// @return Signer's public key.\n function getPublicKey() external view returns (bytes memory);\n}\n", - "sourcePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/KeepBridge.sol", - "ast": { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/KeepBridge.sol", - "exportedSymbols": { - "ECDSAKeep": [ - 5913 - ], - "ECDSAKeepVendor": [ - 5907 - ], - "KeepBridge": [ - 5887 - ], - "KeepRegistry": [ - 5895 - ] - }, - "id": 5914, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 5737, - "literals": [ - "solidity", - "^", - "0.5", - ".10" - ], - "nodeType": "PragmaDirective", - "src": "0:24:14" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/IKeep.sol", - "file": "./IKeep.sol", - "id": 5739, - "nodeType": "ImportDirective", - "scope": 5914, - "sourceUnit": 5699, - "src": "26:34:14", - "symbolAliases": [ - { - "foreign": 5738, - "local": null - } - ], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 5740, - "name": "IKeep", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5698, - "src": "85:5:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IKeep_$5698", - "typeString": "contract IKeep" - } - }, - "id": 5741, - "nodeType": "InheritanceSpecifier", - "src": "85:5:14" - } - ], - "contractDependencies": [ - 5698 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 5887, - "linearizedBaseContracts": [ - 5887, - 5698 - ], - "name": "KeepBridge", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 5743, - "name": "keepRegistry", - "nodeType": "VariableDeclaration", - "scope": 5887, - "src": "97:20:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5742, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "97:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": { - "id": 5754, - "nodeType": "Block", - "src": "231:51:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5752, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "274:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 5751, - "id": 5753, - "nodeType": "Return", - "src": "267:8:14" - } - ] - }, - "documentation": null, - "id": 5755, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "wasDigestApprovedForSigning", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5748, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5745, - "name": "_keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5755, - "src": "161:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5744, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "161:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5747, - "name": "_digest", - "nodeType": "VariableDeclaration", - "scope": 5755, - "src": "183:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 5746, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "183:7:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "160:39:14" - }, - "returnParameters": { - "id": 5751, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5750, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5755, - "src": "223:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5749, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "223:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "222:9:14" - }, - "scope": 5887, - "src": "124:158:14", - "stateMutability": "view", - "superFunction": 5623, - "visibility": "external" - }, - { - "body": { - "id": 5766, - "nodeType": "Block", - "src": "383:58:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5764, - "name": "_success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5762, - "src": "426:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 5763, - "id": 5765, - "nodeType": "Return", - "src": "419:15:14" - } - ] - }, - "documentation": null, - "id": 5767, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approveDigest", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5760, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5757, - "name": "_keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5767, - "src": "312:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5756, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "312:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5759, - "name": "_digest", - "nodeType": "VariableDeclaration", - "scope": 5767, - "src": "334:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 5758, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "334:7:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "311:39:14" - }, - "returnParameters": { - "id": 5763, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5762, - "name": "_success", - "nodeType": "VariableDeclaration", - "scope": 5767, - "src": "369:13:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5761, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "369:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "368:15:14" - }, - "scope": 5887, - "src": "289:152:14", - "stateMutability": "nonpayable", - "superFunction": 5632, - "visibility": "external" - }, - { - "body": { - "id": 5786, - "nodeType": "Block", - "src": "668:58:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5784, - "name": "_isFraud", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5782, - "src": "711:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 5783, - "id": 5785, - "nodeType": "Return", - "src": "704:15:14" - } - ] - }, - "documentation": null, - "id": 5787, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "submitSignatureFraud", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5780, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5769, - "name": "_keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5787, - "src": "486:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5768, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "486:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5771, - "name": "_v", - "nodeType": "VariableDeclaration", - "scope": 5787, - "src": "516:8:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 5770, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "516:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5773, - "name": "_r", - "nodeType": "VariableDeclaration", - "scope": 5787, - "src": "534:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 5772, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "534:7:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5775, - "name": "_s", - "nodeType": "VariableDeclaration", - "scope": 5787, - "src": "554:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 5774, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "554:7:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5777, - "name": "_signedDigest", - "nodeType": "VariableDeclaration", - "scope": 5787, - "src": "574:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 5776, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "574:7:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5779, - "name": "_preimage", - "nodeType": "VariableDeclaration", - "scope": 5787, - "src": "605:24:14", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 5778, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "605:5:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "476:159:14" - }, - "returnParameters": { - "id": 5783, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5782, - "name": "_isFraud", - "nodeType": "VariableDeclaration", - "scope": 5787, - "src": "654:13:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5781, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "654:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "653:15:14" - }, - "scope": 5887, - "src": "447:279:14", - "stateMutability": "nonpayable", - "superFunction": 5649, - "visibility": "external" - }, - { - "body": { - "id": 5796, - "nodeType": "Block", - "src": "819:55:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 5794, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "862:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 5793, - "id": 5795, - "nodeType": "Return", - "src": "855:12:14" - } - ] - }, - "documentation": null, - "id": 5797, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "distributeEthToKeepGroup", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5790, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5789, - "name": "_keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5797, - "src": "766:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5788, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "766:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "765:22:14" - }, - "returnParameters": { - "id": 5793, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5792, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5797, - "src": "814:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5791, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "814:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "813:6:14" - }, - "scope": 5887, - "src": "732:142:14", - "stateMutability": "payable", - "superFunction": 5656, - "visibility": "external" - }, - { - "body": { - "id": 5810, - "nodeType": "Block", - "src": "993:55:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 5808, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1036:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 5807, - "id": 5809, - "nodeType": "Return", - "src": "1029:12:14" - } - ] - }, - "documentation": null, - "id": 5811, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "distributeERC20ToKeepGroup", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5799, - "name": "_keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5811, - "src": "916:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5798, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "916:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5801, - "name": "_asset", - "nodeType": "VariableDeclaration", - "scope": 5811, - "src": "938:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5800, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "938:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5803, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 5811, - "src": "954:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5802, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "954:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "915:54:14" - }, - "returnParameters": { - "id": 5807, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5806, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5811, - "src": "988:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5805, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "988:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "987:6:14" - }, - "scope": 5887, - "src": "880:168:14", - "stateMutability": "nonpayable", - "superFunction": 5667, - "visibility": "external" - }, - { - "body": { - "id": 5841, - "nodeType": "Block", - "src": "1149:208:14", - "statements": [ - { - "assignments": [ - 5821 - ], - "declarations": [ - { - "constant": false, - "id": 5821, - "name": "keepVendorAddress", - "nodeType": "VariableDeclaration", - "scope": 5841, - "src": "1159:25:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5820, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1159:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5828, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "45434453414b656570", - "id": 5826, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1237:11:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3b0cbcb8ecb59da82af69a06a5e688e775a473b0d4b7feda569fc4036069ecf1", - "typeString": "literal_string \"ECDSAKeep\"" - }, - "value": "ECDSAKeep" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_3b0cbcb8ecb59da82af69a06a5e688e775a473b0d4b7feda569fc4036069ecf1", - "typeString": "literal_string \"ECDSAKeep\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5823, - "name": "keepRegistry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5743, - "src": "1200:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5822, - "name": "KeepRegistry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5895, - "src": "1187:12:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_KeepRegistry_$5895_$", - "typeString": "type(contract KeepRegistry)" - } - }, - "id": 5824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1187:26:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_KeepRegistry_$5895", - "typeString": "contract KeepRegistry" - } - }, - "id": 5825, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getVendor", - "nodeType": "MemberAccess", - "referencedDeclaration": 5894, - "src": "1187:49:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_string_memory_ptr_$returns$_t_address_$", - "typeString": "function (string memory) view external returns (address)" - } - }, - "id": 5827, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1187:62:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1159:90:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 5839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5829, - "name": "_keepAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5818, - "src": "1260:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5834, - "name": "_n", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5815, - "src": "1332:2:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5835, - "name": "_m", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5813, - "src": "1335:2:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5836, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9640, - "src": "1339:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1339:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5831, - "name": "keepVendorAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5821, - "src": "1291:17:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5830, - "name": "ECDSAKeepVendor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5907, - "src": "1275:15:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ECDSAKeepVendor_$5907_$", - "typeString": "type(contract ECDSAKeepVendor)" - } - }, - "id": 5832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1275:34:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ECDSAKeepVendor_$5907", - "typeString": "contract ECDSAKeepVendor" - } - }, - "id": 5833, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "openKeep", - "nodeType": "MemberAccess", - "referencedDeclaration": 5906, - "src": "1275:56:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_uint256_$_t_address_$returns$_t_address_$", - "typeString": "function (uint256,uint256,address) payable external returns (address)" - } - }, - "id": 5838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1275:75:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1260:90:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 5840, - "nodeType": "ExpressionStatement", - "src": "1260:90:14" - } - ] - }, - "documentation": null, - "id": 5842, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "requestNewKeep", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5816, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5813, - "name": "_m", - "nodeType": "VariableDeclaration", - "scope": 5842, - "src": "1078:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5812, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1078:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5815, - "name": "_n", - "nodeType": "VariableDeclaration", - "scope": 5842, - "src": "1090:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5814, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1090:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1077:24:14" - }, - "returnParameters": { - "id": 5819, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5818, - "name": "_keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5842, - "src": "1128:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5817, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1128:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1127:22:14" - }, - "scope": 5887, - "src": "1054:303:14", - "stateMutability": "payable", - "superFunction": 5676, - "visibility": "external" - }, - { - "body": { - "id": 5855, - "nodeType": "Block", - "src": "1571:62:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5850, - "name": "_keepAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5844, - "src": "1598:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5849, - "name": "ECDSAKeep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5913, - "src": "1588:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ECDSAKeep_$5913_$", - "typeString": "type(contract ECDSAKeep)" - } - }, - "id": 5851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1588:23:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ECDSAKeep_$5913", - "typeString": "contract ECDSAKeep" - } - }, - "id": 5852, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPublicKey", - "nodeType": "MemberAccess", - "referencedDeclaration": 5912, - "src": "1588:36:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () view external returns (bytes memory)" - } - }, - "id": 5853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1588:38:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 5848, - "id": 5854, - "nodeType": "Return", - "src": "1581:45:14" - } - ] - }, - "documentation": null, - "id": 5856, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getKeepPubkey", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5845, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5844, - "name": "_keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5856, - "src": "1513:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5843, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1513:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1512:22:14" - }, - "returnParameters": { - "id": 5848, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5847, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5856, - "src": "1558:12:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 5846, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1558:5:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1557:14:14" - }, - "scope": 5887, - "src": "1490:143:14", - "stateMutability": "view", - "superFunction": 5683, - "visibility": "external" - }, - { - "body": { - "id": 5865, - "nodeType": "Block", - "src": "1774:51:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5863, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1817:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 5862, - "id": 5864, - "nodeType": "Return", - "src": "1810:8:14" - } - ] - }, - "documentation": null, - "id": 5866, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "checkBondAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5859, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5858, - "name": "_keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5866, - "src": "1721:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5857, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1721:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1720:22:14" - }, - "returnParameters": { - "id": 5862, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5861, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5866, - "src": "1766:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5860, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1766:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1765:9:14" - }, - "scope": 5887, - "src": "1696:129:14", - "stateMutability": "view", - "superFunction": 5690, - "visibility": "external" - }, - { - "body": { - "id": 5875, - "nodeType": "Block", - "src": "1902:55:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 5873, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1945:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 5872, - "id": 5874, - "nodeType": "Return", - "src": "1938:12:14" - } - ] - }, - "documentation": null, - "id": 5876, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "seizeSignerBonds", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5869, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5868, - "name": "_keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5876, - "src": "1857:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5867, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1857:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1856:22:14" - }, - "returnParameters": { - "id": 5872, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5871, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5876, - "src": "1897:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5870, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1897:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1896:6:14" - }, - "scope": 5887, - "src": "1831:126:14", - "stateMutability": "nonpayable", - "superFunction": 5697, - "visibility": "external" - }, - { - "body": { - "id": 5885, - "nodeType": "Block", - "src": "2040:45:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5881, - "name": "keepRegistry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5743, - "src": "2050:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 5882, - "name": "_keepRegistry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5878, - "src": "2065:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2050:28:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 5884, - "nodeType": "ExpressionStatement", - "src": "2050:28:14" - } - ] - }, - "documentation": null, - "id": 5886, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "initialize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5879, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5878, - "name": "_keepRegistry", - "nodeType": "VariableDeclaration", - "scope": 5886, - "src": "2010:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5877, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2010:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2009:23:14" - }, - "returnParameters": { - "id": 5880, - "nodeType": "ParameterList", - "parameters": [], - "src": "2040:0:14" - }, - "scope": 5887, - "src": "1990:95:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 5914, - "src": "62:2025:14" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@notice Interface for communication with `KeepRegistry` contract\n @dev It allows to call a function without the need of low-level call", - "fullyImplemented": false, - "id": 5895, - "linearizedBaseContracts": [ - 5895 - ], - "name": "KeepRegistry", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@notice Get a keep vendor contract address for a keep type.\n @param _keepType Keep type.\n @return Keep vendor contract address.", - "id": 5894, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getVendor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5890, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5889, - "name": "_keepType", - "nodeType": "VariableDeclaration", - "scope": 5894, - "src": "2429:25:14", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 5888, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2429:6:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2428:27:14" - }, - "returnParameters": { - "id": 5893, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5892, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5894, - "src": "2479:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5891, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2479:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2478:9:14" - }, - "scope": 5895, - "src": "2410:78:14", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 5914, - "src": "2231:259:14" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@notice Interface for communication with `ECDSAKeepVendor` contract\n @dev It allows to call a function without the need of low-level call", - "fullyImplemented": false, - "id": 5907, - "linearizedBaseContracts": [ - 5907 - ], - "name": "ECDSAKeepVendor", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@notice Open a new ECDSA keep.\n @param _groupSize Number of members in the keep.\n @param _honestThreshold Minimum number of honest keep members.\n @param _owner Address of the keep owner.\n @return Opened keep address.", - "id": 5906, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "openKeep", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5902, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5897, - "name": "_groupSize", - "nodeType": "VariableDeclaration", - "scope": 5906, - "src": "2949:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5896, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2949:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5899, - "name": "_honestThreshold", - "nodeType": "VariableDeclaration", - "scope": 5906, - "src": "2977:24:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5898, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2977:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5901, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 5906, - "src": "3011:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5900, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3011:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2939:92:14" - }, - "returnParameters": { - "id": 5905, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5904, - "name": "keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5906, - "src": "3058:19:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5903, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3058:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3057:21:14" - }, - "scope": 5907, - "src": "2922:157:14", - "stateMutability": "payable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 5914, - "src": "2637:444:14" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@notice Interface for communication with `ECDSAKeep` contract\n @dev It allows to call a function without the need of low-level call", - "fullyImplemented": false, - "id": 5913, - "linearizedBaseContracts": [ - 5913 - ], - "name": "ECDSAKeep", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@notice Returns the keep signer's public key.\n @return Signer's public key.", - "id": 5912, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getPublicKey", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5908, - "nodeType": "ParameterList", - "parameters": [], - "src": "3360:2:14" - }, - "returnParameters": { - "id": 5911, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5910, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5912, - "src": "3386:12:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 5909, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3386:5:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3385:14:14" - }, - "scope": 5913, - "src": "3339:61:14", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 5914, - "src": "3222:180:14" - } - ], - "src": "0:3403:14" - }, - "legacyAST": { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/KeepBridge.sol", - "exportedSymbols": { - "ECDSAKeep": [ - 5913 - ], - "ECDSAKeepVendor": [ - 5907 - ], - "KeepBridge": [ - 5887 - ], - "KeepRegistry": [ - 5895 - ] - }, - "id": 5914, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 5737, - "literals": [ - "solidity", - "^", - "0.5", - ".10" - ], - "nodeType": "PragmaDirective", - "src": "0:24:14" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/IKeep.sol", - "file": "./IKeep.sol", - "id": 5739, - "nodeType": "ImportDirective", - "scope": 5914, - "sourceUnit": 5699, - "src": "26:34:14", - "symbolAliases": [ - { - "foreign": 5738, - "local": null - } - ], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 5740, - "name": "IKeep", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5698, - "src": "85:5:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IKeep_$5698", - "typeString": "contract IKeep" - } - }, - "id": 5741, - "nodeType": "InheritanceSpecifier", - "src": "85:5:14" - } - ], - "contractDependencies": [ - 5698 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 5887, - "linearizedBaseContracts": [ - 5887, - 5698 - ], - "name": "KeepBridge", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 5743, - "name": "keepRegistry", - "nodeType": "VariableDeclaration", - "scope": 5887, - "src": "97:20:14", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5742, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "97:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": { - "id": 5754, - "nodeType": "Block", - "src": "231:51:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5752, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "274:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 5751, - "id": 5753, - "nodeType": "Return", - "src": "267:8:14" - } - ] - }, - "documentation": null, - "id": 5755, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "wasDigestApprovedForSigning", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5748, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5745, - "name": "_keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5755, - "src": "161:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5744, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "161:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5747, - "name": "_digest", - "nodeType": "VariableDeclaration", - "scope": 5755, - "src": "183:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 5746, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "183:7:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "160:39:14" - }, - "returnParameters": { - "id": 5751, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5750, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5755, - "src": "223:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5749, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "223:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "222:9:14" - }, - "scope": 5887, - "src": "124:158:14", - "stateMutability": "view", - "superFunction": 5623, - "visibility": "external" - }, - { - "body": { - "id": 5766, - "nodeType": "Block", - "src": "383:58:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5764, - "name": "_success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5762, - "src": "426:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 5763, - "id": 5765, - "nodeType": "Return", - "src": "419:15:14" - } - ] - }, - "documentation": null, - "id": 5767, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approveDigest", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5760, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5757, - "name": "_keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5767, - "src": "312:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5756, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "312:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5759, - "name": "_digest", - "nodeType": "VariableDeclaration", - "scope": 5767, - "src": "334:15:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 5758, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "334:7:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "311:39:14" - }, - "returnParameters": { - "id": 5763, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5762, - "name": "_success", - "nodeType": "VariableDeclaration", - "scope": 5767, - "src": "369:13:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5761, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "369:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "368:15:14" - }, - "scope": 5887, - "src": "289:152:14", - "stateMutability": "nonpayable", - "superFunction": 5632, - "visibility": "external" - }, - { - "body": { - "id": 5786, - "nodeType": "Block", - "src": "668:58:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5784, - "name": "_isFraud", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5782, - "src": "711:8:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 5783, - "id": 5785, - "nodeType": "Return", - "src": "704:15:14" - } - ] - }, - "documentation": null, - "id": 5787, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "submitSignatureFraud", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5780, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5769, - "name": "_keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5787, - "src": "486:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5768, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "486:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5771, - "name": "_v", - "nodeType": "VariableDeclaration", - "scope": 5787, - "src": "516:8:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 5770, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "516:5:14", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5773, - "name": "_r", - "nodeType": "VariableDeclaration", - "scope": 5787, - "src": "534:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 5772, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "534:7:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5775, - "name": "_s", - "nodeType": "VariableDeclaration", - "scope": 5787, - "src": "554:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 5774, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "554:7:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5777, - "name": "_signedDigest", - "nodeType": "VariableDeclaration", - "scope": 5787, - "src": "574:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 5776, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "574:7:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5779, - "name": "_preimage", - "nodeType": "VariableDeclaration", - "scope": 5787, - "src": "605:24:14", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 5778, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "605:5:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "476:159:14" - }, - "returnParameters": { - "id": 5783, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5782, - "name": "_isFraud", - "nodeType": "VariableDeclaration", - "scope": 5787, - "src": "654:13:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5781, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "654:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "653:15:14" - }, - "scope": 5887, - "src": "447:279:14", - "stateMutability": "nonpayable", - "superFunction": 5649, - "visibility": "external" - }, - { - "body": { - "id": 5796, - "nodeType": "Block", - "src": "819:55:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 5794, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "862:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 5793, - "id": 5795, - "nodeType": "Return", - "src": "855:12:14" - } - ] - }, - "documentation": null, - "id": 5797, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "distributeEthToKeepGroup", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5790, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5789, - "name": "_keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5797, - "src": "766:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5788, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "766:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "765:22:14" - }, - "returnParameters": { - "id": 5793, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5792, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5797, - "src": "814:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5791, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "814:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "813:6:14" - }, - "scope": 5887, - "src": "732:142:14", - "stateMutability": "payable", - "superFunction": 5656, - "visibility": "external" - }, - { - "body": { - "id": 5810, - "nodeType": "Block", - "src": "993:55:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 5808, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1036:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 5807, - "id": 5809, - "nodeType": "Return", - "src": "1029:12:14" - } - ] - }, - "documentation": null, - "id": 5811, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "distributeERC20ToKeepGroup", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5799, - "name": "_keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5811, - "src": "916:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5798, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "916:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5801, - "name": "_asset", - "nodeType": "VariableDeclaration", - "scope": 5811, - "src": "938:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5800, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "938:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5803, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 5811, - "src": "954:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5802, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "954:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "915:54:14" - }, - "returnParameters": { - "id": 5807, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5806, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5811, - "src": "988:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5805, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "988:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "987:6:14" - }, - "scope": 5887, - "src": "880:168:14", - "stateMutability": "nonpayable", - "superFunction": 5667, - "visibility": "external" - }, - { - "body": { - "id": 5841, - "nodeType": "Block", - "src": "1149:208:14", - "statements": [ - { - "assignments": [ - 5821 - ], - "declarations": [ - { - "constant": false, - "id": 5821, - "name": "keepVendorAddress", - "nodeType": "VariableDeclaration", - "scope": 5841, - "src": "1159:25:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5820, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1159:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 5828, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "45434453414b656570", - "id": 5826, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1237:11:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3b0cbcb8ecb59da82af69a06a5e688e775a473b0d4b7feda569fc4036069ecf1", - "typeString": "literal_string \"ECDSAKeep\"" - }, - "value": "ECDSAKeep" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_3b0cbcb8ecb59da82af69a06a5e688e775a473b0d4b7feda569fc4036069ecf1", - "typeString": "literal_string \"ECDSAKeep\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5823, - "name": "keepRegistry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5743, - "src": "1200:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5822, - "name": "KeepRegistry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5895, - "src": "1187:12:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_KeepRegistry_$5895_$", - "typeString": "type(contract KeepRegistry)" - } - }, - "id": 5824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1187:26:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_KeepRegistry_$5895", - "typeString": "contract KeepRegistry" - } - }, - "id": 5825, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getVendor", - "nodeType": "MemberAccess", - "referencedDeclaration": 5894, - "src": "1187:49:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_string_memory_ptr_$returns$_t_address_$", - "typeString": "function (string memory) view external returns (address)" - } - }, - "id": 5827, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1187:62:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1159:90:14" - }, - { - "expression": { - "argumentTypes": null, - "id": 5839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5829, - "name": "_keepAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5818, - "src": "1260:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5834, - "name": "_n", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5815, - "src": "1332:2:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 5835, - "name": "_m", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5813, - "src": "1335:2:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 5836, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9640, - "src": "1339:3:14", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 5837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1339:10:14", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5831, - "name": "keepVendorAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5821, - "src": "1291:17:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5830, - "name": "ECDSAKeepVendor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5907, - "src": "1275:15:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ECDSAKeepVendor_$5907_$", - "typeString": "type(contract ECDSAKeepVendor)" - } - }, - "id": 5832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1275:34:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ECDSAKeepVendor_$5907", - "typeString": "contract ECDSAKeepVendor" - } - }, - "id": 5833, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "openKeep", - "nodeType": "MemberAccess", - "referencedDeclaration": 5906, - "src": "1275:56:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_uint256_$_t_address_$returns$_t_address_$", - "typeString": "function (uint256,uint256,address) payable external returns (address)" - } - }, - "id": 5838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1275:75:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1260:90:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 5840, - "nodeType": "ExpressionStatement", - "src": "1260:90:14" - } - ] - }, - "documentation": null, - "id": 5842, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "requestNewKeep", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5816, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5813, - "name": "_m", - "nodeType": "VariableDeclaration", - "scope": 5842, - "src": "1078:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5812, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1078:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5815, - "name": "_n", - "nodeType": "VariableDeclaration", - "scope": 5842, - "src": "1090:10:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5814, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1090:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1077:24:14" - }, - "returnParameters": { - "id": 5819, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5818, - "name": "_keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5842, - "src": "1128:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5817, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1128:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1127:22:14" - }, - "scope": 5887, - "src": "1054:303:14", - "stateMutability": "payable", - "superFunction": 5676, - "visibility": "external" - }, - { - "body": { - "id": 5855, - "nodeType": "Block", - "src": "1571:62:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 5850, - "name": "_keepAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5844, - "src": "1598:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 5849, - "name": "ECDSAKeep", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5913, - "src": "1588:9:14", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ECDSAKeep_$5913_$", - "typeString": "type(contract ECDSAKeep)" - } - }, - "id": 5851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1588:23:14", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ECDSAKeep_$5913", - "typeString": "contract ECDSAKeep" - } - }, - "id": 5852, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPublicKey", - "nodeType": "MemberAccess", - "referencedDeclaration": 5912, - "src": "1588:36:14", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () view external returns (bytes memory)" - } - }, - "id": 5853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1588:38:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "functionReturnParameters": 5848, - "id": 5854, - "nodeType": "Return", - "src": "1581:45:14" - } - ] - }, - "documentation": null, - "id": 5856, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getKeepPubkey", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5845, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5844, - "name": "_keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5856, - "src": "1513:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5843, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1513:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1512:22:14" - }, - "returnParameters": { - "id": 5848, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5847, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5856, - "src": "1558:12:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 5846, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1558:5:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1557:14:14" - }, - "scope": 5887, - "src": "1490:143:14", - "stateMutability": "view", - "superFunction": 5683, - "visibility": "external" - }, - { - "body": { - "id": 5865, - "nodeType": "Block", - "src": "1774:51:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 5863, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1817:1:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 5862, - "id": 5864, - "nodeType": "Return", - "src": "1810:8:14" - } - ] - }, - "documentation": null, - "id": 5866, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "checkBondAmount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5859, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5858, - "name": "_keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5866, - "src": "1721:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5857, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1721:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1720:22:14" - }, - "returnParameters": { - "id": 5862, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5861, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5866, - "src": "1766:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5860, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1766:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1765:9:14" - }, - "scope": 5887, - "src": "1696:129:14", - "stateMutability": "view", - "superFunction": 5690, - "visibility": "external" - }, - { - "body": { - "id": 5875, - "nodeType": "Block", - "src": "1902:55:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 5873, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1945:5:14", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 5872, - "id": 5874, - "nodeType": "Return", - "src": "1938:12:14" - } - ] - }, - "documentation": null, - "id": 5876, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "seizeSignerBonds", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5869, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5868, - "name": "_keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5876, - "src": "1857:20:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5867, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1857:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1856:22:14" - }, - "returnParameters": { - "id": 5872, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5871, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5876, - "src": "1897:4:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 5870, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1897:4:14", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1896:6:14" - }, - "scope": 5887, - "src": "1831:126:14", - "stateMutability": "nonpayable", - "superFunction": 5697, - "visibility": "external" - }, - { - "body": { - "id": 5885, - "nodeType": "Block", - "src": "2040:45:14", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 5883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 5881, - "name": "keepRegistry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5743, - "src": "2050:12:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 5882, - "name": "_keepRegistry", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5878, - "src": "2065:13:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2050:28:14", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 5884, - "nodeType": "ExpressionStatement", - "src": "2050:28:14" - } - ] - }, - "documentation": null, - "id": 5886, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "initialize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5879, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5878, - "name": "_keepRegistry", - "nodeType": "VariableDeclaration", - "scope": 5886, - "src": "2010:21:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5877, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2010:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2009:23:14" - }, - "returnParameters": { - "id": 5880, - "nodeType": "ParameterList", - "parameters": [], - "src": "2040:0:14" - }, - "scope": 5887, - "src": "1990:95:14", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 5914, - "src": "62:2025:14" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@notice Interface for communication with `KeepRegistry` contract\n @dev It allows to call a function without the need of low-level call", - "fullyImplemented": false, - "id": 5895, - "linearizedBaseContracts": [ - 5895 - ], - "name": "KeepRegistry", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@notice Get a keep vendor contract address for a keep type.\n @param _keepType Keep type.\n @return Keep vendor contract address.", - "id": 5894, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getVendor", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5890, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5889, - "name": "_keepType", - "nodeType": "VariableDeclaration", - "scope": 5894, - "src": "2429:25:14", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 5888, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2429:6:14", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2428:27:14" - }, - "returnParameters": { - "id": 5893, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5892, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5894, - "src": "2479:7:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5891, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2479:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2478:9:14" - }, - "scope": 5895, - "src": "2410:78:14", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 5914, - "src": "2231:259:14" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@notice Interface for communication with `ECDSAKeepVendor` contract\n @dev It allows to call a function without the need of low-level call", - "fullyImplemented": false, - "id": 5907, - "linearizedBaseContracts": [ - 5907 - ], - "name": "ECDSAKeepVendor", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@notice Open a new ECDSA keep.\n @param _groupSize Number of members in the keep.\n @param _honestThreshold Minimum number of honest keep members.\n @param _owner Address of the keep owner.\n @return Opened keep address.", - "id": 5906, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "openKeep", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5902, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5897, - "name": "_groupSize", - "nodeType": "VariableDeclaration", - "scope": 5906, - "src": "2949:18:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5896, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2949:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5899, - "name": "_honestThreshold", - "nodeType": "VariableDeclaration", - "scope": 5906, - "src": "2977:24:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5898, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2977:7:14", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 5901, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 5906, - "src": "3011:14:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5900, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3011:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2939:92:14" - }, - "returnParameters": { - "id": 5905, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5904, - "name": "keepAddress", - "nodeType": "VariableDeclaration", - "scope": 5906, - "src": "3058:19:14", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 5903, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3058:7:14", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3057:21:14" - }, - "scope": 5907, - "src": "2922:157:14", - "stateMutability": "payable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 5914, - "src": "2637:444:14" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": "@notice Interface for communication with `ECDSAKeep` contract\n @dev It allows to call a function without the need of low-level call", - "fullyImplemented": false, - "id": 5913, - "linearizedBaseContracts": [ - 5913 - ], - "name": "ECDSAKeep", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": "@notice Returns the keep signer's public key.\n @return Signer's public key.", - "id": 5912, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "getPublicKey", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 5908, - "nodeType": "ParameterList", - "parameters": [], - "src": "3360:2:14" - }, - "returnParameters": { - "id": 5911, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5910, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 5912, - "src": "3386:12:14", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 5909, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3386:5:14", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3385:14:14" - }, - "scope": 5913, - "src": "3339:61:14", - "stateMutability": "view", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 5914, - "src": "3222:180:14" - } - ], - "src": "0:3403:14" - }, - "compiler": { - "name": "solc", - "version": "0.5.10+commit.5a6ea5b1.Emscripten.clang" - }, - "networks": { - "1563533123569": { - "events": {}, - "links": {}, - "address": "0x5ba5e250bab4FB304d18c795C5E458b8673e39F5", - "transactionHash": "0xe37d9b46a88833f8783d30246327bf12fffb17105f03bcd3e83a66e44b348e58" - }, - "1564486898078": { - "events": {}, - "links": {}, - "address": "0x177ABC174343Bcf375332C0C606E4A0b17175A80", - "transactionHash": "0x5a9b2ce49938c065b09787149b03e17aa1eca1683422e7bd02414c796d805e2f" - }, - "1564576405726": { - "events": {}, - "links": {}, - "address": "0x929a660AD4833C6434dC4Cb758340CB26505bF17", - "transactionHash": "0x5459d85ed5eef3a5d5d42e718f15a367b3e0435b4f74ff22cac9b2ba3e95987b" - }, - "1564669548315": { - "events": {}, - "links": {}, - "address": "0xBB4697203e20675Db05158989f490FcfeC69Edba", - "transactionHash": "0x8c500c79f2851c16bd960ab7bbaf417fc8e4a41888e7d7618da38cebd7225f04" - }, - "1564683807489": { - "events": {}, - "links": {}, - "address": "0x3b2948640107649eBa71b81cc14fb4a55E56b1E1", - "transactionHash": "0xe0a745056b91b0a58c2467ab125ca8ee052fc5ae9777a1121856970360ada1dd" - }, - "1564760269629": { - "events": {}, - "links": {}, - "address": "0x312aB52C844F4B8ff00F84da79FF51F58AD5a6F2", - "transactionHash": "0x2e1adf877b149d4d1af318970dd90875d5e23a58ceb972325333abab270c824a" - }, - "1565004617282": { - "events": {}, - "links": {}, - "address": "0x292f95916E5d69868D86695B2f6a208E0B5Bb496", - "transactionHash": "0x3fa22643ca42ffed942d7e0b077f7680e94a6d4cd838fce4a09776832a23adf2" - } - }, - "schemaVersion": "3.0.10", - "updatedAt": "2019-08-05T11:32:37.593Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/client/src/eth/artifacts/TBTCSystem.json b/client/src/eth/artifacts/TBTCSystem.json deleted file mode 100644 index c9399669..00000000 --- a/client/src/eth/artifacts/TBTCSystem.json +++ /dev/null @@ -1,5599 +0,0 @@ -{ - "contractName": "TBTCSystem", - "abi": [ - { - "constant": false, - "inputs": [], - "name": "logCourtesyCalled", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "logExitedCourtesyCall", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_keepAddress", - "type": "address" - } - ], - "name": "logCreated", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_requester", - "type": "address" - }, - { - "name": "_digest", - "type": "bytes32" - }, - { - "name": "_utxoSize", - "type": "uint256" - }, - { - "name": "_requesterPKH", - "type": "bytes20" - }, - { - "name": "_requestedFee", - "type": "uint256" - }, - { - "name": "_outpoint", - "type": "bytes" - } - ], - "name": "logRedemptionRequested", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_wasFraud", - "type": "bool" - } - ], - "name": "logStartedLiquidation", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_txid", - "type": "bytes32" - } - ], - "name": "logRedeemed", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_signingGroupPubkeyX", - "type": "bytes32" - }, - { - "name": "_signingGroupPubkeyY", - "type": "bytes32" - } - ], - "name": "logRegisteredPubkey", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "logFunded", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_caller", - "type": "address" - } - ], - "name": "approvedToLog", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "logSetupFailed", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "logLiquidated", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "logFraudDuringSetup", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_digest", - "type": "bytes32" - }, - { - "name": "_r", - "type": "bytes32" - }, - { - "name": "_s", - "type": "bytes32" - } - ], - "name": "logGotRedemptionSignature", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_depositContractAddress", - "type": "address" - }, - { - "indexed": true, - "name": "_keepAddress", - "type": "address" - }, - { - "indexed": false, - "name": "_timestamp", - "type": "uint256" - } - ], - "name": "Created", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_depositContractAddress", - "type": "address" - }, - { - "indexed": true, - "name": "_requester", - "type": "address" - }, - { - "indexed": true, - "name": "_digest", - "type": "bytes32" - }, - { - "indexed": false, - "name": "_utxoSize", - "type": "uint256" - }, - { - "indexed": false, - "name": "_requesterPKH", - "type": "bytes20" - }, - { - "indexed": false, - "name": "_requestedFee", - "type": "uint256" - }, - { - "indexed": false, - "name": "_outpoint", - "type": "bytes" - } - ], - "name": "RedemptionRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_depositContractAddress", - "type": "address" - }, - { - "indexed": true, - "name": "_digest", - "type": "bytes32" - }, - { - "indexed": false, - "name": "_r", - "type": "bytes32" - }, - { - "indexed": false, - "name": "_s", - "type": "bytes32" - }, - { - "indexed": false, - "name": "_timestamp", - "type": "uint256" - } - ], - "name": "GotRedemptionSignature", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_depositContractAddress", - "type": "address" - }, - { - "indexed": false, - "name": "_signingGroupPubkeyX", - "type": "bytes32" - }, - { - "indexed": false, - "name": "_signingGroupPubkeyY", - "type": "bytes32" - }, - { - "indexed": false, - "name": "_timestamp", - "type": "uint256" - } - ], - "name": "RegisteredPubkey", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_depositContractAddress", - "type": "address" - }, - { - "indexed": false, - "name": "_timestamp", - "type": "uint256" - } - ], - "name": "SetupFailed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_depositContractAddress", - "type": "address" - }, - { - "indexed": false, - "name": "_timestamp", - "type": "uint256" - } - ], - "name": "FraudDuringSetup", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_depositContractAddress", - "type": "address" - }, - { - "indexed": false, - "name": "_timestamp", - "type": "uint256" - } - ], - "name": "Funded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_depositContractAddress", - "type": "address" - }, - { - "indexed": false, - "name": "_timestamp", - "type": "uint256" - } - ], - "name": "CourtesyCalled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_depositContractAddress", - "type": "address" - }, - { - "indexed": false, - "name": "_timestamp", - "type": "uint256" - } - ], - "name": "ExitedCourtesyCall", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_depositContractAddress", - "type": "address" - }, - { - "indexed": false, - "name": "_wasFraud", - "type": "bool" - }, - { - "indexed": false, - "name": "_timestamp", - "type": "uint256" - } - ], - "name": "StartedLiquidation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_depositContractAddress", - "type": "address" - }, - { - "indexed": true, - "name": "_txid", - "type": "bytes32" - }, - { - "indexed": false, - "name": "_timestamp", - "type": "uint256" - } - ], - "name": "Redeemed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_depositContractAddress", - "type": "address" - }, - { - "indexed": false, - "name": "_timestamp", - "type": "uint256" - } - ], - "name": "Liquidated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": true, - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "fetchOraclePrice", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "fetchRelayCurrentDifficulty", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "fetchRelayPreviousDifficulty", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_currentDifficulty", - "type": "uint256" - } - ], - "name": "submitCurrentDifficulty", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "balance", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "name": "owner", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "name": "operator", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_operator", - "type": "address" - }, - { - "name": "_approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_tokenId", - "type": "uint256" - }, - { - "name": "_data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.10+commit.5a6ea5b1\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"name\":\"operator\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_currentDifficulty\",\"type\":\"uint256\"}],\"name\":\"submitCurrentDifficulty\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"logCourtesyCalled\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"logExitedCourtesyCall\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_keepAddress\",\"type\":\"address\"}],\"name\":\"logCreated\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_requester\",\"type\":\"address\"},{\"name\":\"_digest\",\"type\":\"bytes32\"},{\"name\":\"_utxoSize\",\"type\":\"uint256\"},{\"name\":\"_requesterPKH\",\"type\":\"bytes20\"},{\"name\":\"_requestedFee\",\"type\":\"uint256\"},{\"name\":\"_outpoint\",\"type\":\"bytes\"}],\"name\":\"logRedemptionRequested\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_wasFraud\",\"type\":\"bool\"}],\"name\":\"logStartedLiquidation\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fetchRelayPreviousDifficulty\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"}],\"name\":\"logRedeemed\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_signingGroupPubkeyX\",\"type\":\"bytes32\"},{\"name\":\"_signingGroupPubkeyY\",\"type\":\"bytes32\"}],\"name\":\"logRegisteredPubkey\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"logFunded\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_caller\",\"type\":\"address\"}],\"name\":\"approvedToLog\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_operator\",\"type\":\"address\"},{\"name\":\"_approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"logSetupFailed\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fetchOraclePrice\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"logLiquidated\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fetchRelayCurrentDifficulty\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"logFraudDuringSetup\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_digest\",\"type\":\"bytes32\"},{\"name\":\"_r\",\"type\":\"bytes32\"},{\"name\":\"_s\",\"type\":\"bytes32\"}],\"name\":\"logGotRedemptionSignature\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_depositContractAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_keepAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"Created\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_depositContractAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_requester\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_digest\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"_utxoSize\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_requesterPKH\",\"type\":\"bytes20\"},{\"indexed\":false,\"name\":\"_requestedFee\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_outpoint\",\"type\":\"bytes\"}],\"name\":\"RedemptionRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_depositContractAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_digest\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"_r\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"_s\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"GotRedemptionSignature\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_depositContractAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_signingGroupPubkeyX\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"_signingGroupPubkeyY\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"RegisteredPubkey\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_depositContractAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"SetupFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_depositContractAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"FraudDuringSetup\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_depositContractAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"Funded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_depositContractAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"CourtesyCalled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_depositContractAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"ExitedCourtesyCall\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_depositContractAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_wasFraud\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"StartedLiquidation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_depositContractAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_txid\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"Redeemed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_depositContractAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"Liquidated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"approvedToLog(address)\":{\"details\":\"Calls the system to check if the caller is a Deposit We don't require this, so deposits are not bricked if the system borks\",\"params\":{\"_caller\":\"The address of the calling contract\"},\"return\":\"True if approved, otherwise false\"},\"logCourtesyCalled()\":{\"details\":\"We append the sender, which is the deposit contract that called returns false if not approved, to prevent accidentally halting Deposit\",\"return\":\"True if successful, else false\"},\"logCreated(address)\":{\"details\":\"We append the sender, which is the deposit contract that called\",\"params\":{\"_keepAddress\":\"The address of the associated keep\"},\"return\":\"True if successful, else revert\"},\"logExitedCourtesyCall()\":{\"details\":\"We append the sender, which is the deposit contract that called returns false if not approved, to prevent accidentally halting Deposit\",\"return\":\"True if successful, else false\"},\"logFraudDuringSetup()\":{\"details\":\"We append the sender, which is the deposit contract that called returns false if not approved, to prevent accidentally halting Deposit\",\"return\":\"True if successful, else false\"},\"logFunded()\":{\"details\":\"We append the sender, which is the deposit contract that called returns false if not approved, to prevent accidentally halting Deposit\",\"return\":\"True if successful, else false\"},\"logGotRedemptionSignature(bytes32,bytes32,bytes32)\":{\"details\":\"We append the sender, which is the deposit contract that called\",\"params\":{\"_digest\":\"signed digest\",\"_r\":\"signature r value\",\"_s\":\"signature s value\"},\"return\":\"True if successful, else revert\"},\"logLiquidated()\":{\"details\":\"We append the sender, which is the deposit contract that called returns false if not approved, to prevent accidentally halting Deposit\",\"return\":\"True if successful, else false\"},\"logRedeemed(bytes32)\":{\"details\":\"We append the sender, which is the deposit contract that called returns false if not approved, to prevent accidentally halting Deposit\",\"return\":\"True if successful, else false\"},\"logRedemptionRequested(address,bytes32,uint256,bytes20,uint256,bytes)\":{\"details\":\"This is the only event without an explicit timestamp\",\"params\":{\"_digest\":\"The calculated sighash digest\",\"_outpoint\":\"The 36 byte outpoint\",\"_requestedFee\":\"The requester or bump-system specified fee\",\"_requester\":\"The ethereum address of the requester\",\"_requesterPKH\":\"The requester's 20-byte bitcoin pkh\",\"_utxoSize\":\"The size of the utxo in sat\"},\"return\":\"True if successful, else revert\"},\"logRegisteredPubkey(bytes32,bytes32)\":{\"details\":\"We append the sender, which is the deposit contract that called returns false if not approved, to prevent accidentally halting Deposit\",\"return\":\"True if successful, else false\"},\"logSetupFailed()\":{\"details\":\"We append the sender, which is the deposit contract that called returns false if not approved, to prevent accidentally halting Deposit\",\"return\":\"True if successful, else false\"},\"logStartedLiquidation(bool)\":{\"details\":\"We append the sender, which is the deposit contract that called\",\"params\":{\"_wasFraud\":\"True if liquidating for fraud\"},\"return\":\"True if successful, else revert\"}}},\"userdoc\":{\"methods\":{\"approvedToLog(address)\":{\"notice\":\" AUTH Checks if an address is an allowed logger\"},\"logCourtesyCalled()\":{\"notice\":\"Fires a CourtesyCalled event\"},\"logCreated(address)\":{\"notice\":\" Logging Fires a Created event\"},\"logExitedCourtesyCall()\":{\"notice\":\"Fires a ExitedCourtesyCall event\"},\"logFraudDuringSetup()\":{\"notice\":\"Fires a FraudDuringSetup event\"},\"logFunded()\":{\"notice\":\"Fires a Funded event\"},\"logGotRedemptionSignature(bytes32,bytes32,bytes32)\":{\"notice\":\"Fires a GotRedemptionSignature event\"},\"logLiquidated()\":{\"notice\":\"Fires a Liquidated event\"},\"logRedeemed(bytes32)\":{\"notice\":\"Fires a Redeemed event\"},\"logRedemptionRequested(address,bytes32,uint256,bytes20,uint256,bytes)\":{\"notice\":\"Fires a RedemptionRequested event\"},\"logRegisteredPubkey(bytes32,bytes32)\":{\"notice\":\"Fires a RegisteredPubkey event\"},\"logSetupFailed()\":{\"notice\":\"Fires a SetupFailed event\"},\"logStartedLiquidation(bool)\":{\"notice\":\"Fires a StartedLiquidation event\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/system/TBTCSystem.sol\":\"TBTCSystem\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/DepositLog.sol\":{\"keccak256\":\"0xbef5c1473925ff0d33942d3c2a2b0a78694ef760070d0d1ca6dbd059279e071a\",\"urls\":[\"bzzr://80bf4dcd38161beb7b037b1550a30d7a0637df0b7b7b4a61dd233a3124ef37b9\",\"dweb:/ipfs/QmVQpCv5j9PkkhSwTe8EZ4hjaVYxXDVHu4QwC6ZeFsLVe7\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/IERC721.sol\":{\"keccak256\":\"0xd2e386ce780b175d8975d09ec8c60a66cabc91022dd19c1c23816b7941036fbc\",\"urls\":[\"bzzr://01d95810573347b0dffcd534cce8c3ff3d19daa211ec9069a484d584a1aa0653\",\"dweb:/ipfs/QmXCWZ4Z5Jfbq9k6BqDQiBctUtdqSVtFTtBhK8Nd9rSjkJ\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/ITBTCSystem.sol\":{\"keccak256\":\"0x848a4d3ef289d9932e969f99a353c575a96f3f30474363a74537f56591738393\",\"urls\":[\"bzzr://eda27ecc511bf98fd3a7036b63e11f2807d02d4bfeaf6d946e380b1a6dffe114\",\"dweb:/ipfs/QmWUsXW5UkjykcgfUgd8fA6MR8G342xpCvX4mYfhW5atgV\"]},\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/system/TBTCSystem.sol\":{\"keccak256\":\"0x8bb625839f620f0c240e75943130c6d2d342c1dc48552e2215be20c8a32d89fe\",\"urls\":[\"bzzr://26dcb2d1119c7cbbd5582290279f6b859a01be5106425d3772b8df4ce7e9fbc8\",\"dweb:/ipfs/QmNcUiZMVaRyCWWu6k47FRQyLg4Chai8ZiKx5TjTBeDybD\"]}},\"version\":1}", - "bytecode": "0x60806040526001600081905580805564e8d4a51000600255600380546001600160a01b031916909117905534801561003657600080fd5b50610b3c806100466000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c806370a08231116100de578063add1c81711610097578063dab70cb111610071578063dab70cb11461056a578063e2c50ad814610572578063e985e9c51461057a578063f760621e146105a85761018e565b8063add1c81714610494578063b88d4fde1461049c578063c8fba243146105625761018e565b806370a08231146103e7578063869f94691461040d5780638c736503146104305780639ffb386214610438578063a22cb4651461045e578063a831c8161461048c5761018e565b8063282bfd381161014b578063402b783d11610125578063402b783d1461039357806342842e0e1461023b5780636352211e146103ad5780636e1ba283146103ca5761018e565b8063282bfd38146102715780632b8af661146102975780633aac3467146103745761018e565b8063081812fc14610193578063095ea7b3146101cc5780630bcfd609146101fa57806322a147e61461021757806322e5724c1461023357806323b872dd1461023b575b600080fd5b6101b0600480360360208110156101a957600080fd5b50356105d1565b604080516001600160a01b039092168252519081900360200190f35b6101f8600480360360408110156101e257600080fd5b506001600160a01b0381351690602001356105d7565b005b6101f86004803603602081101561021057600080fd5b50356105db565b61021f6105f2565b604080519115158252519081900360200190f35b61021f610646565b6101f86004803603606081101561025157600080fd5b506001600160a01b03813581169160208101359091169060400135610699565b61021f6004803603602081101561028757600080fd5b50356001600160a01b031661069e565b61021f600480360360c08110156102ad57600080fd5b6001600160a01b03823516916020810135916040820135916bffffffffffffffffffffffff19606082013516916080820135919081019060c0810160a08201356401000000008111156102ff57600080fd5b82018360208201111561031157600080fd5b8035906020019184600183028401116401000000008311171561033357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106fe945050505050565b61021f6004803603602081101561038a57600080fd5b50351515610807565b61039b610861565b60408051918252519081900360200190f35b6101b0600480360360208110156103c357600080fd5b5035610867565b61021f600480360360208110156103e057600080fd5b5035610877565b61039b600480360360208110156103fd57600080fd5b50356001600160a01b03166108cd565b61021f6004803603604081101561042357600080fd5b50803590602001356108d3565b61021f610936565b61021f6004803603602081101561044e57600080fd5b50356001600160a01b0316610989565b6101f86004803603604081101561047457600080fd5b506001600160a01b03813516906020013515156105d7565b61021f61098f565b61039b6109e2565b6101f8600480360360808110156104b257600080fd5b6001600160a01b038235811692602081013590911691604082013591908101906080810160608201356401000000008111156104ed57600080fd5b8201836020820111156104ff57600080fd5b8035906020019184600183028401116401000000008311171561052157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506109e8945050505050565b61021f6109ee565b61039b610a41565b61021f610a47565b61021f6004803603604081101561059057600080fd5b506001600160a01b0381358116916020013516610a9a565b61021f600480360360608110156105be57600080fd5b5080359060208101359060400135610aa2565b50600890565b5050565b80600054146105ef57600080546001558190555b50565b60006105fd33610989565b61060957506000610643565b60408051428152905133917f6e7b45210b79c12cd1332babd8d86c0bbb9ca898a89ce0404f17064dbfba18c0919081900360200190a25060015b90565b600061065133610989565b61065d57506000610643565b60408051428152905133917f07f0eaafadb9abb1d28da85d4b4c74f1939fd61b535c7f5ab501f618f07e76ee919081900360200190a250600190565b505050565b60006106a933610989565b6106b5575060006106f9565b6040805142815290516001600160a01b0384169133917f822b3073be62c5c7f143c2dcd71ee266434ee935d90a1eec3be34710ac8ec1a29181900360200190a35060015b919050565b600061070933610989565b610715575060006107fd565b85876001600160a01b0316336001600160a01b03167fc878d7c38ac02179fd80904f0f6c8126ea8659612f4cbb389af37ddf671eb7618888888860405180858152602001846bffffffffffffffffffffffff19166bffffffffffffffffffffffff1916815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107bc5781810151838201526020016107a4565b50505050905090810190601f1680156107e95780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a45060015b9695505050505050565b600061081233610989565b61081e575060006106f9565b604080518315158152426020820152815133927fbef11c059eefba82a15aea8a3a89c86fd08d7711c88fa7daea2632a55488510c928290030190a2506001919050565b60015490565b506003546001600160a01b031690565b600061088233610989565b61088e575060006106f9565b604080514281529051839133917f44b7f176bcc739b54bd0800fe491cbdea19df7d4d6b19c281462e6b4fc5043449181900360200190a3506001919050565b50600090565b60006108de33610989565b6108ea57506000610930565b60408051848152602081018490524281830152905133917f8ee737ab16909c4e9d1b750814a4393c9f84ab5d3a29c08c313b783fc846ae33919081900360600190a25060015b92915050565b600061094133610989565b61094d57506000610643565b60408051428152905133917f5af8184bef8e4b45eb9f6ed7734d04da38ced226495548f46e0c8ff8d7d9a524919081900360200190a250600190565b50600190565b600061099a33610989565b6109a657506000610643565b60408051428152905133917f8fd2cfb62a35fccc1ecef829f83a6c2f840b73dad49d3eaaa402909752086d4b919081900360200190a250600190565b60025490565b50505050565b60006109f933610989565b610a0557506000610643565b60408051428152905133917fa5ee7a2b0254fce91deed604506790ed7fa072d0b14cba4859c3bc8955b9caac919081900360200190a250600190565b60005490565b6000610a5233610989565b610a5e57506000610643565b60408051428152905133917f1e61af503f1d7de21d5300094c18bf8700f82b2951a4d54dd2adda13f6b3da30919081900360200190a250600190565b600092915050565b6000610aad33610989565b610ab957506000610b00565b604080518481526020810184905242818301529051859133917f7f7d7327762d01d2c4a552ea0be2bc5a76264574a80aa78083e691a840e509f29181900360600190a35060015b939250505056fea265627a7a7230582087e6707d13ad5dbe051421cfb141ac8fca9b3754dfecf1ce1aa7138491bcb69764736f6c634300050a0032", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061018e5760003560e01c806370a08231116100de578063add1c81711610097578063dab70cb111610071578063dab70cb11461056a578063e2c50ad814610572578063e985e9c51461057a578063f760621e146105a85761018e565b8063add1c81714610494578063b88d4fde1461049c578063c8fba243146105625761018e565b806370a08231146103e7578063869f94691461040d5780638c736503146104305780639ffb386214610438578063a22cb4651461045e578063a831c8161461048c5761018e565b8063282bfd381161014b578063402b783d11610125578063402b783d1461039357806342842e0e1461023b5780636352211e146103ad5780636e1ba283146103ca5761018e565b8063282bfd38146102715780632b8af661146102975780633aac3467146103745761018e565b8063081812fc14610193578063095ea7b3146101cc5780630bcfd609146101fa57806322a147e61461021757806322e5724c1461023357806323b872dd1461023b575b600080fd5b6101b0600480360360208110156101a957600080fd5b50356105d1565b604080516001600160a01b039092168252519081900360200190f35b6101f8600480360360408110156101e257600080fd5b506001600160a01b0381351690602001356105d7565b005b6101f86004803603602081101561021057600080fd5b50356105db565b61021f6105f2565b604080519115158252519081900360200190f35b61021f610646565b6101f86004803603606081101561025157600080fd5b506001600160a01b03813581169160208101359091169060400135610699565b61021f6004803603602081101561028757600080fd5b50356001600160a01b031661069e565b61021f600480360360c08110156102ad57600080fd5b6001600160a01b03823516916020810135916040820135916bffffffffffffffffffffffff19606082013516916080820135919081019060c0810160a08201356401000000008111156102ff57600080fd5b82018360208201111561031157600080fd5b8035906020019184600183028401116401000000008311171561033357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106fe945050505050565b61021f6004803603602081101561038a57600080fd5b50351515610807565b61039b610861565b60408051918252519081900360200190f35b6101b0600480360360208110156103c357600080fd5b5035610867565b61021f600480360360208110156103e057600080fd5b5035610877565b61039b600480360360208110156103fd57600080fd5b50356001600160a01b03166108cd565b61021f6004803603604081101561042357600080fd5b50803590602001356108d3565b61021f610936565b61021f6004803603602081101561044e57600080fd5b50356001600160a01b0316610989565b6101f86004803603604081101561047457600080fd5b506001600160a01b03813516906020013515156105d7565b61021f61098f565b61039b6109e2565b6101f8600480360360808110156104b257600080fd5b6001600160a01b038235811692602081013590911691604082013591908101906080810160608201356401000000008111156104ed57600080fd5b8201836020820111156104ff57600080fd5b8035906020019184600183028401116401000000008311171561052157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506109e8945050505050565b61021f6109ee565b61039b610a41565b61021f610a47565b61021f6004803603604081101561059057600080fd5b506001600160a01b0381358116916020013516610a9a565b61021f600480360360608110156105be57600080fd5b5080359060208101359060400135610aa2565b50600890565b5050565b80600054146105ef57600080546001558190555b50565b60006105fd33610989565b61060957506000610643565b60408051428152905133917f6e7b45210b79c12cd1332babd8d86c0bbb9ca898a89ce0404f17064dbfba18c0919081900360200190a25060015b90565b600061065133610989565b61065d57506000610643565b60408051428152905133917f07f0eaafadb9abb1d28da85d4b4c74f1939fd61b535c7f5ab501f618f07e76ee919081900360200190a250600190565b505050565b60006106a933610989565b6106b5575060006106f9565b6040805142815290516001600160a01b0384169133917f822b3073be62c5c7f143c2dcd71ee266434ee935d90a1eec3be34710ac8ec1a29181900360200190a35060015b919050565b600061070933610989565b610715575060006107fd565b85876001600160a01b0316336001600160a01b03167fc878d7c38ac02179fd80904f0f6c8126ea8659612f4cbb389af37ddf671eb7618888888860405180858152602001846bffffffffffffffffffffffff19166bffffffffffffffffffffffff1916815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107bc5781810151838201526020016107a4565b50505050905090810190601f1680156107e95780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a45060015b9695505050505050565b600061081233610989565b61081e575060006106f9565b604080518315158152426020820152815133927fbef11c059eefba82a15aea8a3a89c86fd08d7711c88fa7daea2632a55488510c928290030190a2506001919050565b60015490565b506003546001600160a01b031690565b600061088233610989565b61088e575060006106f9565b604080514281529051839133917f44b7f176bcc739b54bd0800fe491cbdea19df7d4d6b19c281462e6b4fc5043449181900360200190a3506001919050565b50600090565b60006108de33610989565b6108ea57506000610930565b60408051848152602081018490524281830152905133917f8ee737ab16909c4e9d1b750814a4393c9f84ab5d3a29c08c313b783fc846ae33919081900360600190a25060015b92915050565b600061094133610989565b61094d57506000610643565b60408051428152905133917f5af8184bef8e4b45eb9f6ed7734d04da38ced226495548f46e0c8ff8d7d9a524919081900360200190a250600190565b50600190565b600061099a33610989565b6109a657506000610643565b60408051428152905133917f8fd2cfb62a35fccc1ecef829f83a6c2f840b73dad49d3eaaa402909752086d4b919081900360200190a250600190565b60025490565b50505050565b60006109f933610989565b610a0557506000610643565b60408051428152905133917fa5ee7a2b0254fce91deed604506790ed7fa072d0b14cba4859c3bc8955b9caac919081900360200190a250600190565b60005490565b6000610a5233610989565b610a5e57506000610643565b60408051428152905133917f1e61af503f1d7de21d5300094c18bf8700f82b2951a4d54dd2adda13f6b3da30919081900360200190a250600190565b600092915050565b6000610aad33610989565b610ab957506000610b00565b604080518481526020810184905242818301529051859133917f7f7d7327762d01d2c4a552ea0be2bc5a76264574a80aa78083e691a840e509f29181900360600190a35060015b939250505056fea265627a7a7230582087e6707d13ad5dbe051421cfb141ac8fca9b3754dfecf1ce1aa7138491bcb69764736f6c634300050a0032", - "sourceMap": "183:1879:18:-;;;274:1;246:29;;;;281:30;;;339:8;317:30;;353:33;;;-1:-1:-1;;;;;;353:33:18;;;;;;183:1879;5:2:-1;;;;30:1;27;20:12;5:2;183:1879:18;;;;;;;", - "deployedSourceMap": "183:1879:18:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;183:1879:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1394:112;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1394:112:18;;:::i;:::-;;;;-1:-1:-1;;;;;1394:112:18;;;;;;;;;;;;;;1318:71;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1318:71:18;;;;;;;;:::i;:::-;;845:244;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;845:244:18;;:::i;8234:216:0:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;10269:224;;;:::i;1721:98:18:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1721:98:18;;;;;;;;;;;;;;;;;:::i;3774:248:0:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3774:248:0;-1:-1:-1;;;;;3774:248:0;;:::i;4631:520::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;4631:520:0;;;;;;;;;;;;;;-1:-1:-1;;4631:520:0;;;;;;;;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;4631:520:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;4631:520:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;4631:520:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;4631:520:0;;-1:-1:-1;4631:520:0;;-1:-1:-1;;;;;4631:520:0:i;8727:261::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8727:261:0;;;;:::i;725:114:18:-;;;:::i;:::-;;;;;;;;;;;;;;;;1209:104;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1209:104:18;;:::i;9263:236:0:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9263:236:0;;:::i;1109:95:18:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1109:95:18;-1:-1:-1;;;;;1109:95:18;;:::i;6121:368:0:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6121:368:0;;;;;;;:::i;7753:200::-;;;:::i;3314:148::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3314:148:0;-1:-1:-1;;;;;3314:148:0;;:::i;1511:92:18:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1511:92:18;;;;;;;;;;:::i;6767:210:0:-;;;:::i;413:81:18:-;;;:::i;1931:129::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;1931:129:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;1931:129:18;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1931:129:18;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;1931:129:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;1931:129:18;;-1:-1:-1;1931:129:18;;-1:-1:-1;;;;;1931:129:18:i;9776:208:0:-;;;:::i;607:112:18:-;;;:::i;7260:220:0:-;;;:::i;1608:108:18:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1608:108:18;;;;;;;;;;:::i;5484:354:0:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5484:354:0;;;;;;;;;;;;:::i;1394:112:18:-;-1:-1:-1;1502:1:18;;1394:112::o;1318:71::-;;;:::o;845:244::-;948:18;927:17;;:39;923:160;;1003:17;;;982:18;:38;1034;;;923:160;845:244;:::o;8234:216:0:-;8279:4;8300:25;8314:10;8300:13;:25::i;:::-;8295:44;;-1:-1:-1;8334:5:0;8327:12;;8295:44;8354:68;;;8406:15;8354:68;;;;8382:10;;8354:68;;;;;;;;;;-1:-1:-1;8439:4:0;8234:216;;:::o;10269:224::-;10318:4;10339:25;10353:10;10339:13;:25::i;:::-;10334:44;;-1:-1:-1;10373:5:0;10366:12;;10334:44;10393:72;;;10449:15;10393:72;;;;10425:10;;10393:72;;;;;;;;;;-1:-1:-1;10482:4:0;10269:224;:::o;1721:98:18:-;;;;:::o;3774:248:0:-;3832:4;3853:25;3867:10;3853:13;:25::i;:::-;3848:44;;-1:-1:-1;3887:5:0;3880:12;;3848:44;3907:87;;;3978:15;3907:87;;;;-1:-1:-1;;;;;3907:87:0;;;3928:10;;3907:87;;;;;;;;;-1:-1:-1;4011:4:0;3774:248;;;;:::o;4631:520::-;4859:4;4880:25;4894:10;4880:13;:25::i;:::-;4875:44;;-1:-1:-1;4914:5:0;4907:12;;4875:44;5015:7;4991:10;-1:-1:-1;;;;;4934:189:0;4967:10;-1:-1:-1;;;;;4934:189:0;;5036:9;5059:13;5086;5113:9;4934:189;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;4934:189:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5140:4:0;4631:520;;;;;;;;;:::o;8727:261::-;8790:4;8811:25;8825:10;8811:13;:25::i;:::-;8806:44;;-1:-1:-1;8845:5:0;8838:12;;8806:44;8865:95;;;;;;;;8944:15;8865:95;;;;;;8897:10;;8865:95;;;;;;;;-1:-1:-1;8977:4:0;8727:261;;;:::o;725:114:18:-;814:18;;725:114;:::o;1209:104::-;-1:-1:-1;1299:12:18;;-1:-1:-1;;;;;1299:12:18;;1209:104::o;9263:236:0:-;9315:4;9336:25;9350:10;9336:13;:25::i;:::-;9331:44;;-1:-1:-1;9370:5:0;9363:12;;9331:44;9390:81;;;9455:15;9390:81;;;;9436:5;;9412:10;;9390:81;;;;;;;;;-1:-1:-1;9488:4:0;9263:236;;;:::o;1109:95:18:-;-1:-1:-1;1165:15:18;;1109:95::o;6121:368:0:-;6248:4;6269:25;6283:10;6269:13;:25::i;:::-;6264:44;;-1:-1:-1;6303:5:0;6296:12;;6264:44;6323:138;;;;;;;;;;;;6445:15;6323:138;;;;;;6353:10;;6323:138;;;;;;;;;;-1:-1:-1;6478:4:0;6121:368;;;;;:::o;7753:200::-;7790:4;7811:25;7825:10;7811:13;:25::i;:::-;7806:44;;-1:-1:-1;7845:5:0;7838:12;;7806:44;7865:60;;;7909:15;7865:60;;;;7885:10;;7865:60;;;;;;;;;;-1:-1:-1;7942:4:0;7753:200;:::o;3314:148::-;-1:-1:-1;3451:4:0;;3314:148::o;6767:210::-;6809:4;6830:25;6844:10;6830:13;:25::i;:::-;6825:44;;-1:-1:-1;6864:5:0;6857:12;;6825:44;6884:65;;;6933:15;6884:65;;;;6909:10;;6884:65;;;;;;;;;;-1:-1:-1;6966:4:0;6767:210;:::o;413:81:18:-;481:11;;413:81;:::o;1931:129::-;;;;;:::o;9776:208:0:-;9817:4;9838:25;9852:10;9838:13;:25::i;:::-;9833:44;;-1:-1:-1;9872:5:0;9865:12;;9833:44;9892:64;;;9940:15;9892:64;;;;9916:10;;9892:64;;;;;;;;;;-1:-1:-1;9973:4:0;9776:208;:::o;607:112:18:-;669:7;695:17;607:112;:::o;7260:220:0:-;7307:4;7328:25;7342:10;7328:13;:25::i;:::-;7323:44;;-1:-1:-1;7362:5:0;7355:12;;7323:44;7382:70;;;7436:15;7382:70;;;;7412:10;;7382:70;;;;;;;;;;-1:-1:-1;7469:4:0;7260:220;:::o;1608:108:18:-;1690:4;1608:108;;;;:::o;5484:354:0:-;5606:4;5627:25;5641:10;5627:13;:25::i;:::-;5622:44;;-1:-1:-1;5661:5:0;5654:12;;5622:44;5681:129;;;;;;;;;;;;5794:15;5681:129;;;;;;5741:7;;5717:10;;5681:129;;;;;;;;;-1:-1:-1;5827:4:0;5484:354;;;;;;:::o", - "source": "pragma solidity ^0.5.10;\n\nimport {ITBTCSystem} from \"../interfaces/ITBTCSystem.sol\";\nimport {IERC721} from \"../interfaces/IERC721.sol\";\nimport {DepositLog} from \"../DepositLog.sol\";\n\ncontract TBTCSystem is ITBTCSystem, IERC721, DepositLog {\n\n uint256 currentDifficulty = 1;\n uint256 previousDifficulty = 1;\n uint256 oraclePrice = 10 ** 12;\n address depositOwner = address(1);\n\n // Price Oracle\n function fetchOraclePrice() external view returns (uint256) {return oraclePrice;}\n\n // Difficulty Oracle\n // TODO: This is a workaround. It will be replaced by tbtc-difficulty-oracle.\n function fetchRelayCurrentDifficulty() external view returns (uint256) {\n return currentDifficulty;\n }\n\n function fetchRelayPreviousDifficulty() external view returns (uint256) {\n return previousDifficulty;\n }\n\n function submitCurrentDifficulty(uint256 _currentDifficulty) public {\n if (currentDifficulty != _currentDifficulty) {\n previousDifficulty = currentDifficulty;\n currentDifficulty = _currentDifficulty;\n }\n }\n\n // ERC721\n function balanceOf(address _owner) public view returns (uint256 balance) {_owner; balance = 0;}\n function ownerOf(uint256 _tokenId) public view returns (address owner) {_tokenId; owner = depositOwner;}\n function approve(address _to, uint256 _tokenId) public {_to; _tokenId;}\n function getApproved(uint256 _tokenId) public view returns (address operator) {_tokenId; operator = address(8);}\n function setApprovalForAll(address _operator, bool _approved) public {_operator; _approved;}\n function isApprovedForAll(address _owner, address _operator) public view returns (bool) {_owner; _operator;}\n function transferFrom(address _from, address _to, uint256 _tokenId) public {_from; _to; _tokenId;}\n function safeTransferFrom(address _from, address _to, uint256 _tokenId) public {_from; _to; _tokenId;}\n function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory _data) public {_from; _to; _tokenId; _data;}\n}\n", - "sourcePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/system/TBTCSystem.sol", - "ast": { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/system/TBTCSystem.sol", - "exportedSymbols": { - "TBTCSystem": [ - 6324 - ] - }, - "id": 6325, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 6118, - "literals": [ - "solidity", - "^", - "0.5", - ".10" - ], - "nodeType": "PragmaDirective", - "src": "0:24:18" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/ITBTCSystem.sol", - "file": "../interfaces/ITBTCSystem.sol", - "id": 6120, - "nodeType": "ImportDirective", - "scope": 6325, - "sourceUnit": 5703, - "src": "26:58:18", - "symbolAliases": [ - { - "foreign": 6119, - "local": null - } - ], - "unitAlias": "" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/IERC721.sol", - "file": "../interfaces/IERC721.sol", - "id": 6122, - "nodeType": "ImportDirective", - "scope": 6325, - "sourceUnit": 5580, - "src": "85:50:18", - "symbolAliases": [ - { - "foreign": 6121, - "local": null - } - ], - "unitAlias": "" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/DepositLog.sol", - "file": "../DepositLog.sol", - "id": 6124, - "nodeType": "ImportDirective", - "scope": 6325, - "sourceUnit": 429, - "src": "136:45:18", - "symbolAliases": [ - { - "foreign": 6123, - "local": null - } - ], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6125, - "name": "ITBTCSystem", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5702, - "src": "206:11:18", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ITBTCSystem_$5702", - "typeString": "contract ITBTCSystem" - } - }, - "id": 6126, - "nodeType": "InheritanceSpecifier", - "src": "206:11:18" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6127, - "name": "IERC721", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5579, - "src": "219:7:18", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC721_$5579", - "typeString": "contract IERC721" - } - }, - "id": 6128, - "nodeType": "InheritanceSpecifier", - "src": "219:7:18" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6129, - "name": "DepositLog", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 428, - "src": "228:10:18", - "typeDescriptions": { - "typeIdentifier": "t_contract$_DepositLog_$428", - "typeString": "contract DepositLog" - } - }, - "id": 6130, - "nodeType": "InheritanceSpecifier", - "src": "228:10:18" - } - ], - "contractDependencies": [ - 428, - 5579, - 5702 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 6324, - "linearizedBaseContracts": [ - 6324, - 428, - 5579, - 5702 - ], - "name": "TBTCSystem", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 6133, - "name": "currentDifficulty", - "nodeType": "VariableDeclaration", - "scope": 6324, - "src": "246:29:18", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6131, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "246:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31", - "id": 6132, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "274:1:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6136, - "name": "previousDifficulty", - "nodeType": "VariableDeclaration", - "scope": 6324, - "src": "281:30:18", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6134, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "281:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31", - "id": 6135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "310:1:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6141, - "name": "oraclePrice", - "nodeType": "VariableDeclaration", - "scope": 6324, - "src": "317:30:18", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6137, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "317:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000_by_1", - "typeString": "int_const 1000000000000" - }, - "id": 6140, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 6138, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "339:2:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3132", - "id": 6139, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "345:2:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_12_by_1", - "typeString": "int_const 12" - }, - "value": "12" - }, - "src": "339:8:18", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000_by_1", - "typeString": "int_const 1000000000000" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6146, - "name": "depositOwner", - "nodeType": "VariableDeclaration", - "scope": 6324, - "src": "353:33:18", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6142, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "353:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 6144, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "384:1:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 6143, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "376:7:18", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6145, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "376:10:18", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - }, - { - "body": { - "id": 6153, - "nodeType": "Block", - "src": "473:21:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6151, - "name": "oraclePrice", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6141, - "src": "481:11:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6150, - "id": 6152, - "nodeType": "Return", - "src": "474:18:18" - } - ] - }, - "documentation": null, - "id": 6154, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "fetchOraclePrice", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6147, - "nodeType": "ParameterList", - "parameters": [], - "src": "438:2:18" - }, - "returnParameters": { - "id": 6150, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6149, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6154, - "src": "464:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6148, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "464:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "463:9:18" - }, - "scope": 6324, - "src": "413:81:18", - "stateMutability": "view", - "superFunction": 5691, - "visibility": "external" - }, - { - "body": { - "id": 6161, - "nodeType": "Block", - "src": "678:41:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6159, - "name": "currentDifficulty", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6133, - "src": "695:17:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6158, - "id": 6160, - "nodeType": "Return", - "src": "688:24:18" - } - ] - }, - "documentation": null, - "id": 6162, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "fetchRelayCurrentDifficulty", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6155, - "nodeType": "ParameterList", - "parameters": [], - "src": "643:2:18" - }, - "returnParameters": { - "id": 6158, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6157, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6162, - "src": "669:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6156, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "669:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "668:9:18" - }, - "scope": 6324, - "src": "607:112:18", - "stateMutability": "view", - "superFunction": 5696, - "visibility": "external" - }, - { - "body": { - "id": 6169, - "nodeType": "Block", - "src": "797:42:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6167, - "name": "previousDifficulty", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6136, - "src": "814:18:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6166, - "id": 6168, - "nodeType": "Return", - "src": "807:25:18" - } - ] - }, - "documentation": null, - "id": 6170, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "fetchRelayPreviousDifficulty", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6163, - "nodeType": "ParameterList", - "parameters": [], - "src": "762:2:18" - }, - "returnParameters": { - "id": 6166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6165, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6170, - "src": "788:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "788:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "787:9:18" - }, - "scope": 6324, - "src": "725:114:18", - "stateMutability": "view", - "superFunction": 5701, - "visibility": "external" - }, - { - "body": { - "id": 6188, - "nodeType": "Block", - "src": "913:176:18", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6175, - "name": "currentDifficulty", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6133, - "src": "927:17:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 6176, - "name": "_currentDifficulty", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6172, - "src": "948:18:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "927:39:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6187, - "nodeType": "IfStatement", - "src": "923:160:18", - "trueBody": { - "id": 6186, - "nodeType": "Block", - "src": "968:115:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6178, - "name": "previousDifficulty", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6136, - "src": "982:18:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6179, - "name": "currentDifficulty", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6133, - "src": "1003:17:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "982:38:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6181, - "nodeType": "ExpressionStatement", - "src": "982:38:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6182, - "name": "currentDifficulty", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6133, - "src": "1034:17:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6183, - "name": "_currentDifficulty", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6172, - "src": "1054:18:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1034:38:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6185, - "nodeType": "ExpressionStatement", - "src": "1034:38:18" - } - ] - } - } - ] - }, - "documentation": null, - "id": 6189, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "submitCurrentDifficulty", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6173, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6172, - "name": "_currentDifficulty", - "nodeType": "VariableDeclaration", - "scope": 6189, - "src": "878:26:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6171, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "878:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "877:28:18" - }, - "returnParameters": { - "id": 6174, - "nodeType": "ParameterList", - "parameters": [], - "src": "913:0:18" - }, - "scope": 6324, - "src": "845:244:18", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6202, - "nodeType": "Block", - "src": "1182:22:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6196, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6191, - "src": "1183:6:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6197, - "nodeType": "ExpressionStatement", - "src": "1183:6:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6200, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6198, - "name": "balance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6194, - "src": "1191:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 6199, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1201:1:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1191:11:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6201, - "nodeType": "ExpressionStatement", - "src": "1191:11:18" - } - ] - }, - "documentation": null, - "id": 6203, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6192, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6191, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 6203, - "src": "1128:14:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6190, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1128:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1127:16:18" - }, - "returnParameters": { - "id": 6195, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6194, - "name": "balance", - "nodeType": "VariableDeclaration", - "scope": 6203, - "src": "1165:15:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6193, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1165:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1164:17:18" - }, - "scope": 6324, - "src": "1109:95:18", - "stateMutability": "view", - "superFunction": 5512, - "visibility": "public" - }, - { - "body": { - "id": 6216, - "nodeType": "Block", - "src": "1280:33:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6210, - "name": "_tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6205, - "src": "1281:8:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6211, - "nodeType": "ExpressionStatement", - "src": "1281:8:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6212, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6208, - "src": "1291:5:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6213, - "name": "depositOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6146, - "src": "1299:12:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1291:20:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6215, - "nodeType": "ExpressionStatement", - "src": "1291:20:18" - } - ] - }, - "documentation": null, - "id": 6217, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "ownerOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6206, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6205, - "name": "_tokenId", - "nodeType": "VariableDeclaration", - "scope": 6217, - "src": "1226:16:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6204, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1226:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1225:18:18" - }, - "returnParameters": { - "id": 6209, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6208, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 6217, - "src": "1265:13:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6207, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1265:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1264:15:18" - }, - "scope": 6324, - "src": "1209:104:18", - "stateMutability": "view", - "superFunction": 5519, - "visibility": "public" - }, - { - "body": { - "id": 6228, - "nodeType": "Block", - "src": "1373:16:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6224, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6219, - "src": "1374:3:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6225, - "nodeType": "ExpressionStatement", - "src": "1374:3:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6226, - "name": "_tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6221, - "src": "1379:8:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6227, - "nodeType": "ExpressionStatement", - "src": "1379:8:18" - } - ] - }, - "documentation": null, - "id": 6229, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6222, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6219, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 6229, - "src": "1335:11:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6218, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1335:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6221, - "name": "_tokenId", - "nodeType": "VariableDeclaration", - "scope": 6229, - "src": "1348:16:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6220, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1348:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1334:31:18" - }, - "returnParameters": { - "id": 6223, - "nodeType": "ParameterList", - "parameters": [], - "src": "1373:0:18" - }, - "scope": 6324, - "src": "1318:71:18", - "stateMutability": "nonpayable", - "superFunction": 5526, - "visibility": "public" - }, - { - "body": { - "id": 6244, - "nodeType": "Block", - "src": "1472:34:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6236, - "name": "_tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6231, - "src": "1473:8:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6237, - "nodeType": "ExpressionStatement", - "src": "1473:8:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6238, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6234, - "src": "1483:8:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "38", - "id": 6240, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1502:1:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_8_by_1", - "typeString": "int_const 8" - }, - "value": "8" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_8_by_1", - "typeString": "int_const 8" - } - ], - "id": 6239, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1494:7:18", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6241, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1494:10:18", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1483:21:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6243, - "nodeType": "ExpressionStatement", - "src": "1483:21:18" - } - ] - }, - "documentation": null, - "id": 6245, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getApproved", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6232, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6231, - "name": "_tokenId", - "nodeType": "VariableDeclaration", - "scope": 6245, - "src": "1415:16:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6230, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1415:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1414:18:18" - }, - "returnParameters": { - "id": 6235, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6234, - "name": "operator", - "nodeType": "VariableDeclaration", - "scope": 6245, - "src": "1454:16:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6233, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1454:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1453:18:18" - }, - "scope": 6324, - "src": "1394:112:18", - "stateMutability": "view", - "superFunction": 5533, - "visibility": "public" - }, - { - "body": { - "id": 6256, - "nodeType": "Block", - "src": "1580:23:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6252, - "name": "_operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6247, - "src": "1581:9:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6253, - "nodeType": "ExpressionStatement", - "src": "1581:9:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6254, - "name": "_approved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6249, - "src": "1592:9:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 6255, - "nodeType": "ExpressionStatement", - "src": "1592:9:18" - } - ] - }, - "documentation": null, - "id": 6257, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setApprovalForAll", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6250, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6247, - "name": "_operator", - "nodeType": "VariableDeclaration", - "scope": 6257, - "src": "1538:17:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6246, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1538:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6249, - "name": "_approved", - "nodeType": "VariableDeclaration", - "scope": 6257, - "src": "1557:14:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6248, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1557:4:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1537:35:18" - }, - "returnParameters": { - "id": 6251, - "nodeType": "ParameterList", - "parameters": [], - "src": "1580:0:18" - }, - "scope": 6324, - "src": "1511:92:18", - "stateMutability": "nonpayable", - "superFunction": 5540, - "visibility": "public" - }, - { - "body": { - "id": 6270, - "nodeType": "Block", - "src": "1696:20:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6266, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6259, - "src": "1697:6:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6267, - "nodeType": "ExpressionStatement", - "src": "1697:6:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6268, - "name": "_operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6261, - "src": "1705:9:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6269, - "nodeType": "ExpressionStatement", - "src": "1705:9:18" - } - ] - }, - "documentation": null, - "id": 6271, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isApprovedForAll", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6262, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6259, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 6271, - "src": "1634:14:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6258, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1634:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6261, - "name": "_operator", - "nodeType": "VariableDeclaration", - "scope": 6271, - "src": "1650:17:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6260, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1650:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1633:35:18" - }, - "returnParameters": { - "id": 6265, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6264, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6271, - "src": "1690:4:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6263, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1690:4:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1689:6:18" - }, - "scope": 6324, - "src": "1608:108:18", - "stateMutability": "view", - "superFunction": 5549, - "visibility": "public" - }, - { - "body": { - "id": 6286, - "nodeType": "Block", - "src": "1796:23:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6280, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6273, - "src": "1797:5:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6281, - "nodeType": "ExpressionStatement", - "src": "1797:5:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6282, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6275, - "src": "1804:3:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6283, - "nodeType": "ExpressionStatement", - "src": "1804:3:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6284, - "name": "_tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6277, - "src": "1809:8:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6285, - "nodeType": "ExpressionStatement", - "src": "1809:8:18" - } - ] - }, - "documentation": null, - "id": 6287, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6278, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6273, - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 6287, - "src": "1743:13:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6272, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1743:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6275, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 6287, - "src": "1758:11:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6274, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1758:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6277, - "name": "_tokenId", - "nodeType": "VariableDeclaration", - "scope": 6287, - "src": "1771:16:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6276, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1771:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1742:46:18" - }, - "returnParameters": { - "id": 6279, - "nodeType": "ParameterList", - "parameters": [], - "src": "1796:0:18" - }, - "scope": 6324, - "src": "1721:98:18", - "stateMutability": "nonpayable", - "superFunction": 5558, - "visibility": "public" - }, - { - "body": { - "id": 6302, - "nodeType": "Block", - "src": "1903:23:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6296, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6289, - "src": "1904:5:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6297, - "nodeType": "ExpressionStatement", - "src": "1904:5:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6298, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6291, - "src": "1911:3:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6299, - "nodeType": "ExpressionStatement", - "src": "1911:3:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6300, - "name": "_tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6293, - "src": "1916:8:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6301, - "nodeType": "ExpressionStatement", - "src": "1916:8:18" - } - ] - }, - "documentation": null, - "id": 6303, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6294, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6289, - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 6303, - "src": "1850:13:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6288, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1850:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6291, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 6303, - "src": "1865:11:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6290, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1865:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6293, - "name": "_tokenId", - "nodeType": "VariableDeclaration", - "scope": 6303, - "src": "1878:16:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6292, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1878:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1849:46:18" - }, - "returnParameters": { - "id": 6295, - "nodeType": "ParameterList", - "parameters": [], - "src": "1903:0:18" - }, - "scope": 6324, - "src": "1824:102:18", - "stateMutability": "nonpayable", - "superFunction": 5567, - "visibility": "public" - }, - { - "body": { - "id": 6322, - "nodeType": "Block", - "src": "2030:30:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6314, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6305, - "src": "2031:5:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6315, - "nodeType": "ExpressionStatement", - "src": "2031:5:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6316, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6307, - "src": "2038:3:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6317, - "nodeType": "ExpressionStatement", - "src": "2038:3:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6318, - "name": "_tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6309, - "src": "2043:8:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6319, - "nodeType": "ExpressionStatement", - "src": "2043:8:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6320, - "name": "_data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6311, - "src": "2053:5:18", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 6321, - "nodeType": "ExpressionStatement", - "src": "2053:5:18" - } - ] - }, - "documentation": null, - "id": 6323, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6312, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6305, - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 6323, - "src": "1957:13:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6304, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1957:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6307, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 6323, - "src": "1972:11:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6306, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1972:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6309, - "name": "_tokenId", - "nodeType": "VariableDeclaration", - "scope": 6323, - "src": "1985:16:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6308, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1985:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6311, - "name": "_data", - "nodeType": "VariableDeclaration", - "scope": 6323, - "src": "2003:18:18", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 6310, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2003:5:18", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1956:66:18" - }, - "returnParameters": { - "id": 6313, - "nodeType": "ParameterList", - "parameters": [], - "src": "2030:0:18" - }, - "scope": 6324, - "src": "1931:129:18", - "stateMutability": "nonpayable", - "superFunction": 5578, - "visibility": "public" - } - ], - "scope": 6325, - "src": "183:1879:18" - } - ], - "src": "0:2063:18" - }, - "legacyAST": { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/system/TBTCSystem.sol", - "exportedSymbols": { - "TBTCSystem": [ - 6324 - ] - }, - "id": 6325, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 6118, - "literals": [ - "solidity", - "^", - "0.5", - ".10" - ], - "nodeType": "PragmaDirective", - "src": "0:24:18" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/ITBTCSystem.sol", - "file": "../interfaces/ITBTCSystem.sol", - "id": 6120, - "nodeType": "ImportDirective", - "scope": 6325, - "sourceUnit": 5703, - "src": "26:58:18", - "symbolAliases": [ - { - "foreign": 6119, - "local": null - } - ], - "unitAlias": "" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/interfaces/IERC721.sol", - "file": "../interfaces/IERC721.sol", - "id": 6122, - "nodeType": "ImportDirective", - "scope": 6325, - "sourceUnit": 5580, - "src": "85:50:18", - "symbolAliases": [ - { - "foreign": 6121, - "local": null - } - ], - "unitAlias": "" - }, - { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/DepositLog.sol", - "file": "../DepositLog.sol", - "id": 6124, - "nodeType": "ImportDirective", - "scope": 6325, - "sourceUnit": 429, - "src": "136:45:18", - "symbolAliases": [ - { - "foreign": 6123, - "local": null - } - ], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6125, - "name": "ITBTCSystem", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5702, - "src": "206:11:18", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ITBTCSystem_$5702", - "typeString": "contract ITBTCSystem" - } - }, - "id": 6126, - "nodeType": "InheritanceSpecifier", - "src": "206:11:18" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6127, - "name": "IERC721", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 5579, - "src": "219:7:18", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC721_$5579", - "typeString": "contract IERC721" - } - }, - "id": 6128, - "nodeType": "InheritanceSpecifier", - "src": "219:7:18" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6129, - "name": "DepositLog", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 428, - "src": "228:10:18", - "typeDescriptions": { - "typeIdentifier": "t_contract$_DepositLog_$428", - "typeString": "contract DepositLog" - } - }, - "id": 6130, - "nodeType": "InheritanceSpecifier", - "src": "228:10:18" - } - ], - "contractDependencies": [ - 428, - 5579, - 5702 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 6324, - "linearizedBaseContracts": [ - 6324, - 428, - 5579, - 5702 - ], - "name": "TBTCSystem", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 6133, - "name": "currentDifficulty", - "nodeType": "VariableDeclaration", - "scope": 6324, - "src": "246:29:18", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6131, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "246:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31", - "id": 6132, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "274:1:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6136, - "name": "previousDifficulty", - "nodeType": "VariableDeclaration", - "scope": 6324, - "src": "281:30:18", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6134, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "281:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "31", - "id": 6135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "310:1:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6141, - "name": "oraclePrice", - "nodeType": "VariableDeclaration", - "scope": 6324, - "src": "317:30:18", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6137, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "317:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_1000000000000_by_1", - "typeString": "int_const 1000000000000" - }, - "id": 6140, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 6138, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "339:2:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3132", - "id": 6139, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "345:2:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_12_by_1", - "typeString": "int_const 12" - }, - "value": "12" - }, - "src": "339:8:18", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000_by_1", - "typeString": "int_const 1000000000000" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6146, - "name": "depositOwner", - "nodeType": "VariableDeclaration", - "scope": 6324, - "src": "353:33:18", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6142, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "353:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 6144, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "384:1:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 6143, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "376:7:18", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6145, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "376:10:18", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "visibility": "internal" - }, - { - "body": { - "id": 6153, - "nodeType": "Block", - "src": "473:21:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6151, - "name": "oraclePrice", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6141, - "src": "481:11:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6150, - "id": 6152, - "nodeType": "Return", - "src": "474:18:18" - } - ] - }, - "documentation": null, - "id": 6154, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "fetchOraclePrice", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6147, - "nodeType": "ParameterList", - "parameters": [], - "src": "438:2:18" - }, - "returnParameters": { - "id": 6150, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6149, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6154, - "src": "464:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6148, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "464:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "463:9:18" - }, - "scope": 6324, - "src": "413:81:18", - "stateMutability": "view", - "superFunction": 5691, - "visibility": "external" - }, - { - "body": { - "id": 6161, - "nodeType": "Block", - "src": "678:41:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6159, - "name": "currentDifficulty", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6133, - "src": "695:17:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6158, - "id": 6160, - "nodeType": "Return", - "src": "688:24:18" - } - ] - }, - "documentation": null, - "id": 6162, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "fetchRelayCurrentDifficulty", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6155, - "nodeType": "ParameterList", - "parameters": [], - "src": "643:2:18" - }, - "returnParameters": { - "id": 6158, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6157, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6162, - "src": "669:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6156, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "669:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "668:9:18" - }, - "scope": 6324, - "src": "607:112:18", - "stateMutability": "view", - "superFunction": 5696, - "visibility": "external" - }, - { - "body": { - "id": 6169, - "nodeType": "Block", - "src": "797:42:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6167, - "name": "previousDifficulty", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6136, - "src": "814:18:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 6166, - "id": 6168, - "nodeType": "Return", - "src": "807:25:18" - } - ] - }, - "documentation": null, - "id": 6170, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "fetchRelayPreviousDifficulty", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6163, - "nodeType": "ParameterList", - "parameters": [], - "src": "762:2:18" - }, - "returnParameters": { - "id": 6166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6165, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6170, - "src": "788:7:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6164, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "788:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "787:9:18" - }, - "scope": 6324, - "src": "725:114:18", - "stateMutability": "view", - "superFunction": 5701, - "visibility": "external" - }, - { - "body": { - "id": 6188, - "nodeType": "Block", - "src": "913:176:18", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 6177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 6175, - "name": "currentDifficulty", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6133, - "src": "927:17:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 6176, - "name": "_currentDifficulty", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6172, - "src": "948:18:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "927:39:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 6187, - "nodeType": "IfStatement", - "src": "923:160:18", - "trueBody": { - "id": 6186, - "nodeType": "Block", - "src": "968:115:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6178, - "name": "previousDifficulty", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6136, - "src": "982:18:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6179, - "name": "currentDifficulty", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6133, - "src": "1003:17:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "982:38:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6181, - "nodeType": "ExpressionStatement", - "src": "982:38:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6182, - "name": "currentDifficulty", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6133, - "src": "1034:17:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6183, - "name": "_currentDifficulty", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6172, - "src": "1054:18:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1034:38:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6185, - "nodeType": "ExpressionStatement", - "src": "1034:38:18" - } - ] - } - } - ] - }, - "documentation": null, - "id": 6189, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "submitCurrentDifficulty", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6173, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6172, - "name": "_currentDifficulty", - "nodeType": "VariableDeclaration", - "scope": 6189, - "src": "878:26:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6171, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "878:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "877:28:18" - }, - "returnParameters": { - "id": 6174, - "nodeType": "ParameterList", - "parameters": [], - "src": "913:0:18" - }, - "scope": 6324, - "src": "845:244:18", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6202, - "nodeType": "Block", - "src": "1182:22:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6196, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6191, - "src": "1183:6:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6197, - "nodeType": "ExpressionStatement", - "src": "1183:6:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6200, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6198, - "name": "balance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6194, - "src": "1191:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 6199, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1201:1:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1191:11:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6201, - "nodeType": "ExpressionStatement", - "src": "1191:11:18" - } - ] - }, - "documentation": null, - "id": 6203, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6192, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6191, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 6203, - "src": "1128:14:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6190, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1128:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1127:16:18" - }, - "returnParameters": { - "id": 6195, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6194, - "name": "balance", - "nodeType": "VariableDeclaration", - "scope": 6203, - "src": "1165:15:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6193, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1165:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1164:17:18" - }, - "scope": 6324, - "src": "1109:95:18", - "stateMutability": "view", - "superFunction": 5512, - "visibility": "public" - }, - { - "body": { - "id": 6216, - "nodeType": "Block", - "src": "1280:33:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6210, - "name": "_tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6205, - "src": "1281:8:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6211, - "nodeType": "ExpressionStatement", - "src": "1281:8:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6212, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6208, - "src": "1291:5:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 6213, - "name": "depositOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6146, - "src": "1299:12:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1291:20:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6215, - "nodeType": "ExpressionStatement", - "src": "1291:20:18" - } - ] - }, - "documentation": null, - "id": 6217, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "ownerOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6206, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6205, - "name": "_tokenId", - "nodeType": "VariableDeclaration", - "scope": 6217, - "src": "1226:16:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6204, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1226:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1225:18:18" - }, - "returnParameters": { - "id": 6209, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6208, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 6217, - "src": "1265:13:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6207, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1265:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1264:15:18" - }, - "scope": 6324, - "src": "1209:104:18", - "stateMutability": "view", - "superFunction": 5519, - "visibility": "public" - }, - { - "body": { - "id": 6228, - "nodeType": "Block", - "src": "1373:16:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6224, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6219, - "src": "1374:3:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6225, - "nodeType": "ExpressionStatement", - "src": "1374:3:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6226, - "name": "_tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6221, - "src": "1379:8:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6227, - "nodeType": "ExpressionStatement", - "src": "1379:8:18" - } - ] - }, - "documentation": null, - "id": 6229, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6222, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6219, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 6229, - "src": "1335:11:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6218, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1335:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6221, - "name": "_tokenId", - "nodeType": "VariableDeclaration", - "scope": 6229, - "src": "1348:16:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6220, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1348:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1334:31:18" - }, - "returnParameters": { - "id": 6223, - "nodeType": "ParameterList", - "parameters": [], - "src": "1373:0:18" - }, - "scope": 6324, - "src": "1318:71:18", - "stateMutability": "nonpayable", - "superFunction": 5526, - "visibility": "public" - }, - { - "body": { - "id": 6244, - "nodeType": "Block", - "src": "1472:34:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6236, - "name": "_tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6231, - "src": "1473:8:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6237, - "nodeType": "ExpressionStatement", - "src": "1473:8:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 6238, - "name": "operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6234, - "src": "1483:8:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "38", - "id": 6240, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1502:1:18", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_8_by_1", - "typeString": "int_const 8" - }, - "value": "8" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_8_by_1", - "typeString": "int_const 8" - } - ], - "id": 6239, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1494:7:18", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 6241, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1494:10:18", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1483:21:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6243, - "nodeType": "ExpressionStatement", - "src": "1483:21:18" - } - ] - }, - "documentation": null, - "id": 6245, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getApproved", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6232, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6231, - "name": "_tokenId", - "nodeType": "VariableDeclaration", - "scope": 6245, - "src": "1415:16:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6230, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1415:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1414:18:18" - }, - "returnParameters": { - "id": 6235, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6234, - "name": "operator", - "nodeType": "VariableDeclaration", - "scope": 6245, - "src": "1454:16:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6233, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1454:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1453:18:18" - }, - "scope": 6324, - "src": "1394:112:18", - "stateMutability": "view", - "superFunction": 5533, - "visibility": "public" - }, - { - "body": { - "id": 6256, - "nodeType": "Block", - "src": "1580:23:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6252, - "name": "_operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6247, - "src": "1581:9:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6253, - "nodeType": "ExpressionStatement", - "src": "1581:9:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6254, - "name": "_approved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6249, - "src": "1592:9:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 6255, - "nodeType": "ExpressionStatement", - "src": "1592:9:18" - } - ] - }, - "documentation": null, - "id": 6257, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setApprovalForAll", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6250, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6247, - "name": "_operator", - "nodeType": "VariableDeclaration", - "scope": 6257, - "src": "1538:17:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6246, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1538:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6249, - "name": "_approved", - "nodeType": "VariableDeclaration", - "scope": 6257, - "src": "1557:14:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6248, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1557:4:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1537:35:18" - }, - "returnParameters": { - "id": 6251, - "nodeType": "ParameterList", - "parameters": [], - "src": "1580:0:18" - }, - "scope": 6324, - "src": "1511:92:18", - "stateMutability": "nonpayable", - "superFunction": 5540, - "visibility": "public" - }, - { - "body": { - "id": 6270, - "nodeType": "Block", - "src": "1696:20:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6266, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6259, - "src": "1697:6:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6267, - "nodeType": "ExpressionStatement", - "src": "1697:6:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6268, - "name": "_operator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6261, - "src": "1705:9:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6269, - "nodeType": "ExpressionStatement", - "src": "1705:9:18" - } - ] - }, - "documentation": null, - "id": 6271, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isApprovedForAll", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6262, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6259, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 6271, - "src": "1634:14:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6258, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1634:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6261, - "name": "_operator", - "nodeType": "VariableDeclaration", - "scope": 6271, - "src": "1650:17:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6260, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1650:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1633:35:18" - }, - "returnParameters": { - "id": 6265, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6264, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6271, - "src": "1690:4:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6263, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1690:4:18", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1689:6:18" - }, - "scope": 6324, - "src": "1608:108:18", - "stateMutability": "view", - "superFunction": 5549, - "visibility": "public" - }, - { - "body": { - "id": 6286, - "nodeType": "Block", - "src": "1796:23:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6280, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6273, - "src": "1797:5:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6281, - "nodeType": "ExpressionStatement", - "src": "1797:5:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6282, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6275, - "src": "1804:3:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6283, - "nodeType": "ExpressionStatement", - "src": "1804:3:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6284, - "name": "_tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6277, - "src": "1809:8:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6285, - "nodeType": "ExpressionStatement", - "src": "1809:8:18" - } - ] - }, - "documentation": null, - "id": 6287, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6278, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6273, - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 6287, - "src": "1743:13:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6272, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1743:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6275, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 6287, - "src": "1758:11:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6274, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1758:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6277, - "name": "_tokenId", - "nodeType": "VariableDeclaration", - "scope": 6287, - "src": "1771:16:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6276, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1771:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1742:46:18" - }, - "returnParameters": { - "id": 6279, - "nodeType": "ParameterList", - "parameters": [], - "src": "1796:0:18" - }, - "scope": 6324, - "src": "1721:98:18", - "stateMutability": "nonpayable", - "superFunction": 5558, - "visibility": "public" - }, - { - "body": { - "id": 6302, - "nodeType": "Block", - "src": "1903:23:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6296, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6289, - "src": "1904:5:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6297, - "nodeType": "ExpressionStatement", - "src": "1904:5:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6298, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6291, - "src": "1911:3:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6299, - "nodeType": "ExpressionStatement", - "src": "1911:3:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6300, - "name": "_tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6293, - "src": "1916:8:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6301, - "nodeType": "ExpressionStatement", - "src": "1916:8:18" - } - ] - }, - "documentation": null, - "id": 6303, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6294, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6289, - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 6303, - "src": "1850:13:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6288, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1850:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6291, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 6303, - "src": "1865:11:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6290, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1865:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6293, - "name": "_tokenId", - "nodeType": "VariableDeclaration", - "scope": 6303, - "src": "1878:16:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6292, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1878:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1849:46:18" - }, - "returnParameters": { - "id": 6295, - "nodeType": "ParameterList", - "parameters": [], - "src": "1903:0:18" - }, - "scope": 6324, - "src": "1824:102:18", - "stateMutability": "nonpayable", - "superFunction": 5567, - "visibility": "public" - }, - { - "body": { - "id": 6322, - "nodeType": "Block", - "src": "2030:30:18", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 6314, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6305, - "src": "2031:5:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6315, - "nodeType": "ExpressionStatement", - "src": "2031:5:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6316, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6307, - "src": "2038:3:18", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 6317, - "nodeType": "ExpressionStatement", - "src": "2038:3:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6318, - "name": "_tokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6309, - "src": "2043:8:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 6319, - "nodeType": "ExpressionStatement", - "src": "2043:8:18" - }, - { - "expression": { - "argumentTypes": null, - "id": 6320, - "name": "_data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6311, - "src": "2053:5:18", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 6321, - "nodeType": "ExpressionStatement", - "src": "2053:5:18" - } - ] - }, - "documentation": null, - "id": 6323, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeTransferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6312, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6305, - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 6323, - "src": "1957:13:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6304, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1957:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6307, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 6323, - "src": "1972:11:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6306, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1972:7:18", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6309, - "name": "_tokenId", - "nodeType": "VariableDeclaration", - "scope": 6323, - "src": "1985:16:18", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6308, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1985:7:18", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6311, - "name": "_data", - "nodeType": "VariableDeclaration", - "scope": 6323, - "src": "2003:18:18", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 6310, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2003:5:18", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1956:66:18" - }, - "returnParameters": { - "id": 6313, - "nodeType": "ParameterList", - "parameters": [], - "src": "2030:0:18" - }, - "scope": 6324, - "src": "1931:129:18", - "stateMutability": "nonpayable", - "superFunction": 5578, - "visibility": "public" - } - ], - "scope": 6325, - "src": "183:1879:18" - } - ], - "src": "0:2063:18" - }, - "compiler": { - "name": "solc", - "version": "0.5.10+commit.5a6ea5b1.Emscripten.clang" - }, - "networks": { - "1563533123569": { - "events": {}, - "links": {}, - "address": "0x70e34d3025b279cDab0f0e265D16943F2872846D", - "transactionHash": "0xab8bd08f2dccf88a8277e1d8af3ff53c949c4b7bed8c7312ec0fb4a835e23985" - }, - "1564486898078": { - "events": {}, - "links": {}, - "address": "0x62cE8841bee8AC15be9a6F5cf4adBf98e012744F", - "transactionHash": "0x015c4d5369251401a035f1bd41c0a1b6958015cc431eeec04d72061bc9a0ae30" - }, - "1564576405726": { - "events": {}, - "links": {}, - "address": "0x2d2FE73fCB1C632aB066dA8Ccf22990128A1e0B4", - "transactionHash": "0xb01b08f7b4a875f607ac1d86c80907251ed12972806c6665cf8ccfe2dc54e009" - }, - "1564669548315": { - "events": {}, - "links": {}, - "address": "0xda1b22d14924b27e10F092E1BbdFa2B09c7781A2", - "transactionHash": "0x58370f569d0f2dfb848dda503b74f8ca1ee1202e774e7944bdfd2e78155af42e" - }, - "1564683807489": { - "events": {}, - "links": {}, - "address": "0x1f2D6C927E3B272DDb7977Cccc077a09e9Fc7b72", - "transactionHash": "0x42a3442c4250ba43473823f10d835bba146babbce19b25f9cc41db1fce0be501" - }, - "1564760269629": { - "events": {}, - "links": {}, - "address": "0x06ac073E32E6d2965365511D6eD95141f14505cb", - "transactionHash": "0x53c55186180e38d99146df553b7faf141f7ab37cf25d2cd1093d16e776c242a2" - }, - "1565004617282": { - "events": {}, - "links": {}, - "address": "0xB68aBD2FF8977CcDf9F4c13E20BF1A942762e220", - "transactionHash": "0x98f21eb00042487e648515067ca2b10cf3ecce0fcfac40c787432f5c7ff3ae65" - } - }, - "schemaVersion": "3.0.10", - "updatedAt": "2019-08-05T11:32:37.553Z", - "devdoc": { - "methods": { - "approvedToLog(address)": { - "details": "Calls the system to check if the caller is a Deposit We don't require this, so deposits are not bricked if the system borks", - "params": { - "_caller": "The address of the calling contract" - }, - "return": "True if approved, otherwise false" - }, - "logCourtesyCalled()": { - "details": "We append the sender, which is the deposit contract that called returns false if not approved, to prevent accidentally halting Deposit", - "return": "True if successful, else false" - }, - "logCreated(address)": { - "details": "We append the sender, which is the deposit contract that called", - "params": { - "_keepAddress": "The address of the associated keep" - }, - "return": "True if successful, else revert" - }, - "logExitedCourtesyCall()": { - "details": "We append the sender, which is the deposit contract that called returns false if not approved, to prevent accidentally halting Deposit", - "return": "True if successful, else false" - }, - "logFraudDuringSetup()": { - "details": "We append the sender, which is the deposit contract that called returns false if not approved, to prevent accidentally halting Deposit", - "return": "True if successful, else false" - }, - "logFunded()": { - "details": "We append the sender, which is the deposit contract that called returns false if not approved, to prevent accidentally halting Deposit", - "return": "True if successful, else false" - }, - "logGotRedemptionSignature(bytes32,bytes32,bytes32)": { - "details": "We append the sender, which is the deposit contract that called", - "params": { - "_digest": "signed digest", - "_r": "signature r value", - "_s": "signature s value" - }, - "return": "True if successful, else revert" - }, - "logLiquidated()": { - "details": "We append the sender, which is the deposit contract that called returns false if not approved, to prevent accidentally halting Deposit", - "return": "True if successful, else false" - }, - "logRedeemed(bytes32)": { - "details": "We append the sender, which is the deposit contract that called returns false if not approved, to prevent accidentally halting Deposit", - "return": "True if successful, else false" - }, - "logRedemptionRequested(address,bytes32,uint256,bytes20,uint256,bytes)": { - "details": "This is the only event without an explicit timestamp", - "params": { - "_digest": "The calculated sighash digest", - "_outpoint": "The 36 byte outpoint", - "_requestedFee": "The requester or bump-system specified fee", - "_requester": "The ethereum address of the requester", - "_requesterPKH": "The requester's 20-byte bitcoin pkh", - "_utxoSize": "The size of the utxo in sat" - }, - "return": "True if successful, else revert" - }, - "logRegisteredPubkey(bytes32,bytes32)": { - "details": "We append the sender, which is the deposit contract that called returns false if not approved, to prevent accidentally halting Deposit", - "return": "True if successful, else false" - }, - "logSetupFailed()": { - "details": "We append the sender, which is the deposit contract that called returns false if not approved, to prevent accidentally halting Deposit", - "return": "True if successful, else false" - }, - "logStartedLiquidation(bool)": { - "details": "We append the sender, which is the deposit contract that called", - "params": { - "_wasFraud": "True if liquidating for fraud" - }, - "return": "True if successful, else revert" - } - } - }, - "userdoc": { - "methods": { - "approvedToLog(address)": { - "notice": " AUTH Checks if an address is an allowed logger" - }, - "logCourtesyCalled()": { - "notice": "Fires a CourtesyCalled event" - }, - "logCreated(address)": { - "notice": " Logging Fires a Created event" - }, - "logExitedCourtesyCall()": { - "notice": "Fires a ExitedCourtesyCall event" - }, - "logFraudDuringSetup()": { - "notice": "Fires a FraudDuringSetup event" - }, - "logFunded()": { - "notice": "Fires a Funded event" - }, - "logGotRedemptionSignature(bytes32,bytes32,bytes32)": { - "notice": "Fires a GotRedemptionSignature event" - }, - "logLiquidated()": { - "notice": "Fires a Liquidated event" - }, - "logRedeemed(bytes32)": { - "notice": "Fires a Redeemed event" - }, - "logRedemptionRequested(address,bytes32,uint256,bytes20,uint256,bytes)": { - "notice": "Fires a RedemptionRequested event" - }, - "logRegisteredPubkey(bytes32,bytes32)": { - "notice": "Fires a RegisteredPubkey event" - }, - "logSetupFailed()": { - "notice": "Fires a SetupFailed event" - }, - "logStartedLiquidation(bool)": { - "notice": "Fires a StartedLiquidation event" - } - } - } -} \ No newline at end of file diff --git a/client/src/eth/artifacts/TBTCToken.json b/client/src/eth/artifacts/TBTCToken.json deleted file mode 100644 index db952be9..00000000 --- a/client/src/eth/artifacts/TBTCToken.json +++ /dev/null @@ -1,2094 +0,0 @@ -{ - "contractName": "TBTCToken", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "recipient", - "type": "address" - }, - { - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - }, - { - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "name": "_account", - "type": "address" - }, - { - "name": "_amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_account", - "type": "address" - }, - { - "name": "_amount", - "type": "uint256" - } - ], - "name": "burnFrom", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.10+commit.5a6ea5b1\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_account\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_account\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"See `IERC20.allowance`.\"},\"approve(address,uint256)\":{\"details\":\"See `IERC20.approve`. * Requirements: * - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See `IERC20.balanceOf`.\"},\"burnFrom(address,uint256)\":{\"details\":\"Burns an amount of the token of a given account deducting from the sender's allowance for said account. Uses the internal _burn function.\",\"params\":{\"_account\":\"The account whose tokens will be burnt.\",\"_amount\":\"The amount of tokens that will be burnt.\"}},\"constructor\":{\"details\":\"Constructor, calls ERC20Detailed constructor to set Token info ERC20Detailed(TokenName, TokenSymbol, NumberOfDecimals)\"},\"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. * > Note that 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`.\"},\"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.\"},\"mint(address,uint256)\":{\"details\":\"Mints an amount of the token and assigns it to an account. Uses the internal _mint function\",\"params\":{\"_account\":\"The account that will receive the created tokens.\",\"_amount\":\"The amount of tokens that will be created.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"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\":\"Transfer tokens from one address to another Uses the internal _transfer function.\",\"params\":{\"_from\":\"The address to send tokens from\",\"_to\":\"The address to transfer tokens to\",\"_value\":\"The amount of tokens to be transferred\"}}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/system/TBTCToken.sol\":\"TBTCToken\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/system/TBTCToken.sol\":{\"keccak256\":\"0x53f22f54c0030dceb3692314ae6d31f65a9300acb45ebb54cb0ddcf7cee9031a\",\"urls\":[\"bzzr://9ee867d700826112da33036fbb96da8848d12c20f437c1f798e895ffcb5dd71b\",\"dweb:/ipfs/Qmb5J4wNccMSBBu8uFDrQxbcTBjBQ88DtuUnsppy5qSgyk\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\",\"dweb:/ipfs/QmV3yVktya1s617QmuzQR2CfuJgUi3dR2xEZY9ecmqZ2G1\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\",\"dweb:/ipfs/QmcyytaLs7zFdb4Uu7C5PmQRhQdB3wA3fUdkV6mkYfdDFH\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0xc61b3603089b09a730d8ca72e9133a496cc4405da40e9b87c12f073245d774bf\",\"urls\":[\"bzzr://f280f38d5ab6e1b89fd898ccd3901054a56572c141d91d30302e2db1db4cc6ff\",\"dweb:/ipfs/QmbtwNwAJEehWWL7yGGyyMoenQvcqtz91pqLgQPpLRoLYC\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\",\"dweb:/ipfs/QmP5NaEwZthQeM2ESz4WTT3osrP7jhbvu7ocbttBi2JAw6\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50604080518082018252601181527f54727573746c65737320626974636f696e00000000000000000000000000000060208083019182528351808501909452600484527f544254430000000000000000000000000000000000000000000000000000000090840152815191929160129161008d91600091906100be565b5081516100a19060019060208501906100be565b506002805460ff191660ff92909216919091179055506101599050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100ff57805160ff191683800117855561012c565b8280016001018555821561012c579182015b8281111561012c578251825591602001919060010190610111565b5061013892915061013c565b5090565b61015691905b808211156101385760008155600101610142565b90565b610af4806101686000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c806340c10f191161008c57806395d89b411161006657806395d89b41146102ab578063a457c2d7146102b3578063a9059cbb146102df578063dd62ed3e1461030b576100cf565b806340c10f191461022b57806370a082311461025757806379cc67901461027d576100cf565b806306fdde03146100d4578063095ea7b31461015157806318160ddd1461019157806323b872dd146101ab578063313ce567146101e157806339509351146101ff575b600080fd5b6100dc610339565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101165781810151838201526020016100fe565b50505050905090810190601f1680156101435780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561016757600080fd5b506001600160a01b0381351690602001356103cf565b604080519115158252519081900360200190f35b6101996103e5565b60408051918252519081900360200190f35b61017d600480360360608110156101c157600080fd5b506001600160a01b038135811691602081013590911690604001356103eb565b6101e9610402565b6040805160ff9092168252519081900360200190f35b61017d6004803603604081101561021557600080fd5b506001600160a01b03813516906020013561040b565b61017d6004803603604081101561024157600080fd5b506001600160a01b03813516906020013561044c565b6101996004803603602081101561026d57600080fd5b50356001600160a01b0316610458565b6102a96004803603604081101561029357600080fd5b506001600160a01b038135169060200135610473565b005b6100dc610481565b61017d600480360360408110156102c957600080fd5b506001600160a01b0381351690602001356104e1565b61017d600480360360408110156102f557600080fd5b506001600160a01b03813516906020013561051d565b6101996004803603604081101561032157600080fd5b506001600160a01b038135811691602001351661052a565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103c55780601f1061039a576101008083540402835291602001916103c5565b820191906000526020600020905b8154815290600101906020018083116103a857829003601f168201915b5050505050905090565b60006103dc338484610555565b50600192915050565b60055490565b60006103f8848484610641565b5060019392505050565b60025460ff1690565b3360008181526004602090815260408083206001600160a01b038716845290915281205490916103dc918590610447908663ffffffff61078516565b610555565b60006103dc83836107e6565b6001600160a01b031660009081526003602052604090205490565b61047d82826108d8565b5050565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103c55780601f1061039a576101008083540402835291602001916103c5565b3360008181526004602090815260408083206001600160a01b038716845290915281205490916103dc918590610447908663ffffffff6109b316565b60006103dc338484610641565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6001600160a01b03831661059a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610a9c6024913960400191505060405180910390fd5b6001600160a01b0382166105df5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a346022913960400191505060405180910390fd5b6001600160a01b03808416600081815260046020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106865760405162461bcd60e51b8152600401808060200182810382526025815260200180610a776025913960400191505060405180910390fd5b6001600160a01b0382166106cb5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a116023913960400191505060405180910390fd5b6001600160a01b0383166000908152600360205260409020546106f4908263ffffffff6109b316565b6001600160a01b038085166000908152600360205260408082209390935590841681522054610729908263ffffffff61078516565b6001600160a01b0380841660008181526003602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828201838110156107df576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216610841576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600554610854908263ffffffff61078516565b6005556001600160a01b038216600090815260036020526040902054610880908263ffffffff61078516565b6001600160a01b03831660008181526003602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b03821661091d5760405162461bcd60e51b8152600401808060200182810382526021815260200180610a566021913960400191505060405180910390fd5b600554610930908263ffffffff6109b316565b6005556001600160a01b03821660009081526003602052604090205461095c908263ffffffff6109b316565b6001600160a01b0383166000818152600360209081526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35050565b600082821115610a0a576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b5090039056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a265627a7a72305820a3ac58e60edcc2db220bf979cccd88c126e0ffb5e21973fc8bcd858a710bf6bb64736f6c634300050a0032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c806340c10f191161008c57806395d89b411161006657806395d89b41146102ab578063a457c2d7146102b3578063a9059cbb146102df578063dd62ed3e1461030b576100cf565b806340c10f191461022b57806370a082311461025757806379cc67901461027d576100cf565b806306fdde03146100d4578063095ea7b31461015157806318160ddd1461019157806323b872dd146101ab578063313ce567146101e157806339509351146101ff575b600080fd5b6100dc610339565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101165781810151838201526020016100fe565b50505050905090810190601f1680156101435780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561016757600080fd5b506001600160a01b0381351690602001356103cf565b604080519115158252519081900360200190f35b6101996103e5565b60408051918252519081900360200190f35b61017d600480360360608110156101c157600080fd5b506001600160a01b038135811691602081013590911690604001356103eb565b6101e9610402565b6040805160ff9092168252519081900360200190f35b61017d6004803603604081101561021557600080fd5b506001600160a01b03813516906020013561040b565b61017d6004803603604081101561024157600080fd5b506001600160a01b03813516906020013561044c565b6101996004803603602081101561026d57600080fd5b50356001600160a01b0316610458565b6102a96004803603604081101561029357600080fd5b506001600160a01b038135169060200135610473565b005b6100dc610481565b61017d600480360360408110156102c957600080fd5b506001600160a01b0381351690602001356104e1565b61017d600480360360408110156102f557600080fd5b506001600160a01b03813516906020013561051d565b6101996004803603604081101561032157600080fd5b506001600160a01b038135811691602001351661052a565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103c55780601f1061039a576101008083540402835291602001916103c5565b820191906000526020600020905b8154815290600101906020018083116103a857829003601f168201915b5050505050905090565b60006103dc338484610555565b50600192915050565b60055490565b60006103f8848484610641565b5060019392505050565b60025460ff1690565b3360008181526004602090815260408083206001600160a01b038716845290915281205490916103dc918590610447908663ffffffff61078516565b610555565b60006103dc83836107e6565b6001600160a01b031660009081526003602052604090205490565b61047d82826108d8565b5050565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103c55780601f1061039a576101008083540402835291602001916103c5565b3360008181526004602090815260408083206001600160a01b038716845290915281205490916103dc918590610447908663ffffffff6109b316565b60006103dc338484610641565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6001600160a01b03831661059a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610a9c6024913960400191505060405180910390fd5b6001600160a01b0382166105df5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a346022913960400191505060405180910390fd5b6001600160a01b03808416600081815260046020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106865760405162461bcd60e51b8152600401808060200182810382526025815260200180610a776025913960400191505060405180910390fd5b6001600160a01b0382166106cb5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a116023913960400191505060405180910390fd5b6001600160a01b0383166000908152600360205260409020546106f4908263ffffffff6109b316565b6001600160a01b038085166000908152600360205260408082209390935590841681522054610729908263ffffffff61078516565b6001600160a01b0380841660008181526003602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828201838110156107df576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216610841576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600554610854908263ffffffff61078516565b6005556001600160a01b038216600090815260036020526040902054610880908263ffffffff61078516565b6001600160a01b03831660008181526003602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b03821661091d5760405162461bcd60e51b8152600401808060200182810382526021815260200180610a566021913960400191505060405180910390fd5b600554610930908263ffffffff6109b316565b6005556001600160a01b03821660009081526003602052604090205461095c908263ffffffff6109b316565b6001600160a01b0383166000818152600360209081526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35050565b600082821115610a0a576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b5090039056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a265627a7a72305820a3ac58e60edcc2db220bf979cccd88c126e0ffb5e21973fc8bcd858a710bf6bb64736f6c634300050a0032", - "sourceMap": "163:2115:19:-;;;357:131;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;416:163:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;504:12;;416:163;;;414:2:19;;504:12:27;;-1:-1:-1;;416:163:27;504:12;:::i;:::-;-1:-1:-1;526:16:27;;;;:7;;:16;;;;;:::i;:::-;-1:-1:-1;552:9:27;:20;;-1:-1:-1;;552:20:27;;;;;;;;;;;;-1:-1:-1;163:2115:19;;-1:-1:-1;163:2115:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;163:2115:19;;;-1:-1:-1;163:2115:19;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", - "deployedSourceMap": "163:2115:19:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;163:2115:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;644:81:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;644:81:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2453:145:26;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2453:145:26;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1514:89;;;:::i;:::-;;;;;;;;;;;;;;;;1951:325:19;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1951:325:19;;;;;;;;;;;;;;;;;:::i;1478:81:27:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3702:203:26;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3702:203:26;;;;;;;;:::i;779:243:19:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;779:243:19;;;;;;;;:::i;1661:108:26:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1661:108:26;-1:-1:-1;;;;;1661:108:26;;:::i;1372:271:19:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1372:271:19;;;;;;;;:::i;:::-;;838:85:27;;;:::i;4392:213:26:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4392:213:26;;;;;;;;:::i;1972:153::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1972:153:26;;;;;;;;:::i;2183:132::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2183:132:26;;;;;;;;;;:::i;644:81:27:-;713:5;706:12;;;;;;;;-1:-1:-1;;706:12:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;681:13;;706:12;;713:5;;706:12;;713:5;706:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;644:81;:::o;2453:145:26:-;2518:4;2534:36;2543:10;2555:7;2564:5;2534:8;:36::i;:::-;-1:-1:-1;2587:4:26;2453:145;;;;:::o;1514:89::-;1584:12;;1514:89;:::o;1951:325:19:-;2033:4;2219:29;2229:5;2236:3;2241:6;2219:9;:29::i;:::-;-1:-1:-1;2265:4:19;1951:325;;;;;:::o;1478:81:27:-;1543:9;;;;1478:81;:::o;3702:203:26:-;3807:10;3782:4;3828:23;;;:11;:23;;;;;;;;-1:-1:-1;;;;;3828:32:26;;;;;;;;;;3782:4;;3798:79;;3819:7;;3828:48;;3865:10;3828:48;:36;:48;:::i;:::-;3798:8;:79::i;779:243:19:-;844:4;970:24;976:8;986:7;970:5;:24::i;1661:108:26:-;-1:-1:-1;;;;;1744:18:26;1718:7;1744:18;;;:9;:18;;;;;;;1661:108::o;1372:271:19:-;1612:24;1618:8;1628:7;1612:5;:24::i;:::-;1372:271;;:::o;838:85:27:-;909:7;902:14;;;;;;;;-1:-1:-1;;902:14:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;877:13;;902:14;;909:7;;902:14;;909:7;902:14;;;;;;;;;;;;;;;;;;;;;;;;4392:213:26;4502:10;4477:4;4523:23;;;:11;:23;;;;;;;;-1:-1:-1;;;;;4523:32:26;;;;;;;;;;4477:4;;4493:84;;4514:7;;4523:53;;4560:15;4523:53;:36;:53;:::i;1972:153::-;2041:4;2057:40;2067:10;2079:9;2090:6;2057:9;:40::i;2183:132::-;-1:-1:-1;;;;;2281:18:26;;;2255:7;2281:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;2183:132::o;7117:329::-;-1:-1:-1;;;;;7209:19:26;;7201:68;;;;-1:-1:-1;;;7201:68:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7287:21:26;;7279:68;;;;-1:-1:-1;;;7279:68:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7358:18:26;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:35;;;7408:31;;;;;;;;;;;;;;;;;7117:329;;;:::o;5079:422::-;-1:-1:-1;;;;;5176:20:26;;5168:70;;;;-1:-1:-1;;;5168:70:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5256:23:26;;5248:71;;;;-1:-1:-1;;;5248:71:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5350:17:26;;;;;;:9;:17;;;;;;:29;;5372:6;5350:29;:21;:29;:::i;:::-;-1:-1:-1;;;;;5330:17:26;;;;;;;:9;:17;;;;;;:49;;;;5412:20;;;;;;;:32;;5437:6;5412:32;:24;:32;:::i;:::-;-1:-1:-1;;;;;5389:20:26;;;;;;;:9;:20;;;;;;;;;:55;;;;5459:35;;;;;;;5389:20;;5459:35;;;;;;;;;;;;;5079:422;;;:::o;834:176:25:-;892:7;923:5;;;946:6;;;;938:46;;;;;-1:-1:-1;;;938:46:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;1002:1;834:176;-1:-1:-1;;;834:176:25:o;5771:302:26:-;-1:-1:-1;;;;;5846:21:26;;5838:65;;;;;-1:-1:-1;;;5838:65:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;5929:12;;:24;;5946:6;5929:24;:16;:24;:::i;:::-;5914:12;:39;-1:-1:-1;;;;;5984:18:26;;;;;;:9;:18;;;;;;:30;;6007:6;5984:30;:22;:30;:::i;:::-;-1:-1:-1;;;;;5963:18:26;;;;;;:9;:18;;;;;;;;:51;;;;6029:37;;;;;;;5963:18;;;;6029:37;;;;;;;;;;5771:302;;:::o;6392:300::-;-1:-1:-1;;;;;6466:21:26;;6458:67;;;;-1:-1:-1;;;6458:67:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6551:12;;:23;;6568:5;6551:23;:16;:23;:::i;:::-;6536:12;:38;-1:-1:-1;;;;;6605:18:26;;;;;;:9;:18;;;;;;:29;;6628:5;6605:29;:22;:29;:::i;:::-;-1:-1:-1;;;;;6584:18:26;;;;;;:9;:18;;;;;;;;:50;;;;6649:36;;;;;;;6584:18;;6649:36;;;;;;;;;;;6392:300;;:::o;1274:179:25:-;1332:7;1364:1;1359;:6;;1351:49;;;;;-1:-1:-1;;;1351:49:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1422:5:25;;;1274:179::o", - "source": "pragma solidity ^0.5.10;\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\n\ncontract TBTCToken is ERC20Detailed, ERC20 {\n /// @dev Constructor, calls ERC20Detailed constructor to set Token info\n /// ERC20Detailed(TokenName, TokenSymbol, NumberOfDecimals)\n constructor() ERC20Detailed(\"Trustless bitcoin\", \"TBTC\", 18) public {\n // solium-disable-previous-line no-empty-blocks\n }\n\n /// @dev Mints an amount of the token and assigns it to an account.\n /// Uses the internal _mint function\n /// @param _account The account that will receive the created tokens.\n /// @param _amount The amount of tokens that will be created.\n function mint(address _account, uint256 _amount) public returns (bool){\n // NOTE: this is a public function with unchecked minting.\n // TODO: enforce calling authority.\n _mint(_account, _amount);\n return true;\n }\n\n /// @dev Burns an amount of the token of a given account\n /// deducting from the sender's allowance for said account.\n /// Uses the internal _burn function.\n /// @param _account The account whose tokens will be burnt.\n /// @param _amount The amount of tokens that will be burnt.\n function burnFrom(address _account, uint256 _amount) public {\n // NOTE: this uses internal function _burn instead of _burnFrom.\n // This will bypass allowance check for now.\n // TODO: enforce calling authority.\n _burn(_account, _amount);\n }\n\n /// @dev Transfer tokens from one address to another\n /// Uses the internal _transfer function.\n /// @param _from The address to send tokens from\n /// @param _to The address to transfer tokens to\n /// @param _value The amount of tokens to be transferred\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n // NOTE: this overrides transferFrom in openZeppelin ERC20.sol\n // in order to bypass allowance check for now.\n // TODO: enforce calling authority.\n _transfer(_from, _to, _value);\n return true;\n }\n}\n", - "sourcePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/system/TBTCToken.sol", - "ast": { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/system/TBTCToken.sol", - "exportedSymbols": { - "TBTCToken": [ - 6392 - ] - }, - "id": 6393, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 6326, - "literals": [ - "solidity", - "^", - "0.5", - ".10" - ], - "nodeType": "PragmaDirective", - "src": "0:24:19" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", - "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", - "id": 6327, - "nodeType": "ImportDirective", - "scope": 6393, - "sourceUnit": 9491, - "src": "26:71:19", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", - "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", - "id": 6328, - "nodeType": "ImportDirective", - "scope": 6393, - "sourceUnit": 9433, - "src": "98:63:19", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6329, - "name": "ERC20Detailed", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9490, - "src": "185:13:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20Detailed_$9490", - "typeString": "contract ERC20Detailed" - } - }, - "id": 6330, - "nodeType": "InheritanceSpecifier", - "src": "185:13:19" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6331, - "name": "ERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9432, - "src": "200:5:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$9432", - "typeString": "contract ERC20" - } - }, - "id": 6332, - "nodeType": "InheritanceSpecifier", - "src": "200:5:19" - } - ], - "contractDependencies": [ - 9432, - 9490, - 9559 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 6392, - "linearizedBaseContracts": [ - 6392, - 9432, - 9490, - 9559 - ], - "name": "TBTCToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 6340, - "nodeType": "Block", - "src": "425:63:19", - "statements": [] - }, - "documentation": "@dev Constructor, calls ERC20Detailed constructor to set Token info\n ERC20Detailed(TokenName, TokenSymbol, NumberOfDecimals)", - "id": 6341, - "implemented": true, - "kind": "constructor", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "hexValue": "54727573746c65737320626974636f696e", - "id": 6335, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "385:19:19", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b43e9aa0aa927ba2fad25f35722a839274f525357025d49ea754dfe92d518412", - "typeString": "literal_string \"Trustless bitcoin\"" - }, - "value": "Trustless bitcoin" - }, - { - "argumentTypes": null, - "hexValue": "54425443", - "id": 6336, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "406:6:19", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bd4e6a494fe721b497dd9fef4db5889943de69e7cecd23b2c097f81f747771ec", - "typeString": "literal_string \"TBTC\"" - }, - "value": "TBTC" - }, - { - "argumentTypes": null, - "hexValue": "3138", - "id": 6337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "414:2:19", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - } - ], - "id": 6338, - "modifierName": { - "argumentTypes": null, - "id": 6334, - "name": "ERC20Detailed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9490, - "src": "371:13:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20Detailed_$9490_$", - "typeString": "type(contract ERC20Detailed)" - } - }, - "nodeType": "ModifierInvocation", - "src": "371:46:19" - } - ], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6333, - "nodeType": "ParameterList", - "parameters": [], - "src": "368:2:19" - }, - "returnParameters": { - "id": 6339, - "nodeType": "ParameterList", - "parameters": [], - "src": "425:0:19" - }, - "scope": 6392, - "src": "357:131:19", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6357, - "nodeType": "Block", - "src": "849:173:19", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6351, - "name": "_account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6343, - "src": "976:8:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6352, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6345, - "src": "986:7:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6350, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9318, - "src": "970:5:19", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 6353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "970:24:19", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6354, - "nodeType": "ExpressionStatement", - "src": "970:24:19" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 6355, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1011:4:19", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 6349, - "id": 6356, - "nodeType": "Return", - "src": "1004:11:19" - } - ] - }, - "documentation": "@dev Mints an amount of the token and assigns it to an account.\n Uses the internal _mint function\n @param _account The account that will receive the created tokens.\n @param _amount The amount of tokens that will be created.", - "id": 6358, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6346, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6343, - "name": "_account", - "nodeType": "VariableDeclaration", - "scope": 6358, - "src": "793:16:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6342, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "793:7:19", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6345, - "name": "_amount", - "nodeType": "VariableDeclaration", - "scope": 6358, - "src": "811:15:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6344, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "811:7:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "792:35:19" - }, - "returnParameters": { - "id": 6349, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6348, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6358, - "src": "844:4:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6347, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "844:4:19", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "843:6:19" - }, - "scope": 6392, - "src": "779:243:19", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6370, - "nodeType": "Block", - "src": "1432:211:19", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6366, - "name": "_account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6360, - "src": "1618:8:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6367, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6362, - "src": "1628:7:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6365, - "name": "_burn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9361, - "src": "1612:5:19", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 6368, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1612:24:19", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6369, - "nodeType": "ExpressionStatement", - "src": "1612:24:19" - } - ] - }, - "documentation": "@dev Burns an amount of the token of a given account\n deducting from the sender's allowance for said account.\n Uses the internal _burn function.\n @param _account The account whose tokens will be burnt.\n @param _amount The amount of tokens that will be burnt.", - "id": 6371, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "burnFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6363, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6360, - "name": "_account", - "nodeType": "VariableDeclaration", - "scope": 6371, - "src": "1390:16:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6359, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1390:7:19", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6362, - "name": "_amount", - "nodeType": "VariableDeclaration", - "scope": 6371, - "src": "1408:15:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6361, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1408:7:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1389:35:19" - }, - "returnParameters": { - "id": 6364, - "nodeType": "ParameterList", - "parameters": [], - "src": "1432:0:19" - }, - "scope": 6392, - "src": "1372:271:19", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6390, - "nodeType": "Block", - "src": "2039:237:19", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6383, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6373, - "src": "2229:5:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6384, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6375, - "src": "2236:3:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6385, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6377, - "src": "2241:6:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6382, - "name": "_transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9275, - "src": "2219:9:19", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 6386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2219:29:19", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6387, - "nodeType": "ExpressionStatement", - "src": "2219:29:19" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 6388, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2265:4:19", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 6381, - "id": 6389, - "nodeType": "Return", - "src": "2258:11:19" - } - ] - }, - "documentation": "@dev Transfer tokens from one address to another\n Uses the internal _transfer function.\n @param _from The address to send tokens from\n @param _to The address to transfer tokens to\n @param _value The amount of tokens to be transferred", - "id": 6391, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6378, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6373, - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 6391, - "src": "1973:13:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6372, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1973:7:19", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6375, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 6391, - "src": "1988:11:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6374, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1988:7:19", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6377, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 6391, - "src": "2001:14:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6376, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2001:7:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1972:44:19" - }, - "returnParameters": { - "id": 6381, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6380, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6391, - "src": "2033:4:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6379, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2033:4:19", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2032:6:19" - }, - "scope": 6392, - "src": "1951:325:19", - "stateMutability": "nonpayable", - "superFunction": 9165, - "visibility": "public" - } - ], - "scope": 6393, - "src": "163:2115:19" - } - ], - "src": "0:2279:19" - }, - "legacyAST": { - "absolutePath": "/Users/liamz/go/src/github.com/keep-network/tbtc/implementation/contracts/system/TBTCToken.sol", - "exportedSymbols": { - "TBTCToken": [ - 6392 - ] - }, - "id": 6393, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 6326, - "literals": [ - "solidity", - "^", - "0.5", - ".10" - ], - "nodeType": "PragmaDirective", - "src": "0:24:19" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", - "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", - "id": 6327, - "nodeType": "ImportDirective", - "scope": 6393, - "sourceUnit": 9491, - "src": "26:71:19", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", - "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", - "id": 6328, - "nodeType": "ImportDirective", - "scope": 6393, - "sourceUnit": 9433, - "src": "98:63:19", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6329, - "name": "ERC20Detailed", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9490, - "src": "185:13:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20Detailed_$9490", - "typeString": "contract ERC20Detailed" - } - }, - "id": 6330, - "nodeType": "InheritanceSpecifier", - "src": "185:13:19" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6331, - "name": "ERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 9432, - "src": "200:5:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$9432", - "typeString": "contract ERC20" - } - }, - "id": 6332, - "nodeType": "InheritanceSpecifier", - "src": "200:5:19" - } - ], - "contractDependencies": [ - 9432, - 9490, - 9559 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 6392, - "linearizedBaseContracts": [ - 6392, - 9432, - 9490, - 9559 - ], - "name": "TBTCToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 6340, - "nodeType": "Block", - "src": "425:63:19", - "statements": [] - }, - "documentation": "@dev Constructor, calls ERC20Detailed constructor to set Token info\n ERC20Detailed(TokenName, TokenSymbol, NumberOfDecimals)", - "id": 6341, - "implemented": true, - "kind": "constructor", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "hexValue": "54727573746c65737320626974636f696e", - "id": 6335, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "385:19:19", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b43e9aa0aa927ba2fad25f35722a839274f525357025d49ea754dfe92d518412", - "typeString": "literal_string \"Trustless bitcoin\"" - }, - "value": "Trustless bitcoin" - }, - { - "argumentTypes": null, - "hexValue": "54425443", - "id": 6336, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "406:6:19", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bd4e6a494fe721b497dd9fef4db5889943de69e7cecd23b2c097f81f747771ec", - "typeString": "literal_string \"TBTC\"" - }, - "value": "TBTC" - }, - { - "argumentTypes": null, - "hexValue": "3138", - "id": 6337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "414:2:19", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - } - ], - "id": 6338, - "modifierName": { - "argumentTypes": null, - "id": 6334, - "name": "ERC20Detailed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9490, - "src": "371:13:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20Detailed_$9490_$", - "typeString": "type(contract ERC20Detailed)" - } - }, - "nodeType": "ModifierInvocation", - "src": "371:46:19" - } - ], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6333, - "nodeType": "ParameterList", - "parameters": [], - "src": "368:2:19" - }, - "returnParameters": { - "id": 6339, - "nodeType": "ParameterList", - "parameters": [], - "src": "425:0:19" - }, - "scope": 6392, - "src": "357:131:19", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6357, - "nodeType": "Block", - "src": "849:173:19", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6351, - "name": "_account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6343, - "src": "976:8:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6352, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6345, - "src": "986:7:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6350, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9318, - "src": "970:5:19", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 6353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "970:24:19", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6354, - "nodeType": "ExpressionStatement", - "src": "970:24:19" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 6355, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1011:4:19", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 6349, - "id": 6356, - "nodeType": "Return", - "src": "1004:11:19" - } - ] - }, - "documentation": "@dev Mints an amount of the token and assigns it to an account.\n Uses the internal _mint function\n @param _account The account that will receive the created tokens.\n @param _amount The amount of tokens that will be created.", - "id": 6358, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6346, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6343, - "name": "_account", - "nodeType": "VariableDeclaration", - "scope": 6358, - "src": "793:16:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6342, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "793:7:19", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6345, - "name": "_amount", - "nodeType": "VariableDeclaration", - "scope": 6358, - "src": "811:15:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6344, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "811:7:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "792:35:19" - }, - "returnParameters": { - "id": 6349, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6348, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6358, - "src": "844:4:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6347, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "844:4:19", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "843:6:19" - }, - "scope": 6392, - "src": "779:243:19", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6370, - "nodeType": "Block", - "src": "1432:211:19", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6366, - "name": "_account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6360, - "src": "1618:8:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6367, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6362, - "src": "1628:7:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6365, - "name": "_burn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9361, - "src": "1612:5:19", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 6368, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1612:24:19", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6369, - "nodeType": "ExpressionStatement", - "src": "1612:24:19" - } - ] - }, - "documentation": "@dev Burns an amount of the token of a given account\n deducting from the sender's allowance for said account.\n Uses the internal _burn function.\n @param _account The account whose tokens will be burnt.\n @param _amount The amount of tokens that will be burnt.", - "id": 6371, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "burnFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6363, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6360, - "name": "_account", - "nodeType": "VariableDeclaration", - "scope": 6371, - "src": "1390:16:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6359, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1390:7:19", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6362, - "name": "_amount", - "nodeType": "VariableDeclaration", - "scope": 6371, - "src": "1408:15:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6361, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1408:7:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1389:35:19" - }, - "returnParameters": { - "id": 6364, - "nodeType": "ParameterList", - "parameters": [], - "src": "1432:0:19" - }, - "scope": 6392, - "src": "1372:271:19", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 6390, - "nodeType": "Block", - "src": "2039:237:19", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6383, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6373, - "src": "2229:5:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6384, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6375, - "src": "2236:3:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6385, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6377, - "src": "2241:6:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 6382, - "name": "_transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9275, - "src": "2219:9:19", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 6386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2219:29:19", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6387, - "nodeType": "ExpressionStatement", - "src": "2219:29:19" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 6388, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2265:4:19", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 6381, - "id": 6389, - "nodeType": "Return", - "src": "2258:11:19" - } - ] - }, - "documentation": "@dev Transfer tokens from one address to another\n Uses the internal _transfer function.\n @param _from The address to send tokens from\n @param _to The address to transfer tokens to\n @param _value The amount of tokens to be transferred", - "id": 6391, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 6378, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6373, - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 6391, - "src": "1973:13:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6372, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1973:7:19", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6375, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 6391, - "src": "1988:11:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6374, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1988:7:19", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6377, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 6391, - "src": "2001:14:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6376, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2001:7:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1972:44:19" - }, - "returnParameters": { - "id": 6381, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6380, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 6391, - "src": "2033:4:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6379, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2033:4:19", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2032:6:19" - }, - "scope": 6392, - "src": "1951:325:19", - "stateMutability": "nonpayable", - "superFunction": 9165, - "visibility": "public" - } - ], - "scope": 6393, - "src": "163:2115:19" - } - ], - "src": "0:2279:19" - }, - "compiler": { - "name": "solc", - "version": "0.5.10+commit.5a6ea5b1.Emscripten.clang" - }, - "networks": { - "1564486898078": { - "events": {}, - "links": {}, - "address": "0xCA7708B78b7FEc555794FB42AC16666062F5f969", - "transactionHash": "0xe552fc202c148adfb538a963a602be8f28b148f62ec11055ed2e7d4b16722fd7" - }, - "1564576405726": { - "events": {}, - "links": {}, - "address": "0x39422AE3A32A30923071562E4c86C58A7A0e288F", - "transactionHash": "0x74c5e17a1014bd89381645237d4e89ab67f670bde003f5a4de5b7f28c08f5cfc" - }, - "1564669548315": { - "events": {}, - "links": {}, - "address": "0xe1B1F60A39b43b744bef3501e4cBF9428F5A1B2D", - "transactionHash": "0x6f9ee30843c82f3bdf300aaa5c0a02ed1e9f239cd073f1c87e61e7c83c710a78" - }, - "1564683807489": { - "events": {}, - "links": {}, - "address": "0x0233316b87755747078456F781cB94F45Ac81310", - "transactionHash": "0x98abc1378648766725a9b00f5dd165ce0e9e6554d37576877368f4cd9a5ae8ca" - }, - "1564760269629": { - "events": {}, - "links": {}, - "address": "0xD6eE633A52704b7AFc314E4206E9739Ab01F18D1", - "transactionHash": "0x8b5ee9a36cbd4410ad1e8fafc7b6fe9c97840e8a011f54814f8a4fc70f64f2ac" - }, - "1565004617282": { - "events": {}, - "links": {}, - "address": "0x695d617432F994666034346B4b21aEd9Cb91adBC", - "transactionHash": "0x5525b2d955abbe5b039bcc474c78d24cbe08336a42a0997a6920943b0054edba" - } - }, - "schemaVersion": "3.0.10", - "updatedAt": "2019-08-05T11:32:37.613Z", - "devdoc": { - "methods": { - "allowance(address,address)": { - "details": "See `IERC20.allowance`." - }, - "approve(address,uint256)": { - "details": "See `IERC20.approve`. * Requirements: * - `spender` cannot be the zero address." - }, - "balanceOf(address)": { - "details": "See `IERC20.balanceOf`." - }, - "burnFrom(address,uint256)": { - "details": "Burns an amount of the token of a given account deducting from the sender's allowance for said account. Uses the internal _burn function.", - "params": { - "_account": "The account whose tokens will be burnt.", - "_amount": "The amount of tokens that will be burnt." - } - }, - "constructor": { - "details": "Constructor, calls ERC20Detailed constructor to set Token info ERC20Detailed(TokenName, TokenSymbol, NumberOfDecimals)" - }, - "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. * > Note that 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`." - }, - "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." - }, - "mint(address,uint256)": { - "details": "Mints an amount of the token and assigns it to an account. Uses the internal _mint function", - "params": { - "_account": "The account that will receive the created tokens.", - "_amount": "The amount of tokens that will be created." - } - }, - "name()": { - "details": "Returns the name of the token." - }, - "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": "Transfer tokens from one address to another Uses the internal _transfer function.", - "params": { - "_from": "The address to send tokens from", - "_to": "The address to transfer tokens to", - "_value": "The amount of tokens to be transferred" - } - } - } - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file From 013eca297d5cfc15727296e2b4868cb90e741759 Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 16:29:29 +0200 Subject: [PATCH 19/33] Fix import path --- client/src/FundingTransaction.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/FundingTransaction.js b/client/src/FundingTransaction.js index bf3e5ab8..65725588 100644 --- a/client/src/FundingTransaction.js +++ b/client/src/FundingTransaction.js @@ -1,6 +1,9 @@ -import { Network, publicKeyToP2WPKHaddress } from 'tbtc-helpers/src/Address' +import { Network, publicKeyToP2WPKHaddress } from 'tbtc-helpers' import { Deposit, TBTCSystem } from './eth/contracts' + + + /** * Requests a Bitcoin public key for a Deposit and returns it as a Bitcoin address * @param {string} depositAddress the address of a Deposit contract From 22babe9a5eeac5df33b7ac93104aab71bc6e9c56 Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 16:49:57 +0200 Subject: [PATCH 20/33] Make index.js the main import --- lib/tbtc-helpers/index.js | 8 -------- lib/tbtc-helpers/package.json | 1 + lib/tbtc-helpers/src/index.js | 8 ++++++++ 3 files changed, 9 insertions(+), 8 deletions(-) delete mode 100644 lib/tbtc-helpers/index.js create mode 100644 lib/tbtc-helpers/src/index.js diff --git a/lib/tbtc-helpers/index.js b/lib/tbtc-helpers/index.js deleted file mode 100644 index 3d2c9c0c..00000000 --- a/lib/tbtc-helpers/index.js +++ /dev/null @@ -1,8 +0,0 @@ -const BitcoinSPV = require('./src/BitcoinSPV') -const BitcoinTxParser = require('./src/BitcoinTxParser') -const ElectrumClient = require('./src/ElectrumClient') -const Address = require('./src/Address') - -module.exports = { - BitcoinSPV, BitcoinTxParser, ElectrumClient, Address, -} diff --git a/lib/tbtc-helpers/package.json b/lib/tbtc-helpers/package.json index de28c85b..4e3f82f6 100644 --- a/lib/tbtc-helpers/package.json +++ b/lib/tbtc-helpers/package.json @@ -2,6 +2,7 @@ "name": "tbtc-helpers", "version": "0.0.1", "description": "", + "main": "src/index.js", "scripts": { "test": "mocha --timeout 5000", "js:lint": "eslint .", diff --git a/lib/tbtc-helpers/src/index.js b/lib/tbtc-helpers/src/index.js new file mode 100644 index 00000000..317e9cb6 --- /dev/null +++ b/lib/tbtc-helpers/src/index.js @@ -0,0 +1,8 @@ +const BitcoinSPV = require('./BitcoinSPV') +const BitcoinTxParser = require('./BitcoinTxParser') +const ElectrumClient = require('./ElectrumClient') +const Address = require('./Address') + +module.exports = { + BitcoinSPV, BitcoinTxParser, ElectrumClient, Address, +} From bfda437422fc384dfb22917c70a68bac393ceb4e Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 17:03:36 +0200 Subject: [PATCH 21/33] Test path issues with CI build --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index d8406cf3..2145f808 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "redux": "^4.0.4", "redux-saga": "^1.0.5", "tbtc-client": "file:client", + "tbtc-helpers": "file:lib/tbtc-helpers", "truffle": "^5.0.29", "truffle-contract": "^4.0.26", "web3": "^1.2.0" From d5819d3a122e710ba7aef11e250877a106b27a71 Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 17:08:17 +0200 Subject: [PATCH 22/33] Move back index.js to avoid test refactoring --- lib/tbtc-helpers/index.js | 8 ++++++++ lib/tbtc-helpers/package.json | 2 +- lib/tbtc-helpers/src/index.js | 8 -------- 3 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 lib/tbtc-helpers/index.js delete mode 100644 lib/tbtc-helpers/src/index.js diff --git a/lib/tbtc-helpers/index.js b/lib/tbtc-helpers/index.js new file mode 100644 index 00000000..3d2c9c0c --- /dev/null +++ b/lib/tbtc-helpers/index.js @@ -0,0 +1,8 @@ +const BitcoinSPV = require('./src/BitcoinSPV') +const BitcoinTxParser = require('./src/BitcoinTxParser') +const ElectrumClient = require('./src/ElectrumClient') +const Address = require('./src/Address') + +module.exports = { + BitcoinSPV, BitcoinTxParser, ElectrumClient, Address, +} diff --git a/lib/tbtc-helpers/package.json b/lib/tbtc-helpers/package.json index 4e3f82f6..12c62912 100644 --- a/lib/tbtc-helpers/package.json +++ b/lib/tbtc-helpers/package.json @@ -2,7 +2,7 @@ "name": "tbtc-helpers", "version": "0.0.1", "description": "", - "main": "src/index.js", + "main": "index.js", "scripts": { "test": "mocha --timeout 5000", "js:lint": "eslint .", diff --git a/lib/tbtc-helpers/src/index.js b/lib/tbtc-helpers/src/index.js deleted file mode 100644 index 317e9cb6..00000000 --- a/lib/tbtc-helpers/src/index.js +++ /dev/null @@ -1,8 +0,0 @@ -const BitcoinSPV = require('./BitcoinSPV') -const BitcoinTxParser = require('./BitcoinTxParser') -const ElectrumClient = require('./ElectrumClient') -const Address = require('./Address') - -module.exports = { - BitcoinSPV, BitcoinTxParser, ElectrumClient, Address, -} From 030b6203fe11f9bc23ccba12f0c6722c1bab5703 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Tue, 6 Aug 2019 17:32:19 +0200 Subject: [PATCH 23/33] Add Address back to imports --- client/src/FundingTransaction.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/client/src/FundingTransaction.js b/client/src/FundingTransaction.js index 65725588..387dccaa 100644 --- a/client/src/FundingTransaction.js +++ b/client/src/FundingTransaction.js @@ -1,9 +1,6 @@ -import { Network, publicKeyToP2WPKHaddress } from 'tbtc-helpers' +import { Network, publicKeyToP2WPKHaddress, Address } from 'tbtc-helpers' import { Deposit, TBTCSystem } from './eth/contracts' - - - /** * Requests a Bitcoin public key for a Deposit and returns it as a Bitcoin address * @param {string} depositAddress the address of a Deposit contract @@ -55,7 +52,6 @@ export async function getDepositBtcAddress(depositAddress) { return btcAddress } - /** * Funding transaction details. * @typedef FundingTransaction From 4e327d0919a22bd549e793af7f363cbb87c0d543 Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 18:58:56 +0200 Subject: [PATCH 24/33] Consistent export syntax --- client/src/FundingProof.js | 11 +++-------- lib/tbtc-helpers/src/ElectrumClient.js | 12 ++++-------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/client/src/FundingProof.js b/client/src/FundingProof.js index dc2dc612..e20d7ef6 100644 --- a/client/src/FundingProof.js +++ b/client/src/FundingProof.js @@ -1,5 +1,4 @@ -const BitcoinTxParser = require('tbtc-helpers').BitcoinTxParser -const bitcoinspv = require('tbtc-helpers').BitcoinSPV +import { BitcoinTxParser, BitcoinSPV as bitcoinspv } from 'tbtc-helpers' /** * Gets transaction SPV proof from BitcoinSPV. @@ -32,7 +31,7 @@ async function getTransactionProof(electrumClient, txID, confirmations) { * @param {string} txID Funding transaction ID. * @param {number} fundingOutputIndex Position of a funding output in the transaction. */ -async function calculateAndSubmitFundingProof(electrumClient, txID, fundingOutputIndex) { +export async function calculateAndSubmitFundingProof(electrumClient, txID, fundingOutputIndex) { if (txID.length != 64) { throw new Error(`invalid transaction id length [${txID.length}], required: [64]`) } @@ -61,8 +60,4 @@ async function calculateAndSubmitFundingProof(electrumClient, txID, fundingOutpu // return eth transaction id to later convert it to etherscan link -} - -module.exports = { - calculateAndSubmitFundingProof, -} +} \ No newline at end of file diff --git a/lib/tbtc-helpers/src/ElectrumClient.js b/lib/tbtc-helpers/src/ElectrumClient.js index 708899a7..9505eedd 100644 --- a/lib/tbtc-helpers/src/ElectrumClient.js +++ b/lib/tbtc-helpers/src/ElectrumClient.js @@ -16,7 +16,7 @@ const Sha256 = require('bcrypto/lib/sha256') * @param {number} port ElectrumX server port. * @param {string} protocol ElectrumX server connection protocol (`ssl`|`tls`). */ -function Config(server, port, protocol) { +export function Config(server, port, protocol) { this.server = server this.port = port this.protocol = protocol @@ -27,7 +27,7 @@ function Config(server, port, protocol) { * server. * Uses methods exposed by the [Electrum Protocol](https://electrumx.readthedocs.io/en/latest/protocol.html) */ -class Client { +export class Client { /** * Initializes Electrum Client instance with provided configuration. * @param {Config} config Electrum client connection configuration. @@ -280,11 +280,7 @@ function toHex(bytes) { * @param {string} script ScriptPubKey in a hexadecimal format. * @return {string} Script hash. */ -function scriptToHash(script) { +export function scriptToHash(script) { const scriptHash = Sha256.digest(fromHex(script)).reverse() return toHex(scriptHash) -} - -module.exports = { - Config, Client, scriptToHash, -} +} \ No newline at end of file From 729aa1e761a50c45ca0d74698dbf238267193303 Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 19:00:19 +0200 Subject: [PATCH 25/33] Remove tbtc-helpers, use standard path for index.js --- lib/tbtc-helpers/package.json | 2 +- lib/tbtc-helpers/{ => src}/index.js | 0 package.json | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) rename lib/tbtc-helpers/{ => src}/index.js (100%) diff --git a/lib/tbtc-helpers/package.json b/lib/tbtc-helpers/package.json index 12c62912..4e3f82f6 100644 --- a/lib/tbtc-helpers/package.json +++ b/lib/tbtc-helpers/package.json @@ -2,7 +2,7 @@ "name": "tbtc-helpers", "version": "0.0.1", "description": "", - "main": "index.js", + "main": "src/index.js", "scripts": { "test": "mocha --timeout 5000", "js:lint": "eslint .", diff --git a/lib/tbtc-helpers/index.js b/lib/tbtc-helpers/src/index.js similarity index 100% rename from lib/tbtc-helpers/index.js rename to lib/tbtc-helpers/src/index.js diff --git a/package.json b/package.json index 2145f808..d8406cf3 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,6 @@ "redux": "^4.0.4", "redux-saga": "^1.0.5", "tbtc-client": "file:client", - "tbtc-helpers": "file:lib/tbtc-helpers", "truffle": "^5.0.29", "truffle-contract": "^4.0.26", "web3": "^1.2.0" From d6485e5973b368045108cc4ab562a69d60852779 Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 19:06:13 +0200 Subject: [PATCH 26/33] Revert export changes --- lib/tbtc-helpers/src/ElectrumClient.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/tbtc-helpers/src/ElectrumClient.js b/lib/tbtc-helpers/src/ElectrumClient.js index 9505eedd..62070a59 100644 --- a/lib/tbtc-helpers/src/ElectrumClient.js +++ b/lib/tbtc-helpers/src/ElectrumClient.js @@ -16,7 +16,7 @@ const Sha256 = require('bcrypto/lib/sha256') * @param {number} port ElectrumX server port. * @param {string} protocol ElectrumX server connection protocol (`ssl`|`tls`). */ -export function Config(server, port, protocol) { +function Config(server, port, protocol) { this.server = server this.port = port this.protocol = protocol @@ -27,7 +27,7 @@ export function Config(server, port, protocol) { * server. * Uses methods exposed by the [Electrum Protocol](https://electrumx.readthedocs.io/en/latest/protocol.html) */ -export class Client { +class Client { /** * Initializes Electrum Client instance with provided configuration. * @param {Config} config Electrum client connection configuration. @@ -280,7 +280,11 @@ function toHex(bytes) { * @param {string} script ScriptPubKey in a hexadecimal format. * @return {string} Script hash. */ -export function scriptToHash(script) { +function scriptToHash(script) { const scriptHash = Sha256.digest(fromHex(script)).reverse() return toHex(scriptHash) +} + +module.exports = { + Config, Client, scriptToHash, } \ No newline at end of file From 3166d45c5689ec81523252fdd769712c8a2850de Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 19:18:55 +0200 Subject: [PATCH 27/33] Remove index.js, import with simple paths --- client/src/FundingProof.js | 3 ++- client/src/FundingTransaction.js | 6 ++++-- lib/tbtc-helpers/package.json | 1 - lib/tbtc-helpers/src/index.js | 8 -------- 4 files changed, 6 insertions(+), 12 deletions(-) delete mode 100644 lib/tbtc-helpers/src/index.js diff --git a/client/src/FundingProof.js b/client/src/FundingProof.js index e20d7ef6..35870b69 100644 --- a/client/src/FundingProof.js +++ b/client/src/FundingProof.js @@ -1,4 +1,5 @@ -import { BitcoinTxParser, BitcoinSPV as bitcoinspv } from 'tbtc-helpers' +import BitcoinTxParser from 'tbtc-helpers/src/BitcoinTxParser' +import BitcoinSPV as bitcoinspv from 'tbtc-helpers/src/BitcoinSPV' /** * Gets transaction SPV proof from BitcoinSPV. diff --git a/client/src/FundingTransaction.js b/client/src/FundingTransaction.js index 387dccaa..ae10dfd1 100644 --- a/client/src/FundingTransaction.js +++ b/client/src/FundingTransaction.js @@ -1,4 +1,6 @@ -import { Network, publicKeyToP2WPKHaddress, Address } from 'tbtc-helpers' +import { Network, addressToScript, publicKeyToP2WPKHaddress } from 'tbtc-helpers/src/Address' +import BitcoinSPV as bitcoinspv from 'tbtc-helpers/src/BitcoinSPV' + import { Deposit, TBTCSystem } from './eth/contracts' /** @@ -69,7 +71,7 @@ export async function getDepositBtcAddress(depositAddress) { * @return {FundingTransaction} Transaction details. */ export async function watchForFundingTransaction(electrumClient, bitcoinAddress, expectedValue) { - const script = Address.addressToScript(bitcoinAddress) + const script = addressToScript(bitcoinAddress) // This function is used as a callback to electrum client. It is invoked when // am existing or a new transaction is found. diff --git a/lib/tbtc-helpers/package.json b/lib/tbtc-helpers/package.json index 4e3f82f6..de28c85b 100644 --- a/lib/tbtc-helpers/package.json +++ b/lib/tbtc-helpers/package.json @@ -2,7 +2,6 @@ "name": "tbtc-helpers", "version": "0.0.1", "description": "", - "main": "src/index.js", "scripts": { "test": "mocha --timeout 5000", "js:lint": "eslint .", diff --git a/lib/tbtc-helpers/src/index.js b/lib/tbtc-helpers/src/index.js deleted file mode 100644 index 3d2c9c0c..00000000 --- a/lib/tbtc-helpers/src/index.js +++ /dev/null @@ -1,8 +0,0 @@ -const BitcoinSPV = require('./src/BitcoinSPV') -const BitcoinTxParser = require('./src/BitcoinTxParser') -const ElectrumClient = require('./src/ElectrumClient') -const Address = require('./src/Address') - -module.exports = { - BitcoinSPV, BitcoinTxParser, ElectrumClient, Address, -} From 37a4c6fef2c065836d8384b99e2dc4944747d1f5 Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 19:24:41 +0200 Subject: [PATCH 28/33] Fix bitcoinspv import --- client/src/FundingProof.js | 2 +- client/src/FundingTransaction.js | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/client/src/FundingProof.js b/client/src/FundingProof.js index 35870b69..a95a9e66 100644 --- a/client/src/FundingProof.js +++ b/client/src/FundingProof.js @@ -1,5 +1,5 @@ import BitcoinTxParser from 'tbtc-helpers/src/BitcoinTxParser' -import BitcoinSPV as bitcoinspv from 'tbtc-helpers/src/BitcoinSPV' +const bitcoinspv = require('tbtc-helpers/src/BitcoinSPV') /** * Gets transaction SPV proof from BitcoinSPV. diff --git a/client/src/FundingTransaction.js b/client/src/FundingTransaction.js index ae10dfd1..a17806aa 100644 --- a/client/src/FundingTransaction.js +++ b/client/src/FundingTransaction.js @@ -1,6 +1,4 @@ import { Network, addressToScript, publicKeyToP2WPKHaddress } from 'tbtc-helpers/src/Address' -import BitcoinSPV as bitcoinspv from 'tbtc-helpers/src/BitcoinSPV' - import { Deposit, TBTCSystem } from './eth/contracts' /** From fc5d82e93afa4f28a5c1854c9a09b003d1e9c36e Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 19:39:23 +0200 Subject: [PATCH 29/33] Add index.js, again --- lib/tbtc-helpers/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 lib/tbtc-helpers/index.js diff --git a/lib/tbtc-helpers/index.js b/lib/tbtc-helpers/index.js new file mode 100644 index 00000000..3d2c9c0c --- /dev/null +++ b/lib/tbtc-helpers/index.js @@ -0,0 +1,8 @@ +const BitcoinSPV = require('./src/BitcoinSPV') +const BitcoinTxParser = require('./src/BitcoinTxParser') +const ElectrumClient = require('./src/ElectrumClient') +const Address = require('./src/Address') + +module.exports = { + BitcoinSPV, BitcoinTxParser, ElectrumClient, Address, +} From cb2b709f3aaf33ff67151b832f5ab6d13a332b76 Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 19:45:08 +0200 Subject: [PATCH 30/33] Fix import syntax --- client/src/FundingProof.js | 4 ++-- client/src/FundingTransaction.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/src/FundingProof.js b/client/src/FundingProof.js index a95a9e66..0f03a431 100644 --- a/client/src/FundingProof.js +++ b/client/src/FundingProof.js @@ -1,5 +1,5 @@ -import BitcoinTxParser from 'tbtc-helpers/src/BitcoinTxParser' -const bitcoinspv = require('tbtc-helpers/src/BitcoinSPV') +import { BitcoinTxParser } from 'tbtc-helpers' +const bitcoinspv = require('tbtc-helpers').BitcoinSPV /** * Gets transaction SPV proof from BitcoinSPV. diff --git a/client/src/FundingTransaction.js b/client/src/FundingTransaction.js index a17806aa..acfb4436 100644 --- a/client/src/FundingTransaction.js +++ b/client/src/FundingTransaction.js @@ -1,4 +1,5 @@ -import { Network, addressToScript, publicKeyToP2WPKHaddress } from 'tbtc-helpers/src/Address' +import { Address } from 'tbtc-helpers' +const { Network, publicKeyToP2WPKHaddress, addressToScript } = Address import { Deposit, TBTCSystem } from './eth/contracts' /** From d1d5288c3bc75f0eb44532c743258c4b51330890 Mon Sep 17 00:00:00 2001 From: liamzebedee Date: Tue, 6 Aug 2019 20:06:08 +0200 Subject: [PATCH 31/33] Another permutation of "main" and import path --- lib/tbtc-helpers/package.json | 1 + package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/tbtc-helpers/package.json b/lib/tbtc-helpers/package.json index de28c85b..12c62912 100644 --- a/lib/tbtc-helpers/package.json +++ b/lib/tbtc-helpers/package.json @@ -2,6 +2,7 @@ "name": "tbtc-helpers", "version": "0.0.1", "description": "", + "main": "index.js", "scripts": { "test": "mocha --timeout 5000", "js:lint": "eslint .", diff --git a/package.json b/package.json index d8406cf3..05297f3b 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "redux": "^4.0.4", "redux-saga": "^1.0.5", "tbtc-client": "file:client", + "tbtc-helpers": "file:./lib/tbtc-helpers", "truffle": "^5.0.29", "truffle-contract": "^4.0.26", "web3": "^1.2.0" From 93230dab15eddf92e27776f931408745d1bf950a Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Wed, 7 Aug 2019 20:56:25 +0200 Subject: [PATCH 32/33] Add max-old-space-size to build command --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 05297f3b..3b27a893 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "watch-css": "npm run build-css && less-watch-compiler src/css src app.less", "start-js": "sleep 2 && react-scripts start", "start": "npm-run-all -p watch-css start-js", - "build": "npm run build-css && react-scripts build", + "build": "npm run build-css && react-scripts --max_old_space_size=8192 build", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" }, From a680beca9ee89dbc42bf6816046a6fe341cb7773 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Wed, 7 Aug 2019 21:29:22 +0200 Subject: [PATCH 33/33] Fix exports in FundingTransaction --- client/src/FundingTransaction.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/client/src/FundingTransaction.js b/client/src/FundingTransaction.js index 8db49e36..9ee65a3a 100644 --- a/client/src/FundingTransaction.js +++ b/client/src/FundingTransaction.js @@ -135,9 +135,3 @@ export async function waitForConfirmations(electrumClient, transactionID) { return confirmations } - -module.exports = { - getAddress, - watchForFundingTransaction, - waitForConfirmations, -}