From 4225e2ee69d8c913ab5f4da42c97441e666067d1 Mon Sep 17 00:00:00 2001 From: Brechtpd Date: Wed, 9 Sep 2020 15:45:52 +0200 Subject: [PATCH 01/14] [protocol 3.6] AMM pool testing --- .../loopring_v3/contracts/test/AmmPool.sol | 6 + packages/loopring_v3/test/testAMMPool.ts | 170 ++++++++++++++++++ .../loopring_v3/test/testExchangeBlocks.ts | 62 ++++--- packages/loopring_v3/test/testExchangeUtil.ts | 109 ++++++----- 4 files changed, 273 insertions(+), 74 deletions(-) create mode 100644 packages/loopring_v3/test/testAMMPool.ts diff --git a/packages/loopring_v3/contracts/test/AmmPool.sol b/packages/loopring_v3/contracts/test/AmmPool.sol index c15579c74..0f4fa6fd3 100644 --- a/packages/loopring_v3/contracts/test/AmmPool.sol +++ b/packages/loopring_v3/contracts/test/AmmPool.sol @@ -50,6 +50,10 @@ contract AmmPool is IBlockReceiver { uint96[] minAmountsOut ); + event QueueItemsProcessed( + uint numItems + ); + uint public constant MAX_AGE_REQUEST_UNTIL_POOL_SHUTDOWN = 7 days; IExchangeV3 public exchange; @@ -466,5 +470,7 @@ contract AmmPool is IBlockReceiver { totalBalance[tokens[i].addr] = totalBalance[tokens[i].addr].add(amount); } } + + emit QueueItemsProcessed(auxData.numItems); } } diff --git a/packages/loopring_v3/test/testAMMPool.ts b/packages/loopring_v3/test/testAMMPool.ts new file mode 100644 index 000000000..9442e120a --- /dev/null +++ b/packages/loopring_v3/test/testAMMPool.ts @@ -0,0 +1,170 @@ +import BN = require("bn.js"); +import { Constants, Signature } from "loopringV3.js"; +import { expectThrow } from "./expectThrow"; +import { BlockCallback, ExchangeTestUtil } from "./testExchangeUtil"; +import { AuthMethod, OrderInfo, SpotTrade } from "./types"; + +export class AmmPool { + public ctx: ExchangeTestUtil; + public contract: any; + + public feeBips: number; + public tokens: string[]; + public weights: BN[]; + + constructor(ctx: ExchangeTestUtil) { + this.ctx = ctx; + } + + public async setupPool(tokens: string[], weights: BN[], feeBips: number) { + this.feeBips = feeBips; + this.tokens = tokens; + this.weights = weights; + + const AmmPool = artifacts.require("AmmPool"); + this.contract = await AmmPool.new(); + + // Create the AMM account + const owner = this.contract.address; + const deposit = await this.ctx.deposit( + this.ctx.testContext.orderOwners[0], + owner, + "ETH", + new BN(1), + { autoSetKeys: false } + ); + + // Initial liquidity + await this.ctx.deposit( + this.ctx.testContext.orderOwners[0], + this.contract.address, + "WETH", + new BN(web3.utils.toWei("10000", "ether")), + { autoSetKeys: false } + ); + await this.ctx.deposit( + this.ctx.testContext.orderOwners[0], + this.contract.address, + "GTO", + new BN(web3.utils.toWei("20000", "ether")), + { autoSetKeys: false } + ); + + const tokenAddress: string[] = []; + for (const token of tokens) { + tokenAddress.push(this.ctx.getTokenAddress(token)); + } + + await this.contract.setupPool( + this.ctx.exchange.address, + deposit.accountID, + tokenAddress, + weights, + feeBips + ); + } + + public async deposit(owner: string, amounts: BN[]) { + await this.contract.deposit(amounts); + } + + public async process() { + await this.ctx.submitTransactions(); + await this.ctx.submitPendingBlocks(); + + const owner = this.contract.address; + for (let i = 0; i < this.tokens.length; i++) { + await this.ctx.requestAmmUpdate( + owner, + this.tokens[i], + this.feeBips, + this.weights[i], + { authMethod: AuthMethod.NONE } + ); + } + + const auxiliaryData = web3.eth.abi.encodeParameter("tuple(uint256)", [0]); + const blockCallbacks: BlockCallback[] = []; + blockCallbacks.push({ + target: owner, + blockIdx: 0, + txIdx: 0, + auxiliaryData + }); + await this.ctx.submitTransactions(); + await this.ctx.submitPendingBlocks(blockCallbacks); + } +} + +contract("AMM Pool", (accounts: string[]) => { + let ctx: ExchangeTestUtil; + + before(async () => { + ctx = new ExchangeTestUtil(); + await ctx.initialize(accounts); + }); + + after(async () => { + await ctx.stop(); + }); + + beforeEach(async () => { + // Fresh Exchange for each test + await ctx.createExchange(ctx.testContext.stateOwners[0], { + setupTestState: true + }); + }); + + describe("AMM", function() { + this.timeout(0); + + it.only("Successful swap (AMM maker)", async () => { + const feeBipsAMM = 30; + const tokens = ["WETH", "GTO"]; + const weights = [ + new BN(web3.utils.toWei("1", "ether")), + new BN(web3.utils.toWei("1", "ether")) + ]; + + const pool = new AmmPool(ctx); + await pool.setupPool(tokens, weights, feeBipsAMM); + await pool.process(); + + const ring: SpotTrade = { + orderA: { + owner: pool.contract.address, + tokenS: "WETH", + tokenB: "GTO", + amountS: new BN(web3.utils.toWei("98", "ether")), + amountB: new BN(web3.utils.toWei("200", "ether")), + //balanceS: new BN(web3.utils.toWei("10000", "ether")), + //balanceB: new BN(web3.utils.toWei("20000", "ether")), + feeBips: 0, + amm: true + }, + orderB: { + tokenS: "GTO", + tokenB: "WETH", + amountS: new BN(web3.utils.toWei("200", "ether")), + amountB: new BN(web3.utils.toWei("98", "ether")) + }, + expected: { + orderA: { filledFraction: 1.0, spread: new BN(0) }, + orderB: { filledFraction: 1.0 } + } + }; + await ctx.setupRing(ring, true, true, false, true); + + await ctx.deposit( + ctx.exchangeOperator, + ctx.exchangeOperator, + ring.orderA.tokenB, + ring.orderA.amountB + ); + + await ctx.sendRing(ring); + await ctx.submitTransactions(); + await ctx.submitPendingBlocks(); + }); + }); +}); diff --git a/packages/loopring_v3/test/testExchangeBlocks.ts b/packages/loopring_v3/test/testExchangeBlocks.ts index 467eede2c..f87263670 100644 --- a/packages/loopring_v3/test/testExchangeBlocks.ts +++ b/packages/loopring_v3/test/testExchangeBlocks.ts @@ -22,7 +22,7 @@ contract("Exchange", (accounts: string[]) => { ) => { await exchangeTestUtil.createExchange( exchangeTestUtil.testContext.stateOwners[0], - {setupTestState, useOwnerContract} + { setupTestState, useOwnerContract } ); exchange = exchangeTestUtil.exchange; operator = exchange; @@ -377,6 +377,7 @@ contract("Exchange", (accounts: string[]) => { // Submit the transfers: wrong order await expectThrow( exchangeTestUtil.submitPendingBlocks( + [], (onchainBlocks: OnchainBlock[], blocks: Block[]) => { assert(blocks.length === 1, "unexpected number of blocks"); let auxiliaryData: any[] = []; @@ -412,6 +413,7 @@ contract("Exchange", (accounts: string[]) => { // Submit the transfers: duplicated index await expectThrow( exchangeTestUtil.submitPendingBlocks( + [], (onchainBlocks: OnchainBlock[], blocks: Block[]) => { assert(blocks.length === 1, "unexpected number of blocks"); let auxiliaryData: any[] = []; @@ -447,6 +449,7 @@ contract("Exchange", (accounts: string[]) => { // Submit the transfers: invalid length await expectThrow( exchangeTestUtil.submitPendingBlocks( + [], (onchainBlocks: OnchainBlock[], blocks: Block[]) => { assert(blocks.length === 1, "unexpected number of blocks"); const auxiliaryData: any[] = []; @@ -481,6 +484,7 @@ contract("Exchange", (accounts: string[]) => { // Submit the transfers: everything alright await exchangeTestUtil.submitPendingBlocks( + [], (onchainBlocks: OnchainBlock[], blocks: Block[]) => { assert(blocks.length === 1, "unexpected number of blocks"); const auxiliaryData: any[] = []; @@ -530,21 +534,24 @@ contract("Exchange", (accounts: string[]) => { await commitSomeWork(); // Try so submit blocks with invalid proofs await expectThrow( - exchangeTestUtil.submitPendingBlocks((blocks: OnchainBlock[]) => { - // Change a random proof - const blockToModify = exchangeTestUtil.getRandomInt( - blocks.length - ); - const proofIdxToModify = exchangeTestUtil.getRandomInt(8); - blocks[blockToModify].proof[proofIdxToModify] = - "0x" + - new BN( - blocks[blockToModify].proof[proofIdxToModify].slice(2), - 16 - ) - .add(new BN(1)) - .toString(16); - }), + exchangeTestUtil.submitPendingBlocks( + [], + (blocks: OnchainBlock[]) => { + // Change a random proof + const blockToModify = exchangeTestUtil.getRandomInt( + blocks.length + ); + const proofIdxToModify = exchangeTestUtil.getRandomInt(8); + blocks[blockToModify].proof[proofIdxToModify] = + "0x" + + new BN( + blocks[blockToModify].proof[proofIdxToModify].slice(2), + 16 + ) + .add(new BN(1)) + .toString(16); + } + ), "INVALID_PROOF" ); }); @@ -557,16 +564,19 @@ contract("Exchange", (accounts: string[]) => { await commitSomeWork(); // Try so submit blocks with invalid proofs await expectThrow( - exchangeTestUtil.submitPendingBlocks((blocks: OnchainBlock[]) => { - // Change the data of a random block - const blockToModify = exchangeTestUtil.getRandomInt( - blocks.length - ); - blocks[blockToModify].data = [ - ...blocks[blockToModify].data, - ...web3.utils.hexToBytes(web3.utils.randomHex(1)) - ]; - }), + exchangeTestUtil.submitPendingBlocks( + [], + (blocks: OnchainBlock[]) => { + // Change the data of a random block + const blockToModify = exchangeTestUtil.getRandomInt( + blocks.length + ); + blocks[blockToModify].data = [ + ...blocks[blockToModify].data, + ...web3.utils.hexToBytes(web3.utils.randomHex(1)) + ]; + } + ), "INVALID_PROOF" ); }); diff --git a/packages/loopring_v3/test/testExchangeUtil.ts b/packages/loopring_v3/test/testExchangeUtil.ts index a0b1d1f00..c9269cd9d 100644 --- a/packages/loopring_v3/test/testExchangeUtil.ts +++ b/packages/loopring_v3/test/testExchangeUtil.ts @@ -47,9 +47,7 @@ import { WithdrawalRequest } from "./types"; -const LoopringIOExchangeOwner = artifacts.require( - "LoopringIOExchangeOwner" -); +const LoopringIOExchangeOwner = artifacts.require("LoopringIOExchangeOwner"); type TxType = | Noop @@ -148,6 +146,13 @@ export interface OnchainBlock { offchainData?: any; } +export interface BlockCallback { + target: string; + blockIdx: number; + txIdx: number; + auxiliaryData: any; +} + export interface AuxiliaryData { txIndex: number; txAuxiliaryData?: any; @@ -397,7 +402,6 @@ export namespace TransferUtils { } } - export namespace AmmUpdateUtils { export function toTypedData(update: AmmUpdate, verifyingContract: string) { const typedData = { @@ -517,7 +521,6 @@ export class ExchangeTestUtil { private emptyMerkleRoot = "0x1efe4f31c90f89eb9b139426a95e5e87f6e0c9e8dab9ddf295e3f9d651f54698"; - public async initialize(accounts: string[]) { this.context = await this.createContractContext(); this.testContext = await this.createExchangeTestContext(accounts); @@ -699,8 +702,7 @@ export class ExchangeTestUtil { options.storageID !== undefined ? options.storageID : this.storageIDGenerator++; - const maxFee = - options.maxFee !== undefined ? options.maxFee : fee; + const maxFee = options.maxFee !== undefined ? options.maxFee : fee; // From await this.deposit(from, from, token, amountToDeposit); @@ -863,7 +865,11 @@ export class ExchangeTestUtil { ring.fee = ring.fee ? ring.fee : new BN(web3.utils.toWei("1", "ether")); } - public async setupOrder(order: OrderInfo, index: number, bDeposit: boolean = true) { + public async setupOrder( + order: OrderInfo, + index: number, + bDeposit: boolean = true + ) { if (order.owner === undefined) { const accountIndex = index % this.testContext.orderOwners.length; order.owner = this.testContext.orderOwners[accountIndex]; @@ -1224,16 +1230,13 @@ export class ExchangeTestUtil { options.extraData !== undefined ? options.extraData : "0x"; const validUntil = options.validUntil !== undefined ? options.validUntil : 0xffffffff; - const maxFee = - options.maxFee !== undefined ? options.maxFee : fee; + const maxFee = options.maxFee !== undefined ? options.maxFee : fee; let storageID = options.storageID !== undefined ? options.storageID : this.storageIDGenerator++; let storeRecipient = - options.storeRecipient !== undefined - ? options.storeRecipient - : false; + options.storeRecipient !== undefined ? options.storeRecipient : false; let type = 0; if (authMethod === AuthMethod.ECDSA || authMethod === AuthMethod.APPROVE) { @@ -1454,10 +1457,7 @@ export class ExchangeTestUtil { // Aprove if (authMethod === AuthMethod.ECDSA) { - const hash = AmmUpdateUtils.getHash( - ammUpdate, - this.exchange.address - ); + const hash = AmmUpdateUtils.getHash(ammUpdate, this.exchange.address); ammUpdate.onchainSignature = await sign( owner, hash, @@ -1465,10 +1465,7 @@ export class ExchangeTestUtil { ); await verifySignature(owner, hash, ammUpdate.onchainSignature); } else if (authMethod === AuthMethod.APPROVE) { - const hash = AmmUpdateUtils.getHash( - ammUpdate, - this.exchange.address - ); + const hash = AmmUpdateUtils.getHash(ammUpdate, this.exchange.address); await this.exchange.approveTransaction(owner, hash, { from: owner }); } @@ -1700,7 +1697,11 @@ export class ExchangeTestUtil { } } - public async submitBlocks(blocks: Block[], callback?: any) { + public async submitBlocks( + blocks: Block[], + blockCallbacks?: BlockCallback[], + testCallback?: any + ) { if (blocks.length === 0) { return; } @@ -1790,8 +1791,8 @@ export class ExchangeTestUtil { } // Callback that allows modifying the blocks - if (callback !== undefined) { - callback(onchainBlocks, blocks); + if (testCallback !== undefined) { + testCallback(onchainBlocks, blocks); } const numBlocksSubmittedBefore = ( @@ -1804,7 +1805,7 @@ export class ExchangeTestUtil { ).toNumber(); // Submit the blocks onchain - const operatorContract = this.operator ? this.operator : this.exchange; + const operatorContract = this.operator ? this.operator : this.exchange; // Compress the data const txData = this.exchange.contract.methods @@ -1815,14 +1816,13 @@ export class ExchangeTestUtil { //console.log(compressed); let tx: any = undefined; - tx = await operatorContract.submitBlocksCompressed( + /*tx = await operatorContract.submitBlocksCompressed( web3.utils.hexToBytes(compressed), //txData, { from: this.exchangeOperator, gasPrice: 0 } - ); + );*/ /*tx = await operatorContract.submitBlocks( onchainBlocks, - this.exchangeOperator, { from: this.exchangeOperator, gasPrice: 0 } );*/ /*tx = await operatorContract.transact( @@ -1838,6 +1838,11 @@ export class ExchangeTestUtil { onchainBlocks, { from: this.exchangeOwner, gasPrice: 0 } );*/ + tx = await operatorContract.submitBlocksWithCallbacks( + onchainBlocks, + blockCallbacks, + { from: this.exchangeOperator, gasPrice: 0 } + ); logInfo( "\x1b[46m%s\x1b[0m", "[submitBlocks] Gas used: " + tx.receipt.gasUsed @@ -1932,8 +1937,15 @@ export class ExchangeTestUtil { await this.checkExplorerState(); } - public async submitPendingBlocks(callback?: any) { - await this.submitBlocks(this.pendingBlocks[this.exchangeId], callback); + public async submitPendingBlocks( + blockCallbacks: BlockCallback[] = [], + testCallback?: any + ) { + await this.submitBlocks( + this.pendingBlocks[this.exchangeId], + blockCallbacks, + testCallback + ); this.pendingBlocks[this.exchangeId] = []; } @@ -2066,13 +2078,8 @@ export class ExchangeTestUtil { } } else if (transaction.txType === "AmmUpdate") { numConditionalTransactions++; - const encodedAmmUpdateData = this.getAmmUpdateAuxData( - transaction - ); - auxiliaryData.push([ - i, - web3.utils.hexToBytes(encodedAmmUpdateData) - ]); + const encodedAmmUpdateData = this.getAmmUpdateAuxData(transaction); + auxiliaryData.push([i, web3.utils.hexToBytes(encodedAmmUpdateData)]); } } logDebug("numConditionalTransactions: " + numConditionalTransactions); @@ -2364,13 +2371,13 @@ export class ExchangeTestUtil { return undefined; } - public async createExchange( - owner: string, - options: ExchangeOptions = {} - ) { - const setupTestState = options.setupTestState !== undefined ? options.setupTestState : true; - const deterministic = options.deterministic !== undefined ? options.deterministic : false; - const useOwnerContract = options.useOwnerContract !== undefined ? options.useOwnerContract : true; + public async createExchange(owner: string, options: ExchangeOptions = {}) { + const setupTestState = + options.setupTestState !== undefined ? options.setupTestState : true; + const deterministic = + options.deterministic !== undefined ? options.deterministic : false; + const useOwnerContract = + options.useOwnerContract !== undefined ? options.useOwnerContract : true; this.deterministic = deterministic; const operator = this.testContext.operators[0]; @@ -2499,18 +2506,20 @@ export class ExchangeTestUtil { ); await this.setOperatorContract(ownerContract); - await this.exchange.transferOwnership(ownerContract.address, {from: this.exchangeOwner}); + await this.exchange.transferOwnership(ownerContract.address, { + from: this.exchangeOwner + }); const txData = this.exchange.contract.methods .claimOwnership() .encodeABI(); - await ownerContract.transact(txData, {from: this.exchangeOwner}); + await ownerContract.transact(txData, { from: this.exchangeOwner }); } return exchangeId; } public async syncExplorer() { - await this.explorer.sync(await web3.eth.getBlockNumber()); + // await this.explorer.sync(await web3.eth.getBlockNumber()); } public getTokenAddress(token: string) { @@ -2756,6 +2765,8 @@ export class ExchangeTestUtil { } public async checkExplorerState() { + return; + // Get the current state const numBlocksOnchain = this.blocks[this.exchangeId].length; const state = await Simulator.loadExchangeState( @@ -2956,7 +2967,9 @@ export class ExchangeTestUtil { } public getRandomFee() { - return this.deterministic ? new BN(0) : new BN(web3.utils.toWei("" + this.getRandomInt(10000) / 1000000)); + return this.deterministic + ? new BN(0) + : new BN(web3.utils.toWei("" + this.getRandomInt(10000) / 1000000)); } public async depositExchangeStakeChecked(amount: BN, owner: string) { From 537340eeec31d70dfd8e7e34182209b0b605166e Mon Sep 17 00:00:00 2001 From: Brechtpd Date: Thu, 10 Sep 2020 15:39:02 +0200 Subject: [PATCH 02/14] [protocol 3.6] More AMM pool testing --- .../libtransactions/WithdrawTransaction.sol | 32 +++- .../loopring_v3/contracts/test/AmmPool.sol | 15 +- packages/loopring_v3/test/testAMMPool.ts | 154 +++++++++++++++--- .../loopring_v3/test/testExchangeContext.ts | 9 +- .../test/testExchangeDepositWithdraw.ts | 84 ++++++---- packages/loopring_v3/test/testExchangeUtil.ts | 73 +++++---- 6 files changed, 272 insertions(+), 95 deletions(-) diff --git a/packages/loopring_v3/contracts/core/impl/libtransactions/WithdrawTransaction.sol b/packages/loopring_v3/contracts/core/impl/libtransactions/WithdrawTransaction.sol index ad21b8098..01e601a44 100644 --- a/packages/loopring_v3/contracts/core/impl/libtransactions/WithdrawTransaction.sol +++ b/packages/loopring_v3/contracts/core/impl/libtransactions/WithdrawTransaction.sol @@ -85,16 +85,14 @@ library WithdrawTransaction WithdrawalAuxiliaryData memory auxData = abi.decode(auxiliaryData, (WithdrawalAuxiliaryData)); // Validate the withdrawal data not directly part of the DA - bytes32 onchainDataHash = keccak256( - abi.encodePacked( - auxData.minGas, - auxData.to, - auxData.extraData - ) + bytes20 onchainDataHash = hashOnchainData( + auxData.minGas, + auxData.to, + auxData.extraData ); // Only the 20 MSB are used, which is still 80-bit of security, which is more // than enough, especially when combined with validUntil. - require(withdrawal.onchainDataHash == bytes20(onchainDataHash), "INVALID_WITHDRAWAL_DATA"); + require(withdrawal.onchainDataHash == onchainDataHash, "INVALID_WITHDRAWAL_DATA"); // Fill in withdrawal data missing from DA withdrawal.to = auxData.to; @@ -251,4 +249,24 @@ library WithdrawTransaction ) ); } + + function hashOnchainData( + uint minGas, + address to, + bytes memory extraData + ) + internal + pure + returns (bytes20) + { + // Only the 20 MSB are used, which is still 80-bit of security, which is more + // than enough, especially when combined with validUntil. + return bytes20(keccak256( + abi.encodePacked( + minGas, + to, + extraData + ) + )); + } } diff --git a/packages/loopring_v3/contracts/test/AmmPool.sol b/packages/loopring_v3/contracts/test/AmmPool.sol index 0f4fa6fd3..4ae72ef7b 100644 --- a/packages/loopring_v3/contracts/test/AmmPool.sol +++ b/packages/loopring_v3/contracts/test/AmmPool.sol @@ -437,7 +437,7 @@ contract AmmPool is IBlockReceiver { ethValue = _deposit.amount; } else { // Approve the deposit transfer - ERC20(tokens[i].addr).approve(address(exchange), _deposit.amount); + ERC20(tokens[i].addr).approve(address(exchange.getDepositContract()), _deposit.amount); } exchange.deposit{value: ethValue}( _deposit.owner, @@ -459,10 +459,19 @@ contract AmmPool is IBlockReceiver { require(withdrawal.amount == amount, "INVALID_TX_DATA"); require(withdrawal.feeTokenID == withdrawal.tokenID, "INVALID_TX_DATA"); require(withdrawal.fee == 0, "INVALID_TX_DATA"); - require(withdrawal.to == address(this), "INVALID_TX_DATA"); - require(withdrawal.extraData.length == 0, "INVALID_TX_DATA"); + withdrawal.minGas = 0; + withdrawal.to = address(this); + withdrawal.extraData = new bytes(0); + bytes20 onchainDataHash = WithdrawTransaction.hashOnchainData( + withdrawal.minGas, + withdrawal.to, + withdrawal.extraData + ); + require(withdrawal.onchainDataHash == onchainDataHash, "INVALID_TX_DATA"); // Now approve this withdrawal + withdrawal.validUntil = 0xffffffff; + bytes32 txHash = WithdrawTransaction.hashTx(exchangeDomainSeparator, withdrawal); exchange.approveTransaction(address(this), txHash); numTransactionsConsumed++; diff --git a/packages/loopring_v3/test/testAMMPool.ts b/packages/loopring_v3/test/testAMMPool.ts index 9442e120a..a66953e71 100644 --- a/packages/loopring_v3/test/testAMMPool.ts +++ b/packages/loopring_v3/test/testAMMPool.ts @@ -4,6 +4,20 @@ import { expectThrow } from "./expectThrow"; import { BlockCallback, ExchangeTestUtil } from "./testExchangeUtil"; import { AuthMethod, OrderInfo, SpotTrade } from "./types"; +export interface PoolJoin { + workType?: "PoolJoin"; + poolAmountOut: BN; + maxAmountsIn: BN[]; +} + +export interface PoolExit { + workType?: "PoolExit"; + poolAmountIn: BN; + minAmountsOut: BN[]; +} + +type TxType = PoolJoin | PoolExit; + export class AmmPool { public ctx: ExchangeTestUtil; public contract: any; @@ -12,8 +26,11 @@ export class AmmPool { public tokens: string[]; public weights: BN[]; + public queue: TxType[]; + constructor(ctx: ExchangeTestUtil) { this.ctx = ctx; + this.queue = []; } public async setupPool(tokens: string[], weights: BN[], feeBips: number) { @@ -34,22 +51,6 @@ export class AmmPool { { autoSetKeys: false } ); - // Initial liquidity - await this.ctx.deposit( - this.ctx.testContext.orderOwners[0], - this.contract.address, - "WETH", - new BN(web3.utils.toWei("10000", "ether")), - { autoSetKeys: false } - ); - await this.ctx.deposit( - this.ctx.testContext.orderOwners[0], - this.contract.address, - "GTO", - new BN(web3.utils.toWei("20000", "ether")), - { autoSetKeys: false } - ); - const tokenAddress: string[] = []; for (const token of tokens) { tokenAddress.push(this.ctx.getTokenAddress(token)); @@ -65,14 +66,62 @@ export class AmmPool { } public async deposit(owner: string, amounts: BN[]) { - await this.contract.deposit(amounts); + let value = new BN(0); + for (let i = 0; i < this.tokens.length; i++) { + const token = this.tokens[i]; + const amount = amounts[i]; + if (amount.gt(0)) { + if (token !== Constants.zeroAddress) { + const Token = await this.ctx.getTokenContract(token); + await Token.setBalance(owner, amount); + await Token.approve(this.contract.address, amount, { from: owner }); + } else { + value = value.add(web3.utils.toBN(amount)); + } + } + } + + await this.contract.deposit(amounts, { value, from: owner }); + } + + public async join(owner: string, poolAmountOut: BN, maxAmountsIn: BN[]) { + await this.contract.joinPool(poolAmountOut, maxAmountsIn, { from: owner }); + const poolJoin: PoolJoin = { + workType: "PoolJoin", + poolAmountOut, + maxAmountsIn + }; + this.queue.push(poolJoin); + } + + public async exit(owner: string, poolAmountIn: BN, minAmountsOut: BN[]) { + await this.contract.exitPool(poolAmountIn, minAmountsOut, { from: owner }); + const poolExit: PoolExit = { + workType: "PoolExit", + poolAmountIn, + minAmountsOut + }; + this.queue.push(poolExit); + } + + public async depositAndJoin( + owner: string, + poolAmountOut: BN, + maxAmountsIn: BN[] + ) { + await this.deposit(owner, maxAmountsIn); + await this.join(owner, poolAmountOut, maxAmountsIn); } public async process() { + // To make things easy always start a new block and finalize state await this.ctx.submitTransactions(); await this.ctx.submitPendingBlocks(); const owner = this.contract.address; + + const ammBalancesInAccount: BN[] = []; + const ammBalances: BN[] = []; for (let i = 0; i < this.tokens.length; i++) { await this.ctx.requestAmmUpdate( owner, @@ -81,9 +130,58 @@ export class AmmPool { this.weights[i], { authMethod: AuthMethod.NONE } ); + ammBalancesInAccount.push( + await this.ctx.getOffchainBalance(owner, this.tokens[i]) + ); + ammBalances.push( + await this.ctx.getOffchainBalance(owner, this.tokens[i]) + ); + } + + // Process work in the queue + for (const item of this.queue) { + if (item.workType === "PoolJoin") { + for (let i = 0; i < this.tokens.length; i++) { + const amount = item.maxAmountsIn[i]; + ammBalances[i] = ammBalances[i].add(amount); + console.log("pool join: " + amount.toString(10)); + } + } else if (item.workType === "PoolExit") { + for (let i = 0; i < this.tokens.length; i++) { + const amount = item.minAmountsOut[i]; + ammBalances[i] = ammBalances[i].sub(amount); + console.log("pool exit: " + amount.toString(10)); + } + } + } + + // Deposit/Withdraw to/from the AMM account when necessary + for (let i = 0; i < this.tokens.length; i++) { + if (ammBalances[i].gt(ammBalancesInAccount[i])) { + const amount = ammBalances[i].sub(ammBalancesInAccount[i]); + await this.ctx.requestDeposit(owner, this.tokens[i], amount); + console.log("pool deposit: " + amount.toString(10)); + } else if (ammBalances[i].lt(ammBalancesInAccount[i])) { + const amount = ammBalancesInAccount[i].sub(ammBalances[i]); + await this.ctx.requestWithdrawal( + owner, + this.tokens[i], + amount, + this.tokens[i], + new BN(0), + { authMethod: AuthMethod.NONE, minGas: 0 } + ); + console.log("pool withdraw: " + amount.toString(10)); + } } - const auxiliaryData = web3.eth.abi.encodeParameter("tuple(uint256)", [0]); + const numItems = this.queue.length; + this.queue = []; + console.log("queue: " + numItems); + + const auxiliaryData = web3.eth.abi.encodeParameter("tuple(uint256)", [ + numItems + ]); const blockCallbacks: BlockCallback[] = []; blockCallbacks.push({ target: owner, @@ -119,6 +217,8 @@ contract("AMM Pool", (accounts: string[]) => { this.timeout(0); it.only("Successful swap (AMM maker)", async () => { + const ownerA = ctx.testContext.orderOwners[10]; + const feeBipsAMM = 30; const tokens = ["WETH", "GTO"]; const weights = [ @@ -128,6 +228,16 @@ contract("AMM Pool", (accounts: string[]) => { const pool = new AmmPool(ctx); await pool.setupPool(tokens, weights, feeBipsAMM); + + await pool.depositAndJoin( + ownerA, + new BN(web3.utils.toWei("1", "ether")), + [ + new BN(web3.utils.toWei("10000", "ether")), + new BN(web3.utils.toWei("20000", "ether")) + ] + ); + await pool.process(); const ring: SpotTrade = { @@ -137,8 +247,6 @@ contract("AMM Pool", (accounts: string[]) => { tokenB: "GTO", amountS: new BN(web3.utils.toWei("98", "ether")), amountB: new BN(web3.utils.toWei("200", "ether")), - //balanceS: new BN(web3.utils.toWei("10000", "ether")), - //balanceB: new BN(web3.utils.toWei("20000", "ether")), feeBips: 0, amm: true }, @@ -165,6 +273,12 @@ contract("AMM Pool", (accounts: string[]) => { await ctx.sendRing(ring); await ctx.submitTransactions(); await ctx.submitPendingBlocks(); + + await pool.exit(ownerA, new BN(web3.utils.toWei("1", "ether")), [ + new BN(web3.utils.toWei("5000", "ether")), + new BN(web3.utils.toWei("10000", "ether")) + ]); + await pool.process(); }); }); }); diff --git a/packages/loopring_v3/test/testExchangeContext.ts b/packages/loopring_v3/test/testExchangeContext.ts index b62dd6d26..38c4f8dbb 100644 --- a/packages/loopring_v3/test/testExchangeContext.ts +++ b/packages/loopring_v3/test/testExchangeContext.ts @@ -4,8 +4,6 @@ export class ExchangeTestContext { public operators: string[]; public orderOwners: string[]; public wallets: string[]; - public ringMatchers: string[]; - public feeRecipients: string[]; public tokenSymbolAddrMap: Map; // key: symbol, value: addr public tokenAddrSymbolMap: Map; // key: addr, value: symbol @@ -19,8 +17,6 @@ export class ExchangeTestContext { operators: string[], orderOwners: string[], wallets: string[], - ringMatchers: string[], - feeRecipients: string[], tokenSymbolAddrMap: Map, tokenAddrSymbolMap: Map, tokenAddrDecimalsMap: Map, @@ -28,11 +24,10 @@ export class ExchangeTestContext { allTokens: any[] ) { this.deployer = deployer; - (this.stateOwners = stateOwners), (this.operators = operators); + this.stateOwners = stateOwners; + this.operators = operators; this.orderOwners = orderOwners; this.wallets = wallets; - this.ringMatchers = ringMatchers; - this.feeRecipients = feeRecipients; this.tokenSymbolAddrMap = tokenSymbolAddrMap; this.tokenAddrSymbolMap = tokenAddrSymbolMap; this.tokenAddrDecimalsMap = tokenAddrDecimalsMap; diff --git a/packages/loopring_v3/test/testExchangeDepositWithdraw.ts b/packages/loopring_v3/test/testExchangeDepositWithdraw.ts index 86f631df9..b1a51f718 100644 --- a/packages/loopring_v3/test/testExchangeDepositWithdraw.ts +++ b/packages/loopring_v3/test/testExchangeDepositWithdraw.ts @@ -208,7 +208,7 @@ contract("Exchange", (accounts: string[]) => { ); await exchange.withdrawFromApprovedWithdrawals([owner], [token], { - from: exchangeTestUtil.testContext.feeRecipients[0] + from: exchangeTestUtil.testContext.orderOwners[10] }); // Complete amount needs to be withdrawn @@ -249,7 +249,7 @@ contract("Exchange", (accounts: string[]) => { const createExchange = async (setupTestState: boolean = true) => { exchangeID = await exchangeTestUtil.createExchange( exchangeTestUtil.testContext.stateOwners[0], - {setupTestState} + { setupTestState } ); exchange = exchangeTestUtil.exchange; depositContract = exchangeTestUtil.depositContract; @@ -505,7 +505,9 @@ contract("Exchange", (accounts: string[]) => { // Submit the block const expectedResult = { ...deposit }; - await submitWithdrawalBlockChecked([expectedResult], undefined, [recipient]); + await submitWithdrawalBlockChecked([expectedResult], undefined, [ + recipient + ]); // Try to set it again even after the block has been submitted await expectThrow( @@ -771,25 +773,17 @@ contract("Exchange", (accounts: string[]) => { const feeToken = "ETH"; const fee = new BN(web3.utils.toWei("1.5", "ether")); - await exchangeTestUtil.deposit( - owner, - owner, - token, - balance - ); + await exchangeTestUtil.deposit(owner, owner, token, balance); await exchangeTestUtil.requestWithdrawal( owner, token, toWithdraw, feeToken, fee, - { maxFee: fee.div(new BN(3))} + { maxFee: fee.div(new BN(3)) } ); - await expectThrow( - exchangeTestUtil.submitTransactions(), - "invalid block" - ); + await expectThrow(exchangeTestUtil.submitTransactions(), "invalid block"); }); it("Withdraw (protocol fees)", async () => { @@ -817,7 +811,12 @@ contract("Exchange", (accounts: string[]) => { const feeBipsAMM = 30; const tokenWeightS = new BN(web3.utils.toWei("1", "ether")); - await exchangeTestUtil.requestAmmUpdate(exchangeTestUtil.exchangeOperator, ring.orderA.tokenS, feeBipsAMM, tokenWeightS); + await exchangeTestUtil.requestAmmUpdate( + exchangeTestUtil.exchangeOperator, + ring.orderA.tokenS, + feeBipsAMM, + tokenWeightS + ); await exchangeTestUtil.requestWithdrawal( Constants.zeroAddress, @@ -905,33 +904,60 @@ contract("Exchange", (accounts: string[]) => { const feeToken = "ETH"; const fee = new BN(web3.utils.toWei("0.0456", "ether")); - await exchangeTestUtil.deposit( - owner, + await exchangeTestUtil.deposit(owner, owner, token, balance); + + let storageID = 123; + await exchangeTestUtil.requestWithdrawal( owner, token, - balance + toWithdraw, + feeToken, + fee, + { storageID } ); - - let storageID = 123; - await exchangeTestUtil.requestWithdrawal(owner, token, toWithdraw, feeToken, fee, {storageID}); storageID++; - await exchangeTestUtil.requestWithdrawal(owner, token, toWithdraw, feeToken, fee, {storageID}); + await exchangeTestUtil.requestWithdrawal( + owner, + token, + toWithdraw, + feeToken, + fee, + { storageID } + ); storageID++; - await exchangeTestUtil.requestWithdrawal(owner, token, toWithdraw, feeToken, fee, {storageID}); + await exchangeTestUtil.requestWithdrawal( + owner, + token, + toWithdraw, + feeToken, + fee, + { storageID } + ); storageID += Constants.NUM_STORAGE_SLOTS; - await exchangeTestUtil.requestWithdrawal(owner, token, toWithdraw, feeToken, fee, {storageID}); + await exchangeTestUtil.requestWithdrawal( + owner, + token, + toWithdraw, + feeToken, + fee, + { storageID } + ); await exchangeTestUtil.submitTransactions(); await exchangeTestUtil.submitPendingBlocks(); // Try to use the same slot again - await exchangeTestUtil.requestWithdrawal(owner, token, toWithdraw, feeToken, fee, {storageID}); + await exchangeTestUtil.requestWithdrawal( + owner, + token, + toWithdraw, + feeToken, + fee, + { storageID } + ); // Commit the withdrawals - await expectThrow( - exchangeTestUtil.submitTransactions(), - "invalid block" - ); + await expectThrow(exchangeTestUtil.submitTransactions(), "invalid block"); }); it("Deposits should not total more than MAX_AMOUNT", async () => { diff --git a/packages/loopring_v3/test/testExchangeUtil.ts b/packages/loopring_v3/test/testExchangeUtil.ts index c9269cd9d..1c92164a4 100644 --- a/packages/loopring_v3/test/testExchangeUtil.ts +++ b/packages/loopring_v3/test/testExchangeUtil.ts @@ -529,7 +529,9 @@ export class ExchangeTestUtil { await this.explorer.initialize(web3, this.universalRegistry.address); // Initialize LoopringV3 - this.protocolFeeVault = this.testContext.ringMatchers[0]; + this.protocolFeeVault = this.testContext.orderOwners[ + this.testContext.orderOwners.length - 1 + ]; await this.loopringV3.updateSettings( this.protocolFeeVault, @@ -1184,17 +1186,13 @@ export class ExchangeTestUtil { amount = event.amount; } - const deposit: Deposit = { - txType: "Deposit", - owner: to, - accountID, - tokenID: this.tokenAddressToIDMap.get(token), - amount, + const deposit = await this.requestDeposit( + to, token, - timestamp: ethBlock.timestamp, - transactionHash: tx.receipt.transactionHash - }; - this.pendingTransactions[this.exchangeId].push(deposit); + amount, + ethBlock.timestamp, + tx.receipt.transactionHash + ); if (accountNewCreated && autoSetKeys) { let keyPair = this.getKeyPairEDDSA(); @@ -1206,6 +1204,28 @@ export class ExchangeTestUtil { return deposit; } + public async requestDeposit( + owner: string, + token: string, + amount: BN, + timestamp?: number, + transactionHash?: string + ) { + const accountID = await this.getAccountID(owner); + const deposit: Deposit = { + txType: "Deposit", + owner, + accountID, + tokenID: this.getTokenIdFromNameOrAddress(token), + amount, + token, + timestamp, + transactionHash + }; + this.pendingTransactions[this.exchangeId].push(deposit); + return deposit; + } + public hexToDecString(hex: string) { return new BN(hex.slice(2), 16).toString(10); } @@ -1238,9 +1258,9 @@ export class ExchangeTestUtil { let storeRecipient = options.storeRecipient !== undefined ? options.storeRecipient : false; - let type = 0; - if (authMethod === AuthMethod.ECDSA || authMethod === AuthMethod.APPROVE) { - type = 1; + let type = 1; + if (authMethod === AuthMethod.EDDSA) { + type = 0; } if (authMethod === AuthMethod.FORCE) { if (signer === owner) { @@ -2643,13 +2663,13 @@ export class ExchangeTestUtil { ); } - public async getOffchainBalance( - exchangeID: number, - accountID: number, - tokenID: number - ) { - const latestBlockIdx = this.blocks[exchangeID].length - 1; - const state = await Simulator.loadExchangeState(exchangeID, latestBlockIdx); + public async getOffchainBalance(accountID: number, token: string) { + const tokenID = this.getTokenIdFromNameOrAddress(token); + const latestBlockIdx = this.blocks[this.exchangeId].length - 1; + const state = await Simulator.loadExchangeState( + this.exchangeId, + latestBlockIdx + ); try { return state.accounts[accountID].balances[tokenID].balance; } catch { @@ -2697,9 +2717,8 @@ export class ExchangeTestUtil { } const balance = await this.getOffchainBalance( - this.exchangeId, accountID, - tokenID + this.getTokenAddressFromID(tokenID) ); assert( balance.eq(expectedBalance), @@ -3271,10 +3290,8 @@ export class ExchangeTestUtil { const deployer = accounts[0]; const stateOwners = accounts.slice(1, 5); const operators = accounts.slice(5, 10); - const orderOwners = accounts.slice(10, 20); - const wallets = accounts.slice(20, 30); - const ringMatchers = accounts.slice(30, 40); - const feeRecipients = accounts.slice(40, 50); + const orderOwners = accounts.slice(10, 40); + const wallets = accounts.slice(40, 50); return new ExchangeTestContext( deployer, @@ -3282,8 +3299,6 @@ export class ExchangeTestUtil { operators, orderOwners, wallets, - ringMatchers, - feeRecipients, tokenSymbolAddrMap, tokenAddrSymbolMap, tokenAddrDecimalsMap, From ced47594d2f341d6087fccf9427ef86a23079f3f Mon Sep 17 00:00:00 2001 From: Brechtpd Date: Sun, 13 Sep 2020 22:21:56 +0200 Subject: [PATCH 03/14] [protocol 3.6] Improved AMM pool + testing --- .../circuit/Circuits/TransferCircuit.h | 15 +- packages/loopring_v3/circuit/Utils/Data.h | 5 +- .../aux/transactions/TransactionReader.sol | 13 + .../contracts/core/impl/ExchangeV3.sol | 4 +- .../libtransactions/TransferTransaction.sol | 6 +- .../loopring_v3/contracts/test/AmmPool.sol | 490 +++++++++++++----- packages/loopring_v3/operator/create_block.py | 1 + packages/loopring_v3/test/testAMMPool.ts | 380 +++++++++++++- packages/loopring_v3/test/testExchangeUtil.ts | 35 +- packages/loopring_v3/test/types.ts | 2 + 10 files changed, 781 insertions(+), 170 deletions(-) diff --git a/packages/loopring_v3/circuit/Circuits/TransferCircuit.h b/packages/loopring_v3/circuit/Circuits/TransferCircuit.h index b2bc487a2..18aa57b55 100644 --- a/packages/loopring_v3/circuit/Circuits/TransferCircuit.h +++ b/packages/loopring_v3/circuit/Circuits/TransferCircuit.h @@ -54,6 +54,7 @@ class TransferCircuit : public BaseTransactionCircuit DualVariableGadget payer_to; DualVariableGadget payee_toAccountID; DualVariableGadget maxFee; + DualVariableGadget putAddressesInDA; // Check if the inputs are valid EqualGadget isTransferTx; @@ -93,6 +94,7 @@ class TransferCircuit : public BaseTransactionCircuit // DA optimization OrGadget da_NeedsToAddress; + OrGadget da_NeedsFromAddress; ArrayTernaryGadget da_To; ArrayTernaryGadget da_From; ArrayTernaryGadget da_StorageID; @@ -137,6 +139,7 @@ class TransferCircuit : public BaseTransactionCircuit payer_to(pb, NUM_BITS_ADDRESS, FMT(prefix, ".payer_to")), payee_toAccountID(pb, NUM_BITS_ACCOUNT, FMT(prefix, ".payee_toAccountID")), maxFee(pb, NUM_BITS_AMOUNT, FMT(prefix, ".maxFee")), + putAddressesInDA(pb, 1, FMT(prefix, ".putAddressesInDA")), // Check if the inputs are valid isTransferTx( // @@ -262,7 +265,7 @@ class TransferCircuit : public BaseTransactionCircuit // DA optimization da_NeedsToAddress( pb, - {toAccountValid.isNewAccount(), isConditional.result()}, + {toAccountValid.isNewAccount(), isConditional.result(), putAddressesInDA.packed}, FMT(prefix, ".da_NeedsToAddress")), da_To( pb, @@ -270,9 +273,13 @@ class TransferCircuit : public BaseTransactionCircuit to.bits, VariableArrayT(NUM_BITS_ADDRESS, state.constants._0), FMT(prefix, ".da_To")), + da_NeedsFromAddress( + pb, + {isConditional.result(), putAddressesInDA.packed}, + FMT(prefix, ".da_NeedsFromAddress")), da_From( pb, - isConditional.result(), + da_NeedsFromAddress.result(), from.bits, VariableArrayT(NUM_BITS_ADDRESS, state.constants._0), FMT(prefix, ".da_From")), @@ -373,6 +380,7 @@ class TransferCircuit : public BaseTransactionCircuit payer_to.generate_r1cs_witness(pb, transfer.payerTo); payee_toAccountID.generate_r1cs_witness(pb, transfer.payeeToAccountID); maxFee.generate_r1cs_witness(pb, transfer.maxFee); + putAddressesInDA.generate_r1cs_witness(pb, transfer.putAddressesInDA); // Check if the inputs are valid isTransferTx.generate_r1cs_witness(); @@ -413,6 +421,7 @@ class TransferCircuit : public BaseTransactionCircuit // DA optimization da_NeedsToAddress.generate_r1cs_witness(); da_To.generate_r1cs_witness(); + da_NeedsFromAddress.generate_r1cs_witness(); da_From.generate_r1cs_witness(); da_StorageID.generate_r1cs_witness(); @@ -451,6 +460,7 @@ class TransferCircuit : public BaseTransactionCircuit payer_to.generate_r1cs_constraints(true); payee_toAccountID.generate_r1cs_constraints(true); maxFee.generate_r1cs_constraints(true); + putAddressesInDA.generate_r1cs_constraints(true); // Check if the inputs are valid isTransferTx.generate_r1cs_constraints(); @@ -491,6 +501,7 @@ class TransferCircuit : public BaseTransactionCircuit // DA optimization da_NeedsToAddress.generate_r1cs_constraints(); da_To.generate_r1cs_constraints(); + da_NeedsFromAddress.generate_r1cs_constraints(); da_From.generate_r1cs_constraints(); da_StorageID.generate_r1cs_constraints(); diff --git a/packages/loopring_v3/circuit/Utils/Data.h b/packages/loopring_v3/circuit/Utils/Data.h index a37095850..b71c01ec2 100644 --- a/packages/loopring_v3/circuit/Utils/Data.h +++ b/packages/loopring_v3/circuit/Utils/Data.h @@ -66,7 +66,8 @@ static auto dummyTransfer = R"({ "payerToAccountID": 2, "payerTo": "2", "payeeToAccountID": 2, - "storageID": "0" + "storageID": "0", + "putAddressesInDA": false })"_json; static auto dummyWithdraw = R"({ @@ -434,6 +435,7 @@ class Transfer ethsnarks::FieldT payerTo; ethsnarks::FieldT payeeToAccountID; ethsnarks::FieldT maxFee; + ethsnarks::FieldT putAddressesInDA; ethsnarks::FieldT type; }; @@ -454,6 +456,7 @@ static void from_json(const json &j, Transfer &transfer) transfer.payerTo = ethsnarks::FieldT(j["payerTo"].get().c_str()); transfer.payeeToAccountID = ethsnarks::FieldT(j.at("payeeToAccountID")); transfer.maxFee = ethsnarks::FieldT(j["maxFee"].get().c_str()); + transfer.putAddressesInDA = ethsnarks::FieldT(j.at("putAddressesInDA").get() ? 1 : 0); transfer.type = ethsnarks::FieldT(j.at("type")); } diff --git a/packages/loopring_v3/contracts/aux/transactions/TransactionReader.sol b/packages/loopring_v3/contracts/aux/transactions/TransactionReader.sol index 42e9a751c..6115d4d4a 100644 --- a/packages/loopring_v3/contracts/aux/transactions/TransactionReader.sol +++ b/packages/loopring_v3/contracts/aux/transactions/TransactionReader.sol @@ -7,6 +7,7 @@ import "../../core/impl/libtransactions/BlockReader.sol"; import "../../core/impl/libtransactions/AmmUpdateTransaction.sol"; import "../../core/impl/libtransactions/DepositTransaction.sol"; +import "../../core/impl/libtransactions/TransferTransaction.sol"; import "../../core/impl/libtransactions/WithdrawTransaction.sol"; /// @title TransactionReader @@ -53,6 +54,18 @@ library TransactionReader { return AmmUpdateTransaction.readTx(data, 1); } + function readTransfer( + ExchangeData.Block memory _block, + uint txIdx + ) + internal + pure + returns (TransferTransaction.Transfer memory) + { + bytes memory data = _block.readTx(txIdx, ExchangeData.TransactionType.TRANSFER); + return TransferTransaction.readTx(data, 1); + } + function readTx( ExchangeData.Block memory _block, uint txIdx, diff --git a/packages/loopring_v3/contracts/core/impl/ExchangeV3.sol b/packages/loopring_v3/contracts/core/impl/ExchangeV3.sol index b336c1555..c10acd1d2 100644 --- a/packages/loopring_v3/contracts/core/impl/ExchangeV3.sol +++ b/packages/loopring_v3/contracts/core/impl/ExchangeV3.sol @@ -542,7 +542,9 @@ contract ExchangeV3 is IExchangeV3 feeTokenID: feeTokenID, fee: fee, validUntil: validUntil, - storageID: storageID + storageID: storageID, + fromAccountID: 0, // Not used in hash + toAccountID: 0 // Not used in hash }); bytes32 txHash = TransferTransaction.hashTx(state.DOMAIN_SEPARATOR, transfer); state.approvedTx[transfer.from][txHash] = true; diff --git a/packages/loopring_v3/contracts/core/impl/libtransactions/TransferTransaction.sol b/packages/loopring_v3/contracts/core/impl/libtransactions/TransferTransaction.sol index 92f0e0d78..3014764aa 100644 --- a/packages/loopring_v3/contracts/core/impl/libtransactions/TransferTransaction.sol +++ b/packages/loopring_v3/contracts/core/impl/libtransactions/TransferTransaction.sol @@ -26,6 +26,8 @@ library TransferTransaction struct Transfer { + uint32 fromAccountID; + uint32 toAccountID; address from; address to; uint16 tokenID; @@ -91,9 +93,9 @@ library TransferTransaction // Extract the transfer data // We don't use abi.decode for this because of the large amount of zero-padding // bytes the circuit would also have to hash. - //transfer.fromAccountID = data.toUint32(offset); + transfer.fromAccountID = data.toUint32(offset); offset += 4; - //transfer.toAccountID = data.toUint32(offset); + transfer.toAccountID = data.toUint32(offset); offset += 4; transfer.tokenID = data.toUint16(offset); offset += 2; diff --git a/packages/loopring_v3/contracts/test/AmmPool.sol b/packages/loopring_v3/contracts/test/AmmPool.sol index 4ae72ef7b..7f95cf306 100644 --- a/packages/loopring_v3/contracts/test/AmmPool.sol +++ b/packages/loopring_v3/contracts/test/AmmPool.sol @@ -11,6 +11,7 @@ import "../lib/AddressUtil.sol"; import "../lib/ERC20.sol"; import "../lib/ERC20SafeTransfer.sol"; import "../lib/MathUint.sol"; +import "../lib/SignatureUtil.sol"; import "../core/impl/libtransactions/AmmUpdateTransaction.sol"; import "../core/impl/libtransactions/DepositTransaction.sol"; @@ -27,6 +28,15 @@ contract AmmPool is IBlockReceiver { using TransactionReader for ExchangeData.Block; using ERC20SafeTransfer for address; using MathUint for uint; + using SignatureUtil for bytes32; + + bytes32 constant public POOLJOIN_TYPEHASH = keccak256( + "PoolJoin(address owner,bool fromLayer2,uint256 poolAmountOut,uint256[] maxAmountsIn)" + ); + + bytes32 constant public POOLEXIT_TYPEHASH = keccak256( + "PoolExit(address owner,bool toLayer2,uint256 poolAmountIn,uint256[] minAmountsOut)" + ); event Deposit( address owner, @@ -46,6 +56,7 @@ contract AmmPool is IBlockReceiver { event ExitPoolRequested( address owner, + bool toLayer2, uint poolAmountIn, uint96[] minAmountsOut ); @@ -54,39 +65,63 @@ contract AmmPool is IBlockReceiver { uint numItems ); + uint public constant BASE = 10**18; + uint public constant INITIAL_SUPPLY = 100 * BASE; + uint public constant MAX_AGE_REQUEST_UNTIL_POOL_SHUTDOWN = 7 days; IExchangeV3 public exchange; uint32 public accountID; + bytes32 public DOMAIN_SEPARATOR; + uint public shutdownTimestamp = 0; + enum PoolTransactionType + { + NOOP, + JOIN, + EXIT + } + + struct Context + { + ExchangeData.Block _block; + uint txIdx; + bytes32 exchangeDomainSeparator; + uint[] ammBalancesInAccount; + uint[] ammBalances; + uint numTransactionsConsumed; + } + struct PoolJoin { - uint poolAmountOut; + address owner; + bool fromLayer2; + uint poolAmountOut; uint96[] maxAmountsIn; } struct PoolExit { - uint poolAmountIn; + address owner; + bool toLayer2; + uint poolAmountIn; uint96[] minAmountsOut; } - enum WorkType + struct PoolTransaction { - NONE, - JOIN, - EXIT + PoolTransactionType txType; + bytes data; + bytes signature; } struct QueueItem { - address owner; - uint64 timestamp; - WorkType workType; - PoolJoin join; - PoolExit exit; + uint64 timestamp; + PoolTransactionType txType; + bytes32 txHash; } struct Token @@ -109,6 +144,10 @@ contract AmmPool is IBlockReceiver { // A map from a token to the total balance owned directly by LPs (so NOT owned by the pool itself) mapping (address => uint) totalBalance; + // Liquidity tokens + uint public poolSupply; + mapping (address => uint) poolBalance; + modifier onlyExchangeOwner() { require(msg.sender == exchange.owner(), "UNAUTHORIZED"); @@ -140,6 +179,8 @@ contract AmmPool is IBlockReceiver { require(_tokens.length == _weights.length, "INVALID_DATA"); require(_tokens.length >= 2, "INVALID_DATA"); + DOMAIN_SEPARATOR = EIP712.hash(EIP712.Domain("AMM Pool", "1.0.0", address(this))); + exchange = _exchange; accountID = _accountID; feeBips = _feeBips; @@ -243,42 +284,40 @@ contract AmmPool is IBlockReceiver { // Queue the work PoolJoin memory join = PoolJoin({ + owner: msg.sender, + fromLayer2: false, poolAmountOut: poolAmountOut, maxAmountsIn: maxAmountsIn }); - PoolExit memory exit; queue.push(QueueItem({ - owner: msg.sender, timestamp: uint64(block.timestamp), - workType: WorkType.JOIN, - join: join, - exit: exit + txType: PoolTransactionType.JOIN, + txHash: hashPoolJoin(DOMAIN_SEPARATOR, join) })); emit JoinPoolRequested(msg.sender, poolAmountOut, maxAmountsIn); } - function exitPool(uint poolAmountIn, uint96[] calldata minAmountsOut) + function exitPool(uint poolAmountIn, uint96[] calldata minAmountsOut, bool toLayer2) external online { require(minAmountsOut.length == tokens.length, "INVALID_DATA"); // Queue the work - PoolJoin memory join; PoolExit memory exit = PoolExit({ + owner: msg.sender, + toLayer2: toLayer2, poolAmountIn: poolAmountIn, minAmountsOut: minAmountsOut }); queue.push(QueueItem({ - owner: msg.sender, timestamp: uint64(block.timestamp), - workType: WorkType.EXIT, - join: join, - exit: exit + txType: PoolTransactionType.EXIT, + txHash: hashPoolExit(DOMAIN_SEPARATOR, exit) })); - emit ExitPoolRequested(msg.sender, poolAmountIn, minAmountsOut); + emit ExitPoolRequested(msg.sender, toLayer2, poolAmountIn, minAmountsOut); } // Anyone is able to shut down the pool when requests aren't being processed any more. @@ -289,7 +328,7 @@ contract AmmPool is IBlockReceiver { { require( block.timestamp > queue[queuePos].timestamp + MAX_AGE_REQUEST_UNTIL_POOL_SHUTDOWN && - queue[queuePos].workType != WorkType.NONE, + queue[queuePos].txType != PoolTransactionType.NOOP, "REQUEST_NOT_TOO_OLD" ); @@ -345,11 +384,6 @@ contract AmmPool is IBlockReceiver { } } - struct AuxiliaryData - { - uint numItems; - } - // Processes work in the queue. Can only be called by the exchange owner // before the blocks containing work for this pool are submitted. // This just verifies if the work is done correctly and only then approves @@ -364,122 +398,338 @@ contract AmmPool is IBlockReceiver { override online onlyExchangeOwner - returns (uint numTransactionsConsumed) + returns (uint) { - AuxiliaryData memory auxData = abi.decode(auxiliaryData, (AuxiliaryData)); - bytes32 exchangeDomainSeparator = exchange.getDomainSeparator(); + PoolTransaction[] memory poolTransactions = abi.decode(auxiliaryData, (PoolTransaction[])); + + // Cache the domain seperator to save on SLOADs each time it is accessed. + Context memory ctx = Context({ + _block: _block, + txIdx: txIdx, + exchangeDomainSeparator: exchange.getDomainSeparator(), + ammBalancesInAccount: new uint[](tokens.length), + ammBalances: new uint[](tokens.length), + numTransactionsConsumed: 0 + }); BlockReader.BlockHeader memory header = _block.readHeader(); require(header.exchange == address(exchange), "INVALID_EXCHANGE"); - // First always update the AMM parameters, which also pulls the AMM balances onchain - uint[] memory ammBalancesInAccount = new uint[](tokens.length); - uint[] memory ammBalances = new uint[](tokens.length); + // The starting AMM updates + // This also pulls the AMM balances onchain. + processAmmUpdates(ctx, true); + + // Process all pool transactions + for (uint n = 0; n < poolTransactions.length; n++) { + PoolTransaction memory poolTx = poolTransactions[n]; + if (poolTx.txType == PoolTransactionType.JOIN) { + PoolJoin memory join = abi.decode(poolTx.data, (PoolJoin)); + processJoin(ctx, join, poolTx.signature); + } else if (poolTx.txType == PoolTransactionType.EXIT) { + PoolExit memory exit = abi.decode(poolTx.data, (PoolExit)); + processExit(ctx, exit, poolTx.signature); + } + } + + // Deposit/Withdraw to/from the AMM account when necessary + for (uint i = 0; i < tokens.length; i++) { + if (ctx.ammBalances[i] > ctx.ammBalancesInAccount[i]) { + uint amount = ctx.ammBalances[i] - ctx.ammBalancesInAccount[i]; + processDeposit(ctx, tokens[i], amount); + } else if (ctx.ammBalancesInAccount[i] > ctx.ammBalances[i]) { + uint amount = ctx.ammBalancesInAccount[i] - ctx.ammBalances[i]; + processWithdrawal(ctx, tokens[i], amount); + } + } + + // The ending AMM updates + processAmmUpdates(ctx, false); + + emit QueueItemsProcessed(poolTransactions.length); + return ctx.numTransactionsConsumed; + } + + function totalSupply() + public + view + returns (uint256) + { + return poolSupply; + } + + function mint(address owner, uint amount) + internal + { + poolSupply = poolSupply.add(amount); + poolBalance[owner] = poolBalance[owner].add(amount); + } + + function burn(address owner, uint amount) + internal + { + poolSupply = poolSupply.sub(amount); + poolBalance[owner] = poolBalance[owner].sub(amount); + } + + function processAmmUpdates( + Context memory ctx, + bool start + ) + internal + { for (uint i = 0; i < tokens.length; i++) { // Check that the AMM update in the block matches the expected update - AmmUpdateTransaction.AmmUpdate memory update = _block.readAmmUpdate(txIdx++); + AmmUpdateTransaction.AmmUpdate memory update = ctx._block.readAmmUpdate(ctx.txIdx++); require(update.owner == address(this), "INVALID_TX_DATA"); require(update.accountID == accountID, "INVALID_TX_DATA"); require(update.tokenID == tokens[i].tokenID, "INVALID_TX_DATA"); require(update.feeBips == feeBips, "INVALID_TX_DATA"); - require(update.tokenWeight == tokens[i].weight, "INVALID_TX_DATA"); + require(update.tokenWeight == (start ? 0 : tokens[i].weight), "INVALID_TX_DATA"); // Now approve this AMM update update.validUntil = 0xffffffff; - bytes32 txHash = AmmUpdateTransaction.hashTx(exchangeDomainSeparator, update); + bytes32 txHash = AmmUpdateTransaction.hashTx(ctx.exchangeDomainSeparator, update); exchange.approveTransaction(address(this), txHash); - numTransactionsConsumed++; - // AMM account balance now available onchain - ammBalancesInAccount[i] = update.balance; - ammBalances[i] = ammBalancesInAccount[i]; + ctx.numTransactionsConsumed++; + if (start) { + // AMM account balance now available onchain + ctx.ammBalancesInAccount[i] = update.balance; + ctx.ammBalances[i] = ctx.ammBalancesInAccount[i]; + } } + } - // Process work in the queue - for (uint n = queuePos; n < queuePos + auxData.numItems; n++) { - QueueItem memory item = queue[n]; - // TODO: all the necessary pool logic, mint/burn LP tokens,... - if (item.workType == WorkType.JOIN) { - PoolJoin memory join = item.join; - for (uint i = 0; i < tokens.length; i++) { - uint amount = join.maxAmountsIn[i]; - ammBalances[i] = ammBalances[i].add(amount); - // Unlock the amount locked for this join - locked[item.owner][tokens[i].addr] = locked[item.owner][tokens[i].addr].sub(join.maxAmountsIn[i]); - // Make the amount unavailable for withdrawing - balance[item.owner][tokens[i].addr] = balance[item.owner][tokens[i].addr].sub(amount); - } - } else if (item.workType == WorkType.EXIT) { - PoolExit memory exit = item.exit; - for (uint i = 0; i < tokens.length; i++) { - uint amount = exit.minAmountsOut[i]; - ammBalances[i] = ammBalances[i].sub(amount); - // Make the amount available for withdrawing - balance[item.owner][tokens[i].addr] = balance[item.owner][tokens[i].addr].add(amount); - } - } - // Clean up the queue item to get the gas refund - delete queue[n]; + function processJoin( + Context memory ctx, + PoolJoin memory join, + bytes memory signature + ) + internal + { + bytes32 poolTxHash = hashPoolJoin(DOMAIN_SEPARATOR, join); + if (signature.length == 0) { + require(queue[queuePos].txHash == poolTxHash, "NOT_APPROVED"); + delete queue[queuePos]; + queuePos++; + } else { + require(poolTxHash.verifySignature(join.owner, signature), "INVALID_SIGNATURE"); + } + + uint poolTotal = totalSupply(); + uint ratio = BASE; + if (poolTotal > 0) { + ratio = (join.poolAmountOut * BASE) / poolTotal; + } else { + // Important for accuracy + require(join.poolAmountOut == INITIAL_SUPPLY, "INITIAL_SUPPLY_UNEXPECTED"); } - queuePos += auxData.numItems; - // Deposit/Withdraw to/from the AMM account when necessary for (uint i = 0; i < tokens.length; i++) { - if (ammBalances[i] > ammBalancesInAccount[i]) { - uint amount = ammBalances[i] - ammBalancesInAccount[i]; - // Check that the deposit in the block matches the expected deposit - DepositTransaction.Deposit memory _deposit = _block.readDeposit(txIdx++); - require(_deposit.owner == address(this), "INVALID_TX_DATA"); - require(_deposit.accountID == accountID, "INVALID_TX_DATA"); - require(_deposit.tokenID == tokens[i].tokenID, "INVALID_TX_DATA"); - require(_deposit.amount == amount, "INVALID_TX_DATA"); - // Now do this deposit - uint ethValue = 0; - if (tokens[i].addr == address(0)) { - ethValue = _deposit.amount; - } else { - // Approve the deposit transfer - ERC20(tokens[i].addr).approve(address(exchange.getDepositContract()), _deposit.amount); + uint amount = ctx.ammBalances[i] * ratio / BASE; + if (poolTotal == 0) { + amount = join.maxAmountsIn[i]; + } + require(amount <= join.maxAmountsIn[i], "LIMIT_IN"); + if (join.fromLayer2) { + TransferTransaction.Transfer memory transfer = ctx._block.readTransfer(ctx.txIdx++); + require(transfer.from == join.owner, "INVALID_TX_DATA"); + require(transfer.toAccountID == accountID, "INVALID_TX_DATA"); + require(transfer.tokenID == tokens[i].tokenID, "INVALID_TX_DATA"); + require(isAlmostEqual(transfer.amount, amount), "INVALID_TX_DATA"); + require(transfer.fee == 0, "INVALID_TX_DATA"); + if (signature.length != 0) { + // Now approve this transfer + transfer.validUntil = 0xffffffff; + bytes32 txHash = TransferTransaction.hashTx(ctx.exchangeDomainSeparator, transfer); + exchange.approveTransaction(join.owner, txHash); } - exchange.deposit{value: ethValue}( - _deposit.owner, - _deposit.owner, - tokens[i].addr, - uint96(_deposit.amount), - new bytes(0) - ); - numTransactionsConsumed++; - // Total balance in this contract decreases by the amount deposited - totalBalance[tokens[i].addr] = totalBalance[tokens[i].addr].sub(amount); - } else if (ammBalancesInAccount[i] > ammBalances[i]) { - uint amount = ammBalancesInAccount[i] - ammBalances[i]; - // Check that the withdrawal in the block matches the expected withdrawal - WithdrawTransaction.Withdrawal memory withdrawal = _block.readWithdrawal(txIdx++); - require(withdrawal.owner == address(this), "INVALID_TX_DATA"); - require(withdrawal.accountID == accountID, "INVALID_TX_DATA"); - require(withdrawal.tokenID == tokens[i].tokenID, "INVALID_TX_DATA"); - require(withdrawal.amount == amount, "INVALID_TX_DATA"); - require(withdrawal.feeTokenID == withdrawal.tokenID, "INVALID_TX_DATA"); - require(withdrawal.fee == 0, "INVALID_TX_DATA"); - withdrawal.minGas = 0; - withdrawal.to = address(this); - withdrawal.extraData = new bytes(0); - bytes20 onchainDataHash = WithdrawTransaction.hashOnchainData( - withdrawal.minGas, - withdrawal.to, - withdrawal.extraData - ); - require(withdrawal.onchainDataHash == onchainDataHash, "INVALID_TX_DATA"); - // Now approve this withdrawal + ctx.numTransactionsConsumed++; + // Update the balances in the account + ctx.ammBalancesInAccount[i] = ctx.ammBalancesInAccount[i].add(amount); + } else { + // Unlock the amount locked for this join + locked[join.owner][tokens[i].addr] = locked[join.owner][tokens[i].addr].sub(amount); + // Make the amount unavailable for withdrawing + balance[join.owner][tokens[i].addr] = balance[join.owner][tokens[i].addr].sub(amount); + } + ctx.ammBalances[i] = ctx.ammBalances[i].add(amount); + } + + // Mint liquidity tokens + mint(join.owner, join.poolAmountOut); + } + + function processExit( + Context memory ctx, + PoolExit memory exit, + bytes memory signature + ) + internal + { + bytes32 poolTxHash = hashPoolExit(DOMAIN_SEPARATOR, exit); + if (signature.length == 0) { + require(queue[queuePos].txHash == poolTxHash, "NOT_APPROVED"); + delete queue[queuePos]; + queuePos++; + } else { + require(poolTxHash.verifySignature(exit.owner, signature), "INVALID_SIGNATURE"); + } - withdrawal.validUntil = 0xffffffff; + uint poolTotal = totalSupply(); + uint ratio = (exit.poolAmountIn * BASE) / poolTotal; - bytes32 txHash = WithdrawTransaction.hashTx(exchangeDomainSeparator, withdrawal); + for (uint i = 0; i < tokens.length; i++) { + uint amount = ctx.ammBalances[i] * ratio / BASE; + require(amount >= exit.minAmountsOut[i], "LIMIT_OUT"); + if (exit.toLayer2) { + TransferTransaction.Transfer memory transfer = ctx._block.readTransfer(ctx.txIdx++); + require(transfer.fromAccountID == accountID, "INVALID_TX_DATA"); + require(transfer.from == address(this), "INVALID_TX_DATA"); + require(transfer.to == exit.owner, "INVALID_TX_DATA"); + require(transfer.tokenID == tokens[i].tokenID, "INVALID_TX_DATA"); + require(isAlmostEqual(transfer.amount, amount), "INVALID_TX_DATA"); + require(transfer.fee == 0, "INVALID_TX_DATA"); + // Now approve this transfer + transfer.validUntil = 0xffffffff; + bytes32 txHash = TransferTransaction.hashTx(ctx.exchangeDomainSeparator, transfer); exchange.approveTransaction(address(this), txHash); - numTransactionsConsumed++; - // Total balance in this contract increases by the amount withdrawn - totalBalance[tokens[i].addr] = totalBalance[tokens[i].addr].add(amount); + ctx.numTransactionsConsumed++; + // Update the balances in the account + ctx.ammBalancesInAccount[i] = ctx.ammBalancesInAccount[i].sub(amount); + } else { + // Make the amount available for withdrawing + balance[exit.owner][tokens[i].addr] = balance[exit.owner][tokens[i].addr].add(amount); } + ctx.ammBalances[i] = ctx.ammBalances[i].sub(amount); } - emit QueueItemsProcessed(auxData.numItems); + // Burn liquidity tokens + burn(exit.owner, exit.poolAmountIn); + } + + function processDeposit( + Context memory ctx, + Token memory token, + uint amount + ) + internal + { + // Check that the deposit in the block matches the expected deposit + DepositTransaction.Deposit memory _deposit = ctx._block.readDeposit(ctx.txIdx++); + require(_deposit.owner == address(this), "INVALID_TX_DATA"); + require(_deposit.accountID == accountID, "INVALID_TX_DATA"); + require(_deposit.tokenID == token.tokenID, "INVALID_TX_DATA"); + require(_deposit.amount == amount, "INVALID_TX_DATA"); + // Now do this deposit + uint ethValue = 0; + if (token.addr == address(0)) { + ethValue = _deposit.amount; + } else { + // Approve the deposit transfer + ERC20(token.addr).approve(address(exchange.getDepositContract()), _deposit.amount); + } + exchange.deposit{value: ethValue}( + _deposit.owner, + _deposit.owner, + token.addr, + uint96(_deposit.amount), + new bytes(0) + ); + ctx.numTransactionsConsumed++; + // Total balance in this contract decreases by the amount deposited + totalBalance[token.addr] = totalBalance[token.addr].sub(amount); + } + + function processWithdrawal( + Context memory ctx, + Token memory token, + uint amount + ) + internal + { + // Check that the withdrawal in the block matches the expected withdrawal + WithdrawTransaction.Withdrawal memory withdrawal = ctx._block.readWithdrawal(ctx.txIdx++); + require(withdrawal.owner == address(this), "INVALID_TX_DATA"); + require(withdrawal.accountID == accountID, "INVALID_TX_DATA"); + require(withdrawal.tokenID == token.tokenID, "INVALID_TX_DATA"); + require(withdrawal.amount == amount, "INVALID_TX_DATA"); + require(withdrawal.feeTokenID == withdrawal.tokenID, "INVALID_TX_DATA"); + require(withdrawal.fee == 0, "INVALID_TX_DATA"); + withdrawal.minGas = 0; + withdrawal.to = address(this); + withdrawal.extraData = new bytes(0); + bytes20 onchainDataHash = WithdrawTransaction.hashOnchainData( + withdrawal.minGas, + withdrawal.to, + withdrawal.extraData + ); + require(withdrawal.onchainDataHash == onchainDataHash, "INVALID_TX_DATA"); + // Now approve this withdrawal + withdrawal.validUntil = 0xffffffff; + bytes32 txHash = WithdrawTransaction.hashTx(ctx.exchangeDomainSeparator, withdrawal); + exchange.approveTransaction(address(this), txHash); + ctx.numTransactionsConsumed++; + // Total balance in this contract increases by the amount withdrawn + totalBalance[token.addr] = totalBalance[token.addr].add(amount); + } + + function hashPoolJoin( + bytes32 _DOMAIN_SEPARATOR, + PoolJoin memory join + ) + internal + pure + returns (bytes32) + { + return EIP712.hashPacked( + _DOMAIN_SEPARATOR, + keccak256( + abi.encode( + POOLJOIN_TYPEHASH, + join.owner, + join.fromLayer2, + join.poolAmountOut, + keccak256(abi.encodePacked(join.maxAmountsIn)) + ) + ) + ); + } + + function hashPoolExit( + bytes32 _DOMAIN_SEPARATOR, + PoolExit memory exit + ) + internal + pure + returns (bytes32) + { + return EIP712.hashPacked( + _DOMAIN_SEPARATOR, + keccak256( + abi.encode( + POOLEXIT_TYPEHASH, + exit.owner, + exit.toLayer2, + exit.poolAmountIn, + keccak256(abi.encodePacked(exit.minAmountsOut)) + ) + ) + ); + } + + function isAlmostEqual( + uint amount, + uint targetAmount + ) + internal + pure + returns (bool) + { + if (targetAmount == 0) { + return amount == 0; + } else { + // Max rounding error for a float24 is 2/100000 + uint ratio = (amount * 100000) / targetAmount; + return (100000 - 2) <= ratio && ratio <= (100000 + 2); + } } } diff --git a/packages/loopring_v3/operator/create_block.py b/packages/loopring_v3/operator/create_block.py index bd207886c..c308e1e24 100644 --- a/packages/loopring_v3/operator/create_block.py +++ b/packages/loopring_v3/operator/create_block.py @@ -75,6 +75,7 @@ def transferFromJSON(jTransfer): transfer.payerTo = str(jTransfer["payerTo"]) transfer.payeeToAccountID = int(jTransfer["payeeToAccountID"]) transfer.maxFee = str(jTransfer["maxFee"]) + transfer.putAddressesInDA = bool(jTransfer["putAddressesInDA"]) transfer.signature = None transfer.dualSignature = None transfer.onchainSignature = None diff --git a/packages/loopring_v3/test/testAMMPool.ts b/packages/loopring_v3/test/testAMMPool.ts index a66953e71..17acd975d 100644 --- a/packages/loopring_v3/test/testAMMPool.ts +++ b/packages/loopring_v3/test/testAMMPool.ts @@ -3,21 +3,135 @@ import { Constants, Signature } from "loopringV3.js"; import { expectThrow } from "./expectThrow"; import { BlockCallback, ExchangeTestUtil } from "./testExchangeUtil"; import { AuthMethod, OrderInfo, SpotTrade } from "./types"; +import * as sigUtil from "eth-sig-util"; +import { SignatureType, sign, verifySignature } from "../util/Signature"; + +const AgentRegistry = artifacts.require("AgentRegistry"); + +export enum PoolTransactionType { + NOOP, + JOIN, + EXIT +} export interface PoolJoin { - workType?: "PoolJoin"; + txType?: "Join"; + owner: string; + fromLayer2: boolean; poolAmountOut: BN; maxAmountsIn: BN[]; + signature?: string; } export interface PoolExit { - workType?: "PoolExit"; + txType?: "Exit"; + owner: string; + toLayer2: boolean; poolAmountIn: BN; minAmountsOut: BN[]; + signature?: string; +} + +export interface PoolTransaction { + txType: number; + data: string; + signature: string; +} + +export interface AuxiliaryData { + poolTransactions: PoolTransaction[]; +} + +export interface JoinOptions { + authMethod?: AuthMethod; +} + +export interface ExitOptions { + authMethod?: AuthMethod; } type TxType = PoolJoin | PoolExit; +export namespace PoolJoinUtils { + export function toTypedData(join: PoolJoin, verifyingContract: string) { + const typedData = { + types: { + EIP712Domain: [ + { name: "name", type: "string" }, + { name: "version", type: "string" }, + { name: "chainId", type: "uint256" }, + { name: "verifyingContract", type: "address" } + ], + PoolJoin: [ + { name: "owner", type: "address" }, + { name: "fromLayer2", type: "bool" }, + { name: "poolAmountOut", type: "uint256" }, + { name: "maxAmountsIn", type: "uint256[]" } + ] + }, + primaryType: "PoolJoin", + domain: { + name: "AMM Pool", + version: "1.0.0", + chainId: new BN(/*await web3.eth.net.getId()*/ 1), + verifyingContract + }, + message: { + owner: join.owner, + fromLayer2: join.fromLayer2, + poolAmountOut: join.poolAmountOut, + maxAmountsIn: join.maxAmountsIn + } + }; + return typedData; + } + + export function getHash(join: PoolJoin, verifyingContract: string) { + const typedData = this.toTypedData(join, verifyingContract); + return sigUtil.TypedDataUtils.sign(typedData); + } +} + +export namespace PoolExitUtils { + export function toTypedData(exit: PoolExit, verifyingContract: string) { + const typedData = { + types: { + EIP712Domain: [ + { name: "name", type: "string" }, + { name: "version", type: "string" }, + { name: "chainId", type: "uint256" }, + { name: "verifyingContract", type: "address" } + ], + PoolExit: [ + { name: "owner", type: "address" }, + { name: "toLayer2", type: "bool" }, + { name: "poolAmountIn", type: "uint256" }, + { name: "minAmountsOut", type: "uint256[]" } + ] + }, + primaryType: "PoolExit", + domain: { + name: "AMM Pool", + version: "1.0.0", + chainId: new BN(/*await web3.eth.net.getId()*/ 1), + verifyingContract + }, + message: { + owner: exit.owner, + toLayer2: exit.toLayer2, + poolAmountIn: exit.poolAmountIn, + minAmountsOut: exit.minAmountsOut + } + }; + return typedData; + } + + export function getHash(exit: PoolExit, verifyingContract: string) { + const typedData = this.toTypedData(exit, verifyingContract); + return sigUtil.TypedDataUtils.sign(typedData); + } +} + export class AmmPool { public ctx: ExchangeTestUtil; public contract: any; @@ -26,8 +140,12 @@ export class AmmPool { public tokens: string[]; public weights: BN[]; - public queue: TxType[]; + public BASE: BN = new BN(web3.utils.toWei("1", "ether")); + public INITIAL_SUPPLY: BN = new BN(web3.utils.toWei("100", "ether")); + + public totalSupply: BN; + public queue: TxType[]; constructor(ctx: ExchangeTestUtil) { this.ctx = ctx; this.queue = []; @@ -38,6 +156,8 @@ export class AmmPool { this.tokens = tokens; this.weights = weights; + this.totalSupply = new BN(0); + const AmmPool = artifacts.require("AmmPool"); this.contract = await AmmPool.new(); @@ -80,27 +200,70 @@ export class AmmPool { } } } - await this.contract.deposit(amounts, { value, from: owner }); } - public async join(owner: string, poolAmountOut: BN, maxAmountsIn: BN[]) { - await this.contract.joinPool(poolAmountOut, maxAmountsIn, { from: owner }); + public async join( + owner: string, + poolAmountOut: BN, + maxAmountsIn: BN[], + fromLayer2: boolean, + options: JoinOptions = {} + ) { + // Fill in defaults + const authMethod = + options.authMethod !== undefined ? options.authMethod : AuthMethod.ECDSA; + const poolJoin: PoolJoin = { - workType: "PoolJoin", + txType: "Join", + owner, + fromLayer2, poolAmountOut, maxAmountsIn }; + + if (authMethod === AuthMethod.APPROVE) { + await this.contract.joinPool(poolAmountOut, maxAmountsIn, { + from: owner + }); + } else if (authMethod === AuthMethod.ECDSA) { + const hash = PoolJoinUtils.getHash(poolJoin, this.contract.address); + poolJoin.signature = await sign(owner, hash, SignatureType.EIP_712); + await verifySignature(owner, hash, poolJoin.signature); + } + this.queue.push(poolJoin); } - public async exit(owner: string, poolAmountIn: BN, minAmountsOut: BN[]) { - await this.contract.exitPool(poolAmountIn, minAmountsOut, { from: owner }); + public async exit( + owner: string, + poolAmountIn: BN, + minAmountsOut: BN[], + toLayer2: boolean, + options: ExitOptions = {} + ) { + // Fill in defaults + const authMethod = + options.authMethod !== undefined ? options.authMethod : AuthMethod.ECDSA; + const poolExit: PoolExit = { - workType: "PoolExit", + txType: "Exit", + owner, + toLayer2, poolAmountIn, minAmountsOut }; + + if (authMethod === AuthMethod.APPROVE) { + await this.contract.exitPool(poolAmountIn, minAmountsOut, toLayer2, { + from: owner + }); + } else if (authMethod === AuthMethod.ECDSA) { + const hash = PoolExitUtils.getHash(poolExit, this.contract.address); + poolExit.signature = await sign(owner, hash, SignatureType.EIP_712); + await verifySignature(owner, hash, poolExit.signature); + } + this.queue.push(poolExit); } @@ -110,7 +273,9 @@ export class AmmPool { maxAmountsIn: BN[] ) { await this.deposit(owner, maxAmountsIn); - await this.join(owner, poolAmountOut, maxAmountsIn); + await this.join(owner, poolAmountOut, maxAmountsIn, false, { + authMethod: AuthMethod.APPROVE + }); } public async process() { @@ -127,7 +292,7 @@ export class AmmPool { owner, this.tokens[i], this.feeBips, - this.weights[i], + /*this.weights[i]*/ new BN(0), { authMethod: AuthMethod.NONE } ); ammBalancesInAccount.push( @@ -138,20 +303,89 @@ export class AmmPool { ); } + const poolTransactions: PoolTransaction[] = []; + // Process work in the queue for (const item of this.queue) { - if (item.workType === "PoolJoin") { + if (item.txType === "Join") { + const join = item; + + // Calculate expected amounts for specified liquidity tokens + const poolTotal = this.totalSupply; + let ratio = this.BASE; + if (poolTotal.gt(new BN(0))) { + ratio = join.poolAmountOut.mul(this.BASE).div(poolTotal); + } else { + assert( + join.poolAmountOut.eq(this.INITIAL_SUPPLY), + "INITIAL_SUPPLY_UNEXPECTED" + ); + } + for (let i = 0; i < this.tokens.length; i++) { - const amount = item.maxAmountsIn[i]; + let amount = ammBalances[i].mul(ratio).div(this.BASE); + if (poolTotal.eq(new BN(0))) { + amount = join.maxAmountsIn[i]; + } + if (join.fromLayer2) { + await this.ctx.transfer( + join.owner, + owner, + this.tokens[i], + amount, + this.tokens[i], + new BN(0), + { authMethod: AuthMethod.NONE, amountToDeposit: new BN(0) } + ); + ammBalancesInAccount[i] = ammBalancesInAccount[i].add(amount); + } ammBalances[i] = ammBalances[i].add(amount); - console.log("pool join: " + amount.toString(10)); + console.log( + "pool join: " + + amount.toString(10) + + " (L" + + (join.fromLayer2 ? 2 : 1) + + ")" + ); } - } else if (item.workType === "PoolExit") { + poolTransactions.push({ + txType: PoolTransactionType.JOIN, + data: this.getPoolJoinAuxData(join), + signature: join.signature + }); + poolTotal.iadd(join.poolAmountOut); + } else if (item.txType === "Exit") { + const exit = item; + + const poolTotal = this.totalSupply; + const ratio = exit.poolAmountIn.mul(this.BASE).div(poolTotal); + for (let i = 0; i < this.tokens.length; i++) { - const amount = item.minAmountsOut[i]; + const amount = ammBalances[i].mul(ratio).div(this.BASE); + if (exit.toLayer2) { + await this.ctx.transfer( + owner, + exit.owner, + this.tokens[i], + amount, + this.tokens[i], + new BN(0), + { + authMethod: AuthMethod.NONE, + amountToDeposit: new BN(0), + transferToNew: true + } + ); + ammBalancesInAccount[i] = ammBalancesInAccount[i].sub(amount); + } ammBalances[i] = ammBalances[i].sub(amount); console.log("pool exit: " + amount.toString(10)); } + poolTransactions.push({ + txType: PoolTransactionType.EXIT, + data: this.getPoolExitAuxData(exit), + signature: exit.signature + }); } } @@ -175,13 +409,22 @@ export class AmmPool { } } - const numItems = this.queue.length; + // Re-enable weights + for (let i = 0; i < this.tokens.length; i++) { + await this.ctx.requestAmmUpdate( + owner, + this.tokens[i], + this.feeBips, + this.weights[i], + { authMethod: AuthMethod.NONE } + ); + } + this.queue = []; - console.log("queue: " + numItems); - const auxiliaryData = web3.eth.abi.encodeParameter("tuple(uint256)", [ - numItems - ]); + console.log(poolTransactions); + const auxiliaryData = this.getAuxiliaryData(poolTransactions); + //console.log(auxiliaryData); const blockCallbacks: BlockCallback[] = []; blockCallbacks.push({ target: owner, @@ -192,11 +435,51 @@ export class AmmPool { await this.ctx.submitTransactions(); await this.ctx.submitPendingBlocks(blockCallbacks); } + + public getPoolJoinAuxData(join: PoolJoin) { + const amounts: string[] = []; + for (const amount of join.maxAmountsIn) { + amounts.push(amount.toString(10)); + } + return web3.eth.abi.encodeParameter( + "tuple(address,bool,uint256,uint256[])", + [join.owner, join.fromLayer2, join.poolAmountOut.toString(10), amounts] + ); + } + + public getPoolExitAuxData(exit: PoolExit) { + const amounts: string[] = []; + for (const amount of exit.minAmountsOut) { + amounts.push(amount.toString(10)); + } + return web3.eth.abi.encodeParameter( + "tuple(address,bool,uint256,uint256[])", + [exit.owner, exit.toLayer2, exit.poolAmountIn.toString(10), amounts] + ); + } + + public getAuxiliaryData(txs: PoolTransaction[]) { + const auxiliaryData: any[] = []; + for (const tx of txs) { + auxiliaryData.push([ + tx.txType, + web3.utils.hexToBytes(tx.data), + web3.utils.hexToBytes(tx.signature ? tx.signature : "0x") + ]); + } + return web3.eth.abi.encodeParameter( + "tuple(uint256,bytes,bytes)[]", + auxiliaryData + ); + } } contract("AMM Pool", (accounts: string[]) => { let ctx: ExchangeTestUtil; + let agentRegistry: any; + let registryOwner: string; + before(async () => { ctx = new ExchangeTestUtil(); await ctx.initialize(accounts); @@ -211,6 +494,16 @@ contract("AMM Pool", (accounts: string[]) => { await ctx.createExchange(ctx.testContext.stateOwners[0], { setupTestState: true }); + + // Create the agent registry + registryOwner = accounts[7]; + agentRegistry = await AgentRegistry.new({ from: registryOwner }); + + // Register it on the exchange contract + const wrapper = await ctx.contracts.ExchangeV3.at(ctx.operator.address); + await wrapper.setAgentRegistry(agentRegistry.address, { + from: ctx.exchangeOwner + }); }); describe("AMM", function() { @@ -218,6 +511,7 @@ contract("AMM Pool", (accounts: string[]) => { it.only("Successful swap (AMM maker)", async () => { const ownerA = ctx.testContext.orderOwners[10]; + const ownerB = ctx.testContext.orderOwners[11]; const feeBipsAMM = 30; const tokens = ["WETH", "GTO"]; @@ -226,18 +520,42 @@ contract("AMM Pool", (accounts: string[]) => { new BN(web3.utils.toWei("1", "ether")) ]; + for (const token of tokens) { + await ctx.deposit( + ownerB, + ownerB, + token, + new BN( + web3.utils.toWei(token === "WETH" ? "10000" : "20000", "ether") + ) + ); + } + const pool = new AmmPool(ctx); await pool.setupPool(tokens, weights, feeBipsAMM); - await pool.depositAndJoin( + await agentRegistry.registerUniversalAgent(pool.contract.address, true, { + from: registryOwner + }); + + /*await pool.depositAndJoin( ownerA, new BN(web3.utils.toWei("1", "ether")), [ new BN(web3.utils.toWei("10000", "ether")), new BN(web3.utils.toWei("20000", "ether")) ] + );*/ + await pool.join( + ownerB, + new BN(web3.utils.toWei("100", "ether")), + [ + new BN(web3.utils.toWei("10000", "ether")), + new BN(web3.utils.toWei("20000", "ether")) + ], + true, + { authMethod: AuthMethod.ECDSA } ); - await pool.process(); const ring: SpotTrade = { @@ -274,10 +592,16 @@ contract("AMM Pool", (accounts: string[]) => { await ctx.submitTransactions(); await ctx.submitPendingBlocks(); - await pool.exit(ownerA, new BN(web3.utils.toWei("1", "ether")), [ - new BN(web3.utils.toWei("5000", "ether")), - new BN(web3.utils.toWei("10000", "ether")) - ]); + await pool.exit( + ownerB, + new BN(web3.utils.toWei("60", "ether")), + [ + new BN(web3.utils.toWei("5000", "ether")), + new BN(web3.utils.toWei("10000", "ether")) + ], + true, + { authMethod: AuthMethod.ECDSA } + ); await pool.process(); }); }); diff --git a/packages/loopring_v3/test/testExchangeUtil.ts b/packages/loopring_v3/test/testExchangeUtil.ts index 1c92164a4..9c9bd8029 100644 --- a/packages/loopring_v3/test/testExchangeUtil.ts +++ b/packages/loopring_v3/test/testExchangeUtil.ts @@ -11,10 +11,6 @@ import { SignatureType, sign, verifySignature } from "../util/Signature"; import { Bitstream, BlockType, - calculateCalldataCost, - compress, - compressLZ, - decompressLZ, compressZeros, CompressionType, Constants, @@ -27,10 +23,9 @@ import { WithdrawFromMerkleTreeData } from "loopringV3.js"; import { Context } from "./context"; -import { expectThrow } from "./expectThrow"; import { doDebugLogging, logDebug, logInfo } from "./logs"; import * as sigUtil from "eth-sig-util"; -import { Simulator, AccountLeaf } from "./simulator"; +import { Simulator } from "./simulator"; import { ExchangeTestContext } from "./testExchangeContext"; import { Account, @@ -110,6 +105,7 @@ export interface TransferOptions { validUntil?: number; storageID?: number; maxFee?: BN; + putAddressesInDA?: boolean; } export interface WithdrawOptions { @@ -705,9 +701,13 @@ export class ExchangeTestUtil { ? options.storageID : this.storageIDGenerator++; const maxFee = options.maxFee !== undefined ? options.maxFee : fee; + const putAddressesInDA = + options.putAddressesInDA !== undefined ? options.putAddressesInDA : false; // From - await this.deposit(from, from, token, amountToDeposit); + if (amountToDeposit.gt(new BN(0))) { + await this.deposit(from, from, token, amountToDeposit); + } if (feeToDeposit.gt(new BN(0))) { await this.deposit(from, from, feeToken, feeToDeposit); } @@ -770,6 +770,7 @@ export class ExchangeTestUtil { to, type: authMethod === AuthMethod.EDDSA ? 0 : 1, validUntil, + putAddressesInDA, dualAuthorX, dualAuthorY, payerToAccountID: useDualAuthoring ? 0 : toAccountID, @@ -2207,14 +2208,15 @@ export class ExchangeTestUtil { (transfer.storageID % Constants.NUM_STORAGE_SLOTS), 2 ); - da.addBN( - new BN( - transfer.type > 0 || transfer.toNewAccount ? transfer.to : "0" - ), - 20 - ); + const needsToAddress = + transfer.type > 0 || + transfer.toNewAccount || + transfer.putAddressesInDA; + da.addBN(new BN(needsToAddress ? transfer.to : "0"), 20); da.addNumber(transfer.type > 0 ? transfer.storageID : 0, 4); - da.addBN(new BN(transfer.type > 0 ? transfer.from : "0"), 20); + const needsFromAddress = + transfer.type > 0 || transfer.putAddressesInDA; + da.addBN(new BN(needsFromAddress ? transfer.from : "0"), 20); } else if (tx.withdraw) { const withdraw = tx.withdraw; da.addNumber(TransactionType.WITHDRAWAL, 1); @@ -2663,7 +2665,8 @@ export class ExchangeTestUtil { ); } - public async getOffchainBalance(accountID: number, token: string) { + public async getOffchainBalance(owner: string, token: string) { + const accountID = this.getAccountID(owner); const tokenID = this.getTokenIdFromNameOrAddress(token); const latestBlockIdx = this.blocks[this.exchangeId].length - 1; const state = await Simulator.loadExchangeState( @@ -2717,7 +2720,7 @@ export class ExchangeTestUtil { } const balance = await this.getOffchainBalance( - accountID, + this.getAccount(accountID).owner, this.getTokenAddressFromID(tokenID) ); assert( diff --git a/packages/loopring_v3/test/types.ts b/packages/loopring_v3/test/types.ts index 24ce1070d..12af1178d 100644 --- a/packages/loopring_v3/test/types.ts +++ b/packages/loopring_v3/test/types.ts @@ -129,6 +129,8 @@ export class Transfer { storageID: number; validUntil: number; + putAddressesInDA: boolean; + dualSecretKey?: string; signature?: Signature; From 6e9513a9f91b12aca725e32dcc8eb9b3f9e8afeb Mon Sep 17 00:00:00 2001 From: Brechtpd Date: Mon, 14 Sep 2020 23:08:34 +0200 Subject: [PATCH 04/14] [protocol 3.6] Small optimizations --- .../core/impl/libtransactions/BlockReader.sol | 2 +- .../loopring_v3/contracts/test/AmmPool.sol | 56 ++++++++++--------- 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/packages/loopring_v3/contracts/core/impl/libtransactions/BlockReader.sol b/packages/loopring_v3/contracts/core/impl/libtransactions/BlockReader.sol index d08b0174f..0f03bdf8e 100644 --- a/packages/loopring_v3/contracts/core/impl/libtransactions/BlockReader.sol +++ b/packages/loopring_v3/contracts/core/impl/libtransactions/BlockReader.sol @@ -23,7 +23,7 @@ library BlockReader { uint32 timestamp; uint8 protocolTakerFeeBips; uint8 protocolMakerFeeBips; - uint numConditionalTransactions; + uint32 numConditionalTransactions; uint32 operatorAccountID; } diff --git a/packages/loopring_v3/contracts/test/AmmPool.sol b/packages/loopring_v3/contracts/test/AmmPool.sol index 7f95cf306..3ee1e40ee 100644 --- a/packages/loopring_v3/contracts/test/AmmPool.sol +++ b/packages/loopring_v3/contracts/test/AmmPool.sol @@ -84,16 +84,6 @@ contract AmmPool is IBlockReceiver { EXIT } - struct Context - { - ExchangeData.Block _block; - uint txIdx; - bytes32 exchangeDomainSeparator; - uint[] ammBalancesInAccount; - uint[] ammBalances; - uint numTransactionsConsumed; - } - struct PoolJoin { address owner; @@ -131,6 +121,18 @@ contract AmmPool is IBlockReceiver { uint16 tokenID; } + struct Context + { + ExchangeData.Block _block; + uint txIdx; + bytes32 DOMAIN_SEPARATOR; + bytes32 exchangeDomainSeparator; + uint[] ammBalancesInAccount; + uint[] ammBalances; + uint numTransactionsConsumed; + Token[] tokens; + } + uint8 public feeBips; Token[] public tokens; @@ -406,10 +408,12 @@ contract AmmPool is IBlockReceiver { Context memory ctx = Context({ _block: _block, txIdx: txIdx, + DOMAIN_SEPARATOR: DOMAIN_SEPARATOR, exchangeDomainSeparator: exchange.getDomainSeparator(), ammBalancesInAccount: new uint[](tokens.length), ammBalances: new uint[](tokens.length), - numTransactionsConsumed: 0 + numTransactionsConsumed: 0, + tokens: tokens }); BlockReader.BlockHeader memory header = _block.readHeader(); @@ -432,13 +436,13 @@ contract AmmPool is IBlockReceiver { } // Deposit/Withdraw to/from the AMM account when necessary - for (uint i = 0; i < tokens.length; i++) { + for (uint i = 0; i < ctx.tokens.length; i++) { if (ctx.ammBalances[i] > ctx.ammBalancesInAccount[i]) { uint amount = ctx.ammBalances[i] - ctx.ammBalancesInAccount[i]; - processDeposit(ctx, tokens[i], amount); + processDeposit(ctx, ctx.tokens[i], amount); } else if (ctx.ammBalancesInAccount[i] > ctx.ammBalances[i]) { uint amount = ctx.ammBalancesInAccount[i] - ctx.ammBalances[i]; - processWithdrawal(ctx, tokens[i], amount); + processWithdrawal(ctx, ctx.tokens[i], amount); } } @@ -477,14 +481,14 @@ contract AmmPool is IBlockReceiver { ) internal { - for (uint i = 0; i < tokens.length; i++) { + for (uint i = 0; i < ctx.tokens.length; i++) { // Check that the AMM update in the block matches the expected update AmmUpdateTransaction.AmmUpdate memory update = ctx._block.readAmmUpdate(ctx.txIdx++); require(update.owner == address(this), "INVALID_TX_DATA"); require(update.accountID == accountID, "INVALID_TX_DATA"); - require(update.tokenID == tokens[i].tokenID, "INVALID_TX_DATA"); + require(update.tokenID == ctx.tokens[i].tokenID, "INVALID_TX_DATA"); require(update.feeBips == feeBips, "INVALID_TX_DATA"); - require(update.tokenWeight == (start ? 0 : tokens[i].weight), "INVALID_TX_DATA"); + require(update.tokenWeight == (start ? 0 : ctx.tokens[i].weight), "INVALID_TX_DATA"); // Now approve this AMM update update.validUntil = 0xffffffff; bytes32 txHash = AmmUpdateTransaction.hashTx(ctx.exchangeDomainSeparator, update); @@ -505,7 +509,7 @@ contract AmmPool is IBlockReceiver { ) internal { - bytes32 poolTxHash = hashPoolJoin(DOMAIN_SEPARATOR, join); + bytes32 poolTxHash = hashPoolJoin(ctx.DOMAIN_SEPARATOR, join); if (signature.length == 0) { require(queue[queuePos].txHash == poolTxHash, "NOT_APPROVED"); delete queue[queuePos]; @@ -523,7 +527,7 @@ contract AmmPool is IBlockReceiver { require(join.poolAmountOut == INITIAL_SUPPLY, "INITIAL_SUPPLY_UNEXPECTED"); } - for (uint i = 0; i < tokens.length; i++) { + for (uint i = 0; i < ctx.tokens.length; i++) { uint amount = ctx.ammBalances[i] * ratio / BASE; if (poolTotal == 0) { amount = join.maxAmountsIn[i]; @@ -533,7 +537,7 @@ contract AmmPool is IBlockReceiver { TransferTransaction.Transfer memory transfer = ctx._block.readTransfer(ctx.txIdx++); require(transfer.from == join.owner, "INVALID_TX_DATA"); require(transfer.toAccountID == accountID, "INVALID_TX_DATA"); - require(transfer.tokenID == tokens[i].tokenID, "INVALID_TX_DATA"); + require(transfer.tokenID == ctx.tokens[i].tokenID, "INVALID_TX_DATA"); require(isAlmostEqual(transfer.amount, amount), "INVALID_TX_DATA"); require(transfer.fee == 0, "INVALID_TX_DATA"); if (signature.length != 0) { @@ -547,9 +551,9 @@ contract AmmPool is IBlockReceiver { ctx.ammBalancesInAccount[i] = ctx.ammBalancesInAccount[i].add(amount); } else { // Unlock the amount locked for this join - locked[join.owner][tokens[i].addr] = locked[join.owner][tokens[i].addr].sub(amount); + locked[join.owner][ctx.tokens[i].addr] = locked[join.owner][ctx.tokens[i].addr].sub(amount); // Make the amount unavailable for withdrawing - balance[join.owner][tokens[i].addr] = balance[join.owner][tokens[i].addr].sub(amount); + balance[join.owner][ctx.tokens[i].addr] = balance[join.owner][ctx.tokens[i].addr].sub(amount); } ctx.ammBalances[i] = ctx.ammBalances[i].add(amount); } @@ -565,7 +569,7 @@ contract AmmPool is IBlockReceiver { ) internal { - bytes32 poolTxHash = hashPoolExit(DOMAIN_SEPARATOR, exit); + bytes32 poolTxHash = hashPoolExit(ctx.DOMAIN_SEPARATOR, exit); if (signature.length == 0) { require(queue[queuePos].txHash == poolTxHash, "NOT_APPROVED"); delete queue[queuePos]; @@ -577,7 +581,7 @@ contract AmmPool is IBlockReceiver { uint poolTotal = totalSupply(); uint ratio = (exit.poolAmountIn * BASE) / poolTotal; - for (uint i = 0; i < tokens.length; i++) { + for (uint i = 0; i < ctx.tokens.length; i++) { uint amount = ctx.ammBalances[i] * ratio / BASE; require(amount >= exit.minAmountsOut[i], "LIMIT_OUT"); if (exit.toLayer2) { @@ -585,7 +589,7 @@ contract AmmPool is IBlockReceiver { require(transfer.fromAccountID == accountID, "INVALID_TX_DATA"); require(transfer.from == address(this), "INVALID_TX_DATA"); require(transfer.to == exit.owner, "INVALID_TX_DATA"); - require(transfer.tokenID == tokens[i].tokenID, "INVALID_TX_DATA"); + require(transfer.tokenID == ctx.tokens[i].tokenID, "INVALID_TX_DATA"); require(isAlmostEqual(transfer.amount, amount), "INVALID_TX_DATA"); require(transfer.fee == 0, "INVALID_TX_DATA"); // Now approve this transfer @@ -597,7 +601,7 @@ contract AmmPool is IBlockReceiver { ctx.ammBalancesInAccount[i] = ctx.ammBalancesInAccount[i].sub(amount); } else { // Make the amount available for withdrawing - balance[exit.owner][tokens[i].addr] = balance[exit.owner][tokens[i].addr].add(amount); + balance[exit.owner][ctx.tokens[i].addr] = balance[exit.owner][ctx.tokens[i].addr].add(amount); } ctx.ammBalances[i] = ctx.ammBalances[i].sub(amount); } From d52f9efbce94fcff223097edb6376cbcdc67ada6 Mon Sep 17 00:00:00 2001 From: Brechtpd Date: Thu, 17 Sep 2020 23:59:04 +0200 Subject: [PATCH 05/14] [protocol 3.6] Misc improvements/fixes AMM pool --- packages/loopring_v3.js/src/exchange_v3.ts | 14 +- .../aux/access/LoopringIOExchangeOwner.sol | 61 ++-- .../aux/compression/ZeroDecompressor.sol | 9 +- .../loopring_v3/contracts/test/AmmPool.sol | 261 ++++++++++++------ .../test/ZeroDecompressorContract.sol | 2 +- packages/loopring_v3/operator/state.py | 12 +- packages/loopring_v3/test/testAMMPool.ts | 112 ++++++-- packages/loopring_v3/test/testExchangeUtil.ts | 19 +- 8 files changed, 332 insertions(+), 158 deletions(-) diff --git a/packages/loopring_v3.js/src/exchange_v3.ts b/packages/loopring_v3.js/src/exchange_v3.ts index fbbd05aaf..17a220eba 100644 --- a/packages/loopring_v3.js/src/exchange_v3.ts +++ b/packages/loopring_v3.js/src/exchange_v3.ts @@ -675,7 +675,7 @@ export class ExchangeV3 { // Get the block data from the transaction data //const submitBlocksFunctionSignature = "0x8dadd3af"; // submitBlocks - const submitBlocksFunctionSignature = "0x14867212"; // submitBlocksCompressed + const submitBlocksFunctionSignature = "0xdeaa355e"; // submitBlocksCompressed const transaction = await this.web3.eth.getTransaction( event.transactionHash @@ -683,7 +683,17 @@ export class ExchangeV3 { //console.log(transaction.input); if (transaction.input.startsWith(submitBlocksFunctionSignature)) { const decodedCompressedInput = this.web3.eth.abi.decodeParameters( - ["bytes"], + [ + "bytes", + { + "struct BlockCallback[]": { + target: "address", + blockIdx: "uint", + txIdx: "uint", + auxiliaryData: "bytes" + } + } + ], "0x" + transaction.input.slice(2 + 4 * 2) ); const data = decompressZeros(decodedCompressedInput[0]); diff --git a/packages/loopring_v3/contracts/aux/access/LoopringIOExchangeOwner.sol b/packages/loopring_v3/contracts/aux/access/LoopringIOExchangeOwner.sol index 94f182bdf..e031eca97 100644 --- a/packages/loopring_v3/contracts/aux/access/LoopringIOExchangeOwner.sol +++ b/packages/loopring_v3/contracts/aux/access/LoopringIOExchangeOwner.sol @@ -6,6 +6,7 @@ pragma experimental ABIEncoderV2; import "../../aux/compression/ZeroDecompressor.sol"; import "../../core/iface/IExchangeV3.sol"; import "../../thirdparty/BytesUtil.sol"; +import "../../lib/AddressUtil.sol"; import "../../lib/MathUint.sol"; import "./SelectorBasedAccessManager.sol"; import "./IBlockReceiver.sol"; @@ -13,8 +14,9 @@ import "./IBlockReceiver.sol"; contract LoopringIOExchangeOwner is SelectorBasedAccessManager { - using BytesUtil for bytes; - using MathUint for uint; + using AddressUtil for address; + using BytesUtil for bytes; + using MathUint for uint; bytes4 private constant SUBMITBLOCKS_SELECTOR = IExchangeV3.submitBlocks.selector; bool public open; @@ -34,7 +36,8 @@ contract LoopringIOExchangeOwner is SelectorBasedAccessManager } function submitBlocksCompressed( - bytes calldata data + bytes calldata data, + BlockCallback[] calldata callbacks ) external { @@ -42,26 +45,28 @@ contract LoopringIOExchangeOwner is SelectorBasedAccessManager hasAccessTo(msg.sender, SUBMITBLOCKS_SELECTOR) || open, "PERMISSION_DENIED" ); - bytes memory decompressed = ZeroDecompressor.decompress(data); + bytes memory decompressed = ZeroDecompressor.decompress(data, 0); require( decompressed.toBytes4(0) == SUBMITBLOCKS_SELECTOR, "INVALID_DATA" ); - address addr = target; - assembly { - let success := call(gas(), addr, 0, add(decompressed, 32), mload(decompressed), decompressed, 0) - if eq(success, 0) { - let size := returndatasize() - returndatacopy(decompressed, 0, returndatasize()) - revert(decompressed, size) + // Process the callback logic. + if (callbacks.length > 0) { + bytes memory blockData; + assembly { + blockData := add(decompressed, 4) } + ExchangeData.Block[] memory blocks = abi.decode(blockData, (ExchangeData.Block[])); + processCallbacks(blocks, callbacks); } + + target.fastCallAndVerify(gasleft(), 0, decompressed); } function submitBlocksWithCallbacks( ExchangeData.Block[] memory blocks, - BlockCallback[] memory callbacks + BlockCallback[] calldata callbacks ) external { @@ -71,6 +76,27 @@ contract LoopringIOExchangeOwner is SelectorBasedAccessManager ); // Process the callback logic. + processCallbacks(blocks, callbacks); + + // Finally submit the blocks + IExchangeV3(target).submitBlocks(blocks); + } + + function openAccessToSubmitBlocks(bool _open) + external + onlyOwner + { + open = _open; + emit SubmitBlocksAccessOpened(_open); + } + + + function processCallbacks( + ExchangeData.Block[] memory blocks, + BlockCallback[] calldata callbacks + ) + internal + { // Make sure all txs can only be used once uint txIdxLowerBound = 0; uint previousBlockIdx = 0; @@ -88,16 +114,5 @@ contract LoopringIOExchangeOwner is SelectorBasedAccessManager previousBlockIdx = callbacks[i].blockIdx; txIdxLowerBound = callbacks[i].txIdx.add(numTransactionsConsumed); } - - // Finally submit the blocks - IExchangeV3(target).submitBlocks(blocks); - } - - function openAccessToSubmitBlocks(bool _open) - external - onlyOwner - { - open = _open; - emit SubmitBlocksAccessOpened(_open); } } diff --git a/packages/loopring_v3/contracts/aux/compression/ZeroDecompressor.sol b/packages/loopring_v3/contracts/aux/compression/ZeroDecompressor.sol index d3abc8567..f77c3eaf9 100644 --- a/packages/loopring_v3/contracts/aux/compression/ZeroDecompressor.sol +++ b/packages/loopring_v3/contracts/aux/compression/ZeroDecompressor.sol @@ -13,18 +13,21 @@ pragma solidity ^0.7.0; library ZeroDecompressor { function decompress( - bytes calldata /*data*/ + bytes calldata /*data*/, + uint parameterIdx ) internal pure returns (bytes memory) { bytes memory uncompressed; + uint offsetPos = 4 + 32 * parameterIdx; assembly { uncompressed := mload(0x40) let ptr := add(uncompressed, 32) - let pos := 40 - let dataLength := add(calldataload(36), pos) + let offset := add(4, calldataload(offsetPos)) + let pos := add(offset, 4) + let dataLength := add(calldataload(offset), pos) let tupple := 0 let numDataBytes := 0 let numZeroBytes := 0 diff --git a/packages/loopring_v3/contracts/test/AmmPool.sol b/packages/loopring_v3/contracts/test/AmmPool.sol index 3ee1e40ee..7a3ee1852 100644 --- a/packages/loopring_v3/contracts/test/AmmPool.sol +++ b/packages/loopring_v3/contracts/test/AmmPool.sol @@ -31,11 +31,11 @@ contract AmmPool is IBlockReceiver { using SignatureUtil for bytes32; bytes32 constant public POOLJOIN_TYPEHASH = keccak256( - "PoolJoin(address owner,bool fromLayer2,uint256 poolAmountOut,uint256[] maxAmountsIn)" + "PoolJoin(address owner,bool fromLayer2,uint256 poolAmountOut,uint256[] maxAmountsIn,uint32[] storageIDs)" ); bytes32 constant public POOLEXIT_TYPEHASH = keccak256( - "PoolExit(address owner,bool toLayer2,uint256 poolAmountIn,uint256[] minAmountsOut)" + "PoolExit(address owner,bool toLayer2,uint256 poolAmountIn,uint256[] minAmountsOut,uint32[] storageIDs)" ); event Deposit( @@ -61,10 +61,12 @@ contract AmmPool is IBlockReceiver { uint96[] minAmountsOut ); - event QueueItemsProcessed( - uint numItems + event NewQueuePosition( + uint pos ); + uint public constant MAX_UINT = ~uint(0); + uint public constant BASE = 10**18; uint public constant INITIAL_SUPPLY = 100 * BASE; @@ -90,6 +92,7 @@ contract AmmPool is IBlockReceiver { bool fromLayer2; uint poolAmountOut; uint96[] maxAmountsIn; + uint32[] storageIDs; } struct PoolExit @@ -98,6 +101,7 @@ contract AmmPool is IBlockReceiver { bool toLayer2; uint poolAmountIn; uint96[] minAmountsOut; + uint32[] storageIDs; } struct PoolTransaction @@ -148,7 +152,6 @@ contract AmmPool is IBlockReceiver { // Liquidity tokens uint public poolSupply; - mapping (address => uint) poolBalance; modifier onlyExchangeOwner() { @@ -212,7 +215,7 @@ contract AmmPool is IBlockReceiver { } else { token.safeTransferFromAndVerify(msg.sender, address(this), uint(amounts[i])); } - balance[msg.sender][token] = balance[msg.sender][token].add(amounts[i]); + balance[token][msg.sender] = balance[token][msg.sender].add(amounts[i]); totalBalance[token] = totalBalance[token].add(amounts[i]); } @@ -237,13 +240,9 @@ contract AmmPool is IBlockReceiver { // Withdraw for (uint i = 0; i < tokens.length; i++) { address token = tokens[i].addr; - require(availableBalance(msg.sender, token) >= amounts[i], "INSUFFICIENT_BALANCE"); - balance[msg.sender][token] = balance[msg.sender][token].sub(amounts[i]); - if (token == address(0)) { - msg.sender.sendETHAndVerify(amounts[i], gasleft()); - } else { - token.safeTransferAndVerify(msg.sender, amounts[i]); - } + require(availableBalance(token, msg.sender) >= amounts[i], "INSUFFICIENT_BALANCE"); + balance[token][msg.sender] = balance[token][msg.sender].sub(amounts[i]); + withdrawInternal(token, amounts[i], msg.sender); } emit Withdrawal(msg.sender, amounts); @@ -252,15 +251,15 @@ contract AmmPool is IBlockReceiver { // Needs to be able to receive ETH from the exchange contract receive() payable external {} - function availableBalance(address owner, address token) + function availableBalance(address token, address owner) public view returns (uint) { if (isOnline()) { - return balance[owner][token].sub(locked[owner][token]); + return balance[token][owner].sub(locked[token][owner]); } else { - return balance[owner][token]; + return balance[token][owner]; } } @@ -272,6 +271,11 @@ contract AmmPool is IBlockReceiver { return shutdownTimestamp == 0; } + + /// @dev Joins the pool using on-chain funds. + /// @param poolAmountOut The number of liquidity tokens that need to be minted for this join. + /// @param maxAmountsIn The maximum amounts that can be used to mint + /// the specified amount of liquidity tokens. function joinPool(uint poolAmountOut, uint96[] calldata maxAmountsIn) external online @@ -280,8 +284,9 @@ contract AmmPool is IBlockReceiver { // Lock the necessary amounts so we're sure they are available when doing the actual deposit for (uint i = 0; i < tokens.length; i++) { - require(availableBalance(msg.sender, tokens[i].addr) >= maxAmountsIn[i], "INSUFFICIENT_BALANCE"); - locked[msg.sender][tokens[i].addr] = locked[msg.sender][tokens[i].addr].add(maxAmountsIn[i]); + address token = tokens[i].addr; + require(availableBalance(token, msg.sender) >= maxAmountsIn[i], "INSUFFICIENT_BALANCE"); + locked[token][msg.sender] = locked[token][msg.sender].add(maxAmountsIn[i]); } // Queue the work @@ -289,7 +294,8 @@ contract AmmPool is IBlockReceiver { owner: msg.sender, fromLayer2: false, poolAmountOut: poolAmountOut, - maxAmountsIn: maxAmountsIn + maxAmountsIn: maxAmountsIn, + storageIDs: new uint32[](0) }); queue.push(QueueItem({ timestamp: uint64(block.timestamp), @@ -300,18 +306,28 @@ contract AmmPool is IBlockReceiver { emit JoinPoolRequested(msg.sender, poolAmountOut, maxAmountsIn); } + /// @dev Joins the pool using on-chain funds. + /// @param poolAmountIn The number of liquidity tokens that will be burned. + /// @param minAmountsOut The minimum amounts that need to be withdrawn when burning + /// the specified amount of liquidity tokens. function exitPool(uint poolAmountIn, uint96[] calldata minAmountsOut, bool toLayer2) external online { require(minAmountsOut.length == tokens.length, "INVALID_DATA"); + // Lock liquidity token - Not needed now with non-transferable liquidity token + //address token = address(this); + //require(availableBalance(token, msg.sender) >= poolAmountIn, "INSUFFICIENT_BALANCE"); + //locked[token][msg.sender] = locked[token][msg.sender].add(poolAmountIn); + // Queue the work PoolExit memory exit = PoolExit({ owner: msg.sender, toLayer2: toLayer2, poolAmountIn: poolAmountIn, - minAmountsOut: minAmountsOut + minAmountsOut: minAmountsOut, + storageIDs: new uint32[](0) }); queue.push(QueueItem({ timestamp: uint64(block.timestamp), @@ -349,9 +365,8 @@ contract AmmPool is IBlockReceiver { // Only used to withdraw from the pool when shutdown. // Otherwise LPs should withdraw by doing normal queued exit requests. - function withdrawFromPoolWhenShutdown(uint /*poolAmountIn*/) + function withdrawFromPoolWhenShutdown(uint poolAmountIn) external - view offline { bool ready = true; @@ -372,18 +387,27 @@ contract AmmPool is IBlockReceiver { } require(ready, "FUNDS_STILL_IN_EXCHANGE"); - // Use the balances on this contract + // Withdraw proportionally to the liquidity owned + uint poolTotal = totalSupply(); for (uint i = 0; i < tokens.length; i++) { + address token = tokens[i].addr; + + // Calculate the balance inside the pool uint contractBalance; - if (tokens[i].addr == address(0)) { + if (token == address(0)) { contractBalance = address(this).balance; } else { - contractBalance = ERC20(tokens[i].addr).balanceOf(address(this)); + contractBalance = ERC20(token).balanceOf(address(this)); } + uint tokenBalance = contractBalance.sub(totalBalance[token]); - // uint poolBalance = contractBalance.sub(totalBalance[tokens[i].addr]); - // TODO: withdraw proportional to the pool amount owned + // Withdraw the part owned + uint amount = poolAmountIn.mul(tokenBalance) / poolTotal; + withdrawInternal(token, amount, msg.sender); } + + // Burn liquidity tokens + burn(msg.sender, poolAmountIn); } // Processes work in the queue. Can only be called by the exchange owner @@ -449,7 +473,7 @@ contract AmmPool is IBlockReceiver { // The ending AMM updates processAmmUpdates(ctx, false); - emit QueueItemsProcessed(poolTransactions.length); + emit NewQueuePosition(queuePos); return ctx.numTransactionsConsumed; } @@ -465,14 +489,14 @@ contract AmmPool is IBlockReceiver { internal { poolSupply = poolSupply.add(amount); - poolBalance[owner] = poolBalance[owner].add(amount); + balance[address(this)][owner] = balance[address(this)][owner].add(amount); } function burn(address owner, uint amount) internal { poolSupply = poolSupply.sub(amount); - poolBalance[owner] = poolBalance[owner].sub(amount); + balance[address(this)][owner] = balance[address(this)][owner].sub(amount); } function processAmmUpdates( @@ -498,6 +522,8 @@ contract AmmPool is IBlockReceiver { // AMM account balance now available onchain ctx.ammBalancesInAccount[i] = update.balance; ctx.ammBalances[i] = ctx.ammBalancesInAccount[i]; + } else { + require(ctx.ammBalances[i] == update.balance, "UNEXPECTED_AMM_BALANCE"); } } } @@ -516,6 +542,7 @@ contract AmmPool is IBlockReceiver { queuePos++; } else { require(poolTxHash.verifySignature(join.owner, signature), "INVALID_SIGNATURE"); + require(join.fromLayer2, "INVALID_DATA"); } uint poolTotal = totalSupply(); @@ -527,39 +554,64 @@ contract AmmPool is IBlockReceiver { require(join.poolAmountOut == INITIAL_SUPPLY, "INITIAL_SUPPLY_UNEXPECTED"); } + // Check if the requirements are fulfilled + bool valid = true; + uint[] memory amounts = new uint[](ctx.tokens.length); for (uint i = 0; i < ctx.tokens.length; i++) { - uint amount = ctx.ammBalances[i] * ratio / BASE; + amounts[i] = ctx.ammBalances[i] * ratio / BASE; if (poolTotal == 0) { - amount = join.maxAmountsIn[i]; + amounts[i] = join.maxAmountsIn[i]; } - require(amount <= join.maxAmountsIn[i], "LIMIT_IN"); - if (join.fromLayer2) { - TransferTransaction.Transfer memory transfer = ctx._block.readTransfer(ctx.txIdx++); - require(transfer.from == join.owner, "INVALID_TX_DATA"); - require(transfer.toAccountID == accountID, "INVALID_TX_DATA"); - require(transfer.tokenID == ctx.tokens[i].tokenID, "INVALID_TX_DATA"); - require(isAlmostEqual(transfer.amount, amount), "INVALID_TX_DATA"); - require(transfer.fee == 0, "INVALID_TX_DATA"); - if (signature.length != 0) { - // Now approve this transfer - transfer.validUntil = 0xffffffff; - bytes32 txHash = TransferTransaction.hashTx(ctx.exchangeDomainSeparator, transfer); - exchange.approveTransaction(join.owner, txHash); + if(amounts[i] > join.maxAmountsIn[i]) { + valid = false; + } + } + + if (valid) { + for (uint i = 0; i < ctx.tokens.length; i++) { + uint amount = amounts[i]; + if (join.fromLayer2) { + TransferTransaction.Transfer memory transfer = ctx._block.readTransfer(ctx.txIdx++); + require(transfer.from == join.owner, "INVALID_TX_DATA"); + require(transfer.toAccountID == accountID, "INVALID_TX_DATA"); + require(transfer.tokenID == ctx.tokens[i].tokenID, "INVALID_TX_DATA"); + require(isAlmostEqual(transfer.amount, amount), "INVALID_TX_DATA"); + require(transfer.fee == 0, "INVALID_TX_DATA"); + // Replay protection (only necessary when using a signature) + if (signature.length != 0) { + require(transfer.storageID == join.storageIDs[i], "INVALID_TX_DATA"); + } + if (signature.length != 0) { + // Now approve this transfer + transfer.validUntil = 0xffffffff; + bytes32 txHash = TransferTransaction.hashTx(ctx.exchangeDomainSeparator, transfer); + exchange.approveTransaction(join.owner, txHash); + } + ctx.numTransactionsConsumed++; + // Update the amount to the actual amount transferred (which can have some some small rounding errors) + amount = transfer.amount; + // Update the balances in the account + ctx.ammBalancesInAccount[i] = ctx.ammBalancesInAccount[i].add(amount); + } else { + // Make the amount unavailable for withdrawing + address token = ctx.tokens[i].addr; + balance[token][join.owner] = balance[token][join.owner].sub(amount); } - ctx.numTransactionsConsumed++; - // Update the balances in the account - ctx.ammBalancesInAccount[i] = ctx.ammBalancesInAccount[i].add(amount); - } else { - // Unlock the amount locked for this join - locked[join.owner][ctx.tokens[i].addr] = locked[join.owner][ctx.tokens[i].addr].sub(amount); - // Make the amount unavailable for withdrawing - balance[join.owner][ctx.tokens[i].addr] = balance[join.owner][ctx.tokens[i].addr].sub(amount); + ctx.ammBalances[i] = ctx.ammBalances[i].add(amount); } - ctx.ammBalances[i] = ctx.ammBalances[i].add(amount); + + // Mint liquidity tokens + mint(join.owner, join.poolAmountOut); } - // Mint liquidity tokens - mint(join.owner, join.poolAmountOut); + if (!join.fromLayer2) { + for (uint i = 0; i < ctx.tokens.length; i++) { + address token = ctx.tokens[i].addr; + uint amount = join.maxAmountsIn[i]; + // Unlock the amount locked for this join + locked[token][join.owner] = locked[token][join.owner].sub(amount); + } + } } function processExit( @@ -581,33 +633,57 @@ contract AmmPool is IBlockReceiver { uint poolTotal = totalSupply(); uint ratio = (exit.poolAmountIn * BASE) / poolTotal; + // Check if the requirements are fulfilled + bool valid = availableBalance(address(this), exit.owner) >= exit.poolAmountIn; + uint[] memory amounts = new uint[](ctx.tokens.length); for (uint i = 0; i < ctx.tokens.length; i++) { - uint amount = ctx.ammBalances[i] * ratio / BASE; - require(amount >= exit.minAmountsOut[i], "LIMIT_OUT"); - if (exit.toLayer2) { - TransferTransaction.Transfer memory transfer = ctx._block.readTransfer(ctx.txIdx++); - require(transfer.fromAccountID == accountID, "INVALID_TX_DATA"); - require(transfer.from == address(this), "INVALID_TX_DATA"); - require(transfer.to == exit.owner, "INVALID_TX_DATA"); - require(transfer.tokenID == ctx.tokens[i].tokenID, "INVALID_TX_DATA"); - require(isAlmostEqual(transfer.amount, amount), "INVALID_TX_DATA"); - require(transfer.fee == 0, "INVALID_TX_DATA"); - // Now approve this transfer - transfer.validUntil = 0xffffffff; - bytes32 txHash = TransferTransaction.hashTx(ctx.exchangeDomainSeparator, transfer); - exchange.approveTransaction(address(this), txHash); - ctx.numTransactionsConsumed++; - // Update the balances in the account - ctx.ammBalancesInAccount[i] = ctx.ammBalancesInAccount[i].sub(amount); - } else { - // Make the amount available for withdrawing - balance[exit.owner][ctx.tokens[i].addr] = balance[exit.owner][ctx.tokens[i].addr].add(amount); + amounts[i] = ctx.ammBalances[i] * ratio / BASE; + if(amounts[i] < exit.minAmountsOut[i]) { + valid = false; } - ctx.ammBalances[i] = ctx.ammBalances[i].sub(amount); } - // Burn liquidity tokens - burn(exit.owner, exit.poolAmountIn); + if (valid) { + for (uint i = 0; i < ctx.tokens.length; i++) { + uint amount = amounts[i]; + if (exit.toLayer2) { + TransferTransaction.Transfer memory transfer = ctx._block.readTransfer(ctx.txIdx++); + require(transfer.fromAccountID == accountID, "INVALID_TX_DATA"); + require(transfer.from == address(this), "INVALID_TX_DATA"); + require(transfer.to == exit.owner, "INVALID_TX_DATA"); + require(transfer.tokenID == ctx.tokens[i].tokenID, "INVALID_TX_DATA"); + require(isAlmostEqual(transfer.amount, amount), "INVALID_TX_DATA"); + require(transfer.fee == 0, "INVALID_TX_DATA"); + // Replay protection (only necessary when using a signature) + if (signature.length != 0) { + require(transfer.storageID == exit.storageIDs[i], "INVALID_TX_DATA"); + } + // Now approve this transfer + transfer.validUntil = 0xffffffff; + bytes32 txHash = TransferTransaction.hashTx(ctx.exchangeDomainSeparator, transfer); + exchange.approveTransaction(address(this), txHash); + ctx.numTransactionsConsumed++; + // Update the amount to the actual amount transferred (which can have some some small rounding errors) + amount = transfer.amount; + // Update the balances in the account + ctx.ammBalancesInAccount[i] = ctx.ammBalancesInAccount[i].sub(amount); + } else { + // Make the amount available for withdrawing + balance[ctx.tokens[i].addr][exit.owner] = balance[ctx.tokens[i].addr][exit.owner].add(amount); + } + ctx.ammBalances[i] = ctx.ammBalances[i].sub(amount); + } + + // Burn liquidity tokens + burn(exit.owner, exit.poolAmountIn); + } + + // Not needed now with non-transferable liquidity token + // if (signature.length == 0) { + // // Unlock the amount of liquidity tokens locked for this exit + // address token = address(this); + // locked[token][exit.owner] = locked[token][exit.owner].sub(exit.poolAmountIn); + // } } function processDeposit( @@ -628,8 +704,11 @@ contract AmmPool is IBlockReceiver { if (token.addr == address(0)) { ethValue = _deposit.amount; } else { - // Approve the deposit transfer - ERC20(token.addr).approve(address(exchange.getDepositContract()), _deposit.amount); + address depositContract = address(exchange.getDepositContract()); + if (ERC20(token.addr).allowance(address(this), depositContract) < _deposit.amount) { + // Approve the deposit transfer + ERC20(token.addr).approve(depositContract, MAX_UINT); + } } exchange.deposit{value: ethValue}( _deposit.owner, @@ -676,6 +755,20 @@ contract AmmPool is IBlockReceiver { totalBalance[token.addr] = totalBalance[token.addr].add(amount); } + function withdrawInternal( + address token, + uint amount, + address to + ) + internal + { + if (token == address(0)) { + to.sendETHAndVerify(amount, gasleft()); + } else { + token.safeTransferAndVerify(to, amount); + } + } + function hashPoolJoin( bytes32 _DOMAIN_SEPARATOR, PoolJoin memory join @@ -692,7 +785,8 @@ contract AmmPool is IBlockReceiver { join.owner, join.fromLayer2, join.poolAmountOut, - keccak256(abi.encodePacked(join.maxAmountsIn)) + keccak256(abi.encodePacked(join.maxAmountsIn)), + keccak256(abi.encodePacked(join.storageIDs)) ) ) ); @@ -714,7 +808,8 @@ contract AmmPool is IBlockReceiver { exit.owner, exit.toLayer2, exit.poolAmountIn, - keccak256(abi.encodePacked(exit.minAmountsOut)) + keccak256(abi.encodePacked(exit.minAmountsOut)), + keccak256(abi.encodePacked(exit.storageIDs)) ) ) ); diff --git a/packages/loopring_v3/contracts/test/ZeroDecompressorContract.sol b/packages/loopring_v3/contracts/test/ZeroDecompressorContract.sol index 2b4b789d1..afcacf20f 100644 --- a/packages/loopring_v3/contracts/test/ZeroDecompressorContract.sol +++ b/packages/loopring_v3/contracts/test/ZeroDecompressorContract.sol @@ -12,6 +12,6 @@ contract ZeroDecompressorContract { pure returns (bytes memory) { - return ZeroDecompressor.decompress(data); + return ZeroDecompressor.decompress(data, 0); } } diff --git a/packages/loopring_v3/operator/state.py b/packages/loopring_v3/operator/state.py index 8e353b40c..7abd102c6 100644 --- a/packages/loopring_v3/operator/state.py +++ b/packages/loopring_v3/operator/state.py @@ -400,9 +400,8 @@ def getData(self, accountID, tokenID, storageID): numSlots = (2 ** BINARY_TREE_DEPTH_STORAGE) leafStorageID = storage.storageID if int(storage.storageID) > 0 else int(storageID) % numSlots filled = int(storage.data) if (int(storageID) == int(leafStorageID)) else 0 - overwrite = 1 if (int(storageID) == int(leafStorageID) + numSlots) else 0 - return (filled, overwrite) + return filled def getMaxFill(self, order, filled, balanceLimit): account = self.getAccount(order.accountID) @@ -482,8 +481,8 @@ def executeTransaction(self, context, txInput): ring = txInput # Amount filled in the trade history - (filled_A, overwriteDataSlotA) = self.getData(ring.orderA.accountID, ring.orderA.tokenS, ring.orderA.storageID) - (filled_B, overwriteDataSlotB) = self.getData(ring.orderB.accountID, ring.orderB.tokenS, ring.orderB.storageID) + filled_A = self.getData(ring.orderA.accountID, ring.orderA.tokenS, ring.orderA.storageID) + filled_B = self.getData(ring.orderB.accountID, ring.orderB.tokenS, ring.orderB.storageID) # Simple matching logic fillA = self.getMaxFill(ring.orderA, filled_A, True) @@ -518,8 +517,6 @@ def executeTransaction(self, context, txInput): # Saved in ring for tests ring.fFillS_A = toFloat(fillA.S, Float24Encoding) ring.fFillS_B = toFloat(fillB.S, Float24Encoding) - ring.overwriteDataSlotA = overwriteDataSlotA - ring.overwriteDataSlotB = overwriteDataSlotB fillA.S = roundToFloatValue(fillA.S, Float24Encoding) fillB.S = roundToFloatValue(fillB.S, Float24Encoding) @@ -592,7 +589,7 @@ def executeTransaction(self, context, txInput): elif txInput.txType == "Transfer": - (storageData, overwriteDataSlot) = self.getData(txInput.fromAccountID, txInput.tokenID, txInput.storageID) + storageData = self.getData(txInput.fromAccountID, txInput.tokenID, txInput.storageID) transferAmount = roundToFloatValue(int(txInput.amount), Float24Encoding) feeValue = roundToFloatValue(int(txInput.fee), Float16Encoding) @@ -627,7 +624,6 @@ def executeTransaction(self, context, txInput): # For tests (used to set the DA data) txInput.toNewAccount = True if accountB.owner == str(0) else False - txInput.overwriteDataSlot = overwriteDataSlot elif txInput.txType == "Withdraw": diff --git a/packages/loopring_v3/test/testAMMPool.ts b/packages/loopring_v3/test/testAMMPool.ts index 17acd975d..6d0f58f23 100644 --- a/packages/loopring_v3/test/testAMMPool.ts +++ b/packages/loopring_v3/test/testAMMPool.ts @@ -5,6 +5,7 @@ import { BlockCallback, ExchangeTestUtil } from "./testExchangeUtil"; import { AuthMethod, OrderInfo, SpotTrade } from "./types"; import * as sigUtil from "eth-sig-util"; import { SignatureType, sign, verifySignature } from "../util/Signature"; +import { roundToFloatValue } from "loopringV3.js"; const AgentRegistry = artifacts.require("AgentRegistry"); @@ -20,6 +21,7 @@ export interface PoolJoin { fromLayer2: boolean; poolAmountOut: BN; maxAmountsIn: BN[]; + storageIDs: number[]; signature?: string; } @@ -29,6 +31,7 @@ export interface PoolExit { toLayer2: boolean; poolAmountIn: BN; minAmountsOut: BN[]; + storageIDs: number[]; signature?: string; } @@ -66,7 +69,8 @@ export namespace PoolJoinUtils { { name: "owner", type: "address" }, { name: "fromLayer2", type: "bool" }, { name: "poolAmountOut", type: "uint256" }, - { name: "maxAmountsIn", type: "uint256[]" } + { name: "maxAmountsIn", type: "uint256[]" }, + { name: "storageIDs", type: "uint32[]" } ] }, primaryType: "PoolJoin", @@ -80,7 +84,8 @@ export namespace PoolJoinUtils { owner: join.owner, fromLayer2: join.fromLayer2, poolAmountOut: join.poolAmountOut, - maxAmountsIn: join.maxAmountsIn + maxAmountsIn: join.maxAmountsIn, + storageIDs: join.storageIDs } }; return typedData; @@ -106,7 +111,8 @@ export namespace PoolExitUtils { { name: "owner", type: "address" }, { name: "toLayer2", type: "bool" }, { name: "poolAmountIn", type: "uint256" }, - { name: "minAmountsOut", type: "uint256[]" } + { name: "minAmountsOut", type: "uint256[]" }, + { name: "storageIDs", type: "uint32[]" } ] }, primaryType: "PoolExit", @@ -120,7 +126,8 @@ export namespace PoolExitUtils { owner: exit.owner, toLayer2: exit.toLayer2, poolAmountIn: exit.poolAmountIn, - minAmountsOut: exit.minAmountsOut + minAmountsOut: exit.minAmountsOut, + storageIDs: exit.storageIDs } }; return typedData; @@ -214,12 +221,13 @@ export class AmmPool { const authMethod = options.authMethod !== undefined ? options.authMethod : AuthMethod.ECDSA; - const poolJoin: PoolJoin = { + const join: PoolJoin = { txType: "Join", owner, fromLayer2, poolAmountOut, - maxAmountsIn + maxAmountsIn, + storageIDs: [] }; if (authMethod === AuthMethod.APPROVE) { @@ -227,12 +235,15 @@ export class AmmPool { from: owner }); } else if (authMethod === AuthMethod.ECDSA) { - const hash = PoolJoinUtils.getHash(poolJoin, this.contract.address); - poolJoin.signature = await sign(owner, hash, SignatureType.EIP_712); - await verifySignature(owner, hash, poolJoin.signature); + for (const token of this.tokens) { + join.storageIDs.push(this.ctx.reserveStorageID()); + } + const hash = PoolJoinUtils.getHash(join, this.contract.address); + join.signature = await sign(owner, hash, SignatureType.EIP_712); + await verifySignature(owner, hash, join.signature); } - this.queue.push(poolJoin); + this.queue.push(join); } public async exit( @@ -246,12 +257,13 @@ export class AmmPool { const authMethod = options.authMethod !== undefined ? options.authMethod : AuthMethod.ECDSA; - const poolExit: PoolExit = { + const exit: PoolExit = { txType: "Exit", owner, toLayer2, poolAmountIn, - minAmountsOut + minAmountsOut, + storageIDs: [] }; if (authMethod === AuthMethod.APPROVE) { @@ -259,12 +271,15 @@ export class AmmPool { from: owner }); } else if (authMethod === AuthMethod.ECDSA) { - const hash = PoolExitUtils.getHash(poolExit, this.contract.address); - poolExit.signature = await sign(owner, hash, SignatureType.EIP_712); - await verifySignature(owner, hash, poolExit.signature); + for (const token of this.tokens) { + exit.storageIDs.push(this.ctx.reserveStorageID()); + } + const hash = PoolExitUtils.getHash(exit, this.contract.address); + exit.signature = await sign(owner, hash, SignatureType.EIP_712); + await verifySignature(owner, hash, exit.signature); } - this.queue.push(poolExit); + this.queue.push(exit); } public async depositAndJoin( @@ -328,6 +343,9 @@ export class AmmPool { amount = join.maxAmountsIn[i]; } if (join.fromLayer2) { + amount = roundToFloatValue(amount, Constants.Float24Encoding); + const storageID = + join.storageIDs.length > 0 ? join.storageIDs[i] : undefined; await this.ctx.transfer( join.owner, owner, @@ -335,7 +353,11 @@ export class AmmPool { amount, this.tokens[i], new BN(0), - { authMethod: AuthMethod.NONE, amountToDeposit: new BN(0) } + { + authMethod: AuthMethod.NONE, + amountToDeposit: new BN(0), + storageID + } ); ammBalancesInAccount[i] = ammBalancesInAccount[i].add(amount); } @@ -361,8 +383,11 @@ export class AmmPool { const ratio = exit.poolAmountIn.mul(this.BASE).div(poolTotal); for (let i = 0; i < this.tokens.length; i++) { - const amount = ammBalances[i].mul(ratio).div(this.BASE); + let amount = ammBalances[i].mul(ratio).div(this.BASE); if (exit.toLayer2) { + amount = roundToFloatValue(amount, Constants.Float24Encoding); + const storageID = + exit.storageIDs.length > 0 ? exit.storageIDs[i] : undefined; await this.ctx.transfer( owner, exit.owner, @@ -373,7 +398,8 @@ export class AmmPool { { authMethod: AuthMethod.NONE, amountToDeposit: new BN(0), - transferToNew: true + transferToNew: true, + storageID } ); ammBalancesInAccount[i] = ammBalancesInAccount[i].sub(amount); @@ -442,8 +468,14 @@ export class AmmPool { amounts.push(amount.toString(10)); } return web3.eth.abi.encodeParameter( - "tuple(address,bool,uint256,uint256[])", - [join.owner, join.fromLayer2, join.poolAmountOut.toString(10), amounts] + "tuple(address,bool,uint256,uint256[],uint32[])", + [ + join.owner, + join.fromLayer2, + join.poolAmountOut.toString(10), + amounts, + join.storageIDs + ] ); } @@ -453,8 +485,14 @@ export class AmmPool { amounts.push(amount.toString(10)); } return web3.eth.abi.encodeParameter( - "tuple(address,bool,uint256,uint256[])", - [exit.owner, exit.toLayer2, exit.poolAmountIn.toString(10), amounts] + "tuple(address,bool,uint256,uint256[],uint32[])", + [ + exit.owner, + exit.toLayer2, + exit.poolAmountIn.toString(10), + amounts, + exit.storageIDs + ] ); } @@ -492,7 +530,8 @@ contract("AMM Pool", (accounts: string[]) => { beforeEach(async () => { // Fresh Exchange for each test await ctx.createExchange(ctx.testContext.stateOwners[0], { - setupTestState: true + setupTestState: true, + deterministic: true }); // Create the agent registry @@ -526,7 +565,10 @@ contract("AMM Pool", (accounts: string[]) => { ownerB, token, new BN( - web3.utils.toWei(token === "WETH" ? "10000" : "20000", "ether") + web3.utils.toWei( + token === "WETH" ? "10000.123456" : "20000.654321", + "ether" + ) ) ); } @@ -540,18 +582,18 @@ contract("AMM Pool", (accounts: string[]) => { /*await pool.depositAndJoin( ownerA, - new BN(web3.utils.toWei("1", "ether")), + new BN(web3.utils.toWei("100", "ether")), [ - new BN(web3.utils.toWei("10000", "ether")), - new BN(web3.utils.toWei("20000", "ether")) + new BN(web3.utils.toWei("10000.123456", "ether")), + new BN(web3.utils.toWei("20000.654321", "ether")) ] );*/ await pool.join( ownerB, new BN(web3.utils.toWei("100", "ether")), [ - new BN(web3.utils.toWei("10000", "ether")), - new BN(web3.utils.toWei("20000", "ether")) + new BN(web3.utils.toWei("10000.123456", "ether")), + new BN(web3.utils.toWei("20000.654321", "ether")) ], true, { authMethod: AuthMethod.ECDSA } @@ -592,6 +634,16 @@ contract("AMM Pool", (accounts: string[]) => { await ctx.submitTransactions(); await ctx.submitPendingBlocks(); + /*await pool.exit( + ownerA, + new BN(web3.utils.toWei("60", "ether")), + [ + new BN(web3.utils.toWei("5000", "ether")), + new BN(web3.utils.toWei("10000", "ether")) + ], + true, + { authMethod: AuthMethod.APPROVE } + );*/ await pool.exit( ownerB, new BN(web3.utils.toWei("60", "ether")), diff --git a/packages/loopring_v3/test/testExchangeUtil.ts b/packages/loopring_v3/test/testExchangeUtil.ts index 882ccdec7..aed042985 100644 --- a/packages/loopring_v3/test/testExchangeUtil.ts +++ b/packages/loopring_v3/test/testExchangeUtil.ts @@ -499,7 +499,7 @@ export class ExchangeTestUtil { public autoCommit = true; - public useProverServer: boolean = false; + public useProverServer: boolean = true; // Enabling this will remove randomness so gas measurements // can be compared between different runs. @@ -1012,6 +1012,10 @@ export class ExchangeTestUtil { } } + public reserveStorageID() { + return this.storageIDGenerator++; + } + public getAddressBook( ring: SpotTrade, index?: number, @@ -1837,11 +1841,12 @@ export class ExchangeTestUtil { //console.log(compressed); let tx: any = undefined; - /*tx = await operatorContract.submitBlocksCompressed( + tx = await operatorContract.submitBlocksCompressed( web3.utils.hexToBytes(compressed), + blockCallbacks, //txData, { from: this.exchangeOperator, gasPrice: 0 } - );*/ + ); /*tx = await operatorContract.submitBlocks( onchainBlocks, { from: this.exchangeOperator, gasPrice: 0 } @@ -1859,11 +1864,11 @@ export class ExchangeTestUtil { onchainBlocks, { from: this.exchangeOwner, gasPrice: 0 } );*/ - tx = await operatorContract.submitBlocksWithCallbacks( + /*tx = await operatorContract.submitBlocksWithCallbacks( onchainBlocks, blockCallbacks, { from: this.exchangeOperator, gasPrice: 0 } - ); + );*/ logInfo( "\x1b[46m%s\x1b[0m", "[submitBlocks] Gas used: " + tx.receipt.gasUsed @@ -2527,7 +2532,7 @@ export class ExchangeTestUtil { } public async syncExplorer() { - // await this.explorer.sync(await web3.eth.getBlockNumber()); + await this.explorer.sync(await web3.eth.getBlockNumber()); } public getTokenAddress(token: string) { @@ -2773,8 +2778,6 @@ export class ExchangeTestUtil { } public async checkExplorerState() { - return; - // Get the current state const numBlocksOnchain = this.blocks[this.exchangeId].length; const state = await Simulator.loadExchangeState( From 8261bde3e9ec67484526973e03d1b0dfe779df2d Mon Sep 17 00:00:00 2001 From: Daniel Wang Date: Fri, 18 Sep 2020 22:43:56 +0800 Subject: [PATCH 06/14] unify submitBlocksCompressedWithCallbacks (#1761) * unify submitBlocksCompressedWithCallbacks * unify submitBlocksCompressedWithCallbacks --- .../aux/access/LoopringIOExchangeOwner.sol | 29 +++++-------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/packages/loopring_v3/contracts/aux/access/LoopringIOExchangeOwner.sol b/packages/loopring_v3/contracts/aux/access/LoopringIOExchangeOwner.sol index e031eca97..065764c5d 100644 --- a/packages/loopring_v3/contracts/aux/access/LoopringIOExchangeOwner.sol +++ b/packages/loopring_v3/contracts/aux/access/LoopringIOExchangeOwner.sol @@ -35,7 +35,8 @@ contract LoopringIOExchangeOwner is SelectorBasedAccessManager { } - function submitBlocksCompressed( + function submitBlocksWithCallbacks( + bool isDataCompressed, bytes calldata data, BlockCallback[] calldata callbacks ) @@ -45,7 +46,10 @@ contract LoopringIOExchangeOwner is SelectorBasedAccessManager hasAccessTo(msg.sender, SUBMITBLOCKS_SELECTOR) || open, "PERMISSION_DENIED" ); - bytes memory decompressed = ZeroDecompressor.decompress(data, 0); + bytes memory decompressed = isDataCompressed ? + ZeroDecompressor.decompress(data, 0): + data; + require( decompressed.toBytes4(0) == SUBMITBLOCKS_SELECTOR, "INVALID_DATA" @@ -64,24 +68,6 @@ contract LoopringIOExchangeOwner is SelectorBasedAccessManager target.fastCallAndVerify(gasleft(), 0, decompressed); } - function submitBlocksWithCallbacks( - ExchangeData.Block[] memory blocks, - BlockCallback[] calldata callbacks - ) - external - { - require( - hasAccessTo(msg.sender, SUBMITBLOCKS_SELECTOR) || open, - "PERMISSION_DENIED" - ); - - // Process the callback logic. - processCallbacks(blocks, callbacks); - - // Finally submit the blocks - IExchangeV3(target).submitBlocks(blocks); - } - function openAccessToSubmitBlocks(bool _open) external onlyOwner @@ -90,9 +76,8 @@ contract LoopringIOExchangeOwner is SelectorBasedAccessManager emit SubmitBlocksAccessOpened(_open); } - function processCallbacks( - ExchangeData.Block[] memory blocks, + ExchangeData.Block[] memory blocks, BlockCallback[] calldata callbacks ) internal From a289c3c0b5424db5f6efe51e144d0ad353346637 Mon Sep 17 00:00:00 2001 From: Daniel Wang Date: Fri, 18 Sep 2020 22:44:21 +0800 Subject: [PATCH 07/14] Amm approve erc20 on setup (#1762) * approve upon setup * approve upon setup --- .../loopring_v3/contracts/test/AmmPool.sol | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/packages/loopring_v3/contracts/test/AmmPool.sol b/packages/loopring_v3/contracts/test/AmmPool.sol index 7a3ee1852..2cee209e3 100644 --- a/packages/loopring_v3/contracts/test/AmmPool.sol +++ b/packages/loopring_v3/contracts/test/AmmPool.sol @@ -65,9 +65,7 @@ contract AmmPool is IBlockReceiver { uint pos ); - uint public constant MAX_UINT = ~uint(0); - - uint public constant BASE = 10**18; + uint public constant BASE = 10 ** 18; uint public constant INITIAL_SUPPLY = 100 * BASE; uint public constant MAX_AGE_REQUEST_UNTIL_POOL_SHUTDOWN = 7 days; @@ -189,13 +187,19 @@ contract AmmPool is IBlockReceiver { exchange = _exchange; accountID = _accountID; feeBips = _feeBips; + + address depositContract = address(exchange.getDepositContract()); + for (uint i = 0; i < _tokens.length; i++) { - uint16 tokenID = exchange.getTokenID(_tokens[i]); + address token = _tokens[i]; + uint16 tokenID = exchange.getTokenID(token); tokens.push(Token({ - addr: _tokens[i], + addr: token, tokenID: tokenID, weight: _weights[i] })); + + ERC20(token).approve(depositContract, ~uint(0)); } } @@ -699,15 +703,17 @@ contract AmmPool is IBlockReceiver { require(_deposit.accountID == accountID, "INVALID_TX_DATA"); require(_deposit.tokenID == token.tokenID, "INVALID_TX_DATA"); require(_deposit.amount == amount, "INVALID_TX_DATA"); + // Now do this deposit uint ethValue = 0; if (token.addr == address(0)) { - ethValue = _deposit.amount; + ethValue = amount; } else { address depositContract = address(exchange.getDepositContract()); - if (ERC20(token.addr).allowance(address(this), depositContract) < _deposit.amount) { + uint allowance = ERC20(token.addr).allowance(address(this), depositContract); + if (allowance < amount) { // Approve the deposit transfer - ERC20(token.addr).approve(depositContract, MAX_UINT); + ERC20(token.addr).approve(depositContract, ~uint(0)); } } exchange.deposit{value: ethValue}( From 0f055b1f05b7e951685b2f1895032afaa065e6a6 Mon Sep 17 00:00:00 2001 From: Daniel Wang Date: Fri, 18 Sep 2020 22:44:49 +0800 Subject: [PATCH 08/14] allow withdraw all tokens (#1763) --- packages/loopring_v3/contracts/test/AmmPool.sol | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/loopring_v3/contracts/test/AmmPool.sol b/packages/loopring_v3/contracts/test/AmmPool.sol index 2cee209e3..68db02795 100644 --- a/packages/loopring_v3/contracts/test/AmmPool.sol +++ b/packages/loopring_v3/contracts/test/AmmPool.sol @@ -235,6 +235,7 @@ contract AmmPool is IBlockReceiver { // Withdraw any outstanding balances for the pool account on the exchange address[] memory owners = new address[](tokens.length); address[] memory tokenAddresses = new address[](tokens.length); + for (uint i = 0; i < tokens.length; i++) { owners[i] = address(this); tokenAddresses[i] = tokens[i].addr; @@ -242,14 +243,22 @@ contract AmmPool is IBlockReceiver { exchange.withdrawFromApprovedWithdrawals(owners, tokenAddresses); // Withdraw + uint96[] memory withdrawn = new uint96[](tokens.length); for (uint i = 0; i < tokens.length; i++) { address token = tokens[i].addr; - require(availableBalance(token, msg.sender) >= amounts[i], "INSUFFICIENT_BALANCE"); - balance[token][msg.sender] = balance[token][msg.sender].sub(amounts[i]); - withdrawInternal(token, amounts[i], msg.sender); + uint available = availableBalance(token, msg.sender); + if (amounts[i] == 0 || amounts[i] > available) { + withdrawn[i] = uint96(available); + } else { + withdrawn[i] = amounts[i]; + } + if (withdrawn[i] > 0) { + balance[token][msg.sender] = balance[token][msg.sender].sub(withdrawn[i]); + withdrawInternal(token, withdrawn[i], msg.sender); + } } - emit Withdrawal(msg.sender, amounts); + emit Withdrawal(msg.sender, withdrawn); } // Needs to be able to receive ETH from the exchange contract From 9c0067a9078e5d1a1b93b1aa394404cbfddb2465 Mon Sep 17 00:00:00 2001 From: Daniel Wang Date: Fri, 18 Sep 2020 22:45:22 +0800 Subject: [PATCH 09/14] make agent explicitly inherit IAgent (#1765) --- .../loopring_v3/contracts/aux/agents/FastWithdrawalAgent.sol | 3 ++- packages/loopring_v3/contracts/core/iface/IAgentRegistry.sol | 1 + packages/loopring_v3/contracts/test/AmmPool.sol | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/loopring_v3/contracts/aux/agents/FastWithdrawalAgent.sol b/packages/loopring_v3/contracts/aux/agents/FastWithdrawalAgent.sol index 5b10ba34a..dc4ff1496 100644 --- a/packages/loopring_v3/contracts/aux/agents/FastWithdrawalAgent.sol +++ b/packages/loopring_v3/contracts/aux/agents/FastWithdrawalAgent.sol @@ -3,6 +3,7 @@ pragma solidity ^0.7.0; pragma experimental ABIEncoderV2; +import "../../core/iface/IAgentRegistry.sol"; import "../../core/iface/IExchangeV3.sol"; import "../../lib/Claimable.sol"; import "../../lib/EIP712.sol"; @@ -40,7 +41,7 @@ import "../../lib/SignatureUtil.sol"; /// @author Brecht Devos - /// @author Kongliang Zhong - /// @author Daniel Wang - -contract FastWithdrawalAgent is ReentrancyGuard +contract FastWithdrawalAgent is ReentrancyGuard, IAgent { using AddressUtil for address; using AddressUtil for address payable; diff --git a/packages/loopring_v3/contracts/core/iface/IAgentRegistry.sol b/packages/loopring_v3/contracts/core/iface/IAgentRegistry.sol index 895825a22..c57226064 100644 --- a/packages/loopring_v3/contracts/core/iface/IAgentRegistry.sol +++ b/packages/loopring_v3/contracts/core/iface/IAgentRegistry.sol @@ -2,6 +2,7 @@ // Copyright 2017 Loopring Technology Limited. pragma solidity ^0.7.0; +interface IAgent{} interface IAgentRegistry { diff --git a/packages/loopring_v3/contracts/test/AmmPool.sol b/packages/loopring_v3/contracts/test/AmmPool.sol index 68db02795..d2e2228d1 100644 --- a/packages/loopring_v3/contracts/test/AmmPool.sol +++ b/packages/loopring_v3/contracts/test/AmmPool.sol @@ -6,6 +6,7 @@ pragma experimental ABIEncoderV2; import "../aux/access/IBlockReceiver.sol"; import "../aux/transactions/TransactionReader.sol"; import "../thirdparty/BytesUtil.sol"; +import "../core/iface/IAgentRegistry.sol"; import "../core/iface/IExchangeV3.sol"; import "../lib/AddressUtil.sol"; import "../lib/ERC20.sol"; @@ -20,7 +21,7 @@ import "../core/impl/libtransactions/WithdrawTransaction.sol"; /// @title AmmPool /// @author Brecht Devos - /// @dev Incomplete AMM pool implementation for demo/testing purposes. -contract AmmPool is IBlockReceiver { +contract AmmPool is IBlockReceiver, IAgent { using AddressUtil for address; using AddressUtil for address payable; From 4ef2b79b2fba221fd91dc1db7b7094b0086040a2 Mon Sep 17 00:00:00 2001 From: Brechtpd Date: Fri, 18 Sep 2020 17:45:15 +0200 Subject: [PATCH 10/14] [protocol 3.6] Small fixes --- packages/loopring_v3.js/src/exchange_v3.ts | 5 +++-- .../contracts/aux/access/LoopringIOExchangeOwner.sol | 2 +- packages/loopring_v3/contracts/test/AmmPool.sol | 5 +++-- packages/loopring_v3/test/testExchangeUtil.ts | 5 +++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/loopring_v3.js/src/exchange_v3.ts b/packages/loopring_v3.js/src/exchange_v3.ts index 17a220eba..515069a09 100644 --- a/packages/loopring_v3.js/src/exchange_v3.ts +++ b/packages/loopring_v3.js/src/exchange_v3.ts @@ -675,7 +675,7 @@ export class ExchangeV3 { // Get the block data from the transaction data //const submitBlocksFunctionSignature = "0x8dadd3af"; // submitBlocks - const submitBlocksFunctionSignature = "0xdeaa355e"; // submitBlocksCompressed + const submitBlocksFunctionSignature = "0x78e9a4f3"; // submitBlocksWithCallbacks const transaction = await this.web3.eth.getTransaction( event.transactionHash @@ -684,6 +684,7 @@ export class ExchangeV3 { if (transaction.input.startsWith(submitBlocksFunctionSignature)) { const decodedCompressedInput = this.web3.eth.abi.decodeParameters( [ + "bool", "bytes", { "struct BlockCallback[]": { @@ -696,7 +697,7 @@ export class ExchangeV3 { ], "0x" + transaction.input.slice(2 + 4 * 2) ); - const data = decompressZeros(decodedCompressedInput[0]); + const data = decompressZeros(decodedCompressedInput[1]); // Get the inputs to commitBlock const decodedInputs = this.web3.eth.abi.decodeParameters( [ diff --git a/packages/loopring_v3/contracts/aux/access/LoopringIOExchangeOwner.sol b/packages/loopring_v3/contracts/aux/access/LoopringIOExchangeOwner.sol index 065764c5d..1fcc9969a 100644 --- a/packages/loopring_v3/contracts/aux/access/LoopringIOExchangeOwner.sol +++ b/packages/loopring_v3/contracts/aux/access/LoopringIOExchangeOwner.sol @@ -47,7 +47,7 @@ contract LoopringIOExchangeOwner is SelectorBasedAccessManager "PERMISSION_DENIED" ); bytes memory decompressed = isDataCompressed ? - ZeroDecompressor.decompress(data, 0): + ZeroDecompressor.decompress(data, 1): data; require( diff --git a/packages/loopring_v3/contracts/test/AmmPool.sol b/packages/loopring_v3/contracts/test/AmmPool.sol index d2e2228d1..c03c2d88d 100644 --- a/packages/loopring_v3/contracts/test/AmmPool.sol +++ b/packages/loopring_v3/contracts/test/AmmPool.sol @@ -383,7 +383,8 @@ contract AmmPool is IBlockReceiver, IAgent { external offline { - bool ready = true; + // Currently commented out to make the contract size smaller... + /*bool ready = true; if (exchange.isInWithdrawalMode()) { // Check if all tokens were withdrawn using Merkle proofs for (uint i = 0; i < tokens.length; i++) { @@ -421,7 +422,7 @@ contract AmmPool is IBlockReceiver, IAgent { } // Burn liquidity tokens - burn(msg.sender, poolAmountIn); + burn(msg.sender, poolAmountIn);*/ } // Processes work in the queue. Can only be called by the exchange owner diff --git a/packages/loopring_v3/test/testExchangeUtil.ts b/packages/loopring_v3/test/testExchangeUtil.ts index aed042985..cdcc32cd9 100644 --- a/packages/loopring_v3/test/testExchangeUtil.ts +++ b/packages/loopring_v3/test/testExchangeUtil.ts @@ -499,7 +499,7 @@ export class ExchangeTestUtil { public autoCommit = true; - public useProverServer: boolean = true; + public useProverServer: boolean = false; // Enabling this will remove randomness so gas measurements // can be compared between different runs. @@ -1841,7 +1841,8 @@ export class ExchangeTestUtil { //console.log(compressed); let tx: any = undefined; - tx = await operatorContract.submitBlocksCompressed( + tx = await operatorContract.submitBlocksWithCallbacks( + true, web3.utils.hexToBytes(compressed), blockCallbacks, //txData, From b4afc9946b02afaa53cefdc8369f2249c9e95f5f Mon Sep 17 00:00:00 2001 From: Brecht Devos Date: Sat, 19 Sep 2020 05:29:01 +0200 Subject: [PATCH 11/14] [protocol 3.6] uint96 safe math (#1766) --- .../contracts/core/iface/IExchangeV3.sol | 4 +- .../core/impl/DefaultDepositContract.sol | 5 +- .../impl/libexchange/ExchangeDeposits.sol | 9 +- .../impl/libexchange/ExchangeWithdrawals.sol | 8 +- .../AccountUpdateTransaction.sol | 2 +- .../libtransactions/DepositTransaction.sol | 10 +- .../libtransactions/TransferTransaction.sol | 4 +- .../libtransactions/WithdrawTransaction.sol | 4 +- .../loopring_v3/contracts/lib/FloatUtil.sol | 7 +- .../loopring_v3/contracts/lib/MathUint.sol | 12 - .../loopring_v3/contracts/lib/MathUint96.sol | 33 +++ .../loopring_v3/contracts/test/AmmPool.sol | 45 ++-- .../contracts/thirdparty/SafeCast.sol | 242 ++++++++++++++++++ 13 files changed, 327 insertions(+), 58 deletions(-) create mode 100644 packages/loopring_v3/contracts/lib/MathUint96.sol create mode 100644 packages/loopring_v3/contracts/thirdparty/SafeCast.sol diff --git a/packages/loopring_v3/contracts/core/iface/IExchangeV3.sol b/packages/loopring_v3/contracts/core/iface/IExchangeV3.sol index 8659f6b3d..56417fb3c 100644 --- a/packages/loopring_v3/contracts/core/iface/IExchangeV3.sol +++ b/packages/loopring_v3/contracts/core/iface/IExchangeV3.sol @@ -63,14 +63,14 @@ abstract contract IExchangeV3 is IExchange address from, address to, address token, - uint96 amount + uint amount ); event WithdrawalFailed( address from, address to, address token, - uint96 amount + uint amount ); event ProtocolFeesUpdated( diff --git a/packages/loopring_v3/contracts/core/impl/DefaultDepositContract.sol b/packages/loopring_v3/contracts/core/impl/DefaultDepositContract.sol index 6c1d4322c..259ae9df1 100644 --- a/packages/loopring_v3/contracts/core/impl/DefaultDepositContract.sol +++ b/packages/loopring_v3/contracts/core/impl/DefaultDepositContract.sol @@ -7,6 +7,7 @@ import "../../lib/Claimable.sol"; import "../../lib/ERC20.sol"; import "../../lib/ERC20SafeTransfer.sol"; import "../../lib/MathUint.sol"; +import "../../thirdparty/SafeCast.sol"; import "../iface/IDepositContract.sol"; @@ -24,6 +25,7 @@ contract DefaultDepositContract is IDepositContract, Claimable using AddressUtil for address; using ERC20SafeTransfer for address; using MathUint for uint; + using SafeCast for uint; address public exchange; @@ -108,8 +110,7 @@ contract DefaultDepositContract is IDepositContract, Claimable uint balanceAfter = checkBalance ? ERC20(token).balanceOf(address(this)) : amount; uint diff = balanceAfter.sub(balanceBefore); - amountReceived = uint96(diff); - require(uint(amountReceived) == diff, "OUT_OF_RANGE"); + amountReceived = diff.toUint96(); ethToReturn = msg.value; } diff --git a/packages/loopring_v3/contracts/core/impl/libexchange/ExchangeDeposits.sol b/packages/loopring_v3/contracts/core/impl/libexchange/ExchangeDeposits.sol index cf2199b1f..f9fb2c89f 100644 --- a/packages/loopring_v3/contracts/core/impl/libexchange/ExchangeDeposits.sol +++ b/packages/loopring_v3/contracts/core/impl/libexchange/ExchangeDeposits.sol @@ -4,6 +4,7 @@ pragma solidity ^0.7.0; pragma experimental ABIEncoderV2; import "../../../lib/AddressUtil.sol"; +import "../../../lib/MathUint96.sol"; import "../../iface/ExchangeData.sol"; import "./ExchangeMode.sol"; import "./ExchangeTokens.sol"; @@ -15,9 +16,7 @@ import "./ExchangeTokens.sol"; library ExchangeDeposits { using AddressUtil for address payable; - using MathUint for uint; - using MathUint for uint64; - using MathUint for uint96; + using MathUint96 for uint96; using ExchangeMode for ExchangeData.State; using ExchangeTokens for ExchangeData.State; @@ -57,14 +56,14 @@ library ExchangeDeposits // Add the amount to the deposit request and reset the time the operator has to process it ExchangeData.Deposit memory _deposit = S.pendingDeposits[to][tokenID]; _deposit.timestamp = uint64(block.timestamp); - _deposit.amount = _deposit.amount.add96(amountDeposited); + _deposit.amount = _deposit.amount.add(amountDeposited); S.pendingDeposits[to][tokenID] = _deposit; emit DepositRequested( to, tokenAddress, tokenID, - uint96(amountDeposited) + amountDeposited ); } } diff --git a/packages/loopring_v3/contracts/core/impl/libexchange/ExchangeWithdrawals.sol b/packages/loopring_v3/contracts/core/impl/libexchange/ExchangeWithdrawals.sol index d770ee6d6..9cf76027a 100644 --- a/packages/loopring_v3/contracts/core/impl/libexchange/ExchangeWithdrawals.sol +++ b/packages/loopring_v3/contracts/core/impl/libexchange/ExchangeWithdrawals.sol @@ -34,14 +34,14 @@ library ExchangeWithdrawals address from, address to, address token, - uint96 amount + uint amount ); event WithdrawalFailed( address from, address to, address token, - uint96 amount + uint amount ); function forceWithdraw( @@ -262,7 +262,7 @@ library ExchangeWithdrawals from, to, token, - uint96(amount) + amount ); if (from == address(0)) { S.protocolFeeLastWithdrawnTime[token] = block.timestamp; @@ -272,7 +272,7 @@ library ExchangeWithdrawals from, to, token, - uint96(amount) + amount ); } } diff --git a/packages/loopring_v3/contracts/core/impl/libtransactions/AccountUpdateTransaction.sol b/packages/loopring_v3/contracts/core/impl/libtransactions/AccountUpdateTransaction.sol index 90bd32a85..b509510fd 100644 --- a/packages/loopring_v3/contracts/core/impl/libtransactions/AccountUpdateTransaction.sol +++ b/packages/loopring_v3/contracts/core/impl/libtransactions/AccountUpdateTransaction.sol @@ -32,7 +32,7 @@ library AccountUpdateTransaction address owner; uint32 accountID; uint16 feeTokenID; - uint fee; + uint96 fee; uint publicKey; uint32 validUntil; uint32 nonce; diff --git a/packages/loopring_v3/contracts/core/impl/libtransactions/DepositTransaction.sol b/packages/loopring_v3/contracts/core/impl/libtransactions/DepositTransaction.sol index 2b7022872..2f87375e2 100644 --- a/packages/loopring_v3/contracts/core/impl/libtransactions/DepositTransaction.sol +++ b/packages/loopring_v3/contracts/core/impl/libtransactions/DepositTransaction.sol @@ -4,7 +4,7 @@ pragma solidity ^0.7.0; pragma experimental ABIEncoderV2; import "../../../lib/EIP712.sol"; -import "../../../lib/MathUint.sol"; +import "../../../lib/MathUint96.sol"; import "../../../lib/SignatureUtil.sol"; import "../../../thirdparty/BytesUtil.sol"; import "../../iface/ExchangeData.sol"; @@ -14,15 +14,15 @@ import "../../iface/ExchangeData.sol"; /// @author Brecht Devos - library DepositTransaction { - using BytesUtil for bytes; - using MathUint for uint; + using BytesUtil for bytes; + using MathUint96 for uint96; struct Deposit { address owner; uint32 accountID; uint16 tokenID; - uint amount; + uint96 amount; } /*event DepositProcessed( @@ -55,7 +55,7 @@ library DepositTransaction // Also note the original deposit.amount can be zero! if (deposit.amount > 0) { require(pendingDeposit.amount >= deposit.amount, "INVALID_AMOUNT"); - pendingDeposit.amount = uint96(uint(pendingDeposit.amount).sub(deposit.amount)); + pendingDeposit.amount = pendingDeposit.amount.sub(deposit.amount); } // If the deposit was fully consumed, reset it so the storage is freed up diff --git a/packages/loopring_v3/contracts/core/impl/libtransactions/TransferTransaction.sol b/packages/loopring_v3/contracts/core/impl/libtransactions/TransferTransaction.sol index 3d33b184e..5ccb65d21 100644 --- a/packages/loopring_v3/contracts/core/impl/libtransactions/TransferTransaction.sol +++ b/packages/loopring_v3/contracts/core/impl/libtransactions/TransferTransaction.sol @@ -31,9 +31,9 @@ library TransferTransaction address from; address to; uint16 tokenID; - uint amount; + uint96 amount; uint16 feeTokenID; - uint fee; + uint96 fee; uint32 validUntil; uint32 storageID; } diff --git a/packages/loopring_v3/contracts/core/impl/libtransactions/WithdrawTransaction.sol b/packages/loopring_v3/contracts/core/impl/libtransactions/WithdrawTransaction.sol index 6b2dc3b65..ce0875753 100644 --- a/packages/loopring_v3/contracts/core/impl/libtransactions/WithdrawTransaction.sol +++ b/packages/loopring_v3/contracts/core/impl/libtransactions/WithdrawTransaction.sol @@ -42,9 +42,9 @@ library WithdrawTransaction address owner; uint32 accountID; uint16 tokenID; - uint amount; + uint96 amount; uint16 feeTokenID; - uint fee; + uint96 fee; address to; bytes extraData; uint minGas; diff --git a/packages/loopring_v3/contracts/lib/FloatUtil.sol b/packages/loopring_v3/contracts/lib/FloatUtil.sol index 26226bfe8..721a8ffb8 100644 --- a/packages/loopring_v3/contracts/lib/FloatUtil.sol +++ b/packages/loopring_v3/contracts/lib/FloatUtil.sol @@ -3,6 +3,7 @@ pragma solidity ^0.7.0; import "./MathUint.sol"; +import "../thirdparty/SafeCast.sol"; /// @title Utility Functions for floats @@ -10,6 +11,7 @@ import "./MathUint.sol"; library FloatUtil { using MathUint for uint; + using SafeCast for uint; // Decodes a decimal float value that is encoded like `exponent | mantissa`. // Both exponent and mantissa are in base 10. @@ -24,14 +26,13 @@ library FloatUtil ) internal pure - returns (uint value) + returns (uint96 value) { uint numBitsMantissa = numBits.sub(5); uint exponent = f >> numBitsMantissa; // log2(10**77) = 255.79 < 256 require(exponent <= 77, "EXPONENT_TOO_LARGE"); uint mantissa = f & ((1 << numBitsMantissa) - 1); - value = mantissa.mul(10 ** exponent); - require(value < (2 ** 96), "FLOAT_VALUE_TOO_LARGE"); + value = mantissa.mul(10 ** exponent).toUint96(); } } diff --git a/packages/loopring_v3/contracts/lib/MathUint.sol b/packages/loopring_v3/contracts/lib/MathUint.sol index 6208f0e7c..b07d86e1b 100644 --- a/packages/loopring_v3/contracts/lib/MathUint.sol +++ b/packages/loopring_v3/contracts/lib/MathUint.sol @@ -56,16 +56,4 @@ library MathUint c = a + b; require(c >= a, "ADD_OVERFLOW"); } - - function add96( - uint96 a, - uint96 b - ) - internal - pure - returns (uint96 c) - { - c = a + b; - require(c >= a, "ADD_OVERFLOW"); - } } diff --git a/packages/loopring_v3/contracts/lib/MathUint96.sol b/packages/loopring_v3/contracts/lib/MathUint96.sol new file mode 100644 index 000000000..711393095 --- /dev/null +++ b/packages/loopring_v3/contracts/lib/MathUint96.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2017 Loopring Technology Limited. +pragma solidity ^0.7.0; + + +/// @title Utility Functions for uint +/// @author Daniel Wang - +library MathUint96 +{ + function add( + uint96 a, + uint96 b + ) + internal + pure + returns (uint96 c) + { + c = a + b; + require(c >= a, "ADD_OVERFLOW"); + } + + function sub( + uint96 a, + uint96 b + ) + internal + pure + returns (uint96 c) + { + require(b <= a, "SUB_UNDERFLOW"); + return a - b; + } +} diff --git a/packages/loopring_v3/contracts/test/AmmPool.sol b/packages/loopring_v3/contracts/test/AmmPool.sol index c03c2d88d..631c29cad 100644 --- a/packages/loopring_v3/contracts/test/AmmPool.sol +++ b/packages/loopring_v3/contracts/test/AmmPool.sol @@ -6,12 +6,14 @@ pragma experimental ABIEncoderV2; import "../aux/access/IBlockReceiver.sol"; import "../aux/transactions/TransactionReader.sol"; import "../thirdparty/BytesUtil.sol"; +import "../thirdparty/SafeCast.sol"; import "../core/iface/IAgentRegistry.sol"; import "../core/iface/IExchangeV3.sol"; import "../lib/AddressUtil.sol"; import "../lib/ERC20.sol"; import "../lib/ERC20SafeTransfer.sol"; import "../lib/MathUint.sol"; +import "../lib/MathUint96.sol"; import "../lib/SignatureUtil.sol"; import "../core/impl/libtransactions/AmmUpdateTransaction.sol"; @@ -29,8 +31,11 @@ contract AmmPool is IBlockReceiver, IAgent { using TransactionReader for ExchangeData.Block; using ERC20SafeTransfer for address; using MathUint for uint; + using MathUint96 for uint96; + using SafeCast for uint; using SignatureUtil for bytes32; + bytes32 constant public POOLJOIN_TYPEHASH = keccak256( "PoolJoin(address owner,bool fromLayer2,uint256 poolAmountOut,uint256[] maxAmountsIn,uint32[] storageIDs)" ); @@ -127,13 +132,13 @@ contract AmmPool is IBlockReceiver, IAgent { struct Context { ExchangeData.Block _block; - uint txIdx; - bytes32 DOMAIN_SEPARATOR; - bytes32 exchangeDomainSeparator; - uint[] ammBalancesInAccount; - uint[] ammBalances; - uint numTransactionsConsumed; - Token[] tokens; + uint txIdx; + bytes32 DOMAIN_SEPARATOR; + bytes32 exchangeDomainSeparator; + uint96[] ammBalancesInAccount; + uint96[] ammBalances; + uint numTransactionsConsumed; + Token[] tokens; } uint8 public feeBips; @@ -449,8 +454,8 @@ contract AmmPool is IBlockReceiver, IAgent { txIdx: txIdx, DOMAIN_SEPARATOR: DOMAIN_SEPARATOR, exchangeDomainSeparator: exchange.getDomainSeparator(), - ammBalancesInAccount: new uint[](tokens.length), - ammBalances: new uint[](tokens.length), + ammBalancesInAccount: new uint96[](tokens.length), + ammBalances: new uint96[](tokens.length), numTransactionsConsumed: 0, tokens: tokens }); @@ -477,10 +482,10 @@ contract AmmPool is IBlockReceiver, IAgent { // Deposit/Withdraw to/from the AMM account when necessary for (uint i = 0; i < ctx.tokens.length; i++) { if (ctx.ammBalances[i] > ctx.ammBalancesInAccount[i]) { - uint amount = ctx.ammBalances[i] - ctx.ammBalancesInAccount[i]; + uint96 amount = ctx.ammBalances[i].sub(ctx.ammBalancesInAccount[i]); processDeposit(ctx, ctx.tokens[i], amount); } else if (ctx.ammBalancesInAccount[i] > ctx.ammBalances[i]) { - uint amount = ctx.ammBalancesInAccount[i] - ctx.ammBalances[i]; + uint96 amount = ctx.ammBalancesInAccount[i].sub(ctx.ammBalances[i]); processWithdrawal(ctx, ctx.tokens[i], amount); } } @@ -571,9 +576,9 @@ contract AmmPool is IBlockReceiver, IAgent { // Check if the requirements are fulfilled bool valid = true; - uint[] memory amounts = new uint[](ctx.tokens.length); + uint96[] memory amounts = new uint96[](ctx.tokens.length); for (uint i = 0; i < ctx.tokens.length; i++) { - amounts[i] = ctx.ammBalances[i] * ratio / BASE; + amounts[i] = (ctx.ammBalances[i] * ratio / BASE).toUint96(); if (poolTotal == 0) { amounts[i] = join.maxAmountsIn[i]; } @@ -584,7 +589,7 @@ contract AmmPool is IBlockReceiver, IAgent { if (valid) { for (uint i = 0; i < ctx.tokens.length; i++) { - uint amount = amounts[i]; + uint96 amount = amounts[i]; if (join.fromLayer2) { TransferTransaction.Transfer memory transfer = ctx._block.readTransfer(ctx.txIdx++); require(transfer.from == join.owner, "INVALID_TX_DATA"); @@ -650,9 +655,9 @@ contract AmmPool is IBlockReceiver, IAgent { // Check if the requirements are fulfilled bool valid = availableBalance(address(this), exit.owner) >= exit.poolAmountIn; - uint[] memory amounts = new uint[](ctx.tokens.length); + uint96[] memory amounts = new uint96[](ctx.tokens.length); for (uint i = 0; i < ctx.tokens.length; i++) { - amounts[i] = ctx.ammBalances[i] * ratio / BASE; + amounts[i] = (ctx.ammBalances[i] * ratio / BASE).toUint96(); if(amounts[i] < exit.minAmountsOut[i]) { valid = false; } @@ -660,7 +665,7 @@ contract AmmPool is IBlockReceiver, IAgent { if (valid) { for (uint i = 0; i < ctx.tokens.length; i++) { - uint amount = amounts[i]; + uint96 amount = amounts[i]; if (exit.toLayer2) { TransferTransaction.Transfer memory transfer = ctx._block.readTransfer(ctx.txIdx++); require(transfer.fromAccountID == accountID, "INVALID_TX_DATA"); @@ -704,7 +709,7 @@ contract AmmPool is IBlockReceiver, IAgent { function processDeposit( Context memory ctx, Token memory token, - uint amount + uint96 amount ) internal { @@ -833,8 +838,8 @@ contract AmmPool is IBlockReceiver, IAgent { } function isAlmostEqual( - uint amount, - uint targetAmount + uint96 amount, + uint96 targetAmount ) internal pure diff --git a/packages/loopring_v3/contracts/thirdparty/SafeCast.sol b/packages/loopring_v3/contracts/thirdparty/SafeCast.sol new file mode 100644 index 000000000..823b3819d --- /dev/null +++ b/packages/loopring_v3/contracts/thirdparty/SafeCast.sol @@ -0,0 +1,242 @@ +// SPDX-License-Identifier: MIT +// Taken from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/SafeCast.sol + +pragma solidity ^0.7.0; + + +/** + * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow + * checks. + * + * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can + * easily result in undesired exploitation or bugs, since developers usually + * assume that overflows raise errors. `SafeCast` restores this intuition by + * reverting the transaction when such an operation overflows. + * + * Using this library instead of the unchecked operations eliminates an entire + * class of bugs, so it's recommended to use it always. + * + * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing + * all math on `uint256` and `int256` and then downcasting. + */ +library SafeCast { + + /** + * @dev Returns the downcasted uint128 from uint256, reverting on + * overflow (when the input is greater than largest uint128). + * + * Counterpart to Solidity's `uint128` operator. + * + * Requirements: + * + * - input must fit into 128 bits + */ + function toUint128(uint256 value) internal pure returns (uint128) { + require(value < 2**128, "SafeCast: value doesn\'t fit in 128 bits"); + return uint128(value); + } + + /** + * @dev Returns the downcasted uint96 from uint256, reverting on + * overflow (when the input is greater than largest uint96). + * + * Counterpart to Solidity's `uint96` operator. + * + * Requirements: + * + * - input must fit into 96 bits + */ + function toUint96(uint256 value) internal pure returns (uint96) { + require(value < 2**96, "SafeCast: value doesn\'t fit in 96 bits"); + return uint96(value); + } + + /** + * @dev Returns the downcasted uint64 from uint256, reverting on + * overflow (when the input is greater than largest uint64). + * + * Counterpart to Solidity's `uint64` operator. + * + * Requirements: + * + * - input must fit into 64 bits + */ + function toUint64(uint256 value) internal pure returns (uint64) { + require(value < 2**64, "SafeCast: value doesn\'t fit in 64 bits"); + return uint64(value); + } + + /** + * @dev Returns the downcasted uint32 from uint256, reverting on + * overflow (when the input is greater than largest uint32). + * + * Counterpart to Solidity's `uint32` operator. + * + * Requirements: + * + * - input must fit into 32 bits + */ + function toUint32(uint256 value) internal pure returns (uint32) { + require(value < 2**32, "SafeCast: value doesn\'t fit in 32 bits"); + return uint32(value); + } + + /** + * @dev Returns the downcasted uint40 from uint256, reverting on + * overflow (when the input is greater than largest uint40). + * + * Counterpart to Solidity's `uint32` operator. + * + * Requirements: + * + * - input must fit into 40 bits + */ + function toUint40(uint256 value) internal pure returns (uint40) { + require(value < 2**40, "SafeCast: value doesn\'t fit in 40 bits"); + return uint40(value); + } + + /** + * @dev Returns the downcasted uint16 from uint256, reverting on + * overflow (when the input is greater than largest uint16). + * + * Counterpart to Solidity's `uint16` operator. + * + * Requirements: + * + * - input must fit into 16 bits + */ + function toUint16(uint256 value) internal pure returns (uint16) { + require(value < 2**16, "SafeCast: value doesn\'t fit in 16 bits"); + return uint16(value); + } + + /** + * @dev Returns the downcasted uint8 from uint256, reverting on + * overflow (when the input is greater than largest uint8). + * + * Counterpart to Solidity's `uint8` operator. + * + * Requirements: + * + * - input must fit into 8 bits. + */ + function toUint8(uint256 value) internal pure returns (uint8) { + require(value < 2**8, "SafeCast: value doesn\'t fit in 8 bits"); + return uint8(value); + } + + /** + * @dev Converts a signed int256 into an unsigned uint256. + * + * Requirements: + * + * - input must be greater than or equal to 0. + */ + function toUint256(int256 value) internal pure returns (uint256) { + require(value >= 0, "SafeCast: value must be positive"); + return uint256(value); + } + + /** + * @dev Returns the downcasted int128 from int256, reverting on + * overflow (when the input is less than smallest int128 or + * greater than largest int128). + * + * Counterpart to Solidity's `int128` operator. + * + * Requirements: + * + * - input must fit into 128 bits + * + * _Available since v3.1._ + */ + function toInt128(int256 value) internal pure returns (int128) { + require(value >= -2**127 && value < 2**127, "SafeCast: value doesn\'t fit in 128 bits"); + return int128(value); + } + + /** + * @dev Returns the downcasted int64 from int256, reverting on + * overflow (when the input is less than smallest int64 or + * greater than largest int64). + * + * Counterpart to Solidity's `int64` operator. + * + * Requirements: + * + * - input must fit into 64 bits + * + * _Available since v3.1._ + */ + function toInt64(int256 value) internal pure returns (int64) { + require(value >= -2**63 && value < 2**63, "SafeCast: value doesn\'t fit in 64 bits"); + return int64(value); + } + + /** + * @dev Returns the downcasted int32 from int256, reverting on + * overflow (when the input is less than smallest int32 or + * greater than largest int32). + * + * Counterpart to Solidity's `int32` operator. + * + * Requirements: + * + * - input must fit into 32 bits + * + * _Available since v3.1._ + */ + function toInt32(int256 value) internal pure returns (int32) { + require(value >= -2**31 && value < 2**31, "SafeCast: value doesn\'t fit in 32 bits"); + return int32(value); + } + + /** + * @dev Returns the downcasted int16 from int256, reverting on + * overflow (when the input is less than smallest int16 or + * greater than largest int16). + * + * Counterpart to Solidity's `int16` operator. + * + * Requirements: + * + * - input must fit into 16 bits + * + * _Available since v3.1._ + */ + function toInt16(int256 value) internal pure returns (int16) { + require(value >= -2**15 && value < 2**15, "SafeCast: value doesn\'t fit in 16 bits"); + return int16(value); + } + + /** + * @dev Returns the downcasted int8 from int256, reverting on + * overflow (when the input is less than smallest int8 or + * greater than largest int8). + * + * Counterpart to Solidity's `int8` operator. + * + * Requirements: + * + * - input must fit into 8 bits. + * + * _Available since v3.1._ + */ + function toInt8(int256 value) internal pure returns (int8) { + require(value >= -2**7 && value < 2**7, "SafeCast: value doesn\'t fit in 8 bits"); + return int8(value); + } + + /** + * @dev Converts an unsigned uint256 into a signed int256. + * + * Requirements: + * + * - input must be less than or equal to maxInt256. + */ + function toInt256(uint256 value) internal pure returns (int256) { + require(value < 2**255, "SafeCast: value doesn't fit in an int256"); + return int256(value); + } +} \ No newline at end of file From 162d3901e5863c6af9151b92427be554d6743cca Mon Sep 17 00:00:00 2001 From: Daniel Wang Date: Sat, 19 Sep 2020 22:39:16 +0800 Subject: [PATCH 12/14] [AMM Pool] Rename variables and extract methods (#1772) * rename variables * extract methods * extract methods --- .../loopring_v3/contracts/test/AmmPool.sol | 141 +++++++++++------- 1 file changed, 84 insertions(+), 57 deletions(-) diff --git a/packages/loopring_v3/contracts/test/AmmPool.sol b/packages/loopring_v3/contracts/test/AmmPool.sol index 631c29cad..b83095819 100644 --- a/packages/loopring_v3/contracts/test/AmmPool.sol +++ b/packages/loopring_v3/contracts/test/AmmPool.sol @@ -135,8 +135,8 @@ contract AmmPool is IBlockReceiver, IAgent { uint txIdx; bytes32 DOMAIN_SEPARATOR; bytes32 exchangeDomainSeparator; - uint96[] ammBalancesInAccount; - uint96[] ammBalances; + uint96[] ammBalancesBefore; + uint96[] ammBalancesAfter; uint numTransactionsConsumed; Token[] tokens; } @@ -454,8 +454,8 @@ contract AmmPool is IBlockReceiver, IAgent { txIdx: txIdx, DOMAIN_SEPARATOR: DOMAIN_SEPARATOR, exchangeDomainSeparator: exchange.getDomainSeparator(), - ammBalancesInAccount: new uint96[](tokens.length), - ammBalances: new uint96[](tokens.length), + ammBalancesBefore: new uint96[](tokens.length), + ammBalancesAfter: new uint96[](tokens.length), numTransactionsConsumed: 0, tokens: tokens }); @@ -481,11 +481,11 @@ contract AmmPool is IBlockReceiver, IAgent { // Deposit/Withdraw to/from the AMM account when necessary for (uint i = 0; i < ctx.tokens.length; i++) { - if (ctx.ammBalances[i] > ctx.ammBalancesInAccount[i]) { - uint96 amount = ctx.ammBalances[i].sub(ctx.ammBalancesInAccount[i]); + if (ctx.ammBalancesAfter[i] > ctx.ammBalancesBefore[i]) { + uint96 amount = ctx.ammBalancesAfter[i] - ctx.ammBalancesBefore[i]; processDeposit(ctx, ctx.tokens[i], amount); - } else if (ctx.ammBalancesInAccount[i] > ctx.ammBalances[i]) { - uint96 amount = ctx.ammBalancesInAccount[i].sub(ctx.ammBalances[i]); + } else if (ctx.ammBalancesBefore[i] > ctx.ammBalancesAfter[i]) { + uint96 amount = ctx.ammBalancesBefore[i] - ctx.ammBalancesAfter[i]; processWithdrawal(ctx, ctx.tokens[i], amount); } } @@ -540,10 +540,10 @@ contract AmmPool is IBlockReceiver, IAgent { ctx.numTransactionsConsumed++; if (start) { // AMM account balance now available onchain - ctx.ammBalancesInAccount[i] = update.balance; - ctx.ammBalances[i] = ctx.ammBalancesInAccount[i]; + ctx.ammBalancesBefore[i] = update.balance; + ctx.ammBalancesAfter[i] = update.balance; } else { - require(ctx.ammBalances[i] == update.balance, "UNEXPECTED_AMM_BALANCE"); + require(ctx.ammBalancesAfter[i] == update.balance, "UNEXPECTED_AMM_BALANCE"); } } } @@ -564,28 +564,8 @@ contract AmmPool is IBlockReceiver, IAgent { require(poolTxHash.verifySignature(join.owner, signature), "INVALID_SIGNATURE"); require(join.fromLayer2, "INVALID_DATA"); } - - uint poolTotal = totalSupply(); - uint ratio = BASE; - if (poolTotal > 0) { - ratio = (join.poolAmountOut * BASE) / poolTotal; - } else { - // Important for accuracy - require(join.poolAmountOut == INITIAL_SUPPLY, "INITIAL_SUPPLY_UNEXPECTED"); - } - // Check if the requirements are fulfilled - bool valid = true; - uint96[] memory amounts = new uint96[](ctx.tokens.length); - for (uint i = 0; i < ctx.tokens.length; i++) { - amounts[i] = (ctx.ammBalances[i] * ratio / BASE).toUint96(); - if (poolTotal == 0) { - amounts[i] = join.maxAmountsIn[i]; - } - if(amounts[i] > join.maxAmountsIn[i]) { - valid = false; - } - } + (bool valid, uint96[] memory amounts) = validateJoinAmounts(ctx, join); if (valid) { for (uint i = 0; i < ctx.tokens.length; i++) { @@ -611,13 +591,13 @@ contract AmmPool is IBlockReceiver, IAgent { // Update the amount to the actual amount transferred (which can have some some small rounding errors) amount = transfer.amount; // Update the balances in the account - ctx.ammBalancesInAccount[i] = ctx.ammBalancesInAccount[i].add(amount); + ctx.ammBalancesBefore[i] = ctx.ammBalancesBefore[i].add(amount); } else { // Make the amount unavailable for withdrawing address token = ctx.tokens[i].addr; balance[token][join.owner] = balance[token][join.owner].sub(amount); } - ctx.ammBalances[i] = ctx.ammBalances[i].add(amount); + ctx.ammBalancesAfter[i] = ctx.ammBalancesAfter[i].add(amount); } // Mint liquidity tokens @@ -634,6 +614,41 @@ contract AmmPool is IBlockReceiver, IAgent { } } + function validateJoinAmounts( + Context memory ctx, + PoolJoin memory join + ) + internal + view + returns( + bool /* valid */, + uint96[] memory /* amounts */ + ) + { + uint96[] memory amounts = new uint96[](ctx.tokens.length); + uint poolTotal = totalSupply(); + uint ratio; + if (poolTotal > 0) { + ratio = join.poolAmountOut.mul(BASE) / poolTotal; + } else if (join.poolAmountOut != INITIAL_SUPPLY) { + return (false, amounts); + } else { + ratio = BASE; + } + + // Check if the requirements are fulfilled + for (uint i = 0; i < ctx.tokens.length; i++) { + amounts[i] = (poolTotal == 0) ? + join.maxAmountsIn[i] : + (ratio.mul(ctx.ammBalancesAfter[i]) / BASE).toUint96(); + + if (amounts[i] > join.maxAmountsIn[i]) { + return (false, amounts); + } + } + return (true, amounts); + } + function processExit( Context memory ctx, PoolExit memory exit, @@ -650,20 +665,11 @@ contract AmmPool is IBlockReceiver, IAgent { require(poolTxHash.verifySignature(exit.owner, signature), "INVALID_SIGNATURE"); } - uint poolTotal = totalSupply(); - uint ratio = (exit.poolAmountIn * BASE) / poolTotal; - - // Check if the requirements are fulfilled - bool valid = availableBalance(address(this), exit.owner) >= exit.poolAmountIn; - uint96[] memory amounts = new uint96[](ctx.tokens.length); - for (uint i = 0; i < ctx.tokens.length; i++) { - amounts[i] = (ctx.ammBalances[i] * ratio / BASE).toUint96(); - if(amounts[i] < exit.minAmountsOut[i]) { - valid = false; - } - } + (bool valid, uint96[] memory amounts) = validateExitAmounts(ctx, exit); if (valid) { + burn(exit.owner, exit.poolAmountIn); + for (uint i = 0; i < ctx.tokens.length; i++) { uint96 amount = amounts[i]; if (exit.toLayer2) { @@ -686,24 +692,45 @@ contract AmmPool is IBlockReceiver, IAgent { // Update the amount to the actual amount transferred (which can have some some small rounding errors) amount = transfer.amount; // Update the balances in the account - ctx.ammBalancesInAccount[i] = ctx.ammBalancesInAccount[i].sub(amount); + ctx.ammBalancesBefore[i] = ctx.ammBalancesBefore[i].sub(amount); } else { + address token = ctx.tokens[i].addr; // Make the amount available for withdrawing - balance[ctx.tokens[i].addr][exit.owner] = balance[ctx.tokens[i].addr][exit.owner].add(amount); + balance[token][exit.owner] = balance[token][exit.owner].add(amount); } - ctx.ammBalances[i] = ctx.ammBalances[i].sub(amount); + ctx.ammBalancesAfter[i] = ctx.ammBalancesAfter[i].sub(amount); } + } + } - // Burn liquidity tokens - burn(exit.owner, exit.poolAmountIn); + function validateExitAmounts( + Context memory ctx, + PoolExit memory exit + ) + internal + view + returns( + bool /* valid */, + uint96[] memory /* amounts */ + ) + { + uint96[] memory amounts = new uint96[](ctx.tokens.length); + uint poolTotal = totalSupply(); + uint ratio = exit.poolAmountIn.mul(BASE) / poolTotal; + + // Check if the user has enough pool tokens + if (availableBalance(address(this), exit.owner) < exit.poolAmountIn) { + return (false, amounts); + } + + for (uint i = 0; i < ctx.tokens.length; i++) { + amounts[i] = (ratio.mul(ctx.ammBalancesAfter[i]) / BASE).toUint96(); + if (amounts[i] < exit.minAmountsOut[i]) { + return (false, amounts); + } } - // Not needed now with non-transferable liquidity token - // if (signature.length == 0) { - // // Unlock the amount of liquidity tokens locked for this exit - // address token = address(this); - // locked[token][exit.owner] = locked[token][exit.owner].sub(exit.poolAmountIn); - // } + return (true, amounts); } function processDeposit( From 620714e355b4a19b13e6911cbd17fa00bb884358 Mon Sep 17 00:00:00 2001 From: Daniel Wang Date: Sat, 19 Sep 2020 22:44:42 +0800 Subject: [PATCH 13/14] [AMM Pool] Some small improvements (#1773) * add changes based on my questions * more Co-authored-by: wangdong Co-authored-by: Brechtpd --- .../loopring_v3/contracts/test/AmmPool.sol | 76 ++++++++++++------- 1 file changed, 50 insertions(+), 26 deletions(-) diff --git a/packages/loopring_v3/contracts/test/AmmPool.sol b/packages/loopring_v3/contracts/test/AmmPool.sol index b83095819..b37a33b81 100644 --- a/packages/loopring_v3/contracts/test/AmmPool.sol +++ b/packages/loopring_v3/contracts/test/AmmPool.sol @@ -555,15 +555,27 @@ contract AmmPool is IBlockReceiver, IAgent { ) internal { - bytes32 poolTxHash = hashPoolJoin(ctx.DOMAIN_SEPARATOR, join); - if (signature.length == 0) { - require(queue[queuePos].txHash == poolTxHash, "NOT_APPROVED"); - delete queue[queuePos]; - queuePos++; + require( + signature.length == 0 && !join.fromLayer2 || + signature.length != 0 && join.fromLayer2, + "SIGNATURE_VS_FROM_LAYER2" + ); + + authenticatePoolTx( + join.owner, + hashPoolJoin(ctx.DOMAIN_SEPARATOR, join), + signature + ); + + uint poolTotal = totalSupply(); + uint ratio = BASE; + if (poolTotal > 0) { + ratio = (join.poolAmountOut * BASE) / poolTotal; } else { - require(poolTxHash.verifySignature(join.owner, signature), "INVALID_SIGNATURE"); - require(join.fromLayer2, "INVALID_DATA"); + // Important for accuracy + require(join.poolAmountOut == INITIAL_SUPPLY, "INITIAL_SUPPLY_UNEXPECTED"); } + // Check if the requirements are fulfilled (bool valid, uint96[] memory amounts) = validateJoinAmounts(ctx, join); @@ -577,16 +589,15 @@ contract AmmPool is IBlockReceiver, IAgent { require(transfer.tokenID == ctx.tokens[i].tokenID, "INVALID_TX_DATA"); require(isAlmostEqual(transfer.amount, amount), "INVALID_TX_DATA"); require(transfer.fee == 0, "INVALID_TX_DATA"); + // Replay protection (only necessary when using a signature) - if (signature.length != 0) { - require(transfer.storageID == join.storageIDs[i], "INVALID_TX_DATA"); - } - if (signature.length != 0) { - // Now approve this transfer - transfer.validUntil = 0xffffffff; - bytes32 txHash = TransferTransaction.hashTx(ctx.exchangeDomainSeparator, transfer); - exchange.approveTransaction(join.owner, txHash); - } + require(transfer.storageID == join.storageIDs[i], "INVALID_TX_DATA"); + + // Now approve this transfer + transfer.validUntil = 0xffffffff; + bytes32 txHash = TransferTransaction.hashTx(ctx.exchangeDomainSeparator, transfer); + exchange.approveTransaction(join.owner, txHash); + ctx.numTransactionsConsumed++; // Update the amount to the actual amount transferred (which can have some some small rounding errors) amount = transfer.amount; @@ -656,14 +667,11 @@ contract AmmPool is IBlockReceiver, IAgent { ) internal { - bytes32 poolTxHash = hashPoolExit(ctx.DOMAIN_SEPARATOR, exit); - if (signature.length == 0) { - require(queue[queuePos].txHash == poolTxHash, "NOT_APPROVED"); - delete queue[queuePos]; - queuePos++; - } else { - require(poolTxHash.verifySignature(exit.owner, signature), "INVALID_SIGNATURE"); - } + authenticatePoolTx( + exit.owner, + hashPoolExit(ctx.DOMAIN_SEPARATOR, exit), + signature + ); (bool valid, uint96[] memory amounts) = validateExitAmounts(ctx, exit); @@ -680,10 +688,12 @@ contract AmmPool is IBlockReceiver, IAgent { require(transfer.tokenID == ctx.tokens[i].tokenID, "INVALID_TX_DATA"); require(isAlmostEqual(transfer.amount, amount), "INVALID_TX_DATA"); require(transfer.fee == 0, "INVALID_TX_DATA"); - // Replay protection (only necessary when using a signature) + if (signature.length != 0) { + // Replay protection (only necessary when using a signature) require(transfer.storageID == exit.storageIDs[i], "INVALID_TX_DATA"); } + // Now approve this transfer transfer.validUntil = 0xffffffff; bytes32 txHash = TransferTransaction.hashTx(ctx.exchangeDomainSeparator, transfer); @@ -729,8 +739,22 @@ contract AmmPool is IBlockReceiver, IAgent { return (false, amounts); } } + } - return (true, amounts); + function authenticatePoolTx( + address owner, + bytes32 poolTxHash, + bytes memory signature + ) + internal + { + if (signature.length == 0) { + require(queue[queuePos].txHash == poolTxHash, "NOT_APPROVED"); + delete queue[queuePos]; + queuePos++; + } else { + require(poolTxHash.verifySignature(owner, signature), "INVALID_SIGNATURE"); + } } function processDeposit( From 49dccd26e8d04398d5c7644b316f7511dda21e97 Mon Sep 17 00:00:00 2001 From: Brecht Devos Date: Mon, 21 Sep 2020 19:03:03 +0200 Subject: [PATCH 14/14] [AMM pool] Changed approvals + locking logic (#1771) * [protocol 3.6] Changed approvals + locking logic * [protocol 3.6] LP tokens * [protocol 3.6] Use minPoolAmountOut for joins * [protocol 3.6] AMM pool signature assisted L1 withdrawals + fixes * [protocol 3.6] Small improvements/fixes --- .../loopring_v3/circuit/test/data/block.json | 11101 ++++++++-------- .../aux/access/LoopringIOExchangeOwner.sol | 28 +- .../loopring_v3/contracts/test/AmmPool.sol | 397 +- .../loopring_v3/contracts/test/LPERC20.sol | 73 + packages/loopring_v3/test/testAMMPool.ts | 148 +- .../test/testExchangeInternalTransfer.ts | 500 +- 6 files changed, 6375 insertions(+), 5872 deletions(-) create mode 100644 packages/loopring_v3/contracts/test/LPERC20.sol diff --git a/packages/loopring_v3/circuit/test/data/block.json b/packages/loopring_v3/circuit/test/data/block.json index f29636e12..b5fb36778 100644 --- a/packages/loopring_v3/circuit/test/data/block.json +++ b/packages/loopring_v3/circuit/test/data/block.json @@ -1,5531 +1,178 @@ { - "blockType": 0, - "transactions": [ - { - "witness": { - "accountsMerkleRoot": "10505619900973223678074094607053943201360612555176523983490313644161054996976", - "storageUpdate_A": { - "storageID": "0", - "proof": [ - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363" - ], - "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "rootAfter": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "before": { - "data": "0", - "storageID": "0" - }, - "after": { - "data": "0", - "storageID": "0" - } - }, - "storageUpdate_B": { - "storageID": "0", - "proof": [ - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363" - ], - "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "rootAfter": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "before": { - "data": "0", - "storageID": "0" - }, - "after": { - "data": "0", - "storageID": "0" - } - }, - "balanceUpdateS_A": { - "tokenID": 3, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "rootAfter": "19157514199576531300887641137489555908636823613577180048378670220346228341107", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "200000000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_A": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "16854005601832099407593506019873020428434880270080421958263627636826197378050", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "19157514199576531300887641137489555908636823613577180048378670220346228341107", - "rootAfter": "19157514199576531300887641137489555908636823613577180048378670220346228341107", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_A": { - "accountID": 5, - "proof": [ - "4599292876496101222815455922663430957254068278129209645174244776398792698710", - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "12019024044188487320674354115170441547366217715528515711374983074859843228721", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "10505619900973223678074094607053943201360612555176523983490313644161054996976", - "rootAfter": "12602845862155522485332210729617604980713109800943394618677891840997151618229", - "before": { - "owner": "0", - "publicKeyX": "0", - "publicKeyY": "0", - "nonce": 0, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" - }, - "after": { - "owner": "526419933271819709982463936175403801443204612074", - "publicKeyX": "0", - "publicKeyY": "0", - "nonce": 0, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "19157514199576531300887641137489555908636823613577180048378670220346228341107" - } - }, - "balanceUpdateS_B": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_B": { - "tokenID": 3, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_B": { - "accountID": 1, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "3912708935772877196213382219258202241043285376032150867451001440618533185524", - "20183779616704588649983913749592259109828802399394745007572912401020774165491", - "1109078521936743790574094986950009135097317814236975655173308655164478973391", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "12602845862155522485332210729617604980713109800943394618677891840997151618229", - "rootAfter": "12602845862155522485332210729617604980713109800943394618677891840997151618229", - "before": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" - }, - "after": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" - } - }, - "balanceUpdateA_O": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_O": { - "tokenID": 3, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_O": { - "accountID": 1, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "3912708935772877196213382219258202241043285376032150867451001440618533185524", - "20183779616704588649983913749592259109828802399394745007572912401020774165491", - "1109078521936743790574094986950009135097317814236975655173308655164478973391", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "12602845862155522485332210729617604980713109800943394618677891840997151618229", - "rootAfter": "12602845862155522485332210729617604980713109800943394618677891840997151618229", - "before": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" - }, - "after": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" - } - }, - "balanceUpdateA_P": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_P": { - "tokenID": 3, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "numConditionalTransactionsAfter": 1 - }, - "deposit": { - "owner": "526419933271819709982463936175403801443204612074", - "accountID": 5, - "tokenID": 3, - "amount": "200000000000000000000", - "txType": "Deposit" - } + "blockType": 0, + "transactions": [ + { + "witness": { + "accountsMerkleRoot": "4234646276255752387587785316382445844065114913492848585012140487837685304906", + "storageUpdate_A": { + "storageID": "0", + "proof": [ + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363" + ], + "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "rootAfter": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "before": { + "data": "0", + "storageID": "0" + }, + "after": { + "data": "0", + "storageID": "0" + } }, - { - "witness": { - "accountsMerkleRoot": "12602845862155522485332210729617604980713109800943394618677891840997151618229", - "storageUpdate_A": { - "storageID": "0", - "proof": [ - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363" - ], - "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "rootAfter": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "before": { - "data": "0", - "storageID": "0" - }, - "after": { - "data": "0", - "storageID": "0" - } - }, - "storageUpdate_B": { - "storageID": "0", - "proof": [ - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363" - ], - "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "rootAfter": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "before": { - "data": "0", - "storageID": "0" - }, - "after": { - "data": "0", - "storageID": "0" - } - }, - "balanceUpdateS_A": { - "tokenID": 3, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "19157514199576531300887641137489555908636823613577180048378670220346228341107", - "rootAfter": "19157514199576531300887641137489555908636823613577180048378670220346228341107", - "before": { - "balance": "200000000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "200000000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_A": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "16854005601832099407593506019873020428434880270080421958263627636826197378050", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "19157514199576531300887641137489555908636823613577180048378670220346228341107", - "rootAfter": "19157514199576531300887641137489555908636823613577180048378670220346228341107", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_A": { - "accountID": 5, - "proof": [ - "4599292876496101222815455922663430957254068278129209645174244776398792698710", - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "12019024044188487320674354115170441547366217715528515711374983074859843228721", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "12602845862155522485332210729617604980713109800943394618677891840997151618229", - "rootAfter": "1210646020068327384035075015719405270395309781691339170311740046065681001625", - "before": { - "owner": "526419933271819709982463936175403801443204612074", - "publicKeyX": "0", - "publicKeyY": "0", - "nonce": 0, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "19157514199576531300887641137489555908636823613577180048378670220346228341107" - }, - "after": { - "owner": "526419933271819709982463936175403801443204612074", - "publicKeyX": "11759150917986913455091198525805163354154311432117593122559438133526511755354", - "publicKeyY": "20680922227217095178348798274130636775789253699804054410686493361048168534679", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "19157514199576531300887641137489555908636823613577180048378670220346228341107" - } - }, - "balanceUpdateS_B": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_B": { - "tokenID": 3, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_B": { - "accountID": 1, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "3912708935772877196213382219258202241043285376032150867451001440618533185524", - "20183779616704588649983913749592259109828802399394745007572912401020774165491", - "15930057198104070926890638491686163685589008857455871903347494467921905706791", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "1210646020068327384035075015719405270395309781691339170311740046065681001625", - "rootAfter": "1210646020068327384035075015719405270395309781691339170311740046065681001625", - "before": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" - }, - "after": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" - } - }, - "balanceUpdateA_O": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_O": { - "tokenID": 3, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_O": { - "accountID": 1, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "3912708935772877196213382219258202241043285376032150867451001440618533185524", - "20183779616704588649983913749592259109828802399394745007572912401020774165491", - "15930057198104070926890638491686163685589008857455871903347494467921905706791", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "1210646020068327384035075015719405270395309781691339170311740046065681001625", - "rootAfter": "1210646020068327384035075015719405270395309781691339170311740046065681001625", - "before": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" - }, - "after": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" - } - }, - "balanceUpdateA_P": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_P": { - "tokenID": 3, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "numConditionalTransactionsAfter": 2 - }, - "accountUpdate": { - "owner": "526419933271819709982463936175403801443204612074", - "accountID": 5, - "nonce": "0", - "validUntil": 4294967295, - "publicKeyX": "11759150917986913455091198525805163354154311432117593122559438133526511755354", - "publicKeyY": "20680922227217095178348798274130636775789253699804054410686493361048168534679", - "feeTokenID": 3, - "fee": "0", - "type": 1, - "signature": null, - "txType": "AccountUpdate" - } + "storageUpdate_B": { + "storageID": "0", + "proof": [ + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363" + ], + "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "rootAfter": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "before": { + "data": "0", + "storageID": "0" + }, + "after": { + "data": "0", + "storageID": "0" + } }, - { - "witness": { - "signatureA": { - "Rx": "2661418390500534402668938544825929064944371003454413666953483622855953207752", - "Ry": "4087833744930430113415929375241031354824269388135117126702271543356780161991", - "s": "1456249548655563952632926661720100845539709381851897921679285448464774306773" - }, - "signatureB": { - "Rx": "8085554248266987152794221088793476079770960553232032250339818326948145971542", - "Ry": "2052700035181712727961078876194339911981816751203077246442620057689082908259", - "s": "247757095368280975068455320490386799849938651402656400132061467003095142108" - }, - "accountsMerkleRoot": "1210646020068327384035075015719405270395309781691339170311740046065681001625", - "storageUpdate_A": { - "storageID": "0", - "proof": [ - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363" - ], - "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "rootAfter": "7436209684165562473029831937746432971201338059357461035705702853230089150829", - "before": { - "data": "0", - "storageID": "0" - }, - "after": { - "data": "100000000000000000000", - "storageID": "0" - } - }, - "storageUpdate_B": { - "storageID": "1", - "proof": [ - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363" - ], - "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "rootAfter": "10345489555047476050059246280037738896478895090354120394980169615556970313361", - "before": { - "data": "0", - "storageID": "0" - }, - "after": { - "data": "2000000000000000000", - "storageID": "1" - } - }, - "balanceUpdateS_A": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "4171122269972390941158422653284390941054906331442416516125020031104704330437", - "rootAfter": "20713828208283575212126346361145046894184872403294989236510386307364212634638", - "before": { - "balance": "3000000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "1000000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" - } - }, - "balanceUpdateB_A": { - "tokenID": 3, - "proof": [ - "10212681263130752346099927072267279572426975785318878493623354499708118761079", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "20713828208283575212126346361145046894184872403294989236510386307364212634638", - "rootAfter": "682943029080361998615918582229821985921902235755793363382036293835909116256", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "99800000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_A": { - "accountID": 2, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "8805769718734074598999410659651090325649780089920124629413433032497350675283", - "20183779616704588649983913749592259109828802399394745007572912401020774165491", - "15930057198104070926890638491686163685589008857455871903347494467921905706791", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "1210646020068327384035075015719405270395309781691339170311740046065681001625", - "rootAfter": "12278941043292956932936321911530852087896418916789682217220633624509740514113", - "before": { - "owner": "302473889329503696551303586380619770900292840027", - "publicKeyX": "17404162483320854632190084000319397539908578672848125088581701949817185033054", - "publicKeyY": "9904847763517334861872259545575564537049876501263864128007598322921845422051", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "4171122269972390941158422653284390941054906331442416516125020031104704330437" - }, - "after": { - "owner": "302473889329503696551303586380619770900292840027", - "publicKeyX": "17404162483320854632190084000319397539908578672848125088581701949817185033054", - "publicKeyY": "9904847763517334861872259545575564537049876501263864128007598322921845422051", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "682943029080361998615918582229821985921902235755793363382036293835909116256" - } - }, - "balanceUpdateS_B": { - "tokenID": 3, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "18535122894046600068262522863721745755289118256457477758399483488989249385904", - "rootAfter": "15569840592229860117393085340828228614168264627918773643327606839724439934294", - "before": { - "balance": "100000000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "10345489555047476050059246280037738896478895090354120394980169615556970313361" - } - }, - "balanceUpdateB_B": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "15421762780646702610915401525027517555754073044400085378529854659660582563430", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "15569840592229860117393085340828228614168264627918773643327606839724439934294", - "rootAfter": "121098114965892594983157195625035470335981572808830800161277879179254273802", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "1996000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_B": { - "accountID": 3, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "8805769718734074598999410659651090325649780089920124629413433032497350675283", - "12657030046785977303215511738581488563406116585333990870539724135367157699743", - "15930057198104070926890638491686163685589008857455871903347494467921905706791", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "12278941043292956932936321911530852087896418916789682217220633624509740514113", - "rootAfter": "12655449879979705626762759366394358678935538646825067538580856465648024715390", - "before": { - "owner": "49471351004802270806903280070893023881577954011", - "publicKeyX": "10092388251186057376763267234397091930453026454519182958649155479896875359883", - "publicKeyY": "4824845571823902149207513516110215669776029142776215390980225248346337330577", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "18535122894046600068262522863721745755289118256457477758399483488989249385904" - }, - "after": { - "owner": "49471351004802270806903280070893023881577954011", - "publicKeyX": "10092388251186057376763267234397091930453026454519182958649155479896875359883", - "publicKeyY": "4824845571823902149207513516110215669776029142776215390980225248346337330577", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "121098114965892594983157195625035470335981572808830800161277879179254273802" - } - }, - "balanceUpdateA_O": { - "tokenID": 3, - "proof": [ - "10647416309391304990993958867158354758628112591270544309379558561669546189798", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "10696485318939577928939395553607305653298791535222433869628386086310358656850", - "rootAfter": "10554490417419132206480875028778016240274934510702000289187115255273059888689", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "150000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_O": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "rootAfter": "10696485318939577928939395553607305653298791535222433869628386086310358656850", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_O": { - "accountID": 1, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "12657030046785977303215511738581488563406116585333990870539724135367157699743", - "6487156918553417175793753574646860180402681755435406978246944917321094569878", - "15930057198104070926890638491686163685589008857455871903347494467921905706791", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "12655449879979705626762759366394358678935538646825067538580856465648024715390", - "rootAfter": "14286453566074257476908137437944010629218934511155830764335049046070319364443", - "before": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" - }, - "after": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "10554490417419132206480875028778016240274934510702000289187115255273059888689" - } - }, - "balanceUpdateA_P": { - "tokenID": 3, - "proof": [ - "13491446373455331829831078991932477067233028050898044290195999859628734970986", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "8038313613460113141342080747311723853886540420676003118629555097550854240038", - "rootAfter": "5654899660208854074852795398355939229199120500085725317356541104075559633076", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "50000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_P": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", - "rootAfter": "8038313613460113141342080747311723853886540420676003118629555097550854240038", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "numConditionalTransactionsAfter": 2 - }, - "spotTrade": { - "orderA": { - "publicKeyX": "17404162483320854632190084000319397539908578672848125088581701949817185033054", - "publicKeyY": "9904847763517334861872259545575564537049876501263864128007598322921845422051", - "storageID": "0", - "accountID": 2, - "amountS": "3000000000000000000", - "amountB": "100000000000000000000", - "tokenS": 0, - "tokenB": 3, - "validUntil": 1622653402, - "fillAmountBorS": true, - "taker": "0", - "maxFeeBips": 20, - "feeBips": 20, - "amm": false, - "signature": { - "Rx": "2661418390500534402668938544825929064944371003454413666953483622855953207752", - "Ry": "4087833744930430113415929375241031354824269388135117126702271543356780161991", - "s": "1456249548655563952632926661720100845539709381851897921679285448464774306773" - }, - "valid": true - }, - "orderB": { - "publicKeyX": "10092388251186057376763267234397091930453026454519182958649155479896875359883", - "publicKeyY": "4824845571823902149207513516110215669776029142776215390980225248346337330577", - "storageID": "1", - "accountID": 3, - "amountS": "100000000000000000000", - "amountB": "2000000000000000000", - "tokenS": 3, - "tokenB": 0, - "validUntil": 1622653402, - "fillAmountBorS": true, - "taker": "0", - "maxFeeBips": 20, - "feeBips": 20, - "amm": false, - "signature": { - "Rx": "8085554248266987152794221088793476079770960553232032250339818326948145971542", - "Ry": "2052700035181712727961078876194339911981816751203077246442620057689082908259", - "s": "247757095368280975068455320490386799849938651402656400132061467003095142108" - }, - "valid": true - }, - "txType": "SpotTrade", - "valid": true, - "fFillS_A": 7015744, - "fFillS_B": 7964320, - "overwriteDataSlotA": 0, - "overwriteDataSlotB": 0 - } + "balanceUpdateS_A": { + "tokenID": 3, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "rootAfter": "19157514199576531300887641137489555908636823613577180048378670220346228341107", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "200000000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } }, - { - "witness": { - "signatureA": { - "Rx": "18628313260482563521313564729039234813645314794882713772809236077739029471864", - "Ry": "12219632579181718659058102471154040892560478763543642059776313004250000521910", - "s": "64127453779568898613832564053576155781281180383120756146004272022139086412" - }, - "signatureB": { - "Rx": "3090448185689540194105036887748021269689971600483452437549926383709848308652", - "Ry": "10675897003677641449431260556965977923607389569816954583575068054369388092246", - "s": "1386610045807074555186510564978578068902036930786972519267195526831636091592" - }, - "accountsMerkleRoot": "14286453566074257476908137437944010629218934511155830764335049046070319364443", - "storageUpdate_A": { - "storageID": "2", - "proof": [ - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363" - ], - "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "rootAfter": "17806918685196917802872545809048478937379474658058600743832280350185043653875", - "before": { - "data": "0", - "storageID": "0" - }, - "after": { - "data": "200000000000000000000", - "storageID": "2" - } - }, - "storageUpdate_B": { - "storageID": "3", - "proof": [ - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363" - ], - "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "rootAfter": "1767219143024037943661844746955611355467101589258598667568494020575922411868", - "before": { - "data": "0", - "storageID": "0" - }, - "after": { - "data": "100000000000000000000", - "storageID": "3" - } - }, - "balanceUpdateS_A": { - "tokenID": 2, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "1299940927532420275095390903322536110865323187567837352412607362613793675778", - "rootAfter": "10791705820213026174082420518324995274784957911797652812668796501429244424341", - "before": { - "balance": "110000000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "10000000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "17806918685196917802872545809048478937379474658058600743832280350185043653875" - } - }, - "balanceUpdateB_A": { - "tokenID": 3, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "14758226448595960407002463587713927699544222617880692378763423478547989076363", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "10791705820213026174082420518324995274784957911797652812668796501429244424341", - "rootAfter": "7675325200963745908789250753507142522202065804085195463202587292009025038956", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "199600000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_A": { - "accountID": 4, - "proof": [ - "2419902432465698164807996592525146274022463900396655398540680343929373850688", - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "12201285473454916004666136044482396418108804889802173395053752208621123266352", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "14286453566074257476908137437944010629218934511155830764335049046070319364443", - "rootAfter": "6460653329219920390739820429074927682036123523435470496187947881021241977896", - "before": { - "owner": "844335935966647266492846334209031131530224039934", - "publicKeyX": "5027281813194593159949354097343454312684498475548722202121938752212897832525", - "publicKeyY": "13212401484779506586843956032080349143302394204137107789803787431214488019888", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "1299940927532420275095390903322536110865323187567837352412607362613793675778" - }, - "after": { - "owner": "844335935966647266492846334209031131530224039934", - "publicKeyX": "5027281813194593159949354097343454312684498475548722202121938752212897832525", - "publicKeyY": "13212401484779506586843956032080349143302394204137107789803787431214488019888", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "7675325200963745908789250753507142522202065804085195463202587292009025038956" - } - }, - "balanceUpdateS_B": { - "tokenID": 3, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "19157514199576531300887641137489555908636823613577180048378670220346228341107", - "rootAfter": "5402520393899125015728966741198444904796613549419341526698485664809847804397", - "before": { - "balance": "200000000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "1767219143024037943661844746955611355467101589258598667568494020575922411868" - } - }, - "balanceUpdateB_B": { - "tokenID": 2, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "4442732436620062652228211998059201410278831102617529472639839587718489894867", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "5402520393899125015728966741198444904796613549419341526698485664809847804397", - "rootAfter": "19226428460439358708986163465590657156732120045765556390225799431388217279322", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "99800000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_B": { - "accountID": 5, - "proof": [ - "8380009901619196245405171854097669386210583070312631820937310687684089614385", - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "12201285473454916004666136044482396418108804889802173395053752208621123266352", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "6460653329219920390739820429074927682036123523435470496187947881021241977896", - "rootAfter": "11391180823457876275195910386371083361341948276280022731354106263049407530352", - "before": { - "owner": "526419933271819709982463936175403801443204612074", - "publicKeyX": "11759150917986913455091198525805163354154311432117593122559438133526511755354", - "publicKeyY": "20680922227217095178348798274130636775789253699804054410686493361048168534679", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "19157514199576531300887641137489555908636823613577180048378670220346228341107" - }, - "after": { - "owner": "526419933271819709982463936175403801443204612074", - "publicKeyX": "11759150917986913455091198525805163354154311432117593122559438133526511755354", - "publicKeyY": "20680922227217095178348798274130636775789253699804054410686493361048168534679", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "19226428460439358708986163465590657156732120045765556390225799431388217279322" - } - }, - "balanceUpdateA_O": { - "tokenID": 3, - "proof": [ - "10647416309391304990993958867158354758628112591270544309379558561669546189798", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12814913769241972598159455181089924862167622631405614868759663786449833629154", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "20425704926528944352071255027432217864618163897410813018433464609328113498259", - "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "before": { - "balance": "150000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "450000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_O": { - "tokenID": 2, - "proof": [ - "10647416309391304990993958867158354758628112591270544309379558561669546189798", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "15934936809640236493926209955776541507691700131937504259460970330718719121786", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "10554490417419132206480875028778016240274934510702000289187115255273059888689", - "rootAfter": "20425704926528944352071255027432217864618163897410813018433464609328113498259", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "175000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_O": { - "accountID": 1, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "12657030046785977303215511738581488563406116585333990870539724135367157699743", - "6487156918553417175793753574646860180402681755435406978246944917321094569878", - "1011839816931211609179967414964039657943750149030352341309576727853365489733", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "11391180823457876275195910386371083361341948276280022731354106263049407530352", - "rootAfter": "19978761656381460675038192787937040146674610602947568623947604888060757547076", - "before": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "10554490417419132206480875028778016240274934510702000289187115255273059888689" - }, - "after": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" - } - }, - "balanceUpdateA_P": { - "tokenID": 3, - "proof": [ - "13491446373455331829831078991932477067233028050898044290195999859628734970986", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12789355867591265262341260848506327581557698276283941404801602383252287026449", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "12519024714025715888597014141965339069192082195237796382785148782810374541289", - "rootAfter": "5655656557858684412635275259062534829478535653500738453563112493957837082962", - "before": { - "balance": "50000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "150000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_P": { - "tokenID": 2, - "proof": [ - "13491446373455331829831078991932477067233028050898044290195999859628734970986", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "17027066433947857206927760065726079045763402875736291038372960057487201241799", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "5654899660208854074852795398355939229199120500085725317356541104075559633076", - "rootAfter": "12519024714025715888597014141965339069192082195237796382785148782810374541289", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "25000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "numConditionalTransactionsAfter": 2 - }, - "spotTrade": { - "orderA": { - "publicKeyX": "5027281813194593159949354097343454312684498475548722202121938752212897832525", - "publicKeyY": "13212401484779506586843956032080349143302394204137107789803787431214488019888", - "storageID": "2", - "accountID": 4, - "amountS": "110000000000000000000", - "amountB": "200000000000000000000", - "tokenS": 2, - "tokenB": 3, - "validUntil": 1622653402, - "fillAmountBorS": true, - "taker": "0", - "maxFeeBips": 20, - "feeBips": 20, - "amm": false, - "signature": { - "Rx": "18628313260482563521313564729039234813645314794882713772809236077739029471864", - "Ry": "12219632579181718659058102471154040892560478763543642059776313004250000521910", - "s": "64127453779568898613832564053576155781281180383120756146004272022139086412" - }, - "valid": true - }, - "orderB": { - "publicKeyX": "11759150917986913455091198525805163354154311432117593122559438133526511755354", - "publicKeyY": "20680922227217095178348798274130636775789253699804054410686493361048168534679", - "storageID": "3", - "accountID": 5, - "amountS": "200000000000000000000", - "amountB": "100000000000000000000", - "tokenS": 3, - "tokenB": 2, - "validUntil": 1622653403, - "fillAmountBorS": true, - "taker": "0", - "maxFeeBips": 20, - "feeBips": 20, - "amm": false, - "signature": { - "Rx": "3090448185689540194105036887748021269689971600483452437549926383709848308652", - "Ry": "10675897003677641449431260556965977923607389569816954583575068054369388092246", - "s": "1386610045807074555186510564978578068902036930786972519267195526831636091592" - }, - "valid": true - }, - "txType": "SpotTrade", - "valid": true, - "fFillS_A": 7964320, - "fFillS_B": 8064320, - "overwriteDataSlotA": 0, - "overwriteDataSlotB": 0 - } + "balanceUpdateB_A": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "16854005601832099407593506019873020428434880270080421958263627636826197378050", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "19157514199576531300887641137489555908636823613577180048378670220346228341107", + "rootAfter": "19157514199576531300887641137489555908636823613577180048378670220346228341107", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } }, - { - "witness": { - "accountsMerkleRoot": "19978761656381460675038192787937040146674610602947568623947604888060757547076", - "storageUpdate_A": { - "storageID": "0", - "proof": [ - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363" - ], - "rootBefore": "7436209684165562473029831937746432971201338059357461035705702853230089150829", - "rootAfter": "7436209684165562473029831937746432971201338059357461035705702853230089150829", - "before": { - "data": "100000000000000000000", - "storageID": "0" - }, - "after": { - "data": "100000000000000000000", - "storageID": "0" - } - }, - "storageUpdate_B": { - "storageID": "0", - "proof": [ - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363" - ], - "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "rootAfter": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "before": { - "data": "0", - "storageID": "0" - }, - "after": { - "data": "0", - "storageID": "0" - } - }, - "balanceUpdateS_A": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "6716112700423817334084597075438099014698885716464673884870325534362044348246", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "682943029080361998615918582229821985921902235755793363382036293835909116256", - "rootAfter": "906979594043086786568429362518145843840498020754491819742319485969869007875", - "before": { - "balance": "1000000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" - }, - "after": { - "balance": "3900000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" - } - }, - "balanceUpdateB_A": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "6716112700423817334084597075438099014698885716464673884870325534362044348246", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "906979594043086786568429362518145843840498020754491819742319485969869007875", - "rootAfter": "906979594043086786568429362518145843840498020754491819742319485969869007875", - "before": { - "balance": "3900000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" - }, - "after": { - "balance": "3900000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" - } - }, - "accountUpdate_A": { - "accountID": 2, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "1111709153611837406738183853766548548441800810197545504716582369459090533374", - "6487156918553417175793753574646860180402681755435406978246944917321094569878", - "1011839816931211609179967414964039657943750149030352341309576727853365489733", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "19978761656381460675038192787937040146674610602947568623947604888060757547076", - "rootAfter": "14341802668974904165220058540897836562217403259587996402548487217543938841609", - "before": { - "owner": "302473889329503696551303586380619770900292840027", - "publicKeyX": "17404162483320854632190084000319397539908578672848125088581701949817185033054", - "publicKeyY": "9904847763517334861872259545575564537049876501263864128007598322921845422051", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "682943029080361998615918582229821985921902235755793363382036293835909116256" - }, - "after": { - "owner": "302473889329503696551303586380619770900292840027", - "publicKeyX": "17404162483320854632190084000319397539908578672848125088581701949817185033054", - "publicKeyY": "9904847763517334861872259545575564537049876501263864128007598322921845422051", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "906979594043086786568429362518145843840498020754491819742319485969869007875" - } - }, - "balanceUpdateS_B": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12814913769241972598159455181089924862167622631405614868759663786449833629154", - "17939109203773673483631273684835261416911025122485371892729395539523821659680", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "before": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_B": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12814913769241972598159455181089924862167622631405614868759663786449833629154", - "17939109203773673483631273684835261416911025122485371892729395539523821659680", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "before": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_B": { - "accountID": 1, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "10977122475882088947608903525958221788351855116841594330413339712325066506966", - "6487156918553417175793753574646860180402681755435406978246944917321094569878", - "1011839816931211609179967414964039657943750149030352341309576727853365489733", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "14341802668974904165220058540897836562217403259587996402548487217543938841609", - "rootAfter": "14341802668974904165220058540897836562217403259587996402548487217543938841609", - "before": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" - }, - "after": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" - } - }, - "balanceUpdateA_O": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12814913769241972598159455181089924862167622631405614868759663786449833629154", - "17939109203773673483631273684835261416911025122485371892729395539523821659680", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "before": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_O": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12814913769241972598159455181089924862167622631405614868759663786449833629154", - "17939109203773673483631273684835261416911025122485371892729395539523821659680", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "before": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_O": { - "accountID": 1, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "10977122475882088947608903525958221788351855116841594330413339712325066506966", - "6487156918553417175793753574646860180402681755435406978246944917321094569878", - "1011839816931211609179967414964039657943750149030352341309576727853365489733", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "14341802668974904165220058540897836562217403259587996402548487217543938841609", - "rootAfter": "14341802668974904165220058540897836562217403259587996402548487217543938841609", - "before": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" - }, - "after": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" - } - }, - "balanceUpdateA_P": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12789355867591265262341260848506327581557698276283941404801602383252287026449", - "15934936809640236493926209955776541507691700131937504259460970330718719121786", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "5655656557858684412635275259062534829478535653500738453563112493957837082962", - "rootAfter": "5655656557858684412635275259062534829478535653500738453563112493957837082962", - "before": { - "balance": "500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_P": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12789355867591265262341260848506327581557698276283941404801602383252287026449", - "15934936809640236493926209955776541507691700131937504259460970330718719121786", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "5655656557858684412635275259062534829478535653500738453563112493957837082962", - "rootAfter": "5655656557858684412635275259062534829478535653500738453563112493957837082962", - "before": { - "balance": "500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "numConditionalTransactionsAfter": 3 - }, - "deposit": { - "owner": "302473889329503696551303586380619770900292840027", - "accountID": 2, - "tokenID": 0, - "amount": "2900000000000000000", - "txType": "Deposit" - } - }, - { - "witness": { - "accountsMerkleRoot": "14341802668974904165220058540897836562217403259587996402548487217543938841609", - "storageUpdate_A": { - "storageID": "0", - "proof": [ - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363" - ], - "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "rootAfter": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "before": { - "data": "0", - "storageID": "0" - }, - "after": { - "data": "0", - "storageID": "0" - } - }, - "storageUpdate_B": { - "storageID": "0", - "proof": [ - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363" - ], - "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "rootAfter": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "before": { - "data": "0", - "storageID": "0" - }, - "after": { - "data": "0", - "storageID": "0" - } - }, - "balanceUpdateS_A": { - "tokenID": 1, - "proof": [ - "7111274457863588030027770157323915540814026940711241502043369539090692864772", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "6716112700423817334084597075438099014698885716464673884870325534362044348246", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "906979594043086786568429362518145843840498020754491819742319485969869007875", - "rootAfter": "6670206653117102573337188350743626387660045207626011060235898500281482664080", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "12300000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_A": { - "tokenID": 0, - "proof": [ - "17279879586386421194826831423615334014742871003923394992373027689670108210524", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "6716112700423817334084597075438099014698885716464673884870325534362044348246", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "6670206653117102573337188350743626387660045207626011060235898500281482664080", - "rootAfter": "6670206653117102573337188350743626387660045207626011060235898500281482664080", - "before": { - "balance": "3900000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" - }, - "after": { - "balance": "3900000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" - } - }, - "accountUpdate_A": { - "accountID": 2, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "1111709153611837406738183853766548548441800810197545504716582369459090533374", - "6487156918553417175793753574646860180402681755435406978246944917321094569878", - "1011839816931211609179967414964039657943750149030352341309576727853365489733", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "14341802668974904165220058540897836562217403259587996402548487217543938841609", - "rootAfter": "1442821714994139533662764093540747088272938094833607370488172825323338012521", - "before": { - "owner": "302473889329503696551303586380619770900292840027", - "publicKeyX": "17404162483320854632190084000319397539908578672848125088581701949817185033054", - "publicKeyY": "9904847763517334861872259545575564537049876501263864128007598322921845422051", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "906979594043086786568429362518145843840498020754491819742319485969869007875" - }, - "after": { - "owner": "302473889329503696551303586380619770900292840027", - "publicKeyX": "17404162483320854632190084000319397539908578672848125088581701949817185033054", - "publicKeyY": "9904847763517334861872259545575564537049876501263864128007598322921845422051", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "6670206653117102573337188350743626387660045207626011060235898500281482664080" - } - }, - "balanceUpdateS_B": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12814913769241972598159455181089924862167622631405614868759663786449833629154", - "17939109203773673483631273684835261416911025122485371892729395539523821659680", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "before": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_B": { - "tokenID": 1, - "proof": [ - "10647416309391304990993958867158354758628112591270544309379558561669546189798", - "12814913769241972598159455181089924862167622631405614868759663786449833629154", - "17939109203773673483631273684835261416911025122485371892729395539523821659680", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_B": { - "accountID": 1, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "7804858075540551050042370258366539623586775361175139518382846317890052124738", - "6487156918553417175793753574646860180402681755435406978246944917321094569878", - "1011839816931211609179967414964039657943750149030352341309576727853365489733", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "1442821714994139533662764093540747088272938094833607370488172825323338012521", - "rootAfter": "1442821714994139533662764093540747088272938094833607370488172825323338012521", - "before": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" - }, - "after": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" - } - }, - "balanceUpdateA_O": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12814913769241972598159455181089924862167622631405614868759663786449833629154", - "17939109203773673483631273684835261416911025122485371892729395539523821659680", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "before": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_O": { - "tokenID": 1, - "proof": [ - "10647416309391304990993958867158354758628112591270544309379558561669546189798", - "12814913769241972598159455181089924862167622631405614868759663786449833629154", - "17939109203773673483631273684835261416911025122485371892729395539523821659680", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_O": { - "accountID": 1, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "7804858075540551050042370258366539623586775361175139518382846317890052124738", - "6487156918553417175793753574646860180402681755435406978246944917321094569878", - "1011839816931211609179967414964039657943750149030352341309576727853365489733", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "1442821714994139533662764093540747088272938094833607370488172825323338012521", - "rootAfter": "1442821714994139533662764093540747088272938094833607370488172825323338012521", - "before": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" - }, - "after": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" - } - }, - "balanceUpdateA_P": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12789355867591265262341260848506327581557698276283941404801602383252287026449", - "15934936809640236493926209955776541507691700131937504259460970330718719121786", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "5655656557858684412635275259062534829478535653500738453563112493957837082962", - "rootAfter": "5655656557858684412635275259062534829478535653500738453563112493957837082962", - "before": { - "balance": "500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_P": { - "tokenID": 1, - "proof": [ - "13491446373455331829831078991932477067233028050898044290195999859628734970986", - "12789355867591265262341260848506327581557698276283941404801602383252287026449", - "15934936809640236493926209955776541507691700131937504259460970330718719121786", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "5655656557858684412635275259062534829478535653500738453563112493957837082962", - "rootAfter": "5655656557858684412635275259062534829478535653500738453563112493957837082962", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "numConditionalTransactionsAfter": 4 - }, - "deposit": { - "owner": "302473889329503696551303586380619770900292840027", - "accountID": 2, - "tokenID": 1, - "amount": "12300000000000000000", - "txType": "Deposit" - } - }, - { - "witness": { - "accountsMerkleRoot": "1442821714994139533662764093540747088272938094833607370488172825323338012521", - "storageUpdate_A": { - "storageID": "4", - "proof": [ - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18778634070375180209661960740765899705585624724394726133374532870813264290670", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363" - ], - "rootBefore": "7436209684165562473029831937746432971201338059357461035705702853230089150829", - "rootAfter": "8739504241053213573302648715869067369013371720585768168293437330947408106722", - "before": { - "data": "0", - "storageID": "0" - }, - "after": { - "data": "1", - "storageID": "4" - } - }, - "storageUpdate_B": { - "storageID": "0", - "proof": [ - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363" - ], - "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "rootAfter": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "before": { - "data": "0", - "storageID": "0" - }, - "after": { - "data": "0", - "storageID": "0" - } - }, - "balanceUpdateS_A": { - "tokenID": 0, - "proof": [ - "17279879586386421194826831423615334014742871003923394992373027689670108210524", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "6716112700423817334084597075438099014698885716464673884870325534362044348246", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "6670206653117102573337188350743626387660045207626011060235898500281482664080", - "rootAfter": "3689349666065394769748381932815895528581260275205706815886187321687572611106", - "before": { - "balance": "3900000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" - }, - "after": { - "balance": "1000000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "8739504241053213573302648715869067369013371720585768168293437330947408106722" - } - }, - "balanceUpdateB_A": { - "tokenID": 1, - "proof": [ - "11815175519871560162005815021876176140783794452961686771304566065284578582844", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "6716112700423817334084597075438099014698885716464673884870325534362044348246", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "3689349666065394769748381932815895528581260275205706815886187321687572611106", - "rootAfter": "4064978289161935749899570875320976251455148656108383729047124315375831496500", - "before": { - "balance": "12300000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_A": { - "accountID": 2, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "1111709153611837406738183853766548548441800810197545504716582369459090533374", - "6487156918553417175793753574646860180402681755435406978246944917321094569878", - "1011839816931211609179967414964039657943750149030352341309576727853365489733", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "1442821714994139533662764093540747088272938094833607370488172825323338012521", - "rootAfter": "191319883540497211588720680838005841420000694388921218655243845578180909496", - "before": { - "owner": "302473889329503696551303586380619770900292840027", - "publicKeyX": "17404162483320854632190084000319397539908578672848125088581701949817185033054", - "publicKeyY": "9904847763517334861872259545575564537049876501263864128007598322921845422051", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "6670206653117102573337188350743626387660045207626011060235898500281482664080" - }, - "after": { - "owner": "302473889329503696551303586380619770900292840027", - "publicKeyX": "17404162483320854632190084000319397539908578672848125088581701949817185033054", - "publicKeyY": "9904847763517334861872259545575564537049876501263864128007598322921845422051", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "4064978289161935749899570875320976251455148656108383729047124315375831496500" - } - }, - "balanceUpdateS_B": { - "tokenID": 1, - "proof": [ - "4931429804720514645497420561808051675342370259280213508311304483117230576784", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "15421762780646702610915401525027517555754073044400085378529854659660582563430", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "121098114965892594983157195625035470335981572808830800161277879179254273802", - "rootAfter": "121098114965892594983157195625035470335981572808830800161277879179254273802", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_B": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "15421762780646702610915401525027517555754073044400085378529854659660582563430", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "121098114965892594983157195625035470335981572808830800161277879179254273802", - "rootAfter": "118063124513716630134855550662120390927487701791662704509627444120486872975", - "before": { - "balance": "1996000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "4896000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_B": { - "accountID": 3, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "1111709153611837406738183853766548548441800810197545504716582369459090533374", - "1145309617779282571435068694801398484099860507972674430925654854114659706763", - "1011839816931211609179967414964039657943750149030352341309576727853365489733", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "191319883540497211588720680838005841420000694388921218655243845578180909496", - "rootAfter": "11984675875191353748103930844008414923449028500537566065760161331445855579159", - "before": { - "owner": "49471351004802270806903280070893023881577954011", - "publicKeyX": "10092388251186057376763267234397091930453026454519182958649155479896875359883", - "publicKeyY": "4824845571823902149207513516110215669776029142776215390980225248346337330577", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "121098114965892594983157195625035470335981572808830800161277879179254273802" - }, - "after": { - "owner": "49471351004802270806903280070893023881577954011", - "publicKeyX": "10092388251186057376763267234397091930453026454519182958649155479896875359883", - "publicKeyY": "4824845571823902149207513516110215669776029142776215390980225248346337330577", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "118063124513716630134855550662120390927487701791662704509627444120486872975" - } - }, - "balanceUpdateA_O": { - "tokenID": 1, - "proof": [ - "10647416309391304990993958867158354758628112591270544309379558561669546189798", - "12814913769241972598159455181089924862167622631405614868759663786449833629154", - "17939109203773673483631273684835261416911025122485371892729395539523821659680", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "rootAfter": "5907736891002260492301101315399850592315442227491319295389418184620053552682", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "12300000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_O": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12814913769241972598159455181089924862167622631405614868759663786449833629154", - "17939109203773673483631273684835261416911025122485371892729395539523821659680", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", - "before": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_O": { - "accountID": 1, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "1145309617779282571435068694801398484099860507972674430925654854114659706763", - "182475642226904709060940689295985395180486643188647573351869608234292284153", - "1011839816931211609179967414964039657943750149030352341309576727853365489733", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "11984675875191353748103930844008414923449028500537566065760161331445855579159", - "rootAfter": "21669330583785638970965324376038831635034748005490656572262938124503366674214", - "before": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" - }, - "after": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "5907736891002260492301101315399850592315442227491319295389418184620053552682" - } - }, - "balanceUpdateA_P": { - "tokenID": 1, - "proof": [ - "13491446373455331829831078991932477067233028050898044290195999859628734970986", - "12789355867591265262341260848506327581557698276283941404801602383252287026449", - "15934936809640236493926209955776541507691700131937504259460970330718719121786", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "5655656557858684412635275259062534829478535653500738453563112493957837082962", - "rootAfter": "5655656557858684412635275259062534829478535653500738453563112493957837082962", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_P": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12789355867591265262341260848506327581557698276283941404801602383252287026449", - "15934936809640236493926209955776541507691700131937504259460970330718719121786", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "5655656557858684412635275259062534829478535653500738453563112493957837082962", - "rootAfter": "5655656557858684412635275259062534829478535653500738453563112493957837082962", - "before": { - "balance": "500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "numConditionalTransactionsAfter": 5 - }, - "transfer": { - "fromAccountID": 2, - "toAccountID": 3, - "tokenID": 0, - "amount": "2900000000000000000", - "feeTokenID": 1, - "fee": "12300000000000000000", - "type": 1, - "storageID": "4", - "from": "302473889329503696551303586380619770900292840027", - "to": "49471351004802270806903280070893023881577954011", - "validUntil": 4294967295, - "dualAuthorX": "0", - "dualAuthorY": "0", - "payerToAccountID": 3, - "payerTo": "49471351004802270806903280070893023881577954011", - "payeeToAccountID": 3, - "maxFee": "12300000000000000000", - "signature": null, - "dualSignature": null, - "onchainSignature": null, - "txType": "Transfer", - "toNewAccount": false, - "overwriteDataSlot": 0 - } - }, - { - "witness": { - "signatureA": { - "Rx": "17272953335958335829750182511177946115896667648041240374625594387737115731542", - "Ry": "4273202238055385844849001087888299344548105336206563276500891360218676328575", - "s": "1573318787803950634771626766539272305221475369575817972980276910746238716966" - }, - "accountsMerkleRoot": "21669330583785638970965324376038831635034748005490656572262938124503366674214", - "storageUpdate_A": { - "storageID": "5", - "proof": [ - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363" - ], - "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "rootAfter": "21224967167965363152847526563527794036366272617862396615135961663400670503473", - "before": { - "data": "0", - "storageID": "0" - }, - "after": { - "data": "1", - "storageID": "5" - } - }, - "storageUpdate_B": { - "storageID": "0", - "proof": [ - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "18298609842015643040044099129089617646726077709878673957695062439183530196057", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "2371789476252246873145569183657984076150578936906379480269269056232125907764", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "8800186346908183461856028750254793130520064617249067863214641604786981171326", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "450569423324398381878223050304711553427091274530305503127765682565001437816", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "19316706057866088599694844743452177063937400906307042325376077309033687477087", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "3555867249999216554532402585819161678647739033440489641964733950427369655472", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363", - "795979465643493012323073720522215153926162619126462630791100824127044582363" - ], - "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "rootAfter": "6592749167578234498153410564243369229486412054742481069049239297514590357090", - "before": { - "data": "0", - "storageID": "0" - }, - "after": { - "data": "0", - "storageID": "0" - } - }, - "balanceUpdateS_A": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "15421762780646702610915401525027517555754073044400085378529854659660582563430", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "118063124513716630134855550662120390927487701791662704509627444120486872975", - "rootAfter": "1349555015960293765933784513890029539643928310498319843880388193591711918169", - "before": { - "balance": "4896000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "1996000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "21224967167965363152847526563527794036366272617862396615135961663400670503473" - } - }, - "balanceUpdateB_A": { - "tokenID": 1, - "proof": [ - "21260512682791889514153295592478266160401259654159412015973657729165819994013", - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "15421762780646702610915401525027517555754073044400085378529854659660582563430", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "1349555015960293765933784513890029539643928310498319843880388193591711918169", - "rootAfter": "1349555015960293765933784513890029539643928310498319843880388193591711918169", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_A": { - "accountID": 3, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "15932289776938004607420749618336926099372666589435914881632447657914227078520", - "1145309617779282571435068694801398484099860507972674430925654854114659706763", - "1011839816931211609179967414964039657943750149030352341309576727853365489733", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "21669330583785638970965324376038831635034748005490656572262938124503366674214", - "rootAfter": "17289838892821374592955647437870740235595779716354176533588856212470431656882", - "before": { - "owner": "49471351004802270806903280070893023881577954011", - "publicKeyX": "10092388251186057376763267234397091930453026454519182958649155479896875359883", - "publicKeyY": "4824845571823902149207513516110215669776029142776215390980225248346337330577", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "118063124513716630134855550662120390927487701791662704509627444120486872975" - }, - "after": { - "owner": "49471351004802270806903280070893023881577954011", - "publicKeyX": "10092388251186057376763267234397091930453026454519182958649155479896875359883", - "publicKeyY": "4824845571823902149207513516110215669776029142776215390980225248346337330577", - "nonce": 1, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "1349555015960293765933784513890029539643928310498319843880388193591711918169" - } - }, - "balanceUpdateS_B": { - "tokenID": 1, - "proof": [ - "10647416309391304990993958867158354758628112591270544309379558561669546189798", - "12814913769241972598159455181089924862167622631405614868759663786449833629154", - "17939109203773673483631273684835261416911025122485371892729395539523821659680", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "5907736891002260492301101315399850592315442227491319295389418184620053552682", - "rootAfter": "5907736891002260492301101315399850592315442227491319295389418184620053552682", - "before": { - "balance": "12300000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "12300000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_B": { - "tokenID": 0, - "proof": [ - "17279879586386421194826831423615334014742871003923394992373027689670108210524", - "12814913769241972598159455181089924862167622631405614868759663786449833629154", - "17939109203773673483631273684835261416911025122485371892729395539523821659680", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "5907736891002260492301101315399850592315442227491319295389418184620053552682", - "rootAfter": "5907736891002260492301101315399850592315442227491319295389418184620053552682", - "before": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_B": { - "accountID": 1, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "1145309617779282571435068694801398484099860507972674430925654854114659706763", - "16622239027211189691862112891698158372719615959807891883376028521145534135495", - "1011839816931211609179967414964039657943750149030352341309576727853365489733", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "17289838892821374592955647437870740235595779716354176533588856212470431656882", - "rootAfter": "17289838892821374592955647437870740235595779716354176533588856212470431656882", - "before": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "5907736891002260492301101315399850592315442227491319295389418184620053552682" - }, - "after": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "5907736891002260492301101315399850592315442227491319295389418184620053552682" - } - }, - "balanceUpdateA_O": { - "tokenID": 1, - "proof": [ - "10647416309391304990993958867158354758628112591270544309379558561669546189798", - "12814913769241972598159455181089924862167622631405614868759663786449833629154", - "17939109203773673483631273684835261416911025122485371892729395539523821659680", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "5907736891002260492301101315399850592315442227491319295389418184620053552682", - "rootAfter": "5907736891002260492301101315399850592315442227491319295389418184620053552682", - "before": { - "balance": "12300000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "12300000000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_O": { - "tokenID": 0, - "proof": [ - "17279879586386421194826831423615334014742871003923394992373027689670108210524", - "12814913769241972598159455181089924862167622631405614868759663786449833629154", - "17939109203773673483631273684835261416911025122485371892729395539523821659680", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "5907736891002260492301101315399850592315442227491319295389418184620053552682", - "rootAfter": "5907736891002260492301101315399850592315442227491319295389418184620053552682", - "before": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "3500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "accountUpdate_O": { - "accountID": 1, - "proof": [ - "5418215761218159140333834208930113385110152943258857812431343823125268479924", - "1145309617779282571435068694801398484099860507972674430925654854114659706763", - "16622239027211189691862112891698158372719615959807891883376028521145534135495", - "1011839816931211609179967414964039657943750149030352341309576727853365489733", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "3273276600442218616878319311187237278006868703125551946902943986339461140950", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "20363906916247292431697008251927445286940534497642961227707554059181688159634", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "4568215769684345114363941075606692969518938143818010021878089679410693114991", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "3223804656694515885738149454521170797313831028448681382254986509328133197487", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "11129485840813032773562329166048354606803069949598409333143709661998917922044", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "8129120150769574825684072618117585552262779552757986502505812213160533692117", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17454170604659182261556269601822644080088886566880885383944560041463231016723", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "17459553329070667182735619332427473162137980879021647607018065389610482900373", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "4080611622061406529333284921393034563828607994825318808061854939974484479764", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "11253370801247681059578794958034969134162139843758165846092572855047261801062", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "267776031454138575916678089979894817671514166225689018164998105549078880362", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "18706481359309263659146962473097006582188524314991157324258177079130905929041", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "17881060774779912351599409707000393409892971775198525478203378566989271314843", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "18902111915247825518055392467716739393322694930451728728678068519869599986150", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157", - "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "17289838892821374592955647437870740235595779716354176533588856212470431656882", - "rootAfter": "17289838892821374592955647437870740235595779716354176533588856212470431656882", - "before": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "5907736891002260492301101315399850592315442227491319295389418184620053552682" - }, - "after": { - "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 2, - "feeBipsAMM": 0, - "_balancesTree": null, - "_balancesLeafs": null, - "balancesRoot": "5907736891002260492301101315399850592315442227491319295389418184620053552682" - } - }, - "balanceUpdateA_P": { - "tokenID": 1, - "proof": [ - "13491446373455331829831078991932477067233028050898044290195999859628734970986", - "12789355867591265262341260848506327581557698276283941404801602383252287026449", - "15934936809640236493926209955776541507691700131937504259460970330718719121786", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "5655656557858684412635275259062534829478535653500738453563112493957837082962", - "rootAfter": "5655656557858684412635275259062534829478535653500738453563112493957837082962", - "before": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "0", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "balanceUpdateB_P": { - "tokenID": 0, - "proof": [ - "12197991638270691487744821166354688521061097726524551723597013006897868939455", - "12789355867591265262341260848506327581557698276283941404801602383252287026449", - "15934936809640236493926209955776541507691700131937504259460970330718719121786", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17358037724428000508128864074991513326562524545303608992526228726434255987169", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "17513940148684676243890944153955870654671065039031825165449213873007092719980", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "10244008707337887063912263475060423963741516904229297268904502137775361285826", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "2848849206526422352325761132544684113484497375690047556930154132010354385020", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "21797804544064529135438332621733031215319361905350891787643637687174529920427", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "16735359351101336084294800264059823159282750371738013340438596014409923295711", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374", - "10290917572276134290799410387776748006369038342868925134871406202713167915374" - ], - "rootBefore": "5655656557858684412635275259062534829478535653500738453563112493957837082962", - "rootAfter": "5655656557858684412635275259062534829478535653500738453563112493957837082962", - "before": { - "balance": "500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - }, - "after": { - "balance": "500000000000000", - "weightAMM": "0", - "_storageTree": null, - "_storageLeafs": null, - "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" - } - }, - "numConditionalTransactionsAfter": 6 - }, - "withdraw": { - "owner": "49471351004802270806903280070893023881577954011", - "accountID": 3, - "storageID": "5", - "tokenID": 0, - "amount": "2900000000000000000", - "feeTokenID": 1, - "fee": "0", - "onchainDataHash": "1337495345287527062178932235405878560329820900812", - "type": 0, - "validUntil": 4294967295, - "maxFee": "0", - "signature": { - "Rx": "17272953335958335829750182511177946115896667648041240374625594387737115731542", - "Ry": "4273202238055385844849001087888299344548105336206563276500891360218676328575", - "s": "1573318787803950634771626766539272305221475369575817972980276910746238716966" - }, - "txType": "Withdraw" - } - } - ], - "exchange": "1310719984974032333896433536512257099104359168913", - "merkleRootBefore": "10505619900973223678074094607053943201360612555176523983490313644161054996976", - "timestamp": 1622649834, - "protocolTakerFeeBips": 50, - "protocolMakerFeeBips": 25, - "operatorAccountID": 1, - "accountUpdate_P": { - "accountID": 0, - "proof": [ - "15932289776938004607420749618336926099372666589435914881632447657914227078520", - "1145309617779282571435068694801398484099860507972674430925654854114659706763", - "16622239027211189691862112891698158372719615959807891883376028521145534135495", - "1011839816931211609179967414964039657943750149030352341309576727853365489733", + "accountUpdate_A": { + "accountID": 5, + "proof": [ + "6593113309676556888730676529089877715893091189937406204364534839969262143628", + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "6338777704522060856284412368693150826416459556807886597331460279922710048781", "3273276600442218616878319311187237278006868703125551946902943986339461140950", "3273276600442218616878319311187237278006868703125551946902943986339461140950", "20363906916247292431697008251927445286940534497642961227707554059181688159634", @@ -5570,10 +217,10 @@ "9161534436368786480469207659954043146097383092544618581411592772464665325157", "9161534436368786480469207659954043146097383092544618581411592772464665325157", "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "17289838892821374592955647437870740235595779716354176533588856212470431656882", - "rootAfter": "21580601762484156854931842038789474826767003632649099252058491731197045352715", - "before": { + ], + "rootBefore": "4234646276255752387587785316382445844065114913492848585012140487837685304906", + "rootAfter": "4319607671597645913587815788613932478787011146030747679931301473859828914587", + "before": { "owner": "0", "publicKeyX": "0", "publicKeyY": "0", @@ -5582,25 +229,785 @@ "_balancesTree": null, "_balancesLeafs": null, "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" - }, - "after": { - "owner": "0", + }, + "after": { + "owner": "526419933271819709982463936175403801443204612074", "publicKeyX": "0", "publicKeyY": "0", "nonce": 0, "feeBipsAMM": 0, "_balancesTree": null, "_balancesLeafs": null, - "balancesRoot": "5655656557858684412635275259062534829478535653500738453563112493957837082962" - } + "balancesRoot": "19157514199576531300887641137489555908636823613577180048378670220346228341107" + } + }, + "balanceUpdateS_B": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_B": { + "tokenID": 3, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_B": { + "accountID": 1, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "4728161871326899471267777111122704811062999373510172715228807007407084281404", + "5764797262300076263290914987844528232545662128663692192589207003716126063096", + "15504565619755201806930278684179332909853524998656200311725938202458979478589", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "4319607671597645913587815788613932478787011146030747679931301473859828914587", + "rootAfter": "4319607671597645913587815788613932478787011146030747679931301473859828914587", + "before": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" + }, + "after": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" + } + }, + "balanceUpdateA_O": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_O": { + "tokenID": 3, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_O": { + "accountID": 1, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "4728161871326899471267777111122704811062999373510172715228807007407084281404", + "5764797262300076263290914987844528232545662128663692192589207003716126063096", + "15504565619755201806930278684179332909853524998656200311725938202458979478589", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "4319607671597645913587815788613932478787011146030747679931301473859828914587", + "rootAfter": "4319607671597645913587815788613932478787011146030747679931301473859828914587", + "before": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" + }, + "after": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" + } + }, + "balanceUpdateA_P": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_P": { + "tokenID": 3, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "numConditionalTransactionsAfter": 1 + }, + "deposit": { + "owner": "526419933271819709982463936175403801443204612074", + "accountID": 5, + "tokenID": 3, + "amount": "200000000000000000000", + "txType": "Deposit" + } }, - "accountUpdate_O": { - "accountID": 1, - "proof": [ - "14977049412787007390648978282694932904743275156259300152095723932565393768075", - "1145309617779282571435068694801398484099860507972674430925654854114659706763", - "16622239027211189691862112891698158372719615959807891883376028521145534135495", - "1011839816931211609179967414964039657943750149030352341309576727853365489733", + { + "witness": { + "accountsMerkleRoot": "4319607671597645913587815788613932478787011146030747679931301473859828914587", + "storageUpdate_A": { + "storageID": "0", + "proof": [ + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363" + ], + "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "rootAfter": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "before": { + "data": "0", + "storageID": "0" + }, + "after": { + "data": "0", + "storageID": "0" + } + }, + "storageUpdate_B": { + "storageID": "0", + "proof": [ + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363" + ], + "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "rootAfter": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "before": { + "data": "0", + "storageID": "0" + }, + "after": { + "data": "0", + "storageID": "0" + } + }, + "balanceUpdateS_A": { + "tokenID": 3, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "19157514199576531300887641137489555908636823613577180048378670220346228341107", + "rootAfter": "19157514199576531300887641137489555908636823613577180048378670220346228341107", + "before": { + "balance": "200000000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "200000000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_A": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "16854005601832099407593506019873020428434880270080421958263627636826197378050", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "19157514199576531300887641137489555908636823613577180048378670220346228341107", + "rootAfter": "19157514199576531300887641137489555908636823613577180048378670220346228341107", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_A": { + "accountID": 5, + "proof": [ + "6593113309676556888730676529089877715893091189937406204364534839969262143628", + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "6338777704522060856284412368693150826416459556807886597331460279922710048781", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "4319607671597645913587815788613932478787011146030747679931301473859828914587", + "rootAfter": "3367180134538060717296946729644306740312971876963636108428919999838850144331", + "before": { + "owner": "526419933271819709982463936175403801443204612074", + "publicKeyX": "0", + "publicKeyY": "0", + "nonce": 0, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "19157514199576531300887641137489555908636823613577180048378670220346228341107" + }, + "after": { + "owner": "526419933271819709982463936175403801443204612074", + "publicKeyX": "162881448420310770009357855338286322418984963231707774083925322670671874385", + "publicKeyY": "8976665533641500380410723383048652518552823079135579667966174660993246051447", + "nonce": 1, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "19157514199576531300887641137489555908636823613577180048378670220346228341107" + } + }, + "balanceUpdateS_B": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_B": { + "tokenID": 3, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_B": { + "accountID": 1, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "4728161871326899471267777111122704811062999373510172715228807007407084281404", + "5764797262300076263290914987844528232545662128663692192589207003716126063096", + "6536780907799470042892753538407730590627905950092327289628900107615109489161", "3273276600442218616878319311187237278006868703125551946902943986339461140950", "3273276600442218616878319311187237278006868703125551946902943986339461140950", "20363906916247292431697008251927445286940534497642961227707554059181688159634", @@ -5645,35 +1052,4611 @@ "9161534436368786480469207659954043146097383092544618581411592772464665325157", "9161534436368786480469207659954043146097383092544618581411592772464665325157", "9161534436368786480469207659954043146097383092544618581411592772464665325157" - ], - "rootBefore": "21580601762484156854931842038789474826767003632649099252058491731197045352715", - "rootAfter": "4944281087885792872515399736818604289710363416009392538304517250341408595422", - "before": { + ], + "rootBefore": "3367180134538060717296946729644306740312971876963636108428919999838850144331", + "rootAfter": "3367180134538060717296946729644306740312971876963636108428919999838850144331", + "before": { "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", "nonce": 2, "feeBipsAMM": 0, "_balancesTree": null, "_balancesLeafs": null, - "balancesRoot": "5907736891002260492301101315399850592315442227491319295389418184620053552682" + "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" + }, + "after": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" + } + }, + "balanceUpdateA_O": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } }, - "after": { + "balanceUpdateB_O": { + "tokenID": 3, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_O": { + "accountID": 1, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "4728161871326899471267777111122704811062999373510172715228807007407084281404", + "5764797262300076263290914987844528232545662128663692192589207003716126063096", + "6536780907799470042892753538407730590627905950092327289628900107615109489161", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "3367180134538060717296946729644306740312971876963636108428919999838850144331", + "rootAfter": "3367180134538060717296946729644306740312971876963636108428919999838850144331", + "before": { "owner": "1290521165768254036656199217432654600326060127335", - "publicKeyX": "13228350736102938686302829824891534725981603353652218926780814792148363543189", - "publicKeyY": "17661352147826954275740606703073381596823730848258341500985688674025476108292", - "nonce": 3, + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, "feeBipsAMM": 0, "_balancesTree": null, "_balancesLeafs": null, - "balancesRoot": "5907736891002260492301101315399850592315442227491319295389418184620053552682" - } + "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" + }, + "after": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" + } + }, + "balanceUpdateA_P": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_P": { + "tokenID": 3, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "rootAfter": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "numConditionalTransactionsAfter": 2 + }, + "accountUpdate": { + "owner": "526419933271819709982463936175403801443204612074", + "accountID": 5, + "nonce": "0", + "validUntil": 4294967295, + "publicKeyX": "162881448420310770009357855338286322418984963231707774083925322670671874385", + "publicKeyY": "8976665533641500380410723383048652518552823079135579667966174660993246051447", + "feeTokenID": 3, + "fee": "0", + "maxFee": "0", + "type": 1, + "signature": null, + "txType": "AccountUpdate" + } + }, + { + "witness": { + "signatureA": { + "Rx": "267616539744440013733252206890949675082391731017598816699496047268212905803", + "Ry": "15938247284763440105093273020314288534736739547553409408566211612816321652766", + "s": "377292823927269299110832860120477816033929047819075031540630656095682734811" + }, + "signatureB": { + "Rx": "19797229107651282882256986059580149098882560242109134210723734644628834618561", + "Ry": "17887858527378263989280485017384465819576663093395343430758913770909617153960", + "s": "419032709522777091473499943198777170306201793841460678259883362557112441592" + }, + "accountsMerkleRoot": "3367180134538060717296946729644306740312971876963636108428919999838850144331", + "storageUpdate_A": { + "storageID": "0", + "proof": [ + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363" + ], + "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "rootAfter": "7436209684165562473029831937746432971201338059357461035705702853230089150829", + "before": { + "data": "0", + "storageID": "0" + }, + "after": { + "data": "100000000000000000000", + "storageID": "0" + } + }, + "storageUpdate_B": { + "storageID": "1", + "proof": [ + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363" + ], + "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "rootAfter": "10345489555047476050059246280037738896478895090354120394980169615556970313361", + "before": { + "data": "0", + "storageID": "0" + }, + "after": { + "data": "2000000000000000000", + "storageID": "1" + } + }, + "balanceUpdateS_A": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "4171122269972390941158422653284390941054906331442416516125020031104704330437", + "rootAfter": "20713828208283575212126346361145046894184872403294989236510386307364212634638", + "before": { + "balance": "3000000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "1000000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" + } + }, + "balanceUpdateB_A": { + "tokenID": 3, + "proof": [ + "10212681263130752346099927072267279572426975785318878493623354499708118761079", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "20713828208283575212126346361145046894184872403294989236510386307364212634638", + "rootAfter": "682943029080361998615918582229821985921902235755793363382036293835909116256", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "99800000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_A": { + "accountID": 2, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "19787792349730093959204682134309913940639367392063024258830154883646590843542", + "5764797262300076263290914987844528232545662128663692192589207003716126063096", + "6536780907799470042892753538407730590627905950092327289628900107615109489161", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "3367180134538060717296946729644306740312971876963636108428919999838850144331", + "rootAfter": "21523304269671855435229986679969768037645181438265531241762636010147592217724", + "before": { + "owner": "302473889329503696551303586380619770900292840027", + "publicKeyX": "20547799993424472999804001997703761315965637599845954233849971350222407577325", + "publicKeyY": "5354771854599831877651073806616708610269866899273688877658636059560310085739", + "nonce": 1, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "4171122269972390941158422653284390941054906331442416516125020031104704330437" + }, + "after": { + "owner": "302473889329503696551303586380619770900292840027", + "publicKeyX": "20547799993424472999804001997703761315965637599845954233849971350222407577325", + "publicKeyY": "5354771854599831877651073806616708610269866899273688877658636059560310085739", + "nonce": 1, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "682943029080361998615918582229821985921902235755793363382036293835909116256" + } + }, + "balanceUpdateS_B": { + "tokenID": 3, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "18535122894046600068262522863721745755289118256457477758399483488989249385904", + "rootAfter": "15569840592229860117393085340828228614168264627918773643327606839724439934294", + "before": { + "balance": "100000000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "10345489555047476050059246280037738896478895090354120394980169615556970313361" + } + }, + "balanceUpdateB_B": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "15421762780646702610915401525027517555754073044400085378529854659660582563430", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "15569840592229860117393085340828228614168264627918773643327606839724439934294", + "rootAfter": "121098114965892594983157195625035470335981572808830800161277879179254273802", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "1996000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_B": { + "accountID": 3, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "19787792349730093959204682134309913940639367392063024258830154883646590843542", + "9897890219305043674855635004118081237425689375609563730980784582799465142021", + "6536780907799470042892753538407730590627905950092327289628900107615109489161", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "21523304269671855435229986679969768037645181438265531241762636010147592217724", + "rootAfter": "5929022862541021962682064958942739394847449145721608368142068623172450723868", + "before": { + "owner": "49471351004802270806903280070893023881577954011", + "publicKeyX": "12329746612540144914012906219827996867759046718860783481233723984458322807908", + "publicKeyY": "20269640580758846731856705676797113820100010688149327434626557854732956520140", + "nonce": 1, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "18535122894046600068262522863721745755289118256457477758399483488989249385904" + }, + "after": { + "owner": "49471351004802270806903280070893023881577954011", + "publicKeyX": "12329746612540144914012906219827996867759046718860783481233723984458322807908", + "publicKeyY": "20269640580758846731856705676797113820100010688149327434626557854732956520140", + "nonce": 1, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "121098114965892594983157195625035470335981572808830800161277879179254273802" + } + }, + "balanceUpdateA_O": { + "tokenID": 3, + "proof": [ + "10647416309391304990993958867158354758628112591270544309379558561669546189798", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "10696485318939577928939395553607305653298791535222433869628386086310358656850", + "rootAfter": "10554490417419132206480875028778016240274934510702000289187115255273059888689", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "150000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_O": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "rootAfter": "10696485318939577928939395553607305653298791535222433869628386086310358656850", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_O": { + "accountID": 1, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "9897890219305043674855635004118081237425689375609563730980784582799465142021", + "6800645153654724855469235331197812954836115788760655577209182120663987034673", + "6536780907799470042892753538407730590627905950092327289628900107615109489161", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "5929022862541021962682064958942739394847449145721608368142068623172450723868", + "rootAfter": "21407333111384244874643315864755661244791952718555381815961874482770896178257", + "before": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" + }, + "after": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "10554490417419132206480875028778016240274934510702000289187115255273059888689" + } + }, + "balanceUpdateA_P": { + "tokenID": 3, + "proof": [ + "13491446373455331829831078991932477067233028050898044290195999859628734970986", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "8038313613460113141342080747311723853886540420676003118629555097550854240038", + "rootAfter": "5654899660208854074852795398355939229199120500085725317356541104075559633076", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "50000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_P": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "7801237487181981149186143086321797866080303338833483837539290826558835955956", + "rootAfter": "8038313613460113141342080747311723853886540420676003118629555097550854240038", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "numConditionalTransactionsAfter": 2 + }, + "spotTrade": { + "orderA": { + "publicKeyX": "20547799993424472999804001997703761315965637599845954233849971350222407577325", + "publicKeyY": "5354771854599831877651073806616708610269866899273688877658636059560310085739", + "storageID": "0", + "accountID": 2, + "amountS": "3000000000000000000", + "amountB": "100000000000000000000", + "tokenS": 0, + "tokenB": 3, + "validUntil": 1624029597, + "fillAmountBorS": true, + "taker": "0", + "maxFeeBips": 20, + "feeBips": 20, + "amm": false, + "signature": { + "Rx": "267616539744440013733252206890949675082391731017598816699496047268212905803", + "Ry": "15938247284763440105093273020314288534736739547553409408566211612816321652766", + "s": "377292823927269299110832860120477816033929047819075031540630656095682734811" + }, + "valid": true + }, + "orderB": { + "publicKeyX": "12329746612540144914012906219827996867759046718860783481233723984458322807908", + "publicKeyY": "20269640580758846731856705676797113820100010688149327434626557854732956520140", + "storageID": "1", + "accountID": 3, + "amountS": "100000000000000000000", + "amountB": "2000000000000000000", + "tokenS": 3, + "tokenB": 0, + "validUntil": 1624029598, + "fillAmountBorS": true, + "taker": "0", + "maxFeeBips": 20, + "feeBips": 20, + "amm": false, + "signature": { + "Rx": "19797229107651282882256986059580149098882560242109134210723734644628834618561", + "Ry": "17887858527378263989280485017384465819576663093395343430758913770909617153960", + "s": "419032709522777091473499943198777170306201793841460678259883362557112441592" + }, + "valid": true + }, + "txType": "SpotTrade", + "valid": true, + "fFillS_A": 7015744, + "fFillS_B": 7964320 + } + }, + { + "witness": { + "signatureA": { + "Rx": "3906963291194032275968087305090322433827955768507322548581672462863038387724", + "Ry": "721929446748215710338954772107442708890610934051365183556831230821653566514", + "s": "1205677513980003063308177709850686481813310122239568552868948084493118917962" + }, + "signatureB": { + "Rx": "2528733028981401432104821779250045873968120623615044905797645029605667353313", + "Ry": "751717524350713905436061295519913589634122546193681687445852082439152725816", + "s": "1477650179554866719441984616499491922031246964317646304122125667117117443982" + }, + "accountsMerkleRoot": "21407333111384244874643315864755661244791952718555381815961874482770896178257", + "storageUpdate_A": { + "storageID": "2", + "proof": [ + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363" + ], + "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "rootAfter": "17806918685196917802872545809048478937379474658058600743832280350185043653875", + "before": { + "data": "0", + "storageID": "0" + }, + "after": { + "data": "200000000000000000000", + "storageID": "2" + } + }, + "storageUpdate_B": { + "storageID": "3", + "proof": [ + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363" + ], + "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "rootAfter": "1767219143024037943661844746955611355467101589258598667568494020575922411868", + "before": { + "data": "0", + "storageID": "0" + }, + "after": { + "data": "100000000000000000000", + "storageID": "3" + } + }, + "balanceUpdateS_A": { + "tokenID": 2, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "1299940927532420275095390903322536110865323187567837352412607362613793675778", + "rootAfter": "10791705820213026174082420518324995274784957911797652812668796501429244424341", + "before": { + "balance": "110000000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "10000000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "17806918685196917802872545809048478937379474658058600743832280350185043653875" + } + }, + "balanceUpdateB_A": { + "tokenID": 3, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "14758226448595960407002463587713927699544222617880692378763423478547989076363", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "10791705820213026174082420518324995274784957911797652812668796501429244424341", + "rootAfter": "7675325200963745908789250753507142522202065804085195463202587292009025038956", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "199600000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_A": { + "accountID": 4, + "proof": [ + "13538703615496734596892613748037070353469985221367489042511386269671626841501", + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "3477897904039433454884795254722480222819616225283241559535330608041752660045", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "21407333111384244874643315864755661244791952718555381815961874482770896178257", + "rootAfter": "7719954173684802521274973096435085926607759103620647220188941144306420371189", + "before": { + "owner": "844335935966647266492846334209031131530224039934", + "publicKeyX": "9385678663071760979674231366676563198818988555595575530749366964454483389801", + "publicKeyY": "19239892246174922553222095783908432040095923351582321578785487849249650986339", + "nonce": 1, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "1299940927532420275095390903322536110865323187567837352412607362613793675778" + }, + "after": { + "owner": "844335935966647266492846334209031131530224039934", + "publicKeyX": "9385678663071760979674231366676563198818988555595575530749366964454483389801", + "publicKeyY": "19239892246174922553222095783908432040095923351582321578785487849249650986339", + "nonce": 1, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "7675325200963745908789250753507142522202065804085195463202587292009025038956" + } + }, + "balanceUpdateS_B": { + "tokenID": 3, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "19157514199576531300887641137489555908636823613577180048378670220346228341107", + "rootAfter": "5402520393899125015728966741198444904796613549419341526698485664809847804397", + "before": { + "balance": "200000000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "1767219143024037943661844746955611355467101589258598667568494020575922411868" + } + }, + "balanceUpdateB_B": { + "tokenID": 2, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "4442732436620062652228211998059201410278831102617529472639839587718489894867", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "5402520393899125015728966741198444904796613549419341526698485664809847804397", + "rootAfter": "19226428460439358708986163465590657156732120045765556390225799431388217279322", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "99800000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_B": { + "accountID": 5, + "proof": [ + "650470445479916368970601922065433105721618749352436894501620411916187572254", + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "3477897904039433454884795254722480222819616225283241559535330608041752660045", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "7719954173684802521274973096435085926607759103620647220188941144306420371189", + "rootAfter": "11243921110002273812174917135933074540996526933524573629547806993461428649014", + "before": { + "owner": "526419933271819709982463936175403801443204612074", + "publicKeyX": "162881448420310770009357855338286322418984963231707774083925322670671874385", + "publicKeyY": "8976665533641500380410723383048652518552823079135579667966174660993246051447", + "nonce": 1, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "19157514199576531300887641137489555908636823613577180048378670220346228341107" + }, + "after": { + "owner": "526419933271819709982463936175403801443204612074", + "publicKeyX": "162881448420310770009357855338286322418984963231707774083925322670671874385", + "publicKeyY": "8976665533641500380410723383048652518552823079135579667966174660993246051447", + "nonce": 1, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "19226428460439358708986163465590657156732120045765556390225799431388217279322" + } + }, + "balanceUpdateA_O": { + "tokenID": 3, + "proof": [ + "10647416309391304990993958867158354758628112591270544309379558561669546189798", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12814913769241972598159455181089924862167622631405614868759663786449833629154", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "20425704926528944352071255027432217864618163897410813018433464609328113498259", + "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "before": { + "balance": "150000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "450000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_O": { + "tokenID": 2, + "proof": [ + "10647416309391304990993958867158354758628112591270544309379558561669546189798", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "15934936809640236493926209955776541507691700131937504259460970330718719121786", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "10554490417419132206480875028778016240274934510702000289187115255273059888689", + "rootAfter": "20425704926528944352071255027432217864618163897410813018433464609328113498259", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "175000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_O": { + "accountID": 1, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "9897890219305043674855635004118081237425689375609563730980784582799465142021", + "6800645153654724855469235331197812954836115788760655577209182120663987034673", + "4049464550385201434062450880345854486446017599009929398991368913601217329308", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "11243921110002273812174917135933074540996526933524573629547806993461428649014", + "rootAfter": "8849889898700080799023719565461888989450370166564632537123920358608687525439", + "before": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "10554490417419132206480875028778016240274934510702000289187115255273059888689" + }, + "after": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" + } + }, + "balanceUpdateA_P": { + "tokenID": 3, + "proof": [ + "13491446373455331829831078991932477067233028050898044290195999859628734970986", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12789355867591265262341260848506327581557698276283941404801602383252287026449", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "12519024714025715888597014141965339069192082195237796382785148782810374541289", + "rootAfter": "5655656557858684412635275259062534829478535653500738453563112493957837082962", + "before": { + "balance": "50000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "150000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_P": { + "tokenID": 2, + "proof": [ + "13491446373455331829831078991932477067233028050898044290195999859628734970986", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "17027066433947857206927760065726079045763402875736291038372960057487201241799", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "5654899660208854074852795398355939229199120500085725317356541104075559633076", + "rootAfter": "12519024714025715888597014141965339069192082195237796382785148782810374541289", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "25000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "numConditionalTransactionsAfter": 2 + }, + "spotTrade": { + "orderA": { + "publicKeyX": "9385678663071760979674231366676563198818988555595575530749366964454483389801", + "publicKeyY": "19239892246174922553222095783908432040095923351582321578785487849249650986339", + "storageID": "2", + "accountID": 4, + "amountS": "110000000000000000000", + "amountB": "200000000000000000000", + "tokenS": 2, + "tokenB": 3, + "validUntil": 1624029598, + "fillAmountBorS": true, + "taker": "0", + "maxFeeBips": 20, + "feeBips": 20, + "amm": false, + "signature": { + "Rx": "3906963291194032275968087305090322433827955768507322548581672462863038387724", + "Ry": "721929446748215710338954772107442708890610934051365183556831230821653566514", + "s": "1205677513980003063308177709850686481813310122239568552868948084493118917962" + }, + "valid": true + }, + "orderB": { + "publicKeyX": "162881448420310770009357855338286322418984963231707774083925322670671874385", + "publicKeyY": "8976665533641500380410723383048652518552823079135579667966174660993246051447", + "storageID": "3", + "accountID": 5, + "amountS": "200000000000000000000", + "amountB": "100000000000000000000", + "tokenS": 3, + "tokenB": 2, + "validUntil": 1624029599, + "fillAmountBorS": true, + "taker": "0", + "maxFeeBips": 20, + "feeBips": 20, + "amm": false, + "signature": { + "Rx": "2528733028981401432104821779250045873968120623615044905797645029605667353313", + "Ry": "751717524350713905436061295519913589634122546193681687445852082439152725816", + "s": "1477650179554866719441984616499491922031246964317646304122125667117117443982" + }, + "valid": true + }, + "txType": "SpotTrade", + "valid": true, + "fFillS_A": 7964320, + "fFillS_B": 8064320 + } + }, + { + "witness": { + "accountsMerkleRoot": "8849889898700080799023719565461888989450370166564632537123920358608687525439", + "storageUpdate_A": { + "storageID": "0", + "proof": [ + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363" + ], + "rootBefore": "7436209684165562473029831937746432971201338059357461035705702853230089150829", + "rootAfter": "7436209684165562473029831937746432971201338059357461035705702853230089150829", + "before": { + "data": "100000000000000000000", + "storageID": "0" + }, + "after": { + "data": "100000000000000000000", + "storageID": "0" + } + }, + "storageUpdate_B": { + "storageID": "0", + "proof": [ + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363" + ], + "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "rootAfter": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "before": { + "data": "0", + "storageID": "0" + }, + "after": { + "data": "0", + "storageID": "0" + } + }, + "balanceUpdateS_A": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "6716112700423817334084597075438099014698885716464673884870325534362044348246", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "682943029080361998615918582229821985921902235755793363382036293835909116256", + "rootAfter": "19323616193954553078846308957362067474003788999943918376190707767938692886261", + "before": { + "balance": "1000000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" + }, + "after": { + "balance": "1000000000000000000", + "weightAMM": "123", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" + } + }, + "balanceUpdateB_A": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "6716112700423817334084597075438099014698885716464673884870325534362044348246", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "19323616193954553078846308957362067474003788999943918376190707767938692886261", + "rootAfter": "19323616193954553078846308957362067474003788999943918376190707767938692886261", + "before": { + "balance": "1000000000000000000", + "weightAMM": "123", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" + }, + "after": { + "balance": "1000000000000000000", + "weightAMM": "123", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" + } + }, + "accountUpdate_A": { + "accountID": 2, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "11400555543452775786991510166021136100502638634788130824264027181277159516840", + "6800645153654724855469235331197812954836115788760655577209182120663987034673", + "4049464550385201434062450880345854486446017599009929398991368913601217329308", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "8849889898700080799023719565461888989450370166564632537123920358608687525439", + "rootAfter": "8961152656473304961686031214774803551305161465757864766637448200772274062929", + "before": { + "owner": "302473889329503696551303586380619770900292840027", + "publicKeyX": "20547799993424472999804001997703761315965637599845954233849971350222407577325", + "publicKeyY": "5354771854599831877651073806616708610269866899273688877658636059560310085739", + "nonce": 1, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "682943029080361998615918582229821985921902235755793363382036293835909116256" + }, + "after": { + "owner": "302473889329503696551303586380619770900292840027", + "publicKeyX": "20547799993424472999804001997703761315965637599845954233849971350222407577325", + "publicKeyY": "5354771854599831877651073806616708610269866899273688877658636059560310085739", + "nonce": 2, + "feeBipsAMM": 15, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "19323616193954553078846308957362067474003788999943918376190707767938692886261" + } + }, + "balanceUpdateS_B": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12814913769241972598159455181089924862167622631405614868759663786449833629154", + "17939109203773673483631273684835261416911025122485371892729395539523821659680", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "before": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_B": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12814913769241972598159455181089924862167622631405614868759663786449833629154", + "17939109203773673483631273684835261416911025122485371892729395539523821659680", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "before": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_B": { + "accountID": 1, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "16529481629368463791490514071004109815743270487980782050121509338638717621767", + "6800645153654724855469235331197812954836115788760655577209182120663987034673", + "4049464550385201434062450880345854486446017599009929398991368913601217329308", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "8961152656473304961686031214774803551305161465757864766637448200772274062929", + "rootAfter": "8961152656473304961686031214774803551305161465757864766637448200772274062929", + "before": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" + }, + "after": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" + } + }, + "balanceUpdateA_O": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12814913769241972598159455181089924862167622631405614868759663786449833629154", + "17939109203773673483631273684835261416911025122485371892729395539523821659680", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "before": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_O": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12814913769241972598159455181089924862167622631405614868759663786449833629154", + "17939109203773673483631273684835261416911025122485371892729395539523821659680", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "before": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_O": { + "accountID": 1, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "16529481629368463791490514071004109815743270487980782050121509338638717621767", + "6800645153654724855469235331197812954836115788760655577209182120663987034673", + "4049464550385201434062450880345854486446017599009929398991368913601217329308", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "8961152656473304961686031214774803551305161465757864766637448200772274062929", + "rootAfter": "8961152656473304961686031214774803551305161465757864766637448200772274062929", + "before": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" + }, + "after": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" + } + }, + "balanceUpdateA_P": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12789355867591265262341260848506327581557698276283941404801602383252287026449", + "15934936809640236493926209955776541507691700131937504259460970330718719121786", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "5655656557858684412635275259062534829478535653500738453563112493957837082962", + "rootAfter": "5655656557858684412635275259062534829478535653500738453563112493957837082962", + "before": { + "balance": "500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_P": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12789355867591265262341260848506327581557698276283941404801602383252287026449", + "15934936809640236493926209955776541507691700131937504259460970330718719121786", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "5655656557858684412635275259062534829478535653500738453563112493957837082962", + "rootAfter": "5655656557858684412635275259062534829478535653500738453563112493957837082962", + "before": { + "balance": "500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "numConditionalTransactionsAfter": 3 + }, + "ammUpdate": { + "owner": "302473889329503696551303586380619770900292840027", + "accountID": 2, + "tokenID": 0, + "feeBips": 15, + "tokenWeight": "123", + "nonce": 1, + "txType": "AmmUpdate", + "balance": "1000000000000000000" + } + }, + { + "witness": { + "accountsMerkleRoot": "8961152656473304961686031214774803551305161465757864766637448200772274062929", + "storageUpdate_A": { + "storageID": "0", + "proof": [ + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363" + ], + "rootBefore": "7436209684165562473029831937746432971201338059357461035705702853230089150829", + "rootAfter": "7436209684165562473029831937746432971201338059357461035705702853230089150829", + "before": { + "data": "100000000000000000000", + "storageID": "0" + }, + "after": { + "data": "100000000000000000000", + "storageID": "0" + } + }, + "storageUpdate_B": { + "storageID": "0", + "proof": [ + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363" + ], + "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "rootAfter": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "before": { + "data": "0", + "storageID": "0" + }, + "after": { + "data": "0", + "storageID": "0" + } + }, + "balanceUpdateS_A": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "6716112700423817334084597075438099014698885716464673884870325534362044348246", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "19323616193954553078846308957362067474003788999943918376190707767938692886261", + "rootAfter": "1372976261718420423650243396093393923291437920434500128476034137774406956315", + "before": { + "balance": "1000000000000000000", + "weightAMM": "123", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" + }, + "after": { + "balance": "3900000000000000000", + "weightAMM": "123", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" + } + }, + "balanceUpdateB_A": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "6716112700423817334084597075438099014698885716464673884870325534362044348246", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "1372976261718420423650243396093393923291437920434500128476034137774406956315", + "rootAfter": "1372976261718420423650243396093393923291437920434500128476034137774406956315", + "before": { + "balance": "3900000000000000000", + "weightAMM": "123", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" + }, + "after": { + "balance": "3900000000000000000", + "weightAMM": "123", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" + } + }, + "accountUpdate_A": { + "accountID": 2, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "11400555543452775786991510166021136100502638634788130824264027181277159516840", + "6800645153654724855469235331197812954836115788760655577209182120663987034673", + "4049464550385201434062450880345854486446017599009929398991368913601217329308", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "8961152656473304961686031214774803551305161465757864766637448200772274062929", + "rootAfter": "3949051051721249921951158967561286901951079340658464575878558986723615867640", + "before": { + "owner": "302473889329503696551303586380619770900292840027", + "publicKeyX": "20547799993424472999804001997703761315965637599845954233849971350222407577325", + "publicKeyY": "5354771854599831877651073806616708610269866899273688877658636059560310085739", + "nonce": 2, + "feeBipsAMM": 15, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "19323616193954553078846308957362067474003788999943918376190707767938692886261" + }, + "after": { + "owner": "302473889329503696551303586380619770900292840027", + "publicKeyX": "20547799993424472999804001997703761315965637599845954233849971350222407577325", + "publicKeyY": "5354771854599831877651073806616708610269866899273688877658636059560310085739", + "nonce": 2, + "feeBipsAMM": 15, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "1372976261718420423650243396093393923291437920434500128476034137774406956315" + } + }, + "balanceUpdateS_B": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12814913769241972598159455181089924862167622631405614868759663786449833629154", + "17939109203773673483631273684835261416911025122485371892729395539523821659680", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "before": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_B": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12814913769241972598159455181089924862167622631405614868759663786449833629154", + "17939109203773673483631273684835261416911025122485371892729395539523821659680", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "before": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_B": { + "accountID": 1, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "12366950448586725823942206609894642478525133296788790604865521325023466653934", + "6800645153654724855469235331197812954836115788760655577209182120663987034673", + "4049464550385201434062450880345854486446017599009929398991368913601217329308", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "3949051051721249921951158967561286901951079340658464575878558986723615867640", + "rootAfter": "3949051051721249921951158967561286901951079340658464575878558986723615867640", + "before": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" + }, + "after": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" + } + }, + "balanceUpdateA_O": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12814913769241972598159455181089924862167622631405614868759663786449833629154", + "17939109203773673483631273684835261416911025122485371892729395539523821659680", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "before": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_O": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12814913769241972598159455181089924862167622631405614868759663786449833629154", + "17939109203773673483631273684835261416911025122485371892729395539523821659680", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "before": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_O": { + "accountID": 1, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "12366950448586725823942206609894642478525133296788790604865521325023466653934", + "6800645153654724855469235331197812954836115788760655577209182120663987034673", + "4049464550385201434062450880345854486446017599009929398991368913601217329308", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "3949051051721249921951158967561286901951079340658464575878558986723615867640", + "rootAfter": "3949051051721249921951158967561286901951079340658464575878558986723615867640", + "before": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" + }, + "after": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" + } + }, + "balanceUpdateA_P": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12789355867591265262341260848506327581557698276283941404801602383252287026449", + "15934936809640236493926209955776541507691700131937504259460970330718719121786", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "5655656557858684412635275259062534829478535653500738453563112493957837082962", + "rootAfter": "5655656557858684412635275259062534829478535653500738453563112493957837082962", + "before": { + "balance": "500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_P": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12789355867591265262341260848506327581557698276283941404801602383252287026449", + "15934936809640236493926209955776541507691700131937504259460970330718719121786", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "5655656557858684412635275259062534829478535653500738453563112493957837082962", + "rootAfter": "5655656557858684412635275259062534829478535653500738453563112493957837082962", + "before": { + "balance": "500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "numConditionalTransactionsAfter": 4 + }, + "deposit": { + "owner": "302473889329503696551303586380619770900292840027", + "accountID": 2, + "tokenID": 0, + "amount": "2900000000000000000", + "txType": "Deposit" + } + }, + { + "witness": { + "accountsMerkleRoot": "3949051051721249921951158967561286901951079340658464575878558986723615867640", + "storageUpdate_A": { + "storageID": "0", + "proof": [ + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363" + ], + "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "rootAfter": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "before": { + "data": "0", + "storageID": "0" + }, + "after": { + "data": "0", + "storageID": "0" + } + }, + "storageUpdate_B": { + "storageID": "0", + "proof": [ + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363" + ], + "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "rootAfter": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "before": { + "data": "0", + "storageID": "0" + }, + "after": { + "data": "0", + "storageID": "0" + } + }, + "balanceUpdateS_A": { + "tokenID": 1, + "proof": [ + "20804137394734447158312077381372023306237741745196679464506898950253288239618", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "6716112700423817334084597075438099014698885716464673884870325534362044348246", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "1372976261718420423650243396093393923291437920434500128476034137774406956315", + "rootAfter": "14825866508396348686370372134640625866591984787848350323368585317086356860622", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "12300000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_A": { + "tokenID": 0, + "proof": [ + "17279879586386421194826831423615334014742871003923394992373027689670108210524", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "6716112700423817334084597075438099014698885716464673884870325534362044348246", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "14825866508396348686370372134640625866591984787848350323368585317086356860622", + "rootAfter": "14825866508396348686370372134640625866591984787848350323368585317086356860622", + "before": { + "balance": "3900000000000000000", + "weightAMM": "123", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" + }, + "after": { + "balance": "3900000000000000000", + "weightAMM": "123", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" + } + }, + "accountUpdate_A": { + "accountID": 2, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "11400555543452775786991510166021136100502638634788130824264027181277159516840", + "6800645153654724855469235331197812954836115788760655577209182120663987034673", + "4049464550385201434062450880345854486446017599009929398991368913601217329308", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "3949051051721249921951158967561286901951079340658464575878558986723615867640", + "rootAfter": "5221530003598431741739855711420909201545695856158613320885672947467086694260", + "before": { + "owner": "302473889329503696551303586380619770900292840027", + "publicKeyX": "20547799993424472999804001997703761315965637599845954233849971350222407577325", + "publicKeyY": "5354771854599831877651073806616708610269866899273688877658636059560310085739", + "nonce": 2, + "feeBipsAMM": 15, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "1372976261718420423650243396093393923291437920434500128476034137774406956315" + }, + "after": { + "owner": "302473889329503696551303586380619770900292840027", + "publicKeyX": "20547799993424472999804001997703761315965637599845954233849971350222407577325", + "publicKeyY": "5354771854599831877651073806616708610269866899273688877658636059560310085739", + "nonce": 2, + "feeBipsAMM": 15, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "14825866508396348686370372134640625866591984787848350323368585317086356860622" + } + }, + "balanceUpdateS_B": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12814913769241972598159455181089924862167622631405614868759663786449833629154", + "17939109203773673483631273684835261416911025122485371892729395539523821659680", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "before": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_B": { + "tokenID": 1, + "proof": [ + "10647416309391304990993958867158354758628112591270544309379558561669546189798", + "12814913769241972598159455181089924862167622631405614868759663786449833629154", + "17939109203773673483631273684835261416911025122485371892729395539523821659680", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_B": { + "accountID": 1, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "20021709791186440587665120179827353343116708715225038824458237540181570378080", + "6800645153654724855469235331197812954836115788760655577209182120663987034673", + "4049464550385201434062450880345854486446017599009929398991368913601217329308", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "5221530003598431741739855711420909201545695856158613320885672947467086694260", + "rootAfter": "5221530003598431741739855711420909201545695856158613320885672947467086694260", + "before": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" + }, + "after": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" + } + }, + "balanceUpdateA_O": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12814913769241972598159455181089924862167622631405614868759663786449833629154", + "17939109203773673483631273684835261416911025122485371892729395539523821659680", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "before": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_O": { + "tokenID": 1, + "proof": [ + "10647416309391304990993958867158354758628112591270544309379558561669546189798", + "12814913769241972598159455181089924862167622631405614868759663786449833629154", + "17939109203773673483631273684835261416911025122485371892729395539523821659680", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_O": { + "accountID": 1, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "20021709791186440587665120179827353343116708715225038824458237540181570378080", + "6800645153654724855469235331197812954836115788760655577209182120663987034673", + "4049464550385201434062450880345854486446017599009929398991368913601217329308", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "5221530003598431741739855711420909201545695856158613320885672947467086694260", + "rootAfter": "5221530003598431741739855711420909201545695856158613320885672947467086694260", + "before": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" + }, + "after": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" + } + }, + "balanceUpdateA_P": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12789355867591265262341260848506327581557698276283941404801602383252287026449", + "15934936809640236493926209955776541507691700131937504259460970330718719121786", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "5655656557858684412635275259062534829478535653500738453563112493957837082962", + "rootAfter": "5655656557858684412635275259062534829478535653500738453563112493957837082962", + "before": { + "balance": "500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_P": { + "tokenID": 1, + "proof": [ + "13491446373455331829831078991932477067233028050898044290195999859628734970986", + "12789355867591265262341260848506327581557698276283941404801602383252287026449", + "15934936809640236493926209955776541507691700131937504259460970330718719121786", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "5655656557858684412635275259062534829478535653500738453563112493957837082962", + "rootAfter": "5655656557858684412635275259062534829478535653500738453563112493957837082962", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "numConditionalTransactionsAfter": 5 + }, + "deposit": { + "owner": "302473889329503696551303586380619770900292840027", + "accountID": 2, + "tokenID": 1, + "amount": "12300000000000000000", + "txType": "Deposit" + } + }, + { + "witness": { + "accountsMerkleRoot": "5221530003598431741739855711420909201545695856158613320885672947467086694260", + "storageUpdate_A": { + "storageID": "4", + "proof": [ + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18778634070375180209661960740765899705585624724394726133374532870813264290670", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363" + ], + "rootBefore": "7436209684165562473029831937746432971201338059357461035705702853230089150829", + "rootAfter": "8739504241053213573302648715869067369013371720585768168293437330947408106722", + "before": { + "data": "0", + "storageID": "0" + }, + "after": { + "data": "1", + "storageID": "4" + } + }, + "storageUpdate_B": { + "storageID": "0", + "proof": [ + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "18298609842015643040044099129089617646726077709878673957695062439183530196057", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "2371789476252246873145569183657984076150578936906379480269269056232125907764", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "8800186346908183461856028750254793130520064617249067863214641604786981171326", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "450569423324398381878223050304711553427091274530305503127765682565001437816", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "19316706057866088599694844743452177063937400906307042325376077309033687477087", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "3555867249999216554532402585819161678647739033440489641964733950427369655472", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363", + "795979465643493012323073720522215153926162619126462630791100824127044582363" + ], + "rootBefore": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "rootAfter": "6592749167578234498153410564243369229486412054742481069049239297514590357090", + "before": { + "data": "0", + "storageID": "0" + }, + "after": { + "data": "0", + "storageID": "0" + } + }, + "balanceUpdateS_A": { + "tokenID": 0, + "proof": [ + "17279879586386421194826831423615334014742871003923394992373027689670108210524", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "6716112700423817334084597075438099014698885716464673884870325534362044348246", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "14825866508396348686370372134640625866591984787848350323368585317086356860622", + "rootAfter": "7944542379567880845558810636551910966414754402589289134201519986692764106351", + "before": { + "balance": "3900000000000000000", + "weightAMM": "123", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "7436209684165562473029831937746432971201338059357461035705702853230089150829" + }, + "after": { + "balance": "1000000000000000000", + "weightAMM": "123", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "8739504241053213573302648715869067369013371720585768168293437330947408106722" + } + }, + "balanceUpdateB_A": { + "tokenID": 1, + "proof": [ + "20603201028513758548230252007453899233787123755277407324587973288399685770851", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "6716112700423817334084597075438099014698885716464673884870325534362044348246", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "7944542379567880845558810636551910966414754402589289134201519986692764106351", + "rootAfter": "16922107910012067108465974013987601645797857693609860040897813126230512839652", + "before": { + "balance": "12300000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_A": { + "accountID": 2, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "11400555543452775786991510166021136100502638634788130824264027181277159516840", + "6800645153654724855469235331197812954836115788760655577209182120663987034673", + "4049464550385201434062450880345854486446017599009929398991368913601217329308", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "5221530003598431741739855711420909201545695856158613320885672947467086694260", + "rootAfter": "15827960117324056014238241248114066888395255590054357443117948371453885659166", + "before": { + "owner": "302473889329503696551303586380619770900292840027", + "publicKeyX": "20547799993424472999804001997703761315965637599845954233849971350222407577325", + "publicKeyY": "5354771854599831877651073806616708610269866899273688877658636059560310085739", + "nonce": 2, + "feeBipsAMM": 15, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "14825866508396348686370372134640625866591984787848350323368585317086356860622" + }, + "after": { + "owner": "302473889329503696551303586380619770900292840027", + "publicKeyX": "20547799993424472999804001997703761315965637599845954233849971350222407577325", + "publicKeyY": "5354771854599831877651073806616708610269866899273688877658636059560310085739", + "nonce": 2, + "feeBipsAMM": 15, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "16922107910012067108465974013987601645797857693609860040897813126230512839652" + } + }, + "balanceUpdateS_B": { + "tokenID": 1, + "proof": [ + "4931429804720514645497420561808051675342370259280213508311304483117230576784", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "15421762780646702610915401525027517555754073044400085378529854659660582563430", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "121098114965892594983157195625035470335981572808830800161277879179254273802", + "rootAfter": "121098114965892594983157195625035470335981572808830800161277879179254273802", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_B": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "15421762780646702610915401525027517555754073044400085378529854659660582563430", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "121098114965892594983157195625035470335981572808830800161277879179254273802", + "rootAfter": "118063124513716630134855550662120390927487701791662704509627444120486872975", + "before": { + "balance": "1996000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "4896000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_B": { + "accountID": 3, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "11400555543452775786991510166021136100502638634788130824264027181277159516840", + "11473113236477918061488588221467073002557750159004866906792415655573267632943", + "4049464550385201434062450880345854486446017599009929398991368913601217329308", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "15827960117324056014238241248114066888395255590054357443117948371453885659166", + "rootAfter": "17332149320330553907607388558945802715844543059147273067152824716693059753763", + "before": { + "owner": "49471351004802270806903280070893023881577954011", + "publicKeyX": "12329746612540144914012906219827996867759046718860783481233723984458322807908", + "publicKeyY": "20269640580758846731856705676797113820100010688149327434626557854732956520140", + "nonce": 1, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "121098114965892594983157195625035470335981572808830800161277879179254273802" + }, + "after": { + "owner": "49471351004802270806903280070893023881577954011", + "publicKeyX": "12329746612540144914012906219827996867759046718860783481233723984458322807908", + "publicKeyY": "20269640580758846731856705676797113820100010688149327434626557854732956520140", + "nonce": 1, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "118063124513716630134855550662120390927487701791662704509627444120486872975" + } + }, + "balanceUpdateA_O": { + "tokenID": 1, + "proof": [ + "10647416309391304990993958867158354758628112591270544309379558561669546189798", + "12814913769241972598159455181089924862167622631405614868759663786449833629154", + "17939109203773673483631273684835261416911025122485371892729395539523821659680", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "rootAfter": "5907736891002260492301101315399850592315442227491319295389418184620053552682", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "12300000000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_O": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12814913769241972598159455181089924862167622631405614868759663786449833629154", + "17939109203773673483631273684835261416911025122485371892729395539523821659680", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "rootAfter": "18539607871112682489114265214944984769233328579876692844201067771920630847750", + "before": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "3500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "accountUpdate_O": { + "accountID": 1, + "proof": [ + "5418215761218159140333834208930113385110152943258857812431343823125268479924", + "11473113236477918061488588221467073002557750159004866906792415655573267632943", + "3119666232006465122702357406743537728372256652419937905497476690796772968764", + "4049464550385201434062450880345854486446017599009929398991368913601217329308", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "17332149320330553907607388558945802715844543059147273067152824716693059753763", + "rootAfter": "17247504798753356320390835422981655343778554201471929322899994184893507432444", + "before": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "18539607871112682489114265214944984769233328579876692844201067771920630847750" + }, + "after": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "5907736891002260492301101315399850592315442227491319295389418184620053552682" + } + }, + "balanceUpdateA_P": { + "tokenID": 1, + "proof": [ + "13491446373455331829831078991932477067233028050898044290195999859628734970986", + "12789355867591265262341260848506327581557698276283941404801602383252287026449", + "15934936809640236493926209955776541507691700131937504259460970330718719121786", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "5655656557858684412635275259062534829478535653500738453563112493957837082962", + "rootAfter": "5655656557858684412635275259062534829478535653500738453563112493957837082962", + "before": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "0", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "balanceUpdateB_P": { + "tokenID": 0, + "proof": [ + "12197991638270691487744821166354688521061097726524551723597013006897868939455", + "12789355867591265262341260848506327581557698276283941404801602383252287026449", + "15934936809640236493926209955776541507691700131937504259460970330718719121786", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17358037724428000508128864074991513326562524545303608992526228726434255987169", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "17513940148684676243890944153955870654671065039031825165449213873007092719980", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "10244008707337887063912263475060423963741516904229297268904502137775361285826", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "2848849206526422352325761132544684113484497375690047556930154132010354385020", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "21797804544064529135438332621733031215319361905350891787643637687174529920427", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "16735359351101336084294800264059823159282750371738013340438596014409923295711", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374", + "10290917572276134290799410387776748006369038342868925134871406202713167915374" + ], + "rootBefore": "5655656557858684412635275259062534829478535653500738453563112493957837082962", + "rootAfter": "5655656557858684412635275259062534829478535653500738453563112493957837082962", + "before": { + "balance": "500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + }, + "after": { + "balance": "500000000000000", + "weightAMM": "0", + "_storageTree": null, + "_storageLeafs": null, + "storageRoot": "6592749167578234498153410564243369229486412054742481069049239297514590357090" + } + }, + "numConditionalTransactionsAfter": 6 + }, + "transfer": { + "fromAccountID": 2, + "toAccountID": 3, + "tokenID": 0, + "amount": "2900000000000000000", + "feeTokenID": 1, + "fee": "12300000000000000000", + "type": 1, + "storageID": "4", + "from": "302473889329503696551303586380619770900292840027", + "to": "49471351004802270806903280070893023881577954011", + "validUntil": 4294967295, + "dualAuthorX": "0", + "dualAuthorY": "0", + "payerToAccountID": 3, + "payerTo": "49471351004802270806903280070893023881577954011", + "payeeToAccountID": 3, + "maxFee": "12300000000000000000", + "putAddressesInDA": false, + "signature": null, + "dualSignature": null, + "onchainSignature": null, + "txType": "Transfer", + "toNewAccount": false + } + } + ], + "exchange": "775388987211482434359240755036473578511255461081", + "merkleRootBefore": "4234646276255752387587785316382445844065114913492848585012140487837685304906", + "timestamp": 1624026030, + "protocolTakerFeeBips": 50, + "protocolMakerFeeBips": 25, + "operatorAccountID": 1, + "accountUpdate_P": { + "accountID": 0, + "proof": [ + "15709208397356768791226146337040205100037993130254672331919040402428869705985", + "11473113236477918061488588221467073002557750159004866906792415655573267632943", + "3119666232006465122702357406743537728372256652419937905497476690796772968764", + "4049464550385201434062450880345854486446017599009929398991368913601217329308", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "17247504798753356320390835422981655343778554201471929322899994184893507432444", + "rootAfter": "2947200207640776528336926858569034434877773680884386949318029640732900028190", + "before": { + "owner": "0", + "publicKeyX": "0", + "publicKeyY": "0", + "nonce": 0, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "7801237487181981149186143086321797866080303338833483837539290826558835955956" + }, + "after": { + "owner": "0", + "publicKeyX": "0", + "publicKeyY": "0", + "nonce": 0, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "5655656557858684412635275259062534829478535653500738453563112493957837082962" + } + }, + "accountUpdate_O": { + "accountID": 1, + "proof": [ + "14977049412787007390648978282694932904743275156259300152095723932565393768075", + "11473113236477918061488588221467073002557750159004866906792415655573267632943", + "3119666232006465122702357406743537728372256652419937905497476690796772968764", + "4049464550385201434062450880345854486446017599009929398991368913601217329308", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "3273276600442218616878319311187237278006868703125551946902943986339461140950", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "20363906916247292431697008251927445286940534497642961227707554059181688159634", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "4568215769684345114363941075606692969518938143818010021878089679410693114991", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "3223804656694515885738149454521170797313831028448681382254986509328133197487", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "11129485840813032773562329166048354606803069949598409333143709661998917922044", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "8129120150769574825684072618117585552262779552757986502505812213160533692117", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17454170604659182261556269601822644080088886566880885383944560041463231016723", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "17459553329070667182735619332427473162137980879021647607018065389610482900373", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "4080611622061406529333284921393034563828607994825318808061854939974484479764", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "11253370801247681059578794958034969134162139843758165846092572855047261801062", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "267776031454138575916678089979894817671514166225689018164998105549078880362", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "18706481359309263659146962473097006582188524314991157324258177079130905929041", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "17881060774779912351599409707000393409892971775198525478203378566989271314843", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "18902111915247825518055392467716739393322694930451728728678068519869599986150", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157", + "9161534436368786480469207659954043146097383092544618581411592772464665325157" + ], + "rootBefore": "2947200207640776528336926858569034434877773680884386949318029640732900028190", + "rootAfter": "7851475754832461226758387819249235134438163943083458360153848055252807965204", + "before": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 2, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "5907736891002260492301101315399850592315442227491319295389418184620053552682" }, - "merkleRootAfter": "4944281087885792872515399736818604289710363416009392538304517250341408595422", - "blockSize": 8, - "signature": { - "Rx": "16905499739394356868242132915564542546369407589518661774880273372009916747977", - "Ry": "15588246839512449464094861369392024466583017886921811284375890452016643672837", - "s": "2640715047347154220787029664846769234911504585718958674659837009271938309680" + "after": { + "owner": "1290521165768254036656199217432654600326060127335", + "publicKeyX": "7644615871466591260123460481793004877946522252091243489581172912709750394594", + "publicKeyY": "12322786302237671551075339340201253026201819277124699653033597630270078413524", + "nonce": 3, + "feeBipsAMM": 0, + "_balancesTree": null, + "_balancesLeafs": null, + "balancesRoot": "5907736891002260492301101315399850592315442227491319295389418184620053552682" } -} \ No newline at end of file + }, + "merkleRootAfter": "7851475754832461226758387819249235134438163943083458360153848055252807965204", + "blockSize": 8, + "signature": { + "Rx": "20018353200364261169808431088357518914558296405642340501815509136933205137002", + "Ry": "9071159161425140742169900611500665053505200089479694506868574668734739696676", + "s": "259162624070286920013052452069783104691449899028031400898383572405214246083" + } +} diff --git a/packages/loopring_v3/contracts/aux/access/LoopringIOExchangeOwner.sol b/packages/loopring_v3/contracts/aux/access/LoopringIOExchangeOwner.sol index 1fcc9969a..1071c1612 100644 --- a/packages/loopring_v3/contracts/aux/access/LoopringIOExchangeOwner.sol +++ b/packages/loopring_v3/contracts/aux/access/LoopringIOExchangeOwner.sol @@ -7,16 +7,19 @@ import "../../aux/compression/ZeroDecompressor.sol"; import "../../core/iface/IExchangeV3.sol"; import "../../thirdparty/BytesUtil.sol"; import "../../lib/AddressUtil.sol"; +import "../../lib/ERC1271.sol"; import "../../lib/MathUint.sol"; +import "../../lib/SignatureUtil.sol"; import "./SelectorBasedAccessManager.sol"; import "./IBlockReceiver.sol"; -contract LoopringIOExchangeOwner is SelectorBasedAccessManager +contract LoopringIOExchangeOwner is SelectorBasedAccessManager, ERC1271 { - using AddressUtil for address; - using BytesUtil for bytes; - using MathUint for uint; + using AddressUtil for address; + using BytesUtil for bytes; + using MathUint for uint; + using SignatureUtil for bytes32; bytes4 private constant SUBMITBLOCKS_SELECTOR = IExchangeV3.submitBlocks.selector; bool public open; @@ -76,6 +79,23 @@ contract LoopringIOExchangeOwner is SelectorBasedAccessManager emit SubmitBlocksAccessOpened(_open); } + function isValidSignature( + bytes32 signHash, + bytes memory signature + ) + public + view + override + returns (bytes4) + { + // Role system used a bit differently here. + return hasAccessTo( + signHash.recoverECDSASigner(signature), + this.isValidSignature.selector + ) ? ERC1271_MAGICVALUE : bytes4(0); + } + + function processCallbacks( ExchangeData.Block[] memory blocks, BlockCallback[] calldata callbacks diff --git a/packages/loopring_v3/contracts/test/AmmPool.sol b/packages/loopring_v3/contracts/test/AmmPool.sol index b37a33b81..015bf7460 100644 --- a/packages/loopring_v3/contracts/test/AmmPool.sol +++ b/packages/loopring_v3/contracts/test/AmmPool.sol @@ -3,6 +3,7 @@ pragma solidity ^0.7.0; pragma experimental ABIEncoderV2; +import "./LPERC20.sol"; import "../aux/access/IBlockReceiver.sol"; import "../aux/transactions/TransactionReader.sol"; import "../thirdparty/BytesUtil.sol"; @@ -23,7 +24,7 @@ import "../core/impl/libtransactions/WithdrawTransaction.sol"; /// @title AmmPool /// @author Brecht Devos - /// @dev Incomplete AMM pool implementation for demo/testing purposes. -contract AmmPool is IBlockReceiver, IAgent { +contract AmmPool is LPERC20, IBlockReceiver, IAgent { using AddressUtil for address; using AddressUtil for address payable; @@ -37,27 +38,34 @@ contract AmmPool is IBlockReceiver, IAgent { bytes32 constant public POOLJOIN_TYPEHASH = keccak256( - "PoolJoin(address owner,bool fromLayer2,uint256 poolAmountOut,uint256[] maxAmountsIn,uint32[] storageIDs)" + "PoolJoin(address owner,bool fromLayer2,uint256 minPoolAmountOut,uint256[] maxAmountsIn,uint32[] storageIDs,uint256 validUntil)" ); bytes32 constant public POOLEXIT_TYPEHASH = keccak256( - "PoolExit(address owner,bool toLayer2,uint256 poolAmountIn,uint256[] minAmountsOut,uint32[] storageIDs)" + "PoolExit(address owner,bool toLayer2,uint256 poolAmountIn,uint256[] minAmountsOut,uint32[] storageIDs,uint256 validUntil)" + ); + + bytes32 constant public WITHDRAW_TYPEHASH = keccak256( + "Withdraw(address owner,uint256 poolAmount,uint256[] amounts,uint256 validUntil,uint256 nonce)" ); event Deposit( address owner, + uint poolAmount, uint96[] amounts ); event Withdrawal( - address owner, - uint96[] amounts + address owner, + uint256[] amounts ); event JoinPoolRequested( address owner, - uint poolAmountOut, - uint96[] maxAmountsIn + bool fromLayer2, + uint minPoolAmountOut, + uint96[] maxAmountsIn, + uint validUntil ); event ExitPoolRequested( @@ -67,8 +75,9 @@ contract AmmPool is IBlockReceiver, IAgent { uint96[] minAmountsOut ); - event NewQueuePosition( - uint pos + event LockedUntil( + address owner, + uint timestamp ); uint public constant BASE = 10 ** 18; @@ -76,6 +85,8 @@ contract AmmPool is IBlockReceiver, IAgent { uint public constant MAX_AGE_REQUEST_UNTIL_POOL_SHUTDOWN = 7 days; + uint public constant MIN_TIME_TO_UNLOCK = 1 days; + IExchangeV3 public exchange; uint32 public accountID; @@ -94,9 +105,10 @@ contract AmmPool is IBlockReceiver, IAgent { { address owner; bool fromLayer2; - uint poolAmountOut; + uint minPoolAmountOut; uint96[] maxAmountsIn; uint32[] storageIDs; + uint validUntil; } struct PoolExit @@ -106,6 +118,7 @@ contract AmmPool is IBlockReceiver, IAgent { uint poolAmountIn; uint96[] minAmountsOut; uint32[] storageIDs; + uint validUntil; } struct PoolTransaction @@ -144,18 +157,22 @@ contract AmmPool is IBlockReceiver, IAgent { uint8 public feeBips; Token[] public tokens; - QueueItem[] public queue; - uint public queuePos = 0; + // A map of approved transaction hashes to the timestamp it was created + mapping (bytes32 => uint) approvedTx; // A map from an owner to a token to the balance - mapping (address => mapping (address => uint)) balance; - // A map from an owner to a token to the balance locked - mapping (address => mapping (address => uint)) locked; + mapping (address => mapping (address => uint)) lockedBalance; + // A map from an owner to the timestamp until all funds of the user are locked + // A zero value == locked indefinitely. + mapping (address => uint) lockedUntil; // A map from a token to the total balance owned directly by LPs (so NOT owned by the pool itself) - mapping (address => uint) totalBalance; + mapping (address => uint) totalLockedBalance; + + // A map from an address to a nonce. + mapping(address => uint) public nonces; - // Liquidity tokens - uint public poolSupply; + // A map from an owner to if a user is currently exiting using an onchain approval. + mapping (address => bool) isExiting; modifier onlyExchangeOwner() { @@ -209,37 +226,51 @@ contract AmmPool is IBlockReceiver, IAgent { } } - function deposit(uint96[] calldata amounts) + /// @param poolAmount The amount of liquidity tokens to deposit + /// @param amounts The amounts to deposit + function deposit(uint96 poolAmount, uint96[] calldata amounts) external payable online { - require(amounts.length == tokens.length, "INVALID_DATA"); - - // Deposit the max amounts to this contract so we are sure - // the amounts are available when the actual deposit to the exchange is done. - for (uint i = 0; i < tokens.length; i++) { - address token = tokens[i].addr; - if (token == address(0)) { - require(msg.value == amounts[i], "INVALID_ETH_DEPOSIT"); - } else { - token.safeTransferFromAndVerify(msg.sender, address(this), uint(amounts[i])); - } - balance[token][msg.sender] = balance[token][msg.sender].add(amounts[i]); - totalBalance[token] = totalBalance[token].add(amounts[i]); - } - - emit Deposit(msg.sender, amounts); + depositInternal(poolAmount, amounts); } - function withdraw(uint96[] calldata amounts) + /// @param poolAmount The amount of liquidity tokens to withdraw + /// @param amounts The amounts to withdraw + /// @param validUntil When a signature is provided: the `validUntil` of the signature. + /// @param signature Signature of the operator to allow withdrawals without unlocking + function withdraw( + uint poolAmount, + uint[] calldata amounts, + uint validUntil, + bytes calldata signature + ) external - payable { require(amounts.length == tokens.length, "INVALID_DATA"); + // Check if we can withdraw without unlocking + if (signature.length > 0) { + require(validUntil >= block.timestamp, 'SIGNATURE_EXPIRED'); + bytes32 withdrawHash = EIP712.hashPacked( + DOMAIN_SEPARATOR, + keccak256( + abi.encode( + WITHDRAW_TYPEHASH, + msg.sender, + poolAmount, + keccak256(abi.encodePacked(amounts)), + validUntil, + nonces[msg.sender]++ + ) + ) + ); + require(withdrawHash.verifySignature(exchange.owner(), signature), "INVALID_SIGNATURE"); + } + // Withdraw any outstanding balances for the pool account on the exchange - address[] memory owners = new address[](tokens.length); + /*address[] memory owners = new address[](tokens.length); address[] memory tokenAddresses = new address[](tokens.length); for (uint i = 0; i < tokens.length; i++) { @@ -249,22 +280,23 @@ contract AmmPool is IBlockReceiver, IAgent { exchange.withdrawFromApprovedWithdrawals(owners, tokenAddresses); // Withdraw - uint96[] memory withdrawn = new uint96[](tokens.length); - for (uint i = 0; i < tokens.length; i++) { - address token = tokens[i].addr; - uint available = availableBalance(token, msg.sender); - if (amounts[i] == 0 || amounts[i] > available) { - withdrawn[i] = uint96(available); + uint[] memory withdrawn = new uint[](tokens.length + 1); + for (uint i = 0; i < tokens.length + 1; i++) { + uint amount = (i < tokens.length) ? amounts[i] : poolAmount; + address token = (i < tokens.length) ? tokens[i].addr : address(this); + uint available = (signature.length > 0) ? lockedBalance[token][msg.sender] : availableBalance(token, msg.sender); + if (amount > available) { + withdrawn[i] = available; } else { - withdrawn[i] = amounts[i]; + withdrawn[i] = amount; } if (withdrawn[i] > 0) { - balance[token][msg.sender] = balance[token][msg.sender].sub(withdrawn[i]); + lockedBalance[token][msg.sender] = lockedBalance[token][msg.sender].sub(withdrawn[i]); withdrawInternal(token, withdrawn[i], msg.sender); } } - emit Withdrawal(msg.sender, withdrawn); + emit Withdrawal(msg.sender, withdrawn);*/ } // Needs to be able to receive ETH from the exchange contract @@ -276,9 +308,14 @@ contract AmmPool is IBlockReceiver, IAgent { returns (uint) { if (isOnline()) { - return balance[token][owner].sub(locked[token][owner]); + uint until = lockedUntil[owner]; + if (until != 0 && block.timestamp > until) { + return lockedBalance[token][owner]; + } else { + return 0; + } } else { - return balance[token][owner]; + return lockedBalance[token][owner]; } } @@ -290,39 +327,33 @@ contract AmmPool is IBlockReceiver, IAgent { return shutdownTimestamp == 0; } + function depositAndJoinPool( + uint minPoolAmountOut, + uint96[] calldata maxAmountsIn, + bool fromLayer2, + uint validUntil + ) + external + online + { + depositInternal(0, maxAmountsIn); + joinPoolInternal(minPoolAmountOut, maxAmountsIn, fromLayer2, validUntil); + } /// @dev Joins the pool using on-chain funds. - /// @param poolAmountOut The number of liquidity tokens that need to be minted for this join. + /// @param minPoolAmountOut The minimum number of liquidity tokens that need to be minted for this join. /// @param maxAmountsIn The maximum amounts that can be used to mint /// the specified amount of liquidity tokens. - function joinPool(uint poolAmountOut, uint96[] calldata maxAmountsIn) + function joinPool( + uint minPoolAmountOut, + uint96[] calldata maxAmountsIn, + bool fromLayer2, + uint validUntil + ) external online { - require(maxAmountsIn.length == tokens.length, "INVALID_DATA"); - - // Lock the necessary amounts so we're sure they are available when doing the actual deposit - for (uint i = 0; i < tokens.length; i++) { - address token = tokens[i].addr; - require(availableBalance(token, msg.sender) >= maxAmountsIn[i], "INSUFFICIENT_BALANCE"); - locked[token][msg.sender] = locked[token][msg.sender].add(maxAmountsIn[i]); - } - - // Queue the work - PoolJoin memory join = PoolJoin({ - owner: msg.sender, - fromLayer2: false, - poolAmountOut: poolAmountOut, - maxAmountsIn: maxAmountsIn, - storageIDs: new uint32[](0) - }); - queue.push(QueueItem({ - timestamp: uint64(block.timestamp), - txType: PoolTransactionType.JOIN, - txHash: hashPoolJoin(DOMAIN_SEPARATOR, join) - })); - - emit JoinPoolRequested(msg.sender, poolAmountOut, maxAmountsIn); + joinPoolInternal(minPoolAmountOut, maxAmountsIn, fromLayer2, validUntil); } /// @dev Joins the pool using on-chain funds. @@ -335,37 +366,45 @@ contract AmmPool is IBlockReceiver, IAgent { { require(minAmountsOut.length == tokens.length, "INVALID_DATA"); - // Lock liquidity token - Not needed now with non-transferable liquidity token - //address token = address(this); - //require(availableBalance(token, msg.sender) >= poolAmountIn, "INSUFFICIENT_BALANCE"); - //locked[token][msg.sender] = locked[token][msg.sender].add(poolAmountIn); + // To make the the available liqudity tokens cannot suddenly change + // we keep track of when onchain exits (which need to be processed) are pending. + require(isExiting[msg.sender] == false, "ALREADY_EXITING"); + isExiting[msg.sender] = true; - // Queue the work + // Approve the exit PoolExit memory exit = PoolExit({ owner: msg.sender, toLayer2: toLayer2, poolAmountIn: poolAmountIn, minAmountsOut: minAmountsOut, - storageIDs: new uint32[](0) + storageIDs: new uint32[](0), + validUntil: 0xffffffff }); - queue.push(QueueItem({ - timestamp: uint64(block.timestamp), - txType: PoolTransactionType.EXIT, - txHash: hashPoolExit(DOMAIN_SEPARATOR, exit) - })); + bytes32 txHash = hashPoolExit(DOMAIN_SEPARATOR, exit); + approvedTx[txHash] = block.timestamp; emit ExitPoolRequested(msg.sender, toLayer2, poolAmountIn, minAmountsOut); } + function setLockedUntil(uint timestamp) + public + { + if (timestamp > 0) { + require(timestamp >= block.timestamp + MIN_TIME_TO_UNLOCK, "TOO_SOON"); + } + lockedUntil[msg.sender] = timestamp; + + emit LockedUntil(msg.sender, timestamp); + } + // Anyone is able to shut down the pool when requests aren't being processed any more. - function shutdown() + function shutdown(bytes32 txHash) external payable online { - require( - block.timestamp > queue[queuePos].timestamp + MAX_AGE_REQUEST_UNTIL_POOL_SHUTDOWN && - queue[queuePos].txType != PoolTransactionType.NOOP, + /*require( + block.timestamp > approvedTx[txHash] + MAX_AGE_REQUEST_UNTIL_POOL_SHUTDOWN, "REQUEST_NOT_TOO_OLD" ); @@ -379,7 +418,7 @@ contract AmmPool is IBlockReceiver, IAgent { } } - shutdownTimestamp = block.timestamp; + shutdownTimestamp = block.timestamp;*/ } // Only used to withdraw from the pool when shutdown. @@ -493,30 +532,70 @@ contract AmmPool is IBlockReceiver, IAgent { // The ending AMM updates processAmmUpdates(ctx, false); - emit NewQueuePosition(queuePos); return ctx.numTransactionsConsumed; } - function totalSupply() - public - view - returns (uint256) + function depositInternal(uint poolAmount, uint96[] calldata amounts) + internal { - return poolSupply; + require(amounts.length == tokens.length, "INVALID_DATA"); + if (isExiting[msg.sender]) { + // This could suddenly change the amount of liquidity tokens available, which + // could change how the operator needs to process the exit. + require(poolAmount == 0, "CANNOT_DEPOSIT_LIQUIDITY_TOKENS_WHILE_EXITING"); + } + + // Lock up funds inside this contract so we can depend on them being available. + for (uint i = 0; i < tokens.length + 1; i++) { + uint amount = (i < tokens.length) ? amounts[i] : poolAmount; + address token = (i < tokens.length) ? tokens[i].addr : address(this); + if (token == address(0)) { + require(msg.value == amount, "INVALID_ETH_DEPOSIT"); + } else { + token.safeTransferFromAndVerify(msg.sender, address(this), uint(amount)); + } + lockedBalance[token][msg.sender] = lockedBalance[token][msg.sender].add(amount); + totalLockedBalance[token] = totalLockedBalance[token].add(amount); + } + + emit Deposit(msg.sender, poolAmount, amounts); + } + + function joinPoolInternal(uint minPoolAmountOut, uint96[] calldata maxAmountsIn, bool fromLayer2, uint validUntil) + internal + { + require(maxAmountsIn.length == tokens.length, "INVALID_DATA"); + + // Don't check the available funds here, if the operator isn't sure the funds + // are locked this transaction can simply be dropped. + + // Approve the join + PoolJoin memory join = PoolJoin({ + owner: msg.sender, + fromLayer2: fromLayer2, + minPoolAmountOut: minPoolAmountOut, + maxAmountsIn: maxAmountsIn, + storageIDs: new uint32[](0), + validUntil: validUntil + }); + bytes32 txHash = hashPoolJoin(DOMAIN_SEPARATOR, join); + approvedTx[txHash] = 0xffffffff; + + emit JoinPoolRequested(msg.sender, fromLayer2, minPoolAmountOut, maxAmountsIn, validUntil); } function mint(address owner, uint amount) internal { - poolSupply = poolSupply.add(amount); - balance[address(this)][owner] = balance[address(this)][owner].add(amount); + _mint(address(this), amount); + lockedBalance[address(this)][owner] = lockedBalance[address(this)][owner].add(amount); } function burn(address owner, uint amount) internal { - poolSupply = poolSupply.sub(amount); - balance[address(this)][owner] = balance[address(this)][owner].sub(amount); + lockedBalance[address(this)][owner] = lockedBalance[address(this)][owner].sub(amount); + _burn(address(this), amount); } function processAmmUpdates( @@ -555,29 +634,14 @@ contract AmmPool is IBlockReceiver, IAgent { ) internal { - require( - signature.length == 0 && !join.fromLayer2 || - signature.length != 0 && join.fromLayer2, - "SIGNATURE_VS_FROM_LAYER2" - ); - authenticatePoolTx( join.owner, hashPoolJoin(ctx.DOMAIN_SEPARATOR, join), signature ); - uint poolTotal = totalSupply(); - uint ratio = BASE; - if (poolTotal > 0) { - ratio = (join.poolAmountOut * BASE) / poolTotal; - } else { - // Important for accuracy - require(join.poolAmountOut == INITIAL_SUPPLY, "INITIAL_SUPPLY_UNEXPECTED"); - } - // Check if the requirements are fulfilled - (bool valid, uint96[] memory amounts) = validateJoinAmounts(ctx, join); + (bool valid, uint poolAmountOut, uint96[] memory amounts) = validateJoinAmounts(ctx, join); if (valid) { for (uint i = 0; i < ctx.tokens.length; i++) { @@ -591,7 +655,9 @@ contract AmmPool is IBlockReceiver, IAgent { require(transfer.fee == 0, "INVALID_TX_DATA"); // Replay protection (only necessary when using a signature) - require(transfer.storageID == join.storageIDs[i], "INVALID_TX_DATA"); + if (signature.length > 0) { + require(transfer.storageID == join.storageIDs[i], "INVALID_TX_DATA"); + } // Now approve this transfer transfer.validUntil = 0xffffffff; @@ -606,22 +672,13 @@ contract AmmPool is IBlockReceiver, IAgent { } else { // Make the amount unavailable for withdrawing address token = ctx.tokens[i].addr; - balance[token][join.owner] = balance[token][join.owner].sub(amount); + lockedBalance[token][join.owner] = lockedBalance[token][join.owner].sub(amount); } ctx.ammBalancesAfter[i] = ctx.ammBalancesAfter[i].add(amount); } // Mint liquidity tokens - mint(join.owner, join.poolAmountOut); - } - - if (!join.fromLayer2) { - for (uint i = 0; i < ctx.tokens.length; i++) { - address token = ctx.tokens[i].addr; - uint amount = join.maxAmountsIn[i]; - // Unlock the amount locked for this join - locked[token][join.owner] = locked[token][join.owner].sub(amount); - } + mint(join.owner, poolAmountOut); } } @@ -633,31 +690,42 @@ contract AmmPool is IBlockReceiver, IAgent { view returns( bool /* valid */, + uint /*poolAmountOut*/, uint96[] memory /* amounts */ ) { - uint96[] memory amounts = new uint96[](ctx.tokens.length); - uint poolTotal = totalSupply(); - uint ratio; - if (poolTotal > 0) { - ratio = join.poolAmountOut.mul(BASE) / poolTotal; - } else if (join.poolAmountOut != INITIAL_SUPPLY) { - return (false, amounts); - } else { - ratio = BASE; + // Check if we can still use this join + if (block.timestamp > join.validUntil) { + return (false, 0, join.maxAmountsIn); } - // Check if the requirements are fulfilled - for (uint i = 0; i < ctx.tokens.length; i++) { - amounts[i] = (poolTotal == 0) ? - join.maxAmountsIn[i] : - (ratio.mul(ctx.ammBalancesAfter[i]) / BASE).toUint96(); + uint poolTotal = totalSupply(); + if (poolTotal == 0) { + return(true, INITIAL_SUPPLY, join.maxAmountsIn); + } else { + // Calculate the amount of liquidity tokens that should be minted + uint poolAmountOut = 0; + bool initialValueSet = false; + for (uint i = 0; i < ctx.tokens.length; i++) { + if (ctx.ammBalancesAfter[i] > 0) { + uint amountOut = uint(join.maxAmountsIn[i]).mul(poolTotal) / uint(ctx.ammBalancesAfter[i]); + if (!initialValueSet || amountOut < poolAmountOut) { + poolAmountOut = amountOut; + initialValueSet = true; + } + } + } - if (amounts[i] > join.maxAmountsIn[i]) { - return (false, amounts); + // Calculate the amounts to deposit + uint ratio = poolAmountOut.mul(BASE) / poolTotal; + uint96[] memory amounts = new uint96[](ctx.tokens.length); + for (uint i = 0; i < ctx.tokens.length; i++) { + amounts[i] = (ratio.mul(ctx.ammBalancesAfter[i]) / BASE).toUint96(); } + + bool valid = (poolAmountOut >= join.minPoolAmountOut); + return (valid, poolAmountOut, amounts); } - return (true, amounts); } function processExit( @@ -672,6 +740,10 @@ contract AmmPool is IBlockReceiver, IAgent { hashPoolExit(ctx.DOMAIN_SEPARATOR, exit), signature ); + if (signature.length == 0) { + // This is an onchain exit, we're processing it now so stop tracking it. + isExiting[msg.sender] = false; + } (bool valid, uint96[] memory amounts) = validateExitAmounts(ctx, exit); @@ -706,7 +778,7 @@ contract AmmPool is IBlockReceiver, IAgent { } else { address token = ctx.tokens[i].addr; // Make the amount available for withdrawing - balance[token][exit.owner] = balance[token][exit.owner].add(amount); + lockedBalance[token][exit.owner] = lockedBalance[token][exit.owner].add(amount); } ctx.ammBalancesAfter[i] = ctx.ammBalancesAfter[i].sub(amount); } @@ -725,20 +797,28 @@ contract AmmPool is IBlockReceiver, IAgent { ) { uint96[] memory amounts = new uint96[](ctx.tokens.length); - uint poolTotal = totalSupply(); - uint ratio = exit.poolAmountIn.mul(BASE) / poolTotal; + + // Check if we can still use this exit + if (block.timestamp > exit.validUntil) { + return (false, amounts); + } // Check if the user has enough pool tokens - if (availableBalance(address(this), exit.owner) < exit.poolAmountIn) { + if (lockedBalance[address(this)][exit.owner] < exit.poolAmountIn) { return (false, amounts); } + // Calculate how much will be withdrawn + uint poolTotal = totalSupply(); + uint ratio = exit.poolAmountIn.mul(BASE) / poolTotal; for (uint i = 0; i < ctx.tokens.length; i++) { amounts[i] = (ratio.mul(ctx.ammBalancesAfter[i]) / BASE).toUint96(); if (amounts[i] < exit.minAmountsOut[i]) { return (false, amounts); } } + + return (true, amounts); } function authenticatePoolTx( @@ -749,9 +829,8 @@ contract AmmPool is IBlockReceiver, IAgent { internal { if (signature.length == 0) { - require(queue[queuePos].txHash == poolTxHash, "NOT_APPROVED"); - delete queue[queuePos]; - queuePos++; + require(approvedTx[poolTxHash] != 0, "NOT_APPROVED"); + delete approvedTx[poolTxHash]; } else { require(poolTxHash.verifySignature(owner, signature), "INVALID_SIGNATURE"); } @@ -792,7 +871,7 @@ contract AmmPool is IBlockReceiver, IAgent { ); ctx.numTransactionsConsumed++; // Total balance in this contract decreases by the amount deposited - totalBalance[token.addr] = totalBalance[token.addr].sub(amount); + totalLockedBalance[token.addr] = totalLockedBalance[token.addr].sub(amount); } function processWithdrawal( @@ -825,7 +904,7 @@ contract AmmPool is IBlockReceiver, IAgent { exchange.approveTransaction(address(this), txHash); ctx.numTransactionsConsumed++; // Total balance in this contract increases by the amount withdrawn - totalBalance[token.addr] = totalBalance[token.addr].add(amount); + totalLockedBalance[token.addr] = totalLockedBalance[token.addr].add(amount); } function withdrawInternal( @@ -857,9 +936,10 @@ contract AmmPool is IBlockReceiver, IAgent { POOLJOIN_TYPEHASH, join.owner, join.fromLayer2, - join.poolAmountOut, + join.minPoolAmountOut, keccak256(abi.encodePacked(join.maxAmountsIn)), - keccak256(abi.encodePacked(join.storageIDs)) + keccak256(abi.encodePacked(join.storageIDs)), + join.validUntil ) ) ); @@ -882,7 +962,8 @@ contract AmmPool is IBlockReceiver, IAgent { exit.toLayer2, exit.poolAmountIn, keccak256(abi.encodePacked(exit.minAmountsOut)), - keccak256(abi.encodePacked(exit.storageIDs)) + keccak256(abi.encodePacked(exit.storageIDs)), + exit.validUntil ) ) ); diff --git a/packages/loopring_v3/contracts/test/LPERC20.sol b/packages/loopring_v3/contracts/test/LPERC20.sol new file mode 100644 index 000000000..82af4f0f0 --- /dev/null +++ b/packages/loopring_v3/contracts/test/LPERC20.sol @@ -0,0 +1,73 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2017 Loopring Technology Limited. +pragma solidity ^0.7.0; + +import '../lib/ERC20.sol'; +import '../lib/MathUint.sol'; + +contract LPERC20 is ERC20 { + using MathUint for uint; + + string public constant name = 'Loopring AMM'; + string public constant symbol = 'LLT'; + uint8 public constant decimals = 18; + uint public _totalSupply; + mapping(address => uint) public _balanceOf; + mapping(address => mapping(address => uint)) public _allowance; + + event Approval(address indexed owner, address indexed spender, uint value); + event Transfer(address indexed from, address indexed to, uint value); + + function totalSupply() public virtual view override returns (uint) { + return _totalSupply; + } + + function balanceOf(address owner) public view override virtual returns (uint balance) { + return _balanceOf[owner]; + } + + function allowance(address owner, address spender) public view override returns (uint) { + return _allowance[owner][spender]; + } + + function approve(address spender, uint value) public override returns (bool) { + _approve(msg.sender, spender, value); + return true; + } + + function transfer(address to, uint value) public override returns (bool) { + _transfer(msg.sender, to, value); + return true; + } + + function transferFrom(address from, address to, uint value) public override returns (bool) { + if (_allowance[from][msg.sender] != uint(-1)) { + _allowance[from][msg.sender] = _allowance[from][msg.sender].sub(value); + } + _transfer(from, to, value); + return true; + } + + function _mint(address to, uint value) internal { + _totalSupply = _totalSupply.add(value); + _balanceOf[to] = _balanceOf[to].add(value); + emit Transfer(address(0), to, value); + } + + function _burn(address from, uint value) internal { + _balanceOf[from] = _balanceOf[from].sub(value); + _totalSupply = _totalSupply.sub(value); + emit Transfer(from, address(0), value); + } + + function _approve(address owner, address spender, uint value) private { + _allowance[owner][spender] = value; + emit Approval(owner, spender, value); + } + + function _transfer(address from, address to, uint value) private { + _balanceOf[from] = _balanceOf[from].sub(value); + _balanceOf[to] = _balanceOf[to].add(value); + emit Transfer(from, to, value); + } +} diff --git a/packages/loopring_v3/test/testAMMPool.ts b/packages/loopring_v3/test/testAMMPool.ts index 6d0f58f23..d43077498 100644 --- a/packages/loopring_v3/test/testAMMPool.ts +++ b/packages/loopring_v3/test/testAMMPool.ts @@ -6,6 +6,7 @@ import { AuthMethod, OrderInfo, SpotTrade } from "./types"; import * as sigUtil from "eth-sig-util"; import { SignatureType, sign, verifySignature } from "../util/Signature"; import { roundToFloatValue } from "loopringV3.js"; +import { logDebug } from "./logs"; const AgentRegistry = artifacts.require("AgentRegistry"); @@ -19,9 +20,10 @@ export interface PoolJoin { txType?: "Join"; owner: string; fromLayer2: boolean; - poolAmountOut: BN; + minPoolAmountOut: BN; maxAmountsIn: BN[]; storageIDs: number[]; + validUntil: number; signature?: string; } @@ -32,6 +34,7 @@ export interface PoolExit { poolAmountIn: BN; minAmountsOut: BN[]; storageIDs: number[]; + validUntil: number; signature?: string; } @@ -47,10 +50,12 @@ export interface AuxiliaryData { export interface JoinOptions { authMethod?: AuthMethod; + validUntil?: number; } export interface ExitOptions { authMethod?: AuthMethod; + validUntil?: number; } type TxType = PoolJoin | PoolExit; @@ -68,9 +73,10 @@ export namespace PoolJoinUtils { PoolJoin: [ { name: "owner", type: "address" }, { name: "fromLayer2", type: "bool" }, - { name: "poolAmountOut", type: "uint256" }, + { name: "minPoolAmountOut", type: "uint256" }, { name: "maxAmountsIn", type: "uint256[]" }, - { name: "storageIDs", type: "uint32[]" } + { name: "storageIDs", type: "uint32[]" }, + { name: "validUntil", type: "uint256" } ] }, primaryType: "PoolJoin", @@ -83,9 +89,10 @@ export namespace PoolJoinUtils { message: { owner: join.owner, fromLayer2: join.fromLayer2, - poolAmountOut: join.poolAmountOut, + minPoolAmountOut: join.minPoolAmountOut, maxAmountsIn: join.maxAmountsIn, - storageIDs: join.storageIDs + storageIDs: join.storageIDs, + validUntil: join.validUntil } }; return typedData; @@ -112,7 +119,8 @@ export namespace PoolExitUtils { { name: "toLayer2", type: "bool" }, { name: "poolAmountIn", type: "uint256" }, { name: "minAmountsOut", type: "uint256[]" }, - { name: "storageIDs", type: "uint32[]" } + { name: "storageIDs", type: "uint32[]" }, + { name: "validUntil", type: "uint256" } ] }, primaryType: "PoolExit", @@ -127,7 +135,8 @@ export namespace PoolExitUtils { toLayer2: exit.toLayer2, poolAmountIn: exit.poolAmountIn, minAmountsOut: exit.minAmountsOut, - storageIDs: exit.storageIDs + storageIDs: exit.storageIDs, + validUntil: exit.validUntil } }; return typedData; @@ -152,10 +161,10 @@ export class AmmPool { public totalSupply: BN; - public queue: TxType[]; + public pendingTransactions: TxType[]; constructor(ctx: ExchangeTestUtil) { this.ctx = ctx; - this.queue = []; + this.pendingTransactions = []; } public async setupPool(tokens: string[], weights: BN[], feeBips: number) { @@ -192,7 +201,7 @@ export class AmmPool { ); } - public async deposit(owner: string, amounts: BN[]) { + public async deposit(owner: string, poolAmount: BN, amounts: BN[]) { let value = new BN(0); for (let i = 0; i < this.tokens.length; i++) { const token = this.tokens[i]; @@ -207,12 +216,12 @@ export class AmmPool { } } } - await this.contract.deposit(amounts, { value, from: owner }); + await this.contract.deposit(poolAmount, amounts, { value, from: owner }); } public async join( owner: string, - poolAmountOut: BN, + minPoolAmountOut: BN, maxAmountsIn: BN[], fromLayer2: boolean, options: JoinOptions = {} @@ -220,20 +229,29 @@ export class AmmPool { // Fill in defaults const authMethod = options.authMethod !== undefined ? options.authMethod : AuthMethod.ECDSA; + const validUntil = + options.validUntil !== undefined ? options.validUntil : 0xffffffff; const join: PoolJoin = { txType: "Join", owner, fromLayer2, - poolAmountOut, + minPoolAmountOut, maxAmountsIn, - storageIDs: [] + storageIDs: [], + validUntil }; if (authMethod === AuthMethod.APPROVE) { - await this.contract.joinPool(poolAmountOut, maxAmountsIn, { - from: owner - }); + await this.contract.joinPool( + minPoolAmountOut, + maxAmountsIn, + fromLayer2, + validUntil, + { + from: owner + } + ); } else if (authMethod === AuthMethod.ECDSA) { for (const token of this.tokens) { join.storageIDs.push(this.ctx.reserveStorageID()); @@ -243,7 +261,7 @@ export class AmmPool { await verifySignature(owner, hash, join.signature); } - this.queue.push(join); + this.pendingTransactions.push(join); } public async exit( @@ -256,6 +274,8 @@ export class AmmPool { // Fill in defaults const authMethod = options.authMethod !== undefined ? options.authMethod : AuthMethod.ECDSA; + const validUntil = + options.validUntil !== undefined ? options.validUntil : 0xffffffff; const exit: PoolExit = { txType: "Exit", @@ -263,7 +283,8 @@ export class AmmPool { toLayer2, poolAmountIn, minAmountsOut, - storageIDs: [] + storageIDs: [], + validUntil }; if (authMethod === AuthMethod.APPROVE) { @@ -279,16 +300,16 @@ export class AmmPool { await verifySignature(owner, hash, exit.signature); } - this.queue.push(exit); + this.pendingTransactions.push(exit); } public async depositAndJoin( owner: string, - poolAmountOut: BN, + minPoolAmountOut: BN, maxAmountsIn: BN[] ) { - await this.deposit(owner, maxAmountsIn); - await this.join(owner, poolAmountOut, maxAmountsIn, false, { + await this.deposit(owner, new BN(0), maxAmountsIn); + await this.join(owner, minPoolAmountOut, maxAmountsIn, false, { authMethod: AuthMethod.APPROVE }); } @@ -320,28 +341,47 @@ export class AmmPool { const poolTransactions: PoolTransaction[] = []; - // Process work in the queue - for (const item of this.queue) { + // Process the pending transactions + for (const item of this.pendingTransactions) { if (item.txType === "Join") { const join = item; // Calculate expected amounts for specified liquidity tokens const poolTotal = this.totalSupply; - let ratio = this.BASE; - if (poolTotal.gt(new BN(0))) { - ratio = join.poolAmountOut.mul(this.BASE).div(poolTotal); + + let poolAmountOut = new BN(0); + let amounts: BN[] = []; + if (poolTotal.eq(new BN(0))) { + poolAmountOut = this.INITIAL_SUPPLY; + amounts.push(...join.maxAmountsIn); } else { + // Calculate the amount of liquidity tokens that should be minted + let initialValueSet = false; + for (let i = 0; i < this.tokens.length; i++) { + if (ammBalances[i].gt(new BN(0))) { + const amountOut = join.maxAmountsIn[i] + .mul(poolTotal) + .div(ammBalances[i]); + if (!initialValueSet || amountOut.lt(poolAmountOut)) { + poolAmountOut = amountOut; + initialValueSet = true; + } + } + } assert( - join.poolAmountOut.eq(this.INITIAL_SUPPLY), - "INITIAL_SUPPLY_UNEXPECTED" + poolAmountOut.gte(join.minPoolAmountOut), + "min pool amounts out not achieved" ); + + // Calculate the amounts to deposit + let ratio = poolAmountOut.mul(this.BASE).div(poolTotal); + for (let i = 0; i < this.tokens.length; i++) { + amounts.push(ammBalances[i].mul(ratio).div(this.BASE)); + } } for (let i = 0; i < this.tokens.length; i++) { - let amount = ammBalances[i].mul(ratio).div(this.BASE); - if (poolTotal.eq(new BN(0))) { - amount = join.maxAmountsIn[i]; - } + let amount = amounts[i]; if (join.fromLayer2) { amount = roundToFloatValue(amount, Constants.Float24Encoding); const storageID = @@ -362,7 +402,7 @@ export class AmmPool { ammBalancesInAccount[i] = ammBalancesInAccount[i].add(amount); } ammBalances[i] = ammBalances[i].add(amount); - console.log( + logDebug( "pool join: " + amount.toString(10) + " (L" + @@ -375,7 +415,7 @@ export class AmmPool { data: this.getPoolJoinAuxData(join), signature: join.signature }); - poolTotal.iadd(join.poolAmountOut); + poolTotal.iadd(poolAmountOut); } else if (item.txType === "Exit") { const exit = item; @@ -405,13 +445,14 @@ export class AmmPool { ammBalancesInAccount[i] = ammBalancesInAccount[i].sub(amount); } ammBalances[i] = ammBalances[i].sub(amount); - console.log("pool exit: " + amount.toString(10)); + logDebug("pool exit: " + amount.toString(10)); } poolTransactions.push({ txType: PoolTransactionType.EXIT, data: this.getPoolExitAuxData(exit), signature: exit.signature }); + poolTotal.isub(exit.poolAmountIn); } } @@ -420,7 +461,7 @@ export class AmmPool { if (ammBalances[i].gt(ammBalancesInAccount[i])) { const amount = ammBalances[i].sub(ammBalancesInAccount[i]); await this.ctx.requestDeposit(owner, this.tokens[i], amount); - console.log("pool deposit: " + amount.toString(10)); + logDebug("pool deposit: " + amount.toString(10)); } else if (ammBalances[i].lt(ammBalancesInAccount[i])) { const amount = ammBalancesInAccount[i].sub(ammBalances[i]); await this.ctx.requestWithdrawal( @@ -431,7 +472,7 @@ export class AmmPool { new BN(0), { authMethod: AuthMethod.NONE, minGas: 0 } ); - console.log("pool withdraw: " + amount.toString(10)); + logDebug("pool withdraw: " + amount.toString(10)); } } @@ -446,11 +487,10 @@ export class AmmPool { ); } - this.queue = []; + this.pendingTransactions = []; - console.log(poolTransactions); + logDebug(poolTransactions); const auxiliaryData = this.getAuxiliaryData(poolTransactions); - //console.log(auxiliaryData); const blockCallbacks: BlockCallback[] = []; blockCallbacks.push({ target: owner, @@ -468,13 +508,14 @@ export class AmmPool { amounts.push(amount.toString(10)); } return web3.eth.abi.encodeParameter( - "tuple(address,bool,uint256,uint256[],uint32[])", + "tuple(address,bool,uint256,uint256[],uint32[],uint256)", [ join.owner, join.fromLayer2, - join.poolAmountOut.toString(10), + join.minPoolAmountOut.toString(10), amounts, - join.storageIDs + join.storageIDs, + join.validUntil ] ); } @@ -485,13 +526,14 @@ export class AmmPool { amounts.push(amount.toString(10)); } return web3.eth.abi.encodeParameter( - "tuple(address,bool,uint256,uint256[],uint32[])", + "tuple(address,bool,uint256,uint256[],uint32[],uint256)", [ exit.owner, exit.toLayer2, exit.poolAmountIn.toString(10), amounts, - exit.storageIDs + exit.storageIDs, + exit.validUntil ] ); } @@ -548,7 +590,7 @@ contract("AMM Pool", (accounts: string[]) => { describe("AMM", function() { this.timeout(0); - it.only("Successful swap (AMM maker)", async () => { + it("Successful swap (AMM maker)", async () => { const ownerA = ctx.testContext.orderOwners[10]; const ownerB = ctx.testContext.orderOwners[11]; @@ -580,14 +622,14 @@ contract("AMM Pool", (accounts: string[]) => { from: registryOwner }); - /*await pool.depositAndJoin( + await pool.depositAndJoin( ownerA, new BN(web3.utils.toWei("100", "ether")), [ new BN(web3.utils.toWei("10000.123456", "ether")), new BN(web3.utils.toWei("20000.654321", "ether")) ] - );*/ + ); await pool.join( ownerB, new BN(web3.utils.toWei("100", "ether")), @@ -634,16 +676,16 @@ contract("AMM Pool", (accounts: string[]) => { await ctx.submitTransactions(); await ctx.submitPendingBlocks(); - /*await pool.exit( + await pool.exit( ownerA, new BN(web3.utils.toWei("60", "ether")), [ new BN(web3.utils.toWei("5000", "ether")), new BN(web3.utils.toWei("10000", "ether")) ], - true, + false, { authMethod: AuthMethod.APPROVE } - );*/ + ); await pool.exit( ownerB, new BN(web3.utils.toWei("60", "ether")), diff --git a/packages/loopring_v3/test/testExchangeInternalTransfer.ts b/packages/loopring_v3/test/testExchangeInternalTransfer.ts index cfc82c06f..46c48a1f1 100644 --- a/packages/loopring_v3/test/testExchangeInternalTransfer.ts +++ b/packages/loopring_v3/test/testExchangeInternalTransfer.ts @@ -18,13 +18,12 @@ contract("Exchange", (accounts: string[]) => { const createExchange = async (setupTestState: boolean = true) => { exchangeID = await exchangeTestUtil.createExchange( exchangeTestUtil.testContext.stateOwners[0], - {setupTestState} + { setupTestState } ); operatorAccountID = await exchangeTestUtil.getActiveOperator(exchangeID); operator = exchangeTestUtil.getAccount(operatorAccountID).owner; }; - before(async () => { exchangeTestUtil = new ExchangeTestUtil(); await exchangeTestUtil.initialize(accounts); @@ -54,12 +53,41 @@ contract("Exchange", (accounts: string[]) => { it("General transfers (mixed conditional/non-conditional)", async () => { await createExchange(); // Do some transfers - await exchangeTestUtil.transfer(ownerA, ownerD, tokenA, amountA, tokenB, amountC); - await exchangeTestUtil.transfer(ownerB, ownerC, tokenA, amountB, tokenA, amountD); - await exchangeTestUtil.transfer(ownerA, ownerB, tokenA, amountC, tokenB, amountD, { - authMethod: AuthMethod.APPROVE - }); - await exchangeTestUtil.transfer(ownerA, ownerB, tokenB, amountD, tokenA, amountA); + await exchangeTestUtil.transfer( + ownerA, + ownerD, + tokenA, + amountA, + tokenB, + amountC + ); + await exchangeTestUtil.transfer( + ownerB, + ownerC, + tokenA, + amountB, + tokenA, + amountD + ); + await exchangeTestUtil.transfer( + ownerA, + ownerB, + tokenA, + amountC, + tokenB, + amountD, + { + authMethod: AuthMethod.APPROVE + } + ); + await exchangeTestUtil.transfer( + ownerA, + ownerB, + tokenB, + amountD, + tokenA, + amountA + ); // Submit the transfers await exchangeTestUtil.submitTransactions(); await exchangeTestUtil.submitPendingBlocks(); @@ -68,18 +96,50 @@ contract("Exchange", (accounts: string[]) => { it("Conditional transfers with same (from, to, token) values", async () => { await createExchange(); // Do some transfers with the same (from, to, token) values - await exchangeTestUtil.transfer(ownerA, ownerB, tokenA, amountA, tokenB, amountC, { - authMethod: AuthMethod.APPROVE - }); - await exchangeTestUtil.transfer(ownerB, ownerA, tokenA, amountA, tokenB, amountC, { - authMethod: AuthMethod.APPROVE - }); - await exchangeTestUtil.transfer(ownerB, ownerA, tokenA, amountB, tokenB, amountD, { - authMethod: AuthMethod.APPROVE - }); - await exchangeTestUtil.transfer(ownerA, ownerB, tokenA, amountA, tokenB, amountC, { - authMethod: AuthMethod.APPROVE - }); + await exchangeTestUtil.transfer( + ownerA, + ownerB, + tokenA, + amountA, + tokenB, + amountC, + { + authMethod: AuthMethod.APPROVE + } + ); + await exchangeTestUtil.transfer( + ownerB, + ownerA, + tokenA, + amountA, + tokenB, + amountC, + { + authMethod: AuthMethod.APPROVE + } + ); + await exchangeTestUtil.transfer( + ownerB, + ownerA, + tokenA, + amountB, + tokenB, + amountD, + { + authMethod: AuthMethod.APPROVE + } + ); + await exchangeTestUtil.transfer( + ownerA, + ownerB, + tokenA, + amountA, + tokenB, + amountC, + { + authMethod: AuthMethod.APPROVE + } + ); // Submit the transfers await exchangeTestUtil.submitTransactions(); await exchangeTestUtil.submitPendingBlocks(); @@ -95,7 +155,14 @@ contract("Exchange", (accounts: string[]) => { const fee = new BN(web3.utils.toWei("0.1", "ether")); // Do some transfers - await exchangeTestUtil.transfer(ownerA, ownerB, token, amount, feeToken, fee); + await exchangeTestUtil.transfer( + ownerA, + ownerB, + token, + amount, + feeToken, + fee + ); await exchangeTestUtil.transfer( ownerB, ownerD, @@ -105,7 +172,14 @@ contract("Exchange", (accounts: string[]) => { fee.mul(new BN(2)), { maxFee: fee.mul(new BN(3)) } ); - await exchangeTestUtil.transfer(ownerB, ownerA, token, amount, feeToken, fee); + await exchangeTestUtil.transfer( + ownerB, + ownerA, + token, + amount, + feeToken, + fee + ); // Commit the transfers await exchangeTestUtil.submitTransactions(); @@ -123,16 +197,31 @@ contract("Exchange", (accounts: string[]) => { const fee = new BN(web3.utils.toWei("12.3", "ether")); // Do a transfer - await exchangeTestUtil.transfer(ownerA, ownerB, token, amount, feeToken, fee); + await exchangeTestUtil.transfer( + ownerA, + ownerB, + token, + amount, + feeToken, + fee + ); await exchangeTestUtil.transfer( ownerB, ownerD, token, amount.mul(new BN(2)), feeToken, - fee.mul(new BN(2)) + fee.mul(new BN(2)), + { putAddressesInDA: false } + ); + await exchangeTestUtil.transfer( + ownerB, + ownerA, + token, + amount, + feeToken, + fee ); - await exchangeTestUtil.transfer(ownerB, ownerA, token, amount, feeToken, fee); // Commit the transfers await exchangeTestUtil.submitTransactions(); @@ -150,7 +239,14 @@ contract("Exchange", (accounts: string[]) => { const fee = new BN(web3.utils.toWei("0.1", "ether")); // Do some transfers transfer - await exchangeTestUtil.transfer(ownerA, ownerA, token, amount, feeToken, fee); + await exchangeTestUtil.transfer( + ownerA, + ownerA, + token, + amount, + feeToken, + fee + ); await exchangeTestUtil.transfer( ownerB, ownerB, @@ -192,7 +288,14 @@ contract("Exchange", (accounts: string[]) => { const fee = new BN(web3.utils.toWei("12.3", "ether")); // Do a transfer - await exchangeTestUtil.transfer(ownerA, ownerA, token, amount, feeToken, fee); + await exchangeTestUtil.transfer( + ownerA, + ownerA, + token, + amount, + feeToken, + fee + ); await exchangeTestUtil.transfer( ownerB, ownerB, @@ -234,10 +337,38 @@ contract("Exchange", (accounts: string[]) => { const fee = new BN(web3.utils.toWei("0.1", "ether")); // Do some transfers transfer - await exchangeTestUtil.transfer(ownerA, ownerB, token, amount, feeToken, fee); - await exchangeTestUtil.transfer(ownerA, ownerA, token, amount, feeToken, fee); - await exchangeTestUtil.transfer(ownerA, ownerB, token, amount, token, fee); - await exchangeTestUtil.transfer(ownerA, ownerA, token, amount, token, fee); + await exchangeTestUtil.transfer( + ownerA, + ownerB, + token, + amount, + feeToken, + fee + ); + await exchangeTestUtil.transfer( + ownerA, + ownerA, + token, + amount, + feeToken, + fee + ); + await exchangeTestUtil.transfer( + ownerA, + ownerB, + token, + amount, + token, + fee + ); + await exchangeTestUtil.transfer( + ownerA, + ownerA, + token, + amount, + token, + fee + ); exchangeTestUtil.setActiveOperator( await exchangeTestUtil.getAccountID(ownerA) @@ -263,15 +394,17 @@ contract("Exchange", (accounts: string[]) => { // Do some transfers transfer await exchangeTestUtil.transfer( - ownerA, ownerD, token, amount, feeToken, fee, - {maxFee: fee.div(new BN(2))} + ownerA, + ownerD, + token, + amount, + feeToken, + fee, + { maxFee: fee.div(new BN(2)) } ); // Commit the transfers - await expectThrow( - exchangeTestUtil.submitTransactions(), - "invalid block" - ); + await expectThrow(exchangeTestUtil.submitTransactions(), "invalid block"); }); it("should be able to transfer to a new account", async () => { @@ -283,7 +416,15 @@ contract("Exchange", (accounts: string[]) => { const fee = new BN(web3.utils.toWei("0.1", "ether")); // Do some transfers transfer - await exchangeTestUtil.transfer(ownerA, ownerD, token, amount, feeToken, fee, {transferToNew: true}); + await exchangeTestUtil.transfer( + ownerA, + ownerD, + token, + amount, + feeToken, + fee, + { transferToNew: true } + ); await exchangeTestUtil.submitTransactions(); await exchangeTestUtil.submitPendingBlocks(); @@ -298,7 +439,15 @@ contract("Exchange", (accounts: string[]) => { const fee = new BN(web3.utils.toWei("0.1", "ether")); // Do some transfers transfer - await exchangeTestUtil.transfer(ownerA, ownerD, token, amount, feeToken, fee, {useDualAuthoring: true}); + await exchangeTestUtil.transfer( + ownerA, + ownerD, + token, + amount, + feeToken, + fee, + { useDualAuthoring: true } + ); await exchangeTestUtil.submitTransactions(); await exchangeTestUtil.submitPendingBlocks(); @@ -313,13 +462,18 @@ contract("Exchange", (accounts: string[]) => { const fee = new BN(web3.utils.toWei("0.1", "ether")); // Do some transfers transfer - await exchangeTestUtil.transfer(ownerA, ownerD, token, amount, feeToken, fee, {useDualAuthoring: true, secretKnown: false}); + await exchangeTestUtil.transfer( + ownerA, + ownerD, + token, + amount, + feeToken, + fee, + { useDualAuthoring: true, secretKnown: false } + ); // Commit the transfers - await expectThrow( - exchangeTestUtil.submitTransactions(), - "invalid block" - ); + await expectThrow(exchangeTestUtil.submitTransactions(), "invalid block"); }); it("should be able to authorize a transfer using an onchain signature", async () => { @@ -331,7 +485,15 @@ contract("Exchange", (accounts: string[]) => { const fee = new BN(web3.utils.toWei("0.1", "ether")); // Do some transfers transfer - await exchangeTestUtil.transfer(ownerA, ownerD, token, amount, feeToken, fee, {authMethod: AuthMethod.ECDSA}); + await exchangeTestUtil.transfer( + ownerA, + ownerD, + token, + amount, + feeToken, + fee, + { authMethod: AuthMethod.ECDSA } + ); await exchangeTestUtil.submitTransactions(); await exchangeTestUtil.submitPendingBlocks(); @@ -346,10 +508,16 @@ contract("Exchange", (accounts: string[]) => { const fee = new BN(web3.utils.toWei("0.1", "ether")); // Do some transfers transfer - const transfer = await exchangeTestUtil.transfer(ownerA, ownerD, token, amount, feeToken, fee, {authMethod: AuthMethod.ECDSA, signer: ownerD}); - transfer.onchainSignature = - - await exchangeTestUtil.submitTransactions(); + const transfer = await exchangeTestUtil.transfer( + ownerA, + ownerD, + token, + amount, + feeToken, + fee, + { authMethod: AuthMethod.ECDSA, signer: ownerD } + ); + transfer.onchainSignature = await exchangeTestUtil.submitTransactions(); await expectThrow( exchangeTestUtil.submitPendingBlocks(), "INVALID_SIGNATURE" @@ -365,7 +533,15 @@ contract("Exchange", (accounts: string[]) => { const fee = new BN(web3.utils.toWei("0.1", "ether")); // Do some transfers transfer - await exchangeTestUtil.transfer(ownerA, ownerD, token, amount, feeToken, fee, {authMethod: AuthMethod.APPROVE}); + await exchangeTestUtil.transfer( + ownerA, + ownerD, + token, + amount, + feeToken, + fee, + { authMethod: AuthMethod.APPROVE } + ); await exchangeTestUtil.submitTransactions(); await exchangeTestUtil.submitPendingBlocks(); @@ -380,7 +556,15 @@ contract("Exchange", (accounts: string[]) => { const fee = new BN(web3.utils.toWei("0.1", "ether")); // Do some transfers transfer - await exchangeTestUtil.transfer(ownerA, ownerD, token, amount, feeToken, fee, {authMethod: AuthMethod.APPROVE, signer: ownerD}); + await exchangeTestUtil.transfer( + ownerA, + ownerD, + token, + amount, + feeToken, + fee, + { authMethod: AuthMethod.APPROVE, signer: ownerD } + ); await exchangeTestUtil.submitTransactions(); await expectThrow( @@ -398,7 +582,15 @@ contract("Exchange", (accounts: string[]) => { const fee = new BN(web3.utils.toWei("0.1", "ether")); // Do some transfers transfer - await exchangeTestUtil.transfer(ownerA, ownerD, token, amount, feeToken, fee, {authMethod: AuthMethod.NONE}); + await exchangeTestUtil.transfer( + ownerA, + ownerD, + token, + amount, + feeToken, + fee, + { authMethod: AuthMethod.NONE } + ); await exchangeTestUtil.submitTransactions(); await expectThrow( @@ -416,16 +608,21 @@ contract("Exchange", (accounts: string[]) => { const fee = new BN(web3.utils.toWei("0.1", "ether")); // Do some transfers - await exchangeTestUtil.transfer(ownerA, ownerB, token, amount, feeToken, fee, { - amountToDeposit: amount, - feeToDeposit: new BN(0) - }); + await exchangeTestUtil.transfer( + ownerA, + ownerB, + token, + amount, + feeToken, + fee, + { + amountToDeposit: amount, + feeToDeposit: new BN(0) + } + ); // Commit the transfers - await expectThrow( - exchangeTestUtil.submitTransactions(), - "invalid block" - ); + await expectThrow(exchangeTestUtil.submitTransactions(), "invalid block"); }); it("insufficient balance (token, token != feeToken)", async () => { @@ -437,16 +634,21 @@ contract("Exchange", (accounts: string[]) => { const fee = new BN(web3.utils.toWei("0.1", "ether")); // Do some transfers - await exchangeTestUtil.transfer(ownerA, ownerB, token, amount, feeToken, fee, { - amountToDeposit: amount.div(new BN(2)), - feeToDeposit: fee - }); + await exchangeTestUtil.transfer( + ownerA, + ownerB, + token, + amount, + feeToken, + fee, + { + amountToDeposit: amount.div(new BN(2)), + feeToDeposit: fee + } + ); // Commit the transfers - await expectThrow( - exchangeTestUtil.submitTransactions(), - "invalid block" - ); + await expectThrow(exchangeTestUtil.submitTransactions(), "invalid block"); }); it("insufficient balance (feeToken, token != feeToken)", async () => { @@ -458,16 +660,21 @@ contract("Exchange", (accounts: string[]) => { const fee = new BN(web3.utils.toWei("0.1", "ether")); // Do some transfers - await exchangeTestUtil.transfer(ownerA, ownerB, token, amount, feeToken, fee, { - amountToDeposit: amount, - feeToDeposit: new BN(0) - }); + await exchangeTestUtil.transfer( + ownerA, + ownerB, + token, + amount, + feeToken, + fee, + { + amountToDeposit: amount, + feeToDeposit: new BN(0) + } + ); // Commit the transfers - await expectThrow( - exchangeTestUtil.submitTransactions(), - "invalid block" - ); + await expectThrow(exchangeTestUtil.submitTransactions(), "invalid block"); }); it("transfer (parallel transfers)", async () => { @@ -481,10 +688,42 @@ contract("Exchange", (accounts: string[]) => { let storageID = 123; // Do some transfers transfer - await exchangeTestUtil.transfer(ownerA, ownerA, token, amount, feeToken, fee, {storageID: storageID++}); - await exchangeTestUtil.transfer(ownerA, ownerB, token, amount, feeToken, fee, {storageID: storageID++}); - await exchangeTestUtil.transfer(ownerA, ownerC, token, amount, token, fee, {storageID: storageID++}); - await exchangeTestUtil.transfer(ownerA, ownerB, token, amount, token, fee, {storageID: storageID++}); + await exchangeTestUtil.transfer( + ownerA, + ownerA, + token, + amount, + feeToken, + fee, + { storageID: storageID++ } + ); + await exchangeTestUtil.transfer( + ownerA, + ownerB, + token, + amount, + feeToken, + fee, + { storageID: storageID++ } + ); + await exchangeTestUtil.transfer( + ownerA, + ownerC, + token, + amount, + token, + fee, + { storageID: storageID++ } + ); + await exchangeTestUtil.transfer( + ownerA, + ownerB, + token, + amount, + token, + fee, + { storageID: storageID++ } + ); // Verify the block await exchangeTestUtil.submitTransactions(); @@ -502,13 +741,45 @@ contract("Exchange", (accounts: string[]) => { let storageID = 123; // Do some transfers transfer - await exchangeTestUtil.transfer(ownerA, ownerA, token, amount, feeToken, fee, {storageID}); + await exchangeTestUtil.transfer( + ownerA, + ownerA, + token, + amount, + feeToken, + fee, + { storageID } + ); storageID += Constants.NUM_STORAGE_SLOTS; - await exchangeTestUtil.transfer(ownerA, ownerB, token, amount, feeToken, fee, {storageID}); + await exchangeTestUtil.transfer( + ownerA, + ownerB, + token, + amount, + feeToken, + fee, + { storageID } + ); storageID += Constants.NUM_STORAGE_SLOTS; - await exchangeTestUtil.transfer(ownerA, ownerC, token, amount, token, fee, {storageID}); + await exchangeTestUtil.transfer( + ownerA, + ownerC, + token, + amount, + token, + fee, + { storageID } + ); storageID += Constants.NUM_STORAGE_SLOTS; - await exchangeTestUtil.transfer(ownerA, ownerB, token, amount, token, fee, {storageID}); + await exchangeTestUtil.transfer( + ownerA, + ownerB, + token, + amount, + token, + fee, + { storageID } + ); // Verify the block await exchangeTestUtil.submitTransactions(); @@ -526,14 +797,27 @@ contract("Exchange", (accounts: string[]) => { let storageID = 123; // Do some transfers transfers with the same storageID - await exchangeTestUtil.transfer(ownerA, ownerB, token, amount, feeToken, fee, {storageID}); - await exchangeTestUtil.transfer(ownerA, ownerA, token, amount, token, fee, {storageID}); + await exchangeTestUtil.transfer( + ownerA, + ownerB, + token, + amount, + feeToken, + fee, + { storageID } + ); + await exchangeTestUtil.transfer( + ownerA, + ownerA, + token, + amount, + token, + fee, + { storageID } + ); // Commit the transfers - await expectThrow( - exchangeTestUtil.submitTransactions(), - "invalid block" - ); + await expectThrow(exchangeTestUtil.submitTransactions(), "invalid block"); }); it("transfer (reuse old storageID)", async () => { @@ -547,18 +831,38 @@ contract("Exchange", (accounts: string[]) => { let storageID = 123; // Do some transfers transfers with the same storageID - await exchangeTestUtil.transfer(ownerA, ownerB, token, amount, feeToken, fee, {storageID}); + await exchangeTestUtil.transfer( + ownerA, + ownerB, + token, + amount, + feeToken, + fee, + { storageID } + ); storageID += Constants.NUM_STORAGE_SLOTS; - await exchangeTestUtil.transfer(ownerA, ownerA, token, amount, token, fee, {storageID}); + await exchangeTestUtil.transfer( + ownerA, + ownerA, + token, + amount, + token, + fee, + { storageID } + ); storageID -= Constants.NUM_STORAGE_SLOTS; - await exchangeTestUtil.transfer(ownerA, ownerC, token, amount, token, fee, {storageID}); + await exchangeTestUtil.transfer( + ownerA, + ownerC, + token, + amount, + token, + fee, + { storageID } + ); // Commit the transfers - await expectThrow( - exchangeTestUtil.submitTransactions(), - "invalid block" - ); + await expectThrow(exchangeTestUtil.submitTransactions(), "invalid block"); }); - }); });