From a250476e4315604e6a46ebb3e757a4c4f5018dac Mon Sep 17 00:00:00 2001 From: "Jason Ridgway-Taylor (~misfur-mondut)" <57174310+glottologist@users.noreply.github.com> Date: Fri, 10 Nov 2023 16:29:06 +0800 Subject: [PATCH] Repoint to new Batcher beta Ghonest contract (#414) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash * Clear active account on disconnect * Added interim connecting captions for wallet loading * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab * Fixed issue with token balances updating * Check for null user address on token update to reduce errors to the console * Filtered out 204 responses from tzkt for volumes * Updated About page * Updated About page * Added nix flake for project * Added skeleton ts project * Added initial skeleton for tg bot * Added html formatting to rates messages * Added raw operation socker sub * Added deposit op to bot * Corrected tick filter * Corrected deposit format for TG bot * Corrected deposit amount for TG bot * Corrected deposit amount for TG bot * Scaled amount for TG bot * Added sedning of raw big map * Corrected pair naming * Corrected scaling from rates message * Use all socket messages * PArse non formated big maps to json * Filtered user_batch_ordertypes from big_map updates * Expanded log message * Added additional logging for bot * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Filter for transaction that are contract calls * Filter for transaction that are contract calls * Log ops received from socket * Corrected filter * Added skeleton for batch updates * Added batch update formatter showing volumes * Assisting compiler * Corrected json path in batch change * Corrected html encoding for batch change * Tidy up on logging * Corrected object path for cleared message * Added rate name into batch status message * Corrected closing message detail * Added filter on messages * remove node_modules folder from repo by rewriting history (squash things from commit 706dd9 to 5c5816) List of squashed commits: Amended token update urls to include token addresses (#323) Filtered out 0 vol status updates and added docker bot image builds Corrected entrypoint commands for bot images Added node_modules in sub dirs to gitignore Merge branch 'main' of github.com:marigold-dev/batcher Added mainnet and ghostnet docker files for telegram bot * telegram bot for mainnet version (#333) * pipelines: rework docker build process * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Release - Ghostnet (#312) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Clear active account on disconnect --------- Co-authored-by: Cyril B * Release - Ghostnet (#315) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Release - Ghostnet (#316) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab --------- Co-authored-by: Cyril B * Release - Ghostnet (#318) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Mainnet (#314) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab * Fixed issue with token balances updating --------- Co-authored-by: Cyril B * pipelines: patch deprecated set-output commands and actions [skip ci] * telegram bot for ghostnet version (#332) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Mainnet (#314) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab * Release - Mainnet (#317) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Ghostnet (#312) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Ghostnet (#315) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab --------- Co-authored-by: Cyril B * Fixed issue with token balances updating * Check for null user address on token update to reduce errors to the console * Filtered out 204 responses from tzkt for volumes * Updated About page * Updated About page * Added nix flake for project * Added skeleton ts project * Added initial skeleton for tg bot * Added html formatting to rates messages * Added raw operation socker sub * Added deposit op to bot * Corrected tick filter * Corrected deposit format for TG bot * Corrected deposit amount for TG bot * Corrected deposit amount for TG bot * Scaled amount for TG bot * Added sedning of raw big map * Corrected pair naming * Corrected scaling from rates message * Use all socket messages * PArse non formated big maps to json * Filtered user_batch_ordertypes from big_map updates * Expanded log message * Added additional logging for bot * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Filter for transaction that are contract calls * Filter for transaction that are contract calls * Log ops received from socket * Corrected filter * Added skeleton for batch updates * Added batch update formatter showing volumes * Assisting compiler * Corrected json path in batch change * Corrected html encoding for batch change * Tidy up on logging * Corrected object path for cleared message * Added rate name into batch status message * Corrected closing message detail * Added filter on messages * remove node_modules folder from repo by rewriting history (squash things from commit 706dd9 to 5c5816) List of squashed commits: Amended token update urls to include token addresses (#323) Filtered out 0 vol status updates and added docker bot image builds Corrected entrypoint commands for bot images Added node_modules in sub dirs to gitignore Merge branch 'main' of github.com:marigold-dev/batcher Added mainnet and ghostnet docker files for telegram bot --------- Co-authored-by: Jason Ridgway-Taylor Co-authored-by: Jason Ridgway-Taylor (~misfur-mondut) <57174310+glottologist@users.noreply.github.com> * pipelines: fix ci of bot notif --------- Co-authored-by: Jason Ridgway-Taylor (~misfur-mondut) <57174310+glottologist@users.noreply.github.com> Co-authored-by: Jason Ridgway-Taylor * Corrected mainnet variables * Corrections for batcher notifications bot (mainnet) (#335) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Ghostnet (#312) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Ghostnet (#315) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab * Release - Ghostnet (#316) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab --------- Co-authored-by: Cyril B * Fixed issue with token balances updating * Release - Ghostnet (#318) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Mainnet (#314) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab * Fixed issue with token balances updating --------- Co-authored-by: Cyril B * Check for null user address on token update to reduce errors to the console * Filtered out 204 responses from tzkt for volumes * Updated About page * Updated About page * Added nix flake for project * Added skeleton ts project * Added initial skeleton for tg bot * Added html formatting to rates messages * Added raw operation socker sub * Added deposit op to bot * Corrected tick filter * Corrected deposit format for TG bot * Corrected deposit amount for TG bot * Corrected deposit amount for TG bot * Scaled amount for TG bot * Added sedning of raw big map * Corrected pair naming * Corrected scaling from rates message * Use all socket messages * PArse non formated big maps to json * Filtered user_batch_ordertypes from big_map updates * Expanded log message * Added additional logging for bot * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Filter for transaction that are contract calls * Filter for transaction that are contract calls * Log ops received from socket * Corrected filter * Added skeleton for batch updates * Added batch update formatter showing volumes * Assisting compiler * Corrected json path in batch change * Corrected html encoding for batch change * Tidy up on logging * Corrected object path for cleared message * Added rate name into batch status message * Corrected closing message detail * Added filter on messages * pipelines: patch deprecated set-output commands and actions [skip ci] * remove node_modules folder from repo by rewriting history (squash things from commit 706dd9 to 5c5816) List of squashed commits: Amended token update urls to include token addresses (#323) Filtered out 0 vol status updates and added docker bot image builds Corrected entrypoint commands for bot images Added node_modules in sub dirs to gitignore Merge branch 'main' of github.com:marigold-dev/batcher Added mainnet and ghostnet docker files for telegram bot * telegram bot for ghostnet version (#332) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Mainnet (#314) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab * Release - Mainnet (#317) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Ghostnet (#312) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Ghostnet (#315) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab --------- Co-authored-by: Cyril B * Fixed issue with token balances updating * Check for null user address on token update to reduce errors to the console * Filtered out 204 responses from tzkt for volumes * Updated About page * Updated About page * Added nix flake for project * Added skeleton ts project * Added initial skeleton for tg bot * Added html formatting to rates messages * Added raw operation socker sub * Added deposit op to bot * Corrected tick filter * Corrected deposit format for TG bot * Corrected deposit amount for TG bot * Corrected deposit amount for TG bot * Scaled amount for TG bot * Added sedning of raw big map * Corrected pair naming * Corrected scaling from rates message * Use all socket messages * PArse non formated big maps to json * Filtered user_batch_ordertypes from big_map updates * Expanded log message * Added additional logging for bot * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Filter for transaction that are contract calls * Filter for transaction that are contract calls * Log ops received from socket * Corrected filter * Added skeleton for batch updates * Added batch update formatter showing volumes * Assisting compiler * Corrected json path in batch change * Corrected html encoding for batch change * Tidy up on logging * Corrected object path for cleared message * Added rate name into batch status message * Corrected closing message detail * Added filter on messages * remove node_modules folder from repo by rewriting history (squash things from commit 706dd9 to 5c5816) List of squashed commits: Amended token update urls to include token addresses (#323) Filtered out 0 vol status updates and added docker bot image builds Corrected entrypoint commands for bot images Added node_modules in sub dirs to gitignore Merge branch 'main' of github.com:marigold-dev/batcher Added mainnet and ghostnet docker files for telegram bot --------- Co-authored-by: Jason Ridgway-Taylor Co-authored-by: Jason Ridgway-Taylor (~misfur-mondut) <57174310+glottologist@users.noreply.github.com> * pipelines: fix ci of bot notif * Corrected mainnet variables --------- Co-authored-by: Cyril B * Removed rate notifications from ghostnet nbot * 325 bot jit liquidity (#337) * Added skeleton for liquidity cli * Added initial start of jit implementation * Added buy side jit provisioning rules to bot * Added initial always on provision * Corrected path in message for always-on * Tidy up * Tidy up * Add interaction with batcher contract on ghostnet (#336) * gitignore for javascript compiled files * Add a dependency to Taquito * Add interaction with Batcher contract: deposit and redeem. Also, wallets. * Working versions for both liquidity bots * Packaged build to single file and add release action * Added working sub dir to build and manual trigger for testing * Added example config files into build file and expanded ghostnet example * Corrected release pathing * Corrected release pathing * Compress and hash release artefacts * corrected compression * Added zip compression to release artefacts * Added zip compression to release artefacts * Removed pre-release clause * Removed bundled compilation * Package node modules with liq bots * Updated packaging to prune modules * Always on only submits once per batch * Tidied bot status message * Tidied bot status message * Correctly parse status * Update batcher-bot/liquidity/src/utils.ts Co-authored-by: Ulrik Strid * PRC: Throw if no private key in environment * Added usage README content for liq bot * PRC: Use if in structure rather than getting all keys * PRC: Change lets to consts where applicable in provisioning * PRC: Change lets to consts where applicable in provisioning * PRC: Declare events prior to subscription --------- Co-authored-by: aguillon Co-authored-by: Ulrik Strid * pipelines: use more recent versions of action blocks before deprecation * Disabled swap button if the batch is closed. Additionally added a wait for socket connection (#339) * Disabled redeem button if there are no cleared holdings (#341) * Fix merge issues and tidy up * Added batch number in info panel (#342) * Added current and last to batch prefix * Changed to use a reduced swap structure (name only) to reduce duplication in storage (#350) * 344 reduce duplication in contract storage (#351) * Changed to use a reduced swap structure (name only) to reduce duplication in storage * Changed pair type to string * string * Fixed merge issues * 346 only open batches on first trade (#371) * Batch will not progress via tick on finalized * Added new contact hash for ghostnet * Moved burn from deposit. Allowed redemption to calculate how much of the fees should be burned or refunded based on if the amount was in clearing (#372) * 327-move-fees style suggestion (#373) * Moved burn from deposit. Allowed redemption to calculate how much of the fees should be burned or refunded based on if the amount was in clearing * Small style suggestion --------- Co-authored-by: Jason Ridgway-Taylor Co-authored-by: Jason Ridgway-Taylor (~misfur-mondut) <57174310+glottologist@users.noreply.github.com> * 345 remove batches from bigmap imp2 (#377) * Added refunds of tokens and fess on cancelation * Added check that batch is open in order to cancel * Added batch_holdings object, utils and adjusted storage * Remove holdings and remove batch is completely cleared * Corrected can_batch_be_removed * Added alternative implementation of batch holdings * 380 add documentation (#381) * Release to Ghostnet (#349) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash * Clear active account on disconnect * Added interim connecting captions for wallet loading * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab * Fixed issue with token balances updating * Check for null user address on token update to reduce errors to the console * Filtered out 204 responses from tzkt for volumes * Updated About page * Updated About page * Added nix flake for project * Added skeleton ts project * Added initial skeleton for tg bot * Added html formatting to rates messages * Added raw operation socker sub * Added deposit op to bot * Corrected tick filter * Corrected deposit format for TG bot * Corrected deposit amount for TG bot * Corrected deposit amount for TG bot * Scaled amount for TG bot * Added sedning of raw big map * Corrected pair naming * Corrected scaling from rates message * Use all socket messages * PArse non formated big maps to json * Filtered user_batch_ordertypes from big_map updates * Expanded log message * Added additional logging for bot * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Filter for transaction that are contract calls * Filter for transaction that are contract calls * Log ops received from socket * Corrected filter * Added skeleton for batch updates * Added batch update formatter showing volumes * Assisting compiler * Corrected json path in batch change * Corrected html encoding for batch change * Tidy up on logging * Corrected object path for cleared message * Added rate name into batch status message * Corrected closing message detail * Added filter on messages * remove node_modules folder from repo by rewriting history (squash things from commit 706dd9 to 5c5816) List of squashed commits: Amended token update urls to include token addresses (#323) Filtered out 0 vol status updates and added docker bot image builds Corrected entrypoint commands for bot images Added node_modules in sub dirs to gitignore Merge branch 'main' of github.com:marigold-dev/batcher Added mainnet and ghostnet docker files for telegram bot * telegram bot for mainnet version (#333) * pipelines: rework docker build process * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Release - Ghostnet (#312) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Clear active account on disconnect --------- Co-authored-by: Cyril B * Release - Ghostnet (#315) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Release - Ghostnet (#316) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab --------- Co-authored-by: Cyril B * Release - Ghostnet (#318) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Mainnet (#314) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab * Fixed issue with token balances updating --------- Co-authored-by: Cyril B * pipelines: patch deprecated set-output commands and actions [skip ci] * telegram bot for ghostnet version (#332) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Mainnet (#314) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab * Release - Mainnet (#317) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Ghostnet (#312) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Ghostnet (#315) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab --------- Co-authored-by: Cyril B * Fixed issue with token balances updating * Check for null user address on token update to reduce errors to the console * Filtered out 204 responses from tzkt for volumes * Updated About page * Updated About page * Added nix flake for project * Added skeleton ts project * Added initial skeleton for tg bot * Added html formatting to rates messages * Added raw operation socker sub * Added deposit op to bot * Corrected tick filter * Corrected deposit format for TG bot * Corrected deposit amount for TG bot * Corrected deposit amount for TG bot * Scaled amount for TG bot * Added sedning of raw big map * Corrected pair naming * Corrected scaling from rates message * Use all socket messages * PArse non formated big maps to json * Filtered user_batch_ordertypes from big_map updates * Expanded log message * Added additional logging for bot * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Filter for transaction that are contract calls * Filter for transaction that are contract calls * Log ops received from socket * Corrected filter * Added skeleton for batch updates * Added batch update formatter showing volumes * Assisting compiler * Corrected json path in batch change * Corrected html encoding for batch change * Tidy up on logging * Corrected object path for cleared message * Added rate name into batch status message * Corrected closing message detail * Added filter on messages * remove node_modules folder from repo by rewriting history (squash things from commit 706dd9 to 5c5816) List of squashed commits: Amended token update urls to include token addresses (#323) Filtered out 0 vol status updates and added docker bot image builds Corrected entrypoint commands for bot images Added node_modules in sub dirs to gitignore Merge branch 'main' of github.com:marigold-dev/batcher Added mainnet and ghostnet docker files for telegram bot --------- Co-authored-by: Jason Ridgway-Taylor Co-authored-by: Jason Ridgway-Taylor (~misfur-mondut) <57174310+glottologist@users.noreply.github.com> * pipelines: fix ci of bot notif --------- Co-authored-by: Jason Ridgway-Taylor (~misfur-mondut) <57174310+glottologist@users.noreply.github.com> Co-authored-by: Jason Ridgway-Taylor * Corrected mainnet variables * Removed rate notifications from ghostnet nbot * 325 bot jit liquidity (#337) * Added skeleton for liquidity cli * Added initial start of jit implementation * Added buy side jit provisioning rules to bot * Added initial always on provision * Corrected path in message for always-on * Tidy up * Tidy up * Add interaction with batcher contract on ghostnet (#336) * gitignore for javascript compiled files * Add a dependency to Taquito * Add interaction with Batcher contract: deposit and redeem. Also, wallets. * Working versions for both liquidity bots * Packaged build to single file and add release action * Added working sub dir to build and manual trigger for testing * Added example config files into build file and expanded ghostnet example * Corrected release pathing * Corrected release pathing * Compress and hash release artefacts * corrected compression * Added zip compression to release artefacts * Added zip compression to release artefacts * Removed pre-release clause * Removed bundled compilation * Package node modules with liq bots * Updated packaging to prune modules * Always on only submits once per batch * Tidied bot status message * Tidied bot status message * Correctly parse status * Update batcher-bot/liquidity/src/utils.ts Co-authored-by: Ulrik Strid * PRC: Throw if no private key in environment * Added usage README content for liq bot * PRC: Use if in structure rather than getting all keys * PRC: Change lets to consts where applicable in provisioning * PRC: Change lets to consts where applicable in provisioning * PRC: Declare events prior to subscription --------- Co-authored-by: aguillon Co-authored-by: Ulrik Strid * pipelines: use more recent versions of action blocks before deprecation * Disabled swap button if the batch is closed. Additionally added a wait for socket connection (#339) * Disabled redeem button if there are no cleared holdings (#341) * Fix merge issues and tidy up * Added batch number in info panel (#342) * Added current and last to batch prefix --------- Co-authored-by: Cyril B Co-authored-by: aguillon Co-authored-by: Ulrik Strid * pipelines: add trigger when pr is merged on ghost branch * Changed token hashes in ghostnet contract to match faucet * Switched ghostnet UI to new contract hash * Re-adjusted token hashes on Ghostnet * Re-pointed UI to new contract on ghostnet * Added skeleton docs --------- Co-authored-by: Cyril B Co-authored-by: aguillon Co-authored-by: Ulrik Strid * 380 add documentation (#382) * Release to Ghostnet (#349) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash * Clear active account on disconnect * Added interim connecting captions for wallet loading * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab * Fixed issue with token balances updating * Check for null user address on token update to reduce errors to the console * Filtered out 204 responses from tzkt for volumes * Updated About page * Updated About page * Added nix flake for project * Added skeleton ts project * Added initial skeleton for tg bot * Added html formatting to rates messages * Added raw operation socker sub * Added deposit op to bot * Corrected tick filter * Corrected deposit format for TG bot * Corrected deposit amount for TG bot * Corrected deposit amount for TG bot * Scaled amount for TG bot * Added sedning of raw big map * Corrected pair naming * Corrected scaling from rates message * Use all socket messages * PArse non formated big maps to json * Filtered user_batch_ordertypes from big_map updates * Expanded log message * Added additional logging for bot * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Filter for transaction that are contract calls * Filter for transaction that are contract calls * Log ops received from socket * Corrected filter * Added skeleton for batch updates * Added batch update formatter showing volumes * Assisting compiler * Corrected json path in batch change * Corrected html encoding for batch change * Tidy up on logging * Corrected object path for cleared message * Added rate name into batch status message * Corrected closing message detail * Added filter on messages * remove node_modules folder from repo by rewriting history (squash things from commit 706dd9 to 5c5816) List of squashed commits: Amended token update urls to include token addresses (#323) Filtered out 0 vol status updates and added docker bot image builds Corrected entrypoint commands for bot images Added node_modules in sub dirs to gitignore Merge branch 'main' of github.com:marigold-dev/batcher Added mainnet and ghostnet docker files for telegram bot * telegram bot for mainnet version (#333) * pipelines: rework docker build process * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Release - Ghostnet (#312) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Clear active account on disconnect --------- Co-authored-by: Cyril B * Release - Ghostnet (#315) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Release - Ghostnet (#316) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab --------- Co-authored-by: Cyril B * Release - Ghostnet (#318) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Mainnet (#314) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab * Fixed issue with token balances updating --------- Co-authored-by: Cyril B * pipelines: patch deprecated set-output commands and actions [skip ci] * telegram bot for ghostnet version (#332) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Mainnet (#314) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab * Release - Mainnet (#317) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Ghostnet (#312) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Ghostnet (#315) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab --------- Co-authored-by: Cyril B * Fixed issue with token balances updating * Check for null user address on token update to reduce errors to the console * Filtered out 204 responses from tzkt for volumes * Updated About page * Updated About page * Added nix flake for project * Added skeleton ts project * Added initial skeleton for tg bot * Added html formatting to rates messages * Added raw operation socker sub * Added deposit op to bot * Corrected tick filter * Corrected deposit format for TG bot * Corrected deposit amount for TG bot * Corrected deposit amount for TG bot * Scaled amount for TG bot * Added sedning of raw big map * Corrected pair naming * Corrected scaling from rates message * Use all socket messages * PArse non formated big maps to json * Filtered user_batch_ordertypes from big_map updates * Expanded log message * Added additional logging for bot * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Filter for transaction that are contract calls * Filter for transaction that are contract calls * Log ops received from socket * Corrected filter * Added skeleton for batch updates * Added batch update formatter showing volumes * Assisting compiler * Corrected json path in batch change * Corrected html encoding for batch change * Tidy up on logging * Corrected object path for cleared message * Added rate name into batch status message * Corrected closing message detail * Added filter on messages * remove node_modules folder from repo by rewriting history (squash things from commit 706dd9 to 5c5816) List of squashed commits: Amended token update urls to include token addresses (#323) Filtered out 0 vol status updates and added docker bot image builds Corrected entrypoint commands for bot images Added node_modules in sub dirs to gitignore Merge branch 'main' of github.com:marigold-dev/batcher Added mainnet and ghostnet docker files for telegram bot --------- Co-authored-by: Jason Ridgway-Taylor Co-authored-by: Jason Ridgway-Taylor (~misfur-mondut) <57174310+glottologist@users.noreply.github.com> * pipelines: fix ci of bot notif --------- Co-authored-by: Jason Ridgway-Taylor (~misfur-mondut) <57174310+glottologist@users.noreply.github.com> Co-authored-by: Jason Ridgway-Taylor * Corrected mainnet variables * Removed rate notifications from ghostnet nbot * 325 bot jit liquidity (#337) * Added skeleton for liquidity cli * Added initial start of jit implementation * Added buy side jit provisioning rules to bot * Added initial always on provision * Corrected path in message for always-on * Tidy up * Tidy up * Add interaction with batcher contract on ghostnet (#336) * gitignore for javascript compiled files * Add a dependency to Taquito * Add interaction with Batcher contract: deposit and redeem. Also, wallets. * Working versions for both liquidity bots * Packaged build to single file and add release action * Added working sub dir to build and manual trigger for testing * Added example config files into build file and expanded ghostnet example * Corrected release pathing * Corrected release pathing * Compress and hash release artefacts * corrected compression * Added zip compression to release artefacts * Added zip compression to release artefacts * Removed pre-release clause * Removed bundled compilation * Package node modules with liq bots * Updated packaging to prune modules * Always on only submits once per batch * Tidied bot status message * Tidied bot status message * Correctly parse status * Update batcher-bot/liquidity/src/utils.ts Co-authored-by: Ulrik Strid * PRC: Throw if no private key in environment * Added usage README content for liq bot * PRC: Use if in structure rather than getting all keys * PRC: Change lets to consts where applicable in provisioning * PRC: Change lets to consts where applicable in provisioning * PRC: Declare events prior to subscription --------- Co-authored-by: aguillon Co-authored-by: Ulrik Strid * pipelines: use more recent versions of action blocks before deprecation * Disabled swap button if the batch is closed. Additionally added a wait for socket connection (#339) * Disabled redeem button if there are no cleared holdings (#341) * Fix merge issues and tidy up * Added batch number in info panel (#342) * Added current and last to batch prefix --------- Co-authored-by: Cyril B Co-authored-by: aguillon Co-authored-by: Ulrik Strid * pipelines: add trigger when pr is merged on ghost branch * Changed token hashes in ghostnet contract to match faucet * Switched ghostnet UI to new contract hash * Re-adjusted token hashes on Ghostnet * Re-pointed UI to new contract on ghostnet * Added skeleton docs --------- Co-authored-by: Cyril B Co-authored-by: aguillon Co-authored-by: Ulrik Strid * Cancellations (#375) * Added refunds of tokens and fess on cancelation * Added check that batch is open in order to cancel * Built contract * Added UI changes for cancellations * Added refund of tokens back in, along with burning fee * Revive tests (#384) * Restructured tests. Oracle mock plus origination of test token contracts * Added tests for change_fee * Added tests for change_fee * Added test context type to reduce test code duplication * Adjusted clause to assure burn and fee recipient aren't the same. Additionally added a test * Removed references to burn and burn address as it will not always be a burn address * Added tests for enabling and disabling swap pairs * Added tests for adding, updating and removing metadata * Added tests for token pair limit * Uncommented failing oracle source change test for PR review * Added workflow for testing using github action * rolled action version * rolled action version * Added explicit path variable for workspace * Added explicit path variable for workspace * Added path listing to debug action * Added path listing to debug action * Set directory in workflow file * Adeed explicit working directory * Fixed issue with 0.70 of ligo compiler * Working Oracle test * Attempt to make gh action work * use release of ligo-version * Manage ligo version manually in ligo gh action * Covered add and remove swap pairs * Manage ligo version manually in ligo gh action * Added deposit tests * Amended typos in tests * Switched Expect.fail_with_value for Breath.Expect.fail_with_value * Added cancellation tests * Removed manual ubots construction --------- Co-authored-by: Laurent Canis * w * [1 * Added market maker doc * Added market maker doc * Added Add Liquidity enpoint * Added test for adding liquidity * Add liquidity to market maker and test * Added add/remove liquidity and claim rewards tests. Added view for getting vault holdings summary * Started splitting market maker off into own contract * Seperated out tests * Split out mm contract from Batcher and pulled out common code into shared files * Amended tests to work with new split contracts * Populated ghostnet storage for marketmaker * Added get market holdings mechanism * Added user holdings display and buttons for MM * Added contract calls * Added Batcher modifications to handle fee payouts and makring a batch as having been given liquidity by the market maker * Added placeholders for market vault operations against batcher * Added rebalancing up to amount exchange * Added redemption of holdings * Added operator and deposit ops to utils * Added approve, deposit and revoke operations to the market maker * Added liquidity injection for market maker * Added additional tokens * Set up new pairs in ghostnet storage * Added new tokens and pairs into market maker * Added new ghostnet batcher contract to mm storage * Added new ghostnet mm address to batcher ghostnet storage * Added new ghhostnet addresses to the config * Fix issue cmm (#407) * Release to Mainnet (#348) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Ghostnet (#312) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Ghostnet (#315) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab * Release - Ghostnet (#316) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab --------- Co-authored-by: Cyril B * Fixed issue with token balances updating * Release - Ghostnet (#318) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Mainnet (#314) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab * Fixed issue with token balances updating --------- Co-authored-by: Cyril B * Check for null user address on token update to reduce errors to the console * Filtered out 204 responses from tzkt for volumes * Updated About page * Updated About page * Added nix flake for project * Added skeleton ts project * Added initial skeleton for tg bot * Added html formatting to rates messages * Added raw operation socker sub * Added deposit op to bot * Corrected tick filter * Corrected deposit format for TG bot * Corrected deposit amount for TG bot * Corrected deposit amount for TG bot * Scaled amount for TG bot * Added sedning of raw big map * Corrected pair naming * Corrected scaling from rates message * Use all socket messages * PArse non formated big maps to json * Filtered user_batch_ordertypes from big_map updates * Expanded log message * Added additional logging for bot * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Filter for transaction that are contract calls * Filter for transaction that are contract calls * Log ops received from socket * Corrected filter * Added skeleton for batch updates * Added batch update formatter showing volumes * Assisting compiler * Corrected json path in batch change * Corrected html encoding for batch change * Tidy up on logging * Corrected object path for cleared message * Added rate name into batch status message * Corrected closing message detail * Added filter on messages * pipelines: patch deprecated set-output commands and actions [skip ci] * remove node_modules folder from repo by rewriting history (squash things from commit 706dd9 to 5c5816) List of squashed commits: Amended token update urls to include token addresses (#323) Filtered out 0 vol status updates and added docker bot image builds Corrected entrypoint commands for bot images Added node_modules in sub dirs to gitignore Merge branch 'main' of github.com:marigold-dev/batcher Added mainnet and ghostnet docker files for telegram bot * telegram bot for ghostnet version (#332) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Mainnet (#314) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab * Release - Mainnet (#317) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Ghostnet (#312) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Ghostnet (#315) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab --------- Co-authored-by: Cyril B * Fixed issue with token balances updating * Check for null user address on token update to reduce errors to the console * Filtered out 204 responses from tzkt for volumes * Updated About page * Updated About page * Added nix flake for project * Added skeleton ts project * Added initial skeleton for tg bot * Added html formatting to rates messages * Added raw operation socker sub * Added deposit op to bot * Corrected tick filter * Corrected deposit format for TG bot * Corrected deposit amount for TG bot * Corrected deposit amount for TG bot * Scaled amount for TG bot * Added sedning of raw big map * Corrected pair naming * Corrected scaling from rates message * Use all socket messages * PArse non formated big maps to json * Filtered user_batch_ordertypes from big_map updates * Expanded log message * Added additional logging for bot * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Filter for transaction that are contract calls * Filter for transaction that are contract calls * Log ops received from socket * Corrected filter * Added skeleton for batch updates * Added batch update formatter showing volumes * Assisting compiler * Corrected json path in batch change * Corrected html encoding for batch change * Tidy up on logging * Corrected object path for cleared message * Added rate name into batch status message * Corrected closing message detail * Added filter on messages * remove node_modules folder from repo by rewriting history (squash things from commit 706dd9 to 5c5816) List of squashed commits: Amended token update urls to include token addresses (#323) Filtered out 0 vol status updates and added docker bot image builds Corrected entrypoint commands for bot images Added node_modules in sub dirs to gitignore Merge branch 'main' of github.com:marigold-dev/batcher Added mainnet and ghostnet docker files for telegram bot --------- Co-authored-by: Jason Ridgway-Taylor Co-authored-by: Jason Ridgway-Taylor (~misfur-mondut) <57174310+glottologist@users.noreply.github.com> * pipelines: fix ci of bot notif * Corrected mainnet variables * Corrections to Batcher notifications bot (#334) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash * Clear active account on disconnect * Added interim connecting captions for wallet loading * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab * Fixed issue with token balances updating * Check for null user address on token update to reduce errors to the console * Filtered out 204 responses from tzkt for volumes * Updated About page * Updated About page * Added nix flake for project * Added skeleton ts project * Added initial skeleton for tg bot * Added html formatting to rates messages * Added raw operation socker sub * Added deposit op to bot * Corrected tick filter * Corrected deposit format for TG bot * Corrected deposit amount for TG bot * Corrected deposit amount for TG bot * Scaled amount for TG bot * Added sedning of raw big map * Corrected pair naming * Corrected scaling from rates message * Use all socket messages * PArse non formated big maps to json * Filtered user_batch_ordertypes from big_map updates * Expanded log message * Added additional logging for bot * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Filter for transaction that are contract calls * Filter for transaction that are contract calls * Log ops received from socket * Corrected filter * Added skeleton for batch updates * Added batch update formatter showing volumes * Assisting compiler * Corrected json path in batch change * Corrected html encoding for batch change * Tidy up on logging * Corrected object path for cleared message * Added rate name into batch status message * Corrected closing message detail * Added filter on messages * remove node_modules folder from repo by rewriting history (squash things from commit 706dd9 to 5c5816) List of squashed commits: Amended token update urls to include token addresses (#323) Filtered out 0 vol status updates and added docker bot image builds Corrected entrypoint commands for bot images Added node_modules in sub dirs to gitignore Merge branch 'main' of github.com:marigold-dev/batcher Added mainnet and ghostnet docker files for telegram bot * telegram bot for mainnet version (#333) * pipelines: rework docker build process * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Release - Ghostnet (#312) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Clear active account on disconnect --------- Co-authored-by: Cyril B * Release - Ghostnet (#315) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Release - Ghostnet (#316) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab --------- Co-authored-by: Cyril B * Release - Ghostnet (#318) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Mainnet (#314) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab * Fixed issue with token balances updating --------- Co-authored-by: Cyril B * pipelines: patch deprecated set-output commands and actions [skip ci] * telegram bot for ghostnet version (#332) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Mainnet (#314) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab * Release - Mainnet (#317) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Ghostnet (#312) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading * Release - Ghostnet (#315) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Mainnet - Release (#308) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Mainnet (#311) * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect * Release - Mainnet (#313) * pipelines: rework docker build process * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Ghostnet - Release (#307) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings --------- Co-authored-by: Cyril B * Corrected Network type and mainnet token hash * Release to Ghostnet (#310) * Added mainnet admin and oracle address * Correct mainnet build * Pointed to mainnet contract * Corrected UI error code parsing * pipelines: rework docker build process * pipelines: rework docker build process * Corrected pair name on mainnet and admin address on both nets * Added new mainnet contract hash * pipelines: commit to trigger cicd * pipelines: commit to trigger cicd (#306) * Added michelson files to repo for both mainnet and ghostnet * Added metadata file * Fixed issue with wallet disconnecting * Correctly assigned wallet after reload * Corrected open and closed holdings * Corrected Network type and mainnet token hash --------- Co-authored-by: Cyril B * Clear active account on disconnect --------- Co-authored-by: Cyril B * Added interim connecting captions for wallet loading --------- Co-authored-by: Cyril B * Fixed issue with button showing connecting * Fixed NaN issue in Holdings tab --------- Co-authored-by: Cyril B * Fixed issue with token balances updating * Check for null user address on token update to reduce errors to the console * Filtered out 204 responses from tzkt for volumes * Updated About page * Updated About page * Added nix flake for project * Added skeleton ts project * Added initial skeleton for tg bot * Added html formatting to rates messages * Added raw operation socker sub * Added deposit op to bot * Corrected tick filter * Corrected deposit format for TG bot * Corrected deposit amount for TG bot * Corrected deposit amount for TG bot * Scaled amount for TG bot * Added sedning of raw big map * Corrected pair naming * Corrected scaling from rates message * Use all socket messages * PArse non formated big maps to json * Filtered user_batch_ordertypes from big_map updates * Expanded log message * Added additional logging for bot * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Changed filters on socket messages * Filter for transaction that are contract calls * Filter for transaction that are contract calls * Log ops received from socket * Corrected filter * Added skeleton for batch updates * Added batch update formatter showing volumes * Assisting compiler * Corrected json path in batch change * Corrected html encoding for batch change * Tidy up on logging * Corrected object path for cleared message * Added rate name into batch status message * Corrected closing message detail * Added filter on messages * remove node_modules folder from repo by rewriting history (squash things from commit 706dd9 to 5c5816) List … * Added redeem by batch * Fix CMM UI (#408) * :recycle: review market maker UI * :bento: add usdtz icon --------- Co-authored-by: Quentin Burg Co-authored-by: Jason Ridgway-Taylor (~misfur-mondut) <57174310+glottologist@users.noreply.github.com> * Fixed merge issues, rebuilt to deploy * Added measure for mm contract * Skeleton token manager * Added vault contract and moved michelson output to own folder * Test types * Adjusted Batcher to support calling the token manager * Removed unused code in Batcher * Added fee map insteand of single market maker address * Added liquidity injection to Vault * Added reward distribution in vaults * Amended clean mechanism in makefule * Added liquidity injection request into market maker * Fixed getting native tokens view call from vaults * Fixed bug in upsert methods * Added a build step to build all contracts * Fixed issue on makefile and tzbtc vault storage * Added new vault endpoint call into Batcher for adding rewards to the vault * Added vault balance requests after add or remove liquidity and liquidity injection * Removed balance assertion from deposit for testing * Removed foreign token assertions for testing * Fixed silly token standard parsing error * Fixed silly token standard parsing error * Fixed silly token standard parsing error * Compile all for ghostnet * Moved assert balances into its own entry * Added clause to test batch for liquidity * Removed todo clause * Added debug view to vault to test token balance endpoints * Adjusted callback types * Adjusted vault process response * Adjusted vault process response * Adjusted getBalance endpoint call opt * Adjusted type of getBlanace response for callback * :wrench: rewrite config due to new contracts architecture * :recycle: redirect tokens management to token manager contract * :recycle: refactor components && fetch token vault informations * Updated ghostnet contracts in config * Updated contract error codes * Changed UI to support new contract structure * Adjusted tick script to tick more pairs and also tick the market maker * Amended tick operation to pull rates for all pairs * Adjusted tick script to call new unified tick endpoint and re-pointed to new contract on ghostnet * Repointed UI to new ghostnet contract --------- Co-authored-by: Cyril B Co-authored-by: aguillon Co-authored-by: Ulrik Strid Co-authored-by: Laurent Canis Co-authored-by: Quentin Burg Co-authored-by: Quentin Co-authored-by: Quentin Burg --- Dockerfile.tick.beta.ghostnet | 16 + batcher-ui/src/config/contracts.js | 2 + batcher/batcher.mligo | 53 +- batcher/marketmaker.mligo | 34 +- batcher/michelson/batcher-ghostnet.tz | 2296 +++++++++-------- batcher/michelson/batcher-storage-ghostnet.tz | 5 +- batcher/michelson/marketmaker-ghostnet.tz | 1276 +++++---- .../storage/batcher_storage_ghostnet.mligo | 2 + batcher/types.mligo | 32 +- batcher/utils.mligo | 27 +- docker-compose.yml | 4 +- tick.sh | 26 +- 12 files changed, 1993 insertions(+), 1780 deletions(-) create mode 100644 Dockerfile.tick.beta.ghostnet diff --git a/Dockerfile.tick.beta.ghostnet b/Dockerfile.tick.beta.ghostnet new file mode 100644 index 00000000..ee471846 --- /dev/null +++ b/Dockerfile.tick.beta.ghostnet @@ -0,0 +1,16 @@ +FROM oxheadalpha/flextesa:latest + +RUN apk update && \ + apk add bash && \ + apk add curl && \ + apk add jq + +RUN octez-client --endpoint https://ghostnet.tezos.marigold.dev config update && \ + octez-client import secret key oracle_account unencrypted:edskRzJUQ1xqCPkVXzT8EiUXjcCsXXkhpiHWE19fAV2JmqW68T6nVoXVPJyx99mjJzUa98NEeGr3kLcEh6NQGcpFKj7BoPRd88 --force + +WORKDIR /etc/run + +COPY ./tick.sh /etc/run/ + +CMD [ "/etc/run/tick.sh", "-b", "KT1GSDzo6PU8i732m8WuY9XcTyxiGRaYBsv2", "-m", "KT1T4dbnaNKpGLV89R6drrupy5HVE74bQE3r", "-f", "150" ] + diff --git a/batcher-ui/src/config/contracts.js b/batcher-ui/src/config/contracts.js index 4a464a42..117eb91c 100644 --- a/batcher-ui/src/config/contracts.js +++ b/batcher-ui/src/config/contracts.js @@ -25,6 +25,8 @@ const ghostnet = { EURL_vault: 'KT1Gy8BPpJdAR6ZwgBaVeXrMW2pyX2NL8LSp', }; + + const mainnet = { batcher: 'KT1CoTu4CXcWoVk69Ukbgwx2iDK7ZA4FMSpJ', market_maker: 'KT1TNX1YLCmPJN4rbwAUsUAdnqVYrZ5X5YNB', diff --git a/batcher/batcher.mligo b/batcher/batcher.mligo index b01977b2..f263094a 100644 --- a/batcher/batcher.mligo +++ b/batcher/batcher.mligo @@ -66,6 +66,7 @@ module Storage = struct limit_on_tokens_or_pairs : nat; liquidity_injection_limit_in_seconds : nat; deposit_time_window_in_seconds : nat; + tick_errors: TickErrors.t; } end @@ -799,12 +800,15 @@ end type storage = Storage.t type result = operation list * storage + + + [@inline] let no_op (s : storage) : result = (([] : operation list), s) type entrypoint = | Deposit of external_swap_order - | Tick of string + | Tick | Redeem | Cancel of pair | Change_fee of tez @@ -967,8 +971,14 @@ let confirm_oracle_price_is_available_before_deposit if Batch_Utils.is_batch_open batch then () else let pair_name = get_rate_name_from_pair pair in let valid_swap_reduced = get_valid_swap_reduced pair_name storage in - let (lastupdated, _price) = OracleUtils.get_oracle_price oracle_price_should_be_available_before_deposit valid_swap_reduced in - OracleUtils.oracle_price_is_not_stale storage.deposit_time_window_in_seconds lastupdated + let (lastupdated_opt, tes) = OracleUtils.get_oracle_price pair_name oracle_price_should_be_available_before_deposit valid_swap_reduced storage.tick_errors in + let ou = match lastupdated_opt with + | Some pu -> pu + | None -> failwith oracle_price_should_be_available_before_deposit + in + let lastupdated, _p = ou in + let succeeded, _tes = OracleUtils.oracle_price_is_not_stale pair_name storage.deposit_time_window_in_seconds lastupdated tes in + if succeeded then () else failwith oracle_price_is_stale [@inline] let confirm_swap_pair_is_disabled_prior_to_removal @@ -1043,9 +1053,16 @@ let tick_price (valid_swap : valid_swap) (storage : storage) : storage = let valid_swap_reduced = valid_swap_to_valid_swap_reduced valid_swap in - let (lastupdated, price) = OracleUtils.get_oracle_price unable_to_get_price_from_oracle valid_swap_reduced in - let () = OracleUtils.is_oracle_price_newer_than_current rate_name lastupdated storage.rates_current in - let () = OracleUtils.oracle_price_is_not_stale storage.deposit_time_window_in_seconds lastupdated in + let (lastupdated_opt, tes) = OracleUtils.get_oracle_price rate_name unable_to_get_price_from_oracle valid_swap_reduced storage.tick_errors in + let storage = {storage with tick_errors = tes; } in + if Option.is_none lastupdated_opt then storage else + let lastupdated, price = Option.unopt lastupdated_opt in + let succeeded,tes = OracleUtils.is_oracle_price_newer_than_current rate_name lastupdated storage.rates_current tes in + let storage = {storage with tick_errors = tes; } in + if not succeeded then storage else + let succeeded, tes = OracleUtils.oracle_price_is_not_stale rate_name storage.deposit_time_window_in_seconds lastupdated tes in + let storage = {storage with tick_errors = tes; } in + if not succeeded then storage else let valid_tokens = TokenManagerUtils.get_valid_tokens storage.tokenmanager in let oracle_rate = OracleUtils.convert_oracle_price valid_swap.oracle_precision valid_swap.swap lastupdated price valid_tokens in let rates_current = update_current_rate (rate_name) (oracle_rate) (storage.rates_current) in @@ -1062,17 +1079,25 @@ let tick_price [@inline] -let tick +let tick_rate (rate_name: string) + (vswpr: valid_swap_reduced) + (valid_tokens: ValidTokens.t_map) + (storage : storage) : storage = + let vswp = valid_swap_reduced_to_valid_swap vswpr 1n valid_tokens in + tick_price rate_name vswp storage + + +[@inline] +let tick (storage : storage) : result = let () = reject_if_tez_supplied () in let valid_swaps = TokenManagerUtils.get_valid_swaps storage.tokenmanager in - match Map.find_opt rate_name valid_swaps with - | Some vswpr -> let valid_tokens = TokenManagerUtils.get_valid_tokens storage.tokenmanager in - let vswp = valid_swap_reduced_to_valid_swap vswpr 1n valid_tokens in - let storage = tick_price rate_name vswp storage in - no_op (storage) - | None -> failwith swap_does_not_exist + let valid_tokens = TokenManagerUtils.get_valid_tokens storage.tokenmanager in + let tick_all_rates (stor,(p,vsr):( storage * (string * valid_swap_reduced))) : storage = tick_rate p vsr valid_tokens stor + in + let storage = Map.fold tick_all_rates valid_swaps storage in + no_op storage [@inline] let change_fee @@ -1219,7 +1244,7 @@ let main | Redeem -> redeem storage | Cancel pair -> cancel pair storage (* Maintenance endpoint *) - | Tick r -> tick r storage + | Tick -> tick storage (* Admin endpoints *) | Change_fee new_fee -> change_fee new_fee storage | Change_liquidity_injection_time_limit new_time_limit -> change_liquidity_injection_limit_in_seconds new_time_limit storage diff --git a/batcher/marketmaker.mligo b/batcher/marketmaker.mligo index 9b37a879..bcf5bf29 100644 --- a/batcher/marketmaker.mligo +++ b/batcher/marketmaker.mligo @@ -102,25 +102,27 @@ let execute_liquidity_request (opposing_volume: nat) (vault_address:address) (valid_tokens:ValidTokens.t_map) - (valid_swaps:ValidSwaps.t_map) : operation = + (valid_swaps:ValidSwaps.t_map): operation = let pair_name = find_lexicographical_pair_name lt.name ot.name in match Map.find_opt pair_name valid_swaps with | None -> failwith swap_does_not_exist - | Some vs -> let (lastupdated, price) = OracleUtils.get_oracle_price unable_to_get_price_from_oracle vs in - let swap:swap = swap_reduced_to_swap vs.swap 1n valid_tokens in - let oracle_rate = OracleUtils.convert_oracle_price vs.oracle_precision swap lastupdated price valid_tokens in - let (side,vol_req) = if lt.name = vs.swap.to then - (Sell,get_inverse_volume oracle_rate opposing_volume) - else - (Buy,get_volume oracle_rate opposing_volume) - in - let req = { - side = side; - from_token = lt; - to_token = ot; - amount = vol_req; - } in - send_liquidity_injection_request req vault_address + | Some vs -> let (lastupdated_opt, _tes) = OracleUtils.get_oracle_price pair_name unable_to_get_price_from_oracle vs (Big_map.empty: TickErrors.t) in + (match lastupdated_opt with + | None -> failwith unable_to_get_price_from_oracle + | Some (lastupdated, price) -> let swap:swap = swap_reduced_to_swap vs.swap 1n valid_tokens in + let oracle_rate = OracleUtils.convert_oracle_price vs.oracle_precision swap lastupdated price valid_tokens in + let (side,vol_req) = if lt.name = vs.swap.to then + (Sell,get_inverse_volume oracle_rate opposing_volume) + else + (Buy,get_volume oracle_rate opposing_volume) + in + let req = { + side = side; + from_token = lt; + to_token = ot; + amount = vol_req; + } in + send_liquidity_injection_request req vault_address) [@inline] diff --git a/batcher/michelson/batcher-ghostnet.tz b/batcher/michelson/batcher-ghostnet.tz index 6b53cd12..2518356b 100644 --- a/batcher/michelson/batcher-ghostnet.tz +++ b/batcher/michelson/batcher-ghostnet.tz @@ -26,7 +26,7 @@ (nat %side) (nat %tolerance))) (or (unit %redeem) (string %remove_metadata))) - (string %tick))) ; + (unit %tick))) ; storage (pair (pair (pair (pair (address %administrator) (pair %batch_set @@ -78,14 +78,34 @@ (pair (pair %swap (string %from) (string %to)) (pair %rate (int %p) (int %q)) (timestamp %when))) - (address %tokenmanager)) + (big_map %tick_errors string (pair (nat %error) (timestamp %time)))) + (address %tokenmanager) (big_map %user_batch_ordertypes address (map nat (map (pair (or %side (unit %buy) (unit %sell)) (or %tolerance (or (unit %exact) (unit %minus)) (unit %plus))) nat)))) ; - code { PUSH int 1 ; + code { LAMBDA + (pair string nat (big_map string (pair nat timestamp))) + (big_map string (pair nat timestamp)) + { UNPAIR 3 ; + NOW ; + DUP 4 ; + DUP 3 ; + GET ; + IF_NONE + { DIG 3 } + { DROP ; DIG 3 ; DUP 3 ; NONE (pair nat timestamp) ; SWAP ; UPDATE } ; + SWAP ; + DIG 3 ; + PAIR ; + DIG 2 ; + SWAP ; + SOME ; + SWAP ; + UPDATE } ; + PUSH int 1 ; PUSH int 10000 ; PAIR ; PUSH int 1 ; @@ -173,13 +193,14 @@ CAR ; MUL ; PAIR ; - DIG 4 ; + DIG 5 ; UNPAIR ; IF_LEFT { DIG 2 ; DIG 4 ; DIG 5 ; - DROP 3 ; + DIG 6 ; + DROP 4 ; IF_LEFT { IF_LEFT { IF_LEFT @@ -256,9 +277,8 @@ UNPAIR ; DUP 5 ; CDR ; - CAR ; - CDR ; CDR ; + CAR ; UNIT ; VIEW "get_valid_swaps" (map string @@ -278,10 +298,9 @@ IF_NONE { DROP 4 ; PUSH nat 117 ; FAILWITH } { DUP 4 ; - CDR ; - CAR ; CDR ; CDR ; + CAR ; UNIT ; VIEW "get_valid_tokens" (map string @@ -518,6 +537,7 @@ DIG 7 ; CDR ; CDR ; + CDR ; DUP 8 ; GET ; IF_NONE @@ -532,19 +552,23 @@ { DUP 6 ; DUP 7 ; CDR ; - DIG 7 ; + DUP ; CDR ; + DIG 8 ; CDR ; - DIG 5 ; - DIG 5 ; + CDR ; + CDR ; + DIG 6 ; + DIG 6 ; NONE (map (pair (or unit unit) (or (or unit unit) unit)) nat) ; SWAP ; UPDATE ; SOME ; - DUP 11 ; + DUP 12 ; UPDATE ; UPDATE 2 ; UPDATE 2 ; + UPDATE 2 ; SWAP ; PAIR } ; UNPAIR ; @@ -996,7 +1020,9 @@ { DIG 2 ; DROP ; IF_LEFT - { DUP 2 ; + { DIG 2 ; + DROP ; + DUP 2 ; CAR ; CAR ; CAR ; @@ -1014,14 +1040,11 @@ DIG 2 ; CDR ; DUP ; - CAR ; - DUP ; CDR ; - DIG 4 ; - UPDATE 2 ; - UPDATE 2 ; + DIG 3 ; UPDATE 1 ; UPDATE 2 ; + UPDATE 2 ; NIL operation ; PAIR } { DUP ; @@ -1051,9 +1074,8 @@ NOW ; DUP 4 ; CDR ; - CAR ; - CDR ; CDR ; + CAR ; UNIT ; VIEW "get_valid_swaps" (map string @@ -1075,7 +1097,7 @@ IF_NONE { PUSH nat 117 ; FAILWITH } {} ; DUP ; GET 8 ; - IF { DROP 5 ; PUSH nat 125 ; FAILWITH } + IF { DROP 6 ; PUSH nat 125 ; FAILWITH } { DUP 4 ; CAR ; DUP 5 ; @@ -1123,10 +1145,10 @@ DUP 2 ; COMPARE ; LT ; - IF { DROP 6 ; PUSH nat 113 ; FAILWITH } + IF { DROP 7 ; PUSH nat 113 ; FAILWITH } { COMPARE ; GT ; - IF { DROP 4 ; PUSH nat 130 ; FAILWITH } + IF { DROP 5 ; PUSH nat 130 ; FAILWITH } { DUP 4 ; CAR ; CAR ; @@ -1341,12 +1363,19 @@ IF_LEFT { IF_LEFT { DROP ; PUSH bool False } { DROP ; PUSH bool False } } { DROP ; PUSH bool True } ; - IF { DIG 3 ; DROP } - { DUP 3 ; - CDR ; - CAR ; + IF { DIG 3 ; DIG 5 ; DROP 2 } + { DIG 3 ; + UNPAIR ; + DUP ; + DUP 3 ; + COMPARE ; + GT ; + IF { PUSH string "/" ; CONCAT ; SWAP ; CONCAT } + { SWAP ; PUSH string "/" ; CONCAT ; SWAP ; CONCAT } ; + DUP 4 ; CDR ; CDR ; + CAR ; UNIT ; VIEW "get_valid_swaps" (map string @@ -1356,14 +1385,7 @@ (nat %oracle_precision) (bool %is_disabled_for_deposits))) ; IF_NONE { PUSH nat 165 ; FAILWITH } {} ; - DIG 4 ; - UNPAIR ; - DUP ; - DUP 3 ; - COMPARE ; - GT ; - IF { PUSH string "/" ; CONCAT ; SWAP ; CONCAT } - { SWAP ; PUSH string "/" ; CONCAT ; SWAP ; CONCAT } ; + DUP 2 ; GET ; IF_NONE { PUSH nat 117 ; FAILWITH } {} ; DUP ; @@ -1371,9 +1393,23 @@ SWAP ; GET 5 ; VIEW "getPrice" (pair timestamp nat) ; + IF_NONE + { DUP 4 ; + CDR ; + CAR ; + CDR ; + CDR ; + PUSH nat 124 ; + DUP 3 ; + PAIR 3 ; + DUP 7 ; + SWAP ; + EXEC ; + NONE (pair timestamp nat) } + { DUP 5 ; CDR ; CAR ; CDR ; CDR ; SWAP ; SOME } ; IF_NONE { PUSH nat 124 ; FAILWITH } {} ; CAR ; - DUP 4 ; + DUP 6 ; CAR ; CAR ; CDR ; @@ -1383,6 +1419,10 @@ SUB ; COMPARE ; LT ; + IF { SWAP ; DIG 6 ; DROP 2 ; PUSH bool True } + { PUSH nat 120 ; DIG 2 ; PAIR 3 ; DIG 5 ; SWAP ; EXEC ; PUSH bool False } ; + SWAP ; + DROP ; IF {} { PUSH nat 120 ; FAILWITH } } ; DUP 3 ; DIG 3 ; @@ -1419,9 +1459,8 @@ ADD ; DUP 5 ; CDR ; - CAR ; - CDR ; CDR ; + CAR ; UNIT ; VIEW "get_valid_swaps" (map string @@ -1433,9 +1472,8 @@ IF_NONE { PUSH nat 165 ; FAILWITH } {} ; DUP 6 ; CDR ; - CAR ; - CDR ; CDR ; + CAR ; UNIT ; VIEW "get_valid_tokens" (map string @@ -1596,6 +1634,7 @@ DUP 6 ; CDR ; CDR ; + CDR ; DUP 2 ; GET 5 ; GET ; @@ -1721,6 +1760,7 @@ DUP 5 ; CDR ; CDR ; + CDR ; DUP 3 ; GET 5 ; GET ; @@ -1746,10 +1786,12 @@ DUP 6 ; CDR ; CDR ; + CDR ; DUP 2 ; GET ; IF_NONE { DUP 6 ; + CDR ; CDR ; CDR ; EMPTY_MAP nat (map (pair (or unit unit) (or (or unit unit) unit)) nat) ; @@ -1817,6 +1859,7 @@ DUP 6 ; CDR ; CDR ; + CDR ; SWAP ; SOME ; DIG 2 ; @@ -1902,7 +1945,10 @@ DUP 2 ; DIG 2 ; CDR ; - DIG 3 ; + DUP ; + CDR ; + DIG 4 ; + UPDATE 2 ; UPDATE 2 ; UPDATE 2 ; NIL operation ; @@ -1910,8 +1956,10 @@ CONS ; PAIR } { DROP 8 ; PUSH nat 112 ; FAILWITH } } - { DROP 5 ; PUSH nat 103 ; FAILWITH } } } } } } - { IF_LEFT + { DROP 6 ; PUSH nat 103 ; FAILWITH } } } } } } + { DIG 3 ; + DROP ; + IF_LEFT { DROP ; SENDER ; PUSH mutez 1 ; @@ -1946,11 +1994,11 @@ DUP 6 ; CDR ; CDR ; - DUP 7 ; CDR ; - CAR ; + DUP 7 ; CDR ; CDR ; + CAR ; UNIT ; VIEW "get_valid_tokens" (map string @@ -3474,7 +3522,10 @@ DUP 4 ; DIG 4 ; CDR ; - DIG 4 ; + DUP ; + CDR ; + DIG 5 ; + UPDATE 2 ; UPDATE 2 ; UPDATE 2 ; DUP ; @@ -3528,17 +3579,16 @@ NIL operation } ; PAIR } } { DIG 3 ; - DROP ; + DROP 2 ; PUSH mutez 1 ; AMOUNT ; COMPARE ; LT ; IF {} { PUSH nat 118 ; FAILWITH } ; - DUP 2 ; - CDR ; - CAR ; + DUP ; CDR ; CDR ; + CAR ; UNIT ; VIEW "get_valid_swaps" (map string @@ -3549,1060 +3599,1139 @@ (bool %is_disabled_for_deposits))) ; IF_NONE { PUSH nat 165 ; FAILWITH } {} ; DUP 2 ; - GET ; - IF_NONE - { DROP 5 ; PUSH nat 117 ; FAILWITH } - { DUP 3 ; - CDR ; - CAR ; - CDR ; - CDR ; - UNIT ; - VIEW "get_valid_tokens" - (map string - (pair (nat %token_id) - (string %name) - (option %address address) - (nat %decimals) - (option %standard string))) ; - IF_NONE { PUSH nat 162 ; FAILWITH } {} ; - DUP 2 ; - CAR ; - DUP 2 ; - DUP 2 ; - CAR ; - GET ; - IF_NONE { PUSH nat 111 ; FAILWITH } {} ; - DUG 2 ; - CDR ; - GET ; - IF_NONE { PUSH nat 111 ; FAILWITH } {} ; - DUP 3 ; - GET 8 ; - DUP 4 ; - GET 7 ; - DUP 5 ; - GET 5 ; - DIG 5 ; - GET 3 ; - DIG 4 ; - PUSH nat 1 ; - DIG 6 ; - PAIR ; - PAIR ; - PAIR 5 ; - DUP ; - GET 8 ; - DUP 2 ; - GET 7 ; - DUP 3 ; - GET 5 ; - DUP 4 ; - GET 3 ; - DUP 5 ; - CAR ; - DUP ; - CDR ; - GET 3 ; - SWAP ; - CAR ; - CAR ; - GET 3 ; - PAIR ; - PAIR 5 ; - DUP ; - GET 3 ; - SWAP ; - GET 5 ; - VIEW "getPrice" (pair timestamp nat) ; - IF_NONE { PUSH nat 122 ; FAILWITH } {} ; - UNPAIR ; - DUP 5 ; - CDR ; - CAR ; - CDR ; - CAR ; - DUP 5 ; - GET ; - IF_NONE - {} - { DUP 2 ; - SWAP ; - GET 4 ; - COMPARE ; - GE ; - IF { PUSH nat 121 ; FAILWITH } {} } ; - DUP 5 ; - CAR ; - CAR ; - CDR ; - CAR ; - INT ; - DUP 2 ; - SWAP ; - NOW ; - SUB ; - COMPARE ; - LT ; - IF {} { PUSH nat 120 ; FAILWITH } ; - DUP 5 ; - CDR ; - CAR ; - CDR ; - CDR ; - UNIT ; - VIEW "get_valid_tokens" - (map string - (pair (nat %token_id) - (string %name) - (option %address address) - (nat %decimals) - (option %standard string))) ; - IF_NONE { PUSH nat 162 ; FAILWITH } {} ; - DUP 4 ; - CAR ; - DIG 4 ; - GET 7 ; - DUP ; - DUP 3 ; - CAR ; - CAR ; - GET 7 ; - COMPARE ; - GT ; - IF { DUP 2 ; - CAR ; - CAR ; - GET 7 ; - SUB ; - PUSH int 10 ; - PAIR ; - DUP 9 ; - SWAP ; - EXEC ; - DIG 4 ; - MUL ; - ISNAT ; - IF_NONE { PUSH nat 119 ; FAILWITH } {} ; - DUP 2 ; - CAR ; - CAR ; - GET 7 ; - INT ; - PUSH int 10 ; - PAIR ; - DUP 9 ; - SWAP ; - EXEC ; - SWAP } - { INT ; PUSH int 10 ; PAIR ; DUP 9 ; SWAP ; EXEC ; DIG 4 } ; - INT ; - PUSH int 1 ; - SWAP ; - PAIR ; - PUSH int 1 ; - DIG 2 ; - PAIR ; - DUP ; - CAR ; - DUP 3 ; - CDR ; - MUL ; - SWAP ; - CDR ; - DIG 2 ; - CAR ; - MUL ; - PAIR ; - DIG 3 ; - SWAP ; - DUP 3 ; - CDR ; - GET 3 ; - DIG 3 ; - CAR ; - CAR ; - GET 3 ; - PAIR ; - PAIR 3 ; - DUP ; - CAR ; - DUP 3 ; - DUP 2 ; - CAR ; - GET ; - IF_NONE { PUSH nat 111 ; FAILWITH } {} ; - DIG 3 ; - DIG 2 ; - CDR ; - GET ; - IF_NONE { PUSH nat 111 ; FAILWITH } {} ; - SWAP ; - GET 7 ; - SWAP ; - GET 7 ; - SUB ; - DUP ; - ABS ; - INT ; - PUSH int 10 ; - PAIR ; - DIG 6 ; - SWAP ; - EXEC ; - PUSH int 0 ; - DUP 3 ; - COMPARE ; - EQ ; - IF { DROP 2 ; PUSH int 1 ; PUSH int 1 } - { PUSH int 0 ; - DIG 2 ; - COMPARE ; - LT ; - IF { PUSH int 1 ; - SWAP ; - PAIR ; - PUSH int 1 ; - PUSH int 1 ; - PAIR ; - DUP 2 ; - CAR ; - DUP 2 ; - CDR ; - MUL ; - DIG 2 ; - CDR ; - DIG 2 ; - CAR ; - MUL } - { PUSH int 1 ; SWAP } } ; - PAIR ; - DUP 2 ; - GET 3 ; - DUP 2 ; - CDR ; - DUP 2 ; - CDR ; - MUL ; - DIG 2 ; - CAR ; - DIG 2 ; - CAR ; - MUL ; - PAIR ; - UPDATE 3 ; - DUP 3 ; - DUP 4 ; - CDR ; - DUP ; - CAR ; - DUP ; - CDR ; - DIG 6 ; - CDR ; - CAR ; - CDR ; - CAR ; - DUP ; - DUP 8 ; - GET ; - IF_NONE - { DUP 6 ; DIG 7 ; SWAP ; SOME ; SWAP ; UPDATE } - { GET 4 ; - DUP 7 ; - GET 4 ; - COMPARE ; - GT ; - IF { DUP 6 ; SOME ; DIG 7 ; UPDATE } { DIG 6 ; DROP } } ; - UPDATE 1 ; - UPDATE 2 ; - UPDATE 1 ; - UPDATE 2 ; - DUP 2 ; - CAR ; - UNIT ; - LEFT unit ; - IF_LEFT { DROP } { DROP ; DUP ; CAR ; SWAP ; CDR ; PAIR } ; - NOW ; - DUP 3 ; - CAR ; - CAR ; - CAR ; - CDR ; - DUP ; - CDR ; - DUP 2 ; - CAR ; - DUP 5 ; - UNPAIR ; - DUP ; - DUP 3 ; - COMPARE ; - GT ; - IF { PUSH string "/" ; CONCAT ; SWAP ; CONCAT } - { SWAP ; PUSH string "/" ; CONCAT ; SWAP ; CONCAT } ; - GET ; - IF_NONE { PUSH nat 0 } {} ; - GET ; - IF_NONE - { DIG 2 ; - DROP ; - DIG 2 ; - SWAP ; - NONE (pair nat - (or (or (pair (pair timestamp - (pair (pair nat nat nat) - (or (or unit unit) unit) - (pair nat nat nat nat) - (pair (pair string string) (pair int int) timestamp))) - (pair (pair string string) (pair int int) timestamp)) - (pair timestamp timestamp)) - timestamp) - (pair nat nat nat nat nat nat nat nat) - (pair string string) - nat - (option address)) } - { DUP ; - GET 3 ; - IF_LEFT - { IF_LEFT { DROP ; PUSH bool True } { DROP ; PUSH bool False } } - { DROP ; PUSH bool False } ; - IF { DIG 3 ; DROP ; DIG 3 } - { DUP 5 ; - CAR ; - CAR ; - CDR ; - CAR ; - DUP 2 ; - GET 3 ; - IF_LEFT - { SWAP ; - DROP ; - IF_LEFT - { DROP 2 ; - PUSH nat 0 ; - DUP 2 ; - CAR ; - ITER { CDR ; DUP 2 ; DUP 2 ; COMPARE ; GT ; IF { SWAP ; DROP } { DROP } } ; - PUSH nat 1 ; - ADD ; - NONE address ; - PUSH nat 0 ; - DIG 5 ; - PUSH nat 0 ; - PUSH nat 0 ; - PUSH nat 0 ; - PUSH nat 0 ; - PUSH nat 0 ; - PUSH nat 0 ; - PUSH nat 0 ; - PUSH nat 0 ; - PAIR 8 ; + CDR ; + CDR ; + CAR ; + UNIT ; + VIEW "get_valid_tokens" + (map string + (pair (nat %token_id) + (string %name) + (option %address address) + (nat %decimals) + (option %standard string))) ; + IF_NONE { PUSH nat 162 ; FAILWITH } {} ; + DUG 2 ; + ITER { UNPAIR ; + DUP 2 ; + CAR ; + DUP 5 ; + DUP 2 ; + CAR ; + GET ; + IF_NONE { PUSH nat 111 ; FAILWITH } {} ; + DUP 6 ; + DIG 2 ; + CDR ; + GET ; + IF_NONE { PUSH nat 111 ; FAILWITH } {} ; + DUP 4 ; + GET 8 ; + DUP 5 ; + GET 7 ; + DUP 6 ; + GET 5 ; + DIG 6 ; + GET 3 ; + DIG 4 ; + PUSH nat 1 ; + DIG 6 ; + PAIR ; + PAIR ; + PAIR 5 ; + DUP ; + GET 8 ; + DUP 2 ; + GET 7 ; + DUP 3 ; + GET 5 ; + DUP 4 ; + GET 3 ; + DUP 5 ; + CAR ; + DUP ; + CDR ; + GET 3 ; + SWAP ; + CAR ; + CAR ; + GET 3 ; + PAIR ; + PAIR 5 ; + DUP ; + GET 3 ; + SWAP ; + GET 5 ; + VIEW "getPrice" (pair timestamp nat) ; + IF_NONE + { DUP 3 ; + CDR ; + CAR ; + CDR ; + CDR ; + PUSH nat 122 ; + DUP 4 ; + PAIR 3 ; + DUP 9 ; + SWAP ; + EXEC ; + NONE (pair timestamp nat) } + { DUP 4 ; CDR ; CAR ; CDR ; CDR ; SWAP ; SOME } ; + DUP 5 ; + DIG 5 ; + CDR ; + DUP ; + CAR ; + DUP ; + CDR ; + DUP 6 ; + UPDATE 2 ; + UPDATE 2 ; + UPDATE 1 ; + UPDATE 2 ; + DUP 2 ; + IF_NONE { PUSH bool True } { DROP ; PUSH bool False } ; + IF { SWAP ; DIG 2 ; DIG 3 ; DIG 4 ; DROP 4 } + { SWAP ; + IF_NONE { PUSH string "option is None" ; FAILWITH } {} ; + UNPAIR ; + DUP 3 ; + CDR ; + CAR ; + CDR ; + CAR ; + DUP 7 ; + GET ; + IF_NONE + { DIG 3 ; PUSH bool True } + { DUP 2 ; + SWAP ; + GET 4 ; + COMPARE ; + GE ; + IF { DIG 3 ; + PUSH nat 121 ; DUP 7 ; - RIGHT - (or (pair (pair timestamp - (pair (pair nat nat nat) - (or (or unit unit) unit) - (pair nat nat nat nat) - (pair (pair string string) (pair int int) timestamp))) - (pair (pair string string) (pair int int) timestamp)) - (pair timestamp timestamp)) ; - DIG 5 ; - PAIR 6 ; - DIG 3 ; - DUP 3 ; - DUP 4 ; - CDR ; - DUP 4 ; - SOME ; - DUP 5 ; - CAR ; - UPDATE ; - UPDATE 2 ; - DIG 3 ; - CAR ; - DUP 4 ; - CAR ; - SOME ; - DUP 5 ; - GET 7 ; - UNPAIR ; - DUP ; - DUP 3 ; - COMPARE ; - GT ; - IF { PUSH string "/" ; CONCAT ; SWAP ; CONCAT } - { SWAP ; PUSH string "/" ; CONCAT ; SWAP ; CONCAT } ; - UPDATE ; - UPDATE 1 } - { DIG 4 ; DROP 2 ; DIG 3 ; DIG 2 } } - { DIG 5 ; - DROP ; - DUP 2 ; + PAIR 3 ; + DUP 11 ; + SWAP ; + EXEC ; + PUSH bool False } + { DIG 3 ; PUSH bool True } } ; + DUP 5 ; + DIG 5 ; + CDR ; + DUP ; + CAR ; + DUP ; + CDR ; + DUP 6 ; + UPDATE 2 ; + UPDATE 2 ; + UPDATE 1 ; + UPDATE 2 ; + SWAP ; + NOT ; + IF { SWAP ; DIG 2 ; DIG 3 ; DIG 4 ; DIG 5 ; DROP 5 } + { DUP ; + CAR ; + CAR ; + CDR ; + CAR ; INT ; - ADD ; - DUP 5 ; + DUP 4 ; + SWAP ; + NOW ; + SUB ; COMPARE ; - GE ; - IF { DUP 2 ; - GET 3 ; - IF_LEFT - { SWAP ; - DIG 2 ; - DIG 5 ; - DROP 3 ; - IF_LEFT - { DROP ; PUSH nat 105 ; FAILWITH } - { DROP ; PUSH nat 105 ; FAILWITH } } - { SWAP ; - INT ; - DUP 2 ; - ADD ; - PAIR ; - RIGHT - (pair (pair timestamp - (pair (pair nat nat nat) - (or (or unit unit) unit) - (pair nat nat nat nat) - (pair (pair string string) (pair int int) timestamp))) - (pair (pair string string) (pair int int) timestamp)) ; - LEFT timestamp ; - UPDATE 3 ; - DIG 3 ; - PAIR } ; - UNPAIR ; - DUP 3 ; - DUP 4 ; + LT ; + IF { SWAP ; PUSH bool True } + { SWAP ; + PUSH nat 120 ; + DUP 7 ; + PAIR 3 ; + DUP 11 ; + SWAP ; + EXEC ; + PUSH bool False } ; + DUP 3 ; + DIG 3 ; + CDR ; + DUP ; + CAR ; + DUP ; + CDR ; + DIG 5 ; + UPDATE 2 ; + UPDATE 2 ; + UPDATE 1 ; + UPDATE 2 ; + SWAP ; + NOT ; + IF { SWAP ; DIG 2 ; DIG 3 ; DIG 4 ; DROP 4 } + { DUP ; + CDR ; CDR ; - DUP 4 ; - SOME ; - DUP 5 ; - CAR ; - UPDATE ; - UPDATE 2 ; - DIG 3 ; - CAR ; - DUP 4 ; CAR ; - SOME ; + UNIT ; + VIEW "get_valid_tokens" + (map string + (pair (nat %token_id) + (string %name) + (option %address address) + (nat %decimals) + (option %standard string))) ; + IF_NONE { PUSH nat 162 ; FAILWITH } {} ; DUP 5 ; + CAR ; + DIG 5 ; GET 7 ; - UNPAIR ; DUP ; DUP 3 ; + CAR ; + CAR ; + GET 7 ; COMPARE ; GT ; - IF { PUSH string "/" ; CONCAT ; SWAP ; CONCAT } - { SWAP ; PUSH string "/" ; CONCAT ; SWAP ; CONCAT } ; - UPDATE ; - UPDATE 1 } - { DROP ; DIG 3 ; DIG 2 } } ; - DUG 2 } ; - DUG 2 ; - SOME } ; - IF_NONE - { DIG 2 ; DIG 3 ; DIG 4 ; DIG 5 ; DROP 5 } - { DUP ; - GET 3 ; - IF_LEFT - { IF_LEFT - { DIG 4 ; DROP 2 ; PUSH bool False } - { CAR ; PUSH int 120 ; ADD ; DIG 4 ; COMPARE ; GT } } - { DIG 4 ; DROP 2 ; PUSH bool False } ; - IF { NOW ; - DUP 2 ; - GET 5 ; - DUP ; - GET 9 ; - INT ; - DUP 2 ; - GET 11 ; - INT ; - DUP 3 ; - GET 13 ; - INT ; - DUP 4 ; - CAR ; - INT ; - DUP 5 ; - GET 3 ; - INT ; - DUP 6 ; - GET 5 ; - INT ; - DIG 3 ; - DIG 4 ; - DIG 5 ; - PAIR ; - PAIR ; - SWAP ; - DIG 2 ; - DIG 3 ; - PAIR ; - PAIR ; - DUP 8 ; - GET 3 ; - DUP 2 ; - CAR ; - CAR ; - DUP 4 ; - UNPAIR ; - UNPAIR ; - DUP 5 ; - DUP 16 ; - DIG 4 ; - DIG 4 ; - DIG 4 ; - ADD ; - ADD ; - PUSH int 1 ; - SWAP ; - PAIR ; - DUP 2 ; - CDR ; - DUP 2 ; - CDR ; - MUL ; - DIG 2 ; - CAR ; - DIG 2 ; - CAR ; - MUL ; - PAIR ; - DUP 2 ; - CAR ; - DUP 2 ; - CDR ; - MUL ; - DIG 2 ; - CDR ; - DIG 2 ; - CAR ; - MUL ; - PAIR ; - PUSH int 1 ; - DIG 2 ; - PAIR ; - DUP 2 ; - CAR ; - DUP 2 ; - CDR ; - MUL ; - DUP 3 ; - CDR ; - DUP 3 ; - CAR ; - MUL ; - COMPARE ; - LE ; - IF { SWAP ; DROP } { DROP } ; - DUP 3 ; - CAR ; - UNPAIR ; - DUP 6 ; - UNPAIR ; - CDR ; - DIG 3 ; - DIG 3 ; - ADD ; - DUP 5 ; - DIG 3 ; - DIG 3 ; - ADD ; - PUSH int 1 ; - SWAP ; - PAIR ; - DUP 2 ; - CAR ; - DUP 2 ; - CDR ; - MUL ; - DIG 2 ; - CDR ; - DIG 2 ; - CAR ; - MUL ; - PAIR ; - PUSH int 1 ; - DIG 2 ; - PAIR ; - DUP 2 ; - CAR ; - DUP 2 ; - CDR ; - MUL ; - DUP 3 ; - CDR ; - DUP 3 ; - CAR ; - MUL ; - COMPARE ; - LE ; - IF { SWAP ; DROP } { DROP } ; - DIG 3 ; - UNPAIR ; - UNPAIR ; - DIG 6 ; - CDR ; - DUG 3 ; - ADD ; - ADD ; - DUP 5 ; - CDR ; - DUP 14 ; - CDR ; - MUL ; - DIG 5 ; - CAR ; - DIG 13 ; - CAR ; - MUL ; - PAIR ; - PUSH int 1 ; - DIG 3 ; - PAIR ; - DUP 2 ; - CAR ; - DUP 2 ; - CDR ; - MUL ; - DIG 2 ; - CDR ; - DIG 2 ; - CAR ; - MUL ; - PAIR ; - PUSH int 1 ; - DIG 2 ; - PAIR ; - DUP 2 ; - CAR ; - DUP 2 ; - CDR ; - MUL ; - DUP 3 ; - CDR ; - DUP 3 ; - CAR ; - MUL ; - COMPARE ; - LE ; - IF { SWAP ; DROP } { DROP } ; - PUSH int 0 ; - DUP 4 ; - CAR ; - COMPARE ; - LT ; - IF { PUSH int -1 ; DUP 4 ; CDR ; MUL ; PUSH int -1 ; DUP 5 ; CAR ; MUL ; PAIR } - { DUP 3 } ; - DUP ; - CDR ; - PUSH nat 1 ; - PUSH nat 0 ; - PUSH nat 10 ; - PAIR ; - PAIR ; - LEFT nat ; - LOOP_LEFT - { UNPAIR ; - UNPAIR ; - PUSH nat 0 ; - DUP 3 ; - COMPARE ; - EQ ; - IF { DROP 2 ; RIGHT (pair (pair nat nat) nat) } - { PUSH nat 1 ; - PUSH nat 1 ; - DUP 4 ; - AND ; - COMPARE ; - EQ ; - IF { DUP ; DIG 3 ; MUL } { DIG 2 } ; - PUSH nat 1 ; - DIG 3 ; - LSR ; - DUP 3 ; - DIG 3 ; - MUL ; + IF { DUP 2 ; + CAR ; + CAR ; + GET 7 ; + SUB ; + PUSH int 10 ; + PAIR ; + DUP 10 ; + SWAP ; + EXEC ; + DIG 5 ; + MUL ; + ISNAT ; + IF_NONE { PUSH nat 119 ; FAILWITH } {} ; + DUP 2 ; + CAR ; + CAR ; + GET 7 ; + INT ; + PUSH int 10 ; + PAIR ; + DUP 10 ; + SWAP ; + EXEC ; + SWAP } + { INT ; PUSH int 10 ; PAIR ; DUP 10 ; SWAP ; EXEC ; DIG 5 } ; + INT ; + PUSH int 1 ; + SWAP ; PAIR ; + PUSH int 1 ; + DIG 2 ; PAIR ; - LEFT nat } } ; - DIG 2 ; - CAR ; - MUL ; - EDIV ; - IF_NONE { PUSH string "DIV by 0" ; FAILWITH } {} ; - CAR ; - ISNAT ; - IF_NONE { PUSH nat 119 ; FAILWITH } {} ; - PUSH int 0 ; - DUP 4 ; - CAR ; - COMPARE ; - LT ; - IF { PUSH int -1 ; DUP 4 ; CDR ; MUL ; PUSH int -1 ; DUP 5 ; CAR ; MUL ; PAIR } - { DUP 3 } ; - DUP ; - CDR ; - PUSH nat 1 ; - PUSH nat 0 ; - PUSH nat 10 ; - PAIR ; - PAIR ; - LEFT nat ; - LOOP_LEFT - { UNPAIR ; - UNPAIR ; - PUSH nat 0 ; - DUP 3 ; - COMPARE ; - EQ ; - IF { DROP 2 ; RIGHT (pair (pair nat nat) nat) } - { PUSH nat 1 ; - PUSH nat 1 ; - DUP 4 ; - AND ; - COMPARE ; - EQ ; - IF { DUP ; DIG 3 ; MUL } { DIG 2 } ; - PUSH nat 1 ; - DIG 3 ; - LSR ; + DUP ; + CAR ; DUP 3 ; - DIG 3 ; + CDR ; + MUL ; + SWAP ; + CDR ; + DIG 2 ; + CAR ; MUL ; PAIR ; - PAIR ; - LEFT nat } } ; - DIG 2 ; - CAR ; - MUL ; - EDIV ; - IF_NONE { PUSH string "DIV by 0" ; FAILWITH } {} ; - CAR ; - ISNAT ; - IF_NONE { PUSH nat 119 ; FAILWITH } {} ; - PUSH int 0 ; - DUP 4 ; - CAR ; - COMPARE ; - LT ; - IF { PUSH int -1 ; DUP 4 ; CDR ; MUL ; PUSH int -1 ; DUP 5 ; CAR ; MUL ; PAIR } - { DUP 3 } ; - DUP ; - CDR ; - PUSH nat 1 ; - PUSH nat 0 ; - PUSH nat 10 ; - PAIR ; - PAIR ; - LEFT nat ; - LOOP_LEFT - { UNPAIR ; - UNPAIR ; - PUSH nat 0 ; - DUP 3 ; - COMPARE ; - EQ ; - IF { DROP 2 ; RIGHT (pair (pair nat nat) nat) } - { PUSH nat 1 ; - PUSH nat 1 ; - DUP 4 ; - AND ; - COMPARE ; - EQ ; - IF { DUP ; DIG 3 ; MUL } { DIG 2 } ; - PUSH nat 1 ; - DIG 3 ; - LSR ; + DIG 4 ; + SWAP ; DUP 3 ; + CDR ; + GET 3 ; DIG 3 ; - MUL ; - PAIR ; + CAR ; + CAR ; + GET 3 ; PAIR ; - LEFT nat } } ; - DIG 2 ; - CAR ; - MUL ; - EDIV ; - IF_NONE { PUSH string "DIV by 0" ; FAILWITH } {} ; - CAR ; - ISNAT ; - IF_NONE { PUSH nat 119 ; FAILWITH } {} ; - DUP 4 ; - CAR ; - DUP 7 ; - CDR ; - MUL ; - DUP 5 ; - CDR ; - DUP 8 ; - CAR ; - MUL ; - COMPARE ; - LT ; - NOT ; - DUP 6 ; - CAR ; - DUP 8 ; - CDR ; - MUL ; - DUP 7 ; - CDR ; - DUP 9 ; - CAR ; - MUL ; - COMPARE ; - LT ; - NOT ; - AND ; - IF { DIG 3 ; DIG 4 ; DIG 5 ; DROP 3 ; UNIT ; RIGHT unit ; LEFT unit } - { DUP 4 ; - CAR ; - DUP 6 ; - CDR ; - MUL ; - DIG 4 ; - CDR ; - DUP 6 ; - CAR ; - MUL ; - COMPARE ; - LT ; - NOT ; - DUP 6 ; - CAR ; - DUP 6 ; - CDR ; - MUL ; - DIG 6 ; - CDR ; - DIG 6 ; - CAR ; - MUL ; - COMPARE ; - LT ; - NOT ; - AND ; - IF { UNIT ; LEFT unit ; LEFT unit } { UNIT ; RIGHT (or unit unit) } } ; - DUP 10 ; - PUSH nat 0 ; - PUSH nat 0 ; - PUSH nat 0 ; - PUSH nat 0 ; - PAIR 4 ; - DIG 2 ; - DIG 3 ; - DIG 4 ; - DIG 5 ; - PAIR 3 ; - PAIR 4 ; - DUP ; - GET 3 ; - IF_LEFT - { IF_LEFT - { DROP ; - DUP 2 ; - GET 3 ; - DUP 3 ; - CAR ; - ADD ; - DUP 3 ; - GET 13 ; - DIG 3 ; - GET 11 ; - ADD ; - SWAP } - { DROP ; - DUP 2 ; - GET 13 ; - DUP 3 ; - GET 11 ; - DUP 4 ; - GET 9 ; - ADD ; - ADD ; - DIG 2 ; - CAR } } - { DROP ; - DUP 2 ; - GET 5 ; - DUP 3 ; - GET 3 ; - DUP 4 ; - CAR ; - ADD ; - ADD ; - DIG 2 ; - GET 13 ; - SWAP } ; - DUP 3 ; - GET 3 ; - IF_LEFT - { IF_LEFT - { DIG 9 ; DROP 2 ; DUP 8 } - { DROP ; - DUP 8 ; - GET 3 ; - DUP 10 ; - CAR ; - DUP 2 ; - CDR ; - MUL ; - DIG 10 ; - CDR ; - DIG 2 ; - CAR ; - MUL ; - PAIR ; - DUP 9 ; - SWAP ; - UPDATE 3 } } - { DROP ; - DUP 8 ; - GET 3 ; - DUP 10 ; - CDR ; - DUP 2 ; - CDR ; - MUL ; - DIG 10 ; - CAR ; - DIG 2 ; - CAR ; - MUL ; - PAIR ; - DUP 9 ; - SWAP ; - UPDATE 3 } ; - DUP 4 ; - GET 3 ; - IF_LEFT - { IF_LEFT { DROP ; DUP 4 ; CAR ; GET 3 } { DROP ; DUP 4 ; CAR ; CAR } } - { DROP ; DUP 4 ; CAR ; GET 4 } ; - DUP 2 ; - GET 3 ; - DUP 2 ; - INT ; - PUSH int 1 ; - SWAP ; - PAIR ; - DUP 2 ; - CDR ; - DUP 2 ; - CDR ; - MUL ; - DIG 2 ; - CAR ; - DIG 2 ; - CAR ; - MUL ; - PAIR ; - PUSH int 0 ; - DUP 2 ; - CAR ; - COMPARE ; - LT ; - IF { PUSH int -1 ; DUP 2 ; CDR ; MUL ; PUSH int -1 ; DIG 2 ; CAR ; MUL ; PAIR } - {} ; - DUP ; - CDR ; - PUSH nat 1 ; - PUSH nat 0 ; - PUSH nat 10 ; - PAIR ; - PAIR ; - LEFT nat ; - LOOP_LEFT - { UNPAIR ; - UNPAIR ; - PUSH nat 0 ; - DUP 3 ; - COMPARE ; - EQ ; - IF { DROP 2 ; RIGHT (pair (pair nat nat) nat) } - { PUSH nat 1 ; - PUSH nat 1 ; - DUP 4 ; - AND ; - COMPARE ; - EQ ; - IF { DUP ; DIG 3 ; MUL } { DIG 2 } ; - PUSH nat 1 ; - DIG 3 ; - LSR ; + PAIR 3 ; + DUP ; + CAR ; DUP 3 ; + DUP 2 ; + CAR ; + GET ; + IF_NONE { PUSH nat 111 ; FAILWITH } {} ; DIG 3 ; - MUL ; - PAIR ; + DIG 2 ; + CDR ; + GET ; + IF_NONE { PUSH nat 111 ; FAILWITH } {} ; + SWAP ; + GET 7 ; + SWAP ; + GET 7 ; + SUB ; + DUP ; + ABS ; + INT ; + PUSH int 10 ; PAIR ; - LEFT nat } } ; - DIG 2 ; - CAR ; - MUL ; - EDIV ; - IF_NONE { PUSH string "DIV by 0" ; FAILWITH } {} ; - CAR ; - ISNAT ; - IF_NONE { PUSH nat 119 ; FAILWITH } {} ; - DIG 5 ; - DIG 5 ; - DIG 2 ; - DIG 5 ; - DIG 4 ; - PAIR 4 ; - UPDATE 5 ; - SWAP ; - UPDATE 6 ; - DIG 2 ; - DIG 5 ; - DIG 2 ; - DIG 3 ; - PAIR ; - PAIR ; - LEFT (pair timestamp timestamp) ; - LEFT timestamp ; - UPDATE 3 ; - DUP 2 ; - DUP 3 ; - CDR ; - DUP 3 ; - SOME ; - DUP 4 ; - CAR ; - UPDATE ; - UPDATE 2 ; - DIG 2 ; - CAR ; - DUP 3 ; - CAR ; - SOME ; - DIG 3 ; - GET 7 ; - UNPAIR ; - DUP ; - DUP 3 ; - COMPARE ; - GT ; - IF { PUSH string "/" ; CONCAT ; SWAP ; CONCAT } - { SWAP ; PUSH string "/" ; CONCAT ; SWAP ; CONCAT } ; - UPDATE ; - UPDATE 1 } - { DIG 3 ; DIG 4 ; DIG 5 ; DROP 4 } ; - DUP 2 ; - DIG 2 ; - CAR ; - DUP ; - CAR ; - DUP ; - CAR ; - DIG 4 ; - UPDATE 2 ; - UPDATE 1 ; - UPDATE 1 ; - UPDATE 1 } ; - NIL operation ; - PAIR } } } } ; + DUP 8 ; + SWAP ; + EXEC ; + PUSH int 0 ; + DUP 3 ; + COMPARE ; + EQ ; + IF { DROP 2 ; PUSH int 1 ; PUSH int 1 } + { PUSH int 0 ; + DIG 2 ; + COMPARE ; + LT ; + IF { PUSH int 1 ; + SWAP ; + PAIR ; + PUSH int 1 ; + PUSH int 1 ; + PAIR ; + DUP 2 ; + CAR ; + DUP 2 ; + CDR ; + MUL ; + DIG 2 ; + CDR ; + DIG 2 ; + CAR ; + MUL } + { PUSH int 1 ; SWAP } } ; + PAIR ; + DUP 2 ; + GET 3 ; + DUP 2 ; + CDR ; + DUP 2 ; + CDR ; + MUL ; + DIG 2 ; + CAR ; + DIG 2 ; + CAR ; + MUL ; + PAIR ; + UPDATE 3 ; + DUP 2 ; + DUP 3 ; + CDR ; + DUP ; + CAR ; + DUP ; + CDR ; + DIG 5 ; + CDR ; + CAR ; + CDR ; + CAR ; + DUP ; + DUP 8 ; + GET ; + IF_NONE + { DUP 6 ; DIG 7 ; SWAP ; SOME ; SWAP ; UPDATE } + { GET 4 ; + DUP 7 ; + GET 4 ; + COMPARE ; + GT ; + IF { DUP 6 ; SOME ; DIG 7 ; UPDATE } { DIG 6 ; DROP } } ; + UPDATE 1 ; + UPDATE 2 ; + UPDATE 1 ; + UPDATE 2 ; + DUP 2 ; + CAR ; + UNIT ; + LEFT unit ; + IF_LEFT { DROP } { DROP ; DUP ; CAR ; SWAP ; CDR ; PAIR } ; + NOW ; + DUP 3 ; + CAR ; + CAR ; + CAR ; + CDR ; + DUP ; + CDR ; + DUP 2 ; + CAR ; + DUP 5 ; + UNPAIR ; + DUP ; + DUP 3 ; + COMPARE ; + GT ; + IF { PUSH string "/" ; CONCAT ; SWAP ; CONCAT } + { SWAP ; PUSH string "/" ; CONCAT ; SWAP ; CONCAT } ; + GET ; + IF_NONE { PUSH nat 0 } {} ; + GET ; + IF_NONE + { DIG 2 ; + DROP ; + DIG 2 ; + SWAP ; + NONE (pair nat + (or (or (pair (pair timestamp + (pair (pair nat nat nat) + (or (or unit unit) unit) + (pair nat nat nat nat) + (pair (pair string string) (pair int int) timestamp))) + (pair (pair string string) (pair int int) timestamp)) + (pair timestamp timestamp)) + timestamp) + (pair nat nat nat nat nat nat nat nat) + (pair string string) + nat + (option address)) } + { DUP ; + GET 3 ; + IF_LEFT + { IF_LEFT { DROP ; PUSH bool True } { DROP ; PUSH bool False } } + { DROP ; PUSH bool False } ; + IF { DIG 3 ; DROP ; DIG 3 } + { DUP 5 ; + CAR ; + CAR ; + CDR ; + CAR ; + DUP 2 ; + GET 3 ; + IF_LEFT + { SWAP ; + DROP ; + IF_LEFT + { DROP 2 ; + PUSH nat 0 ; + DUP 2 ; + CAR ; + ITER { CDR ; DUP 2 ; DUP 2 ; COMPARE ; GT ; IF { SWAP ; DROP } { DROP } } ; + PUSH nat 1 ; + ADD ; + NONE address ; + PUSH nat 0 ; + DIG 5 ; + PUSH nat 0 ; + PUSH nat 0 ; + PUSH nat 0 ; + PUSH nat 0 ; + PUSH nat 0 ; + PUSH nat 0 ; + PUSH nat 0 ; + PUSH nat 0 ; + PAIR 8 ; + DUP 7 ; + RIGHT + (or (pair (pair timestamp + (pair (pair nat nat nat) + (or (or unit unit) unit) + (pair nat nat nat nat) + (pair (pair string string) (pair int int) timestamp))) + (pair (pair string string) (pair int int) timestamp)) + (pair timestamp timestamp)) ; + DIG 5 ; + PAIR 6 ; + DIG 3 ; + DUP 3 ; + DUP 4 ; + CDR ; + DUP 4 ; + SOME ; + DUP 5 ; + CAR ; + UPDATE ; + UPDATE 2 ; + DIG 3 ; + CAR ; + DUP 4 ; + CAR ; + SOME ; + DUP 5 ; + GET 7 ; + UNPAIR ; + DUP ; + DUP 3 ; + COMPARE ; + GT ; + IF { PUSH string "/" ; CONCAT ; SWAP ; CONCAT } + { SWAP ; PUSH string "/" ; CONCAT ; SWAP ; CONCAT } ; + UPDATE ; + UPDATE 1 } + { DIG 4 ; DROP 2 ; DIG 3 ; DIG 2 } } + { DIG 5 ; + DROP ; + DUP 2 ; + INT ; + ADD ; + DUP 5 ; + COMPARE ; + GE ; + IF { DUP 2 ; + GET 3 ; + IF_LEFT + { SWAP ; + DIG 2 ; + DIG 5 ; + DROP 3 ; + IF_LEFT + { DROP ; PUSH nat 105 ; FAILWITH } + { DROP ; PUSH nat 105 ; FAILWITH } } + { SWAP ; + INT ; + DUP 2 ; + ADD ; + PAIR ; + RIGHT + (pair (pair timestamp + (pair (pair nat nat nat) + (or (or unit unit) unit) + (pair nat nat nat nat) + (pair (pair string string) (pair int int) timestamp))) + (pair (pair string string) (pair int int) timestamp)) ; + LEFT timestamp ; + UPDATE 3 ; + DIG 3 ; + PAIR } ; + UNPAIR ; + DUP 3 ; + DUP 4 ; + CDR ; + DUP 4 ; + SOME ; + DUP 5 ; + CAR ; + UPDATE ; + UPDATE 2 ; + DIG 3 ; + CAR ; + DUP 4 ; + CAR ; + SOME ; + DUP 5 ; + GET 7 ; + UNPAIR ; + DUP ; + DUP 3 ; + COMPARE ; + GT ; + IF { PUSH string "/" ; CONCAT ; SWAP ; CONCAT } + { SWAP ; PUSH string "/" ; CONCAT ; SWAP ; CONCAT } ; + UPDATE ; + UPDATE 1 } + { DROP ; DIG 3 ; DIG 2 } } ; + DUG 2 } ; + DUG 2 ; + SOME } ; + IF_NONE + { DIG 2 ; DIG 3 ; DROP 3 } + { DUP ; + GET 3 ; + IF_LEFT + { IF_LEFT + { DIG 4 ; DROP 2 ; PUSH bool False } + { CAR ; PUSH int 120 ; ADD ; DIG 4 ; COMPARE ; GT } } + { DIG 4 ; DROP 2 ; PUSH bool False } ; + IF { NOW ; + DUP 2 ; + GET 5 ; + DUP ; + GET 9 ; + INT ; + DUP 2 ; + GET 11 ; + INT ; + DUP 3 ; + GET 13 ; + INT ; + DUP 4 ; + CAR ; + INT ; + DUP 5 ; + GET 3 ; + INT ; + DUP 6 ; + GET 5 ; + INT ; + DIG 3 ; + DIG 4 ; + DIG 5 ; + PAIR ; + PAIR ; + SWAP ; + DIG 2 ; + DIG 3 ; + PAIR ; + PAIR ; + DUP 8 ; + GET 3 ; + DUP 2 ; + CAR ; + CAR ; + DUP 4 ; + UNPAIR ; + UNPAIR ; + DUP 5 ; + DUP 18 ; + DIG 4 ; + DIG 4 ; + DIG 4 ; + ADD ; + ADD ; + PUSH int 1 ; + SWAP ; + PAIR ; + DUP 2 ; + CDR ; + DUP 2 ; + CDR ; + MUL ; + DIG 2 ; + CAR ; + DIG 2 ; + CAR ; + MUL ; + PAIR ; + DUP 2 ; + CAR ; + DUP 2 ; + CDR ; + MUL ; + DIG 2 ; + CDR ; + DIG 2 ; + CAR ; + MUL ; + PAIR ; + PUSH int 1 ; + DIG 2 ; + PAIR ; + DUP 2 ; + CAR ; + DUP 2 ; + CDR ; + MUL ; + DUP 3 ; + CDR ; + DUP 3 ; + CAR ; + MUL ; + COMPARE ; + LE ; + IF { SWAP ; DROP } { DROP } ; + DUP 3 ; + CAR ; + UNPAIR ; + DUP 6 ; + UNPAIR ; + CDR ; + DIG 3 ; + DIG 3 ; + ADD ; + DUP 5 ; + DIG 3 ; + DIG 3 ; + ADD ; + PUSH int 1 ; + SWAP ; + PAIR ; + DUP 2 ; + CAR ; + DUP 2 ; + CDR ; + MUL ; + DIG 2 ; + CDR ; + DIG 2 ; + CAR ; + MUL ; + PAIR ; + PUSH int 1 ; + DIG 2 ; + PAIR ; + DUP 2 ; + CAR ; + DUP 2 ; + CDR ; + MUL ; + DUP 3 ; + CDR ; + DUP 3 ; + CAR ; + MUL ; + COMPARE ; + LE ; + IF { SWAP ; DROP } { DROP } ; + DIG 3 ; + UNPAIR ; + UNPAIR ; + DIG 6 ; + CDR ; + DUG 3 ; + ADD ; + ADD ; + DUP 5 ; + CDR ; + DUP 16 ; + CDR ; + MUL ; + DIG 5 ; + CAR ; + DUP 16 ; + CAR ; + MUL ; + PAIR ; + PUSH int 1 ; + DIG 3 ; + PAIR ; + DUP 2 ; + CAR ; + DUP 2 ; + CDR ; + MUL ; + DIG 2 ; + CDR ; + DIG 2 ; + CAR ; + MUL ; + PAIR ; + PUSH int 1 ; + DIG 2 ; + PAIR ; + DUP 2 ; + CAR ; + DUP 2 ; + CDR ; + MUL ; + DUP 3 ; + CDR ; + DUP 3 ; + CAR ; + MUL ; + COMPARE ; + LE ; + IF { SWAP ; DROP } { DROP } ; + PUSH int 0 ; + DUP 4 ; + CAR ; + COMPARE ; + LT ; + IF { PUSH int -1 ; DUP 4 ; CDR ; MUL ; PUSH int -1 ; DUP 5 ; CAR ; MUL ; PAIR } + { DUP 3 } ; + DUP ; + CDR ; + PUSH nat 1 ; + PUSH nat 0 ; + PUSH nat 10 ; + PAIR ; + PAIR ; + LEFT nat ; + LOOP_LEFT + { UNPAIR ; + UNPAIR ; + PUSH nat 0 ; + DUP 3 ; + COMPARE ; + EQ ; + IF { DROP 2 ; RIGHT (pair (pair nat nat) nat) } + { PUSH nat 1 ; + PUSH nat 1 ; + DUP 4 ; + AND ; + COMPARE ; + EQ ; + IF { DUP ; DIG 3 ; MUL } { DIG 2 } ; + PUSH nat 1 ; + DIG 3 ; + LSR ; + DUP 3 ; + DIG 3 ; + MUL ; + PAIR ; + PAIR ; + LEFT nat } } ; + DIG 2 ; + CAR ; + MUL ; + EDIV ; + IF_NONE { PUSH string "DIV by 0" ; FAILWITH } {} ; + CAR ; + ISNAT ; + IF_NONE { PUSH nat 119 ; FAILWITH } {} ; + PUSH int 0 ; + DUP 4 ; + CAR ; + COMPARE ; + LT ; + IF { PUSH int -1 ; DUP 4 ; CDR ; MUL ; PUSH int -1 ; DUP 5 ; CAR ; MUL ; PAIR } + { DUP 3 } ; + DUP ; + CDR ; + PUSH nat 1 ; + PUSH nat 0 ; + PUSH nat 10 ; + PAIR ; + PAIR ; + LEFT nat ; + LOOP_LEFT + { UNPAIR ; + UNPAIR ; + PUSH nat 0 ; + DUP 3 ; + COMPARE ; + EQ ; + IF { DROP 2 ; RIGHT (pair (pair nat nat) nat) } + { PUSH nat 1 ; + PUSH nat 1 ; + DUP 4 ; + AND ; + COMPARE ; + EQ ; + IF { DUP ; DIG 3 ; MUL } { DIG 2 } ; + PUSH nat 1 ; + DIG 3 ; + LSR ; + DUP 3 ; + DIG 3 ; + MUL ; + PAIR ; + PAIR ; + LEFT nat } } ; + DIG 2 ; + CAR ; + MUL ; + EDIV ; + IF_NONE { PUSH string "DIV by 0" ; FAILWITH } {} ; + CAR ; + ISNAT ; + IF_NONE { PUSH nat 119 ; FAILWITH } {} ; + PUSH int 0 ; + DUP 4 ; + CAR ; + COMPARE ; + LT ; + IF { PUSH int -1 ; DUP 4 ; CDR ; MUL ; PUSH int -1 ; DUP 5 ; CAR ; MUL ; PAIR } + { DUP 3 } ; + DUP ; + CDR ; + PUSH nat 1 ; + PUSH nat 0 ; + PUSH nat 10 ; + PAIR ; + PAIR ; + LEFT nat ; + LOOP_LEFT + { UNPAIR ; + UNPAIR ; + PUSH nat 0 ; + DUP 3 ; + COMPARE ; + EQ ; + IF { DROP 2 ; RIGHT (pair (pair nat nat) nat) } + { PUSH nat 1 ; + PUSH nat 1 ; + DUP 4 ; + AND ; + COMPARE ; + EQ ; + IF { DUP ; DIG 3 ; MUL } { DIG 2 } ; + PUSH nat 1 ; + DIG 3 ; + LSR ; + DUP 3 ; + DIG 3 ; + MUL ; + PAIR ; + PAIR ; + LEFT nat } } ; + DIG 2 ; + CAR ; + MUL ; + EDIV ; + IF_NONE { PUSH string "DIV by 0" ; FAILWITH } {} ; + CAR ; + ISNAT ; + IF_NONE { PUSH nat 119 ; FAILWITH } {} ; + DUP 4 ; + CAR ; + DUP 7 ; + CDR ; + MUL ; + DUP 5 ; + CDR ; + DUP 8 ; + CAR ; + MUL ; + COMPARE ; + LT ; + NOT ; + DUP 6 ; + CAR ; + DUP 8 ; + CDR ; + MUL ; + DUP 7 ; + CDR ; + DUP 9 ; + CAR ; + MUL ; + COMPARE ; + LT ; + NOT ; + AND ; + IF { DIG 3 ; DIG 4 ; DIG 5 ; DROP 3 ; UNIT ; RIGHT unit ; LEFT unit } + { DUP 4 ; + CAR ; + DUP 6 ; + CDR ; + MUL ; + DIG 4 ; + CDR ; + DUP 6 ; + CAR ; + MUL ; + COMPARE ; + LT ; + NOT ; + DUP 6 ; + CAR ; + DUP 6 ; + CDR ; + MUL ; + DIG 6 ; + CDR ; + DIG 6 ; + CAR ; + MUL ; + COMPARE ; + LT ; + NOT ; + AND ; + IF { UNIT ; LEFT unit ; LEFT unit } { UNIT ; RIGHT (or unit unit) } } ; + DUP 10 ; + PUSH nat 0 ; + PUSH nat 0 ; + PUSH nat 0 ; + PUSH nat 0 ; + PAIR 4 ; + DIG 2 ; + DIG 3 ; + DIG 4 ; + DIG 5 ; + PAIR 3 ; + PAIR 4 ; + DUP ; + GET 3 ; + IF_LEFT + { IF_LEFT + { DROP ; + DUP 2 ; + GET 3 ; + DUP 3 ; + CAR ; + ADD ; + DUP 3 ; + GET 13 ; + DIG 3 ; + GET 11 ; + ADD ; + SWAP } + { DROP ; + DUP 2 ; + GET 13 ; + DUP 3 ; + GET 11 ; + DUP 4 ; + GET 9 ; + ADD ; + ADD ; + DIG 2 ; + CAR } } + { DROP ; + DUP 2 ; + GET 5 ; + DUP 3 ; + GET 3 ; + DUP 4 ; + CAR ; + ADD ; + ADD ; + DIG 2 ; + GET 13 ; + SWAP } ; + DUP 3 ; + GET 3 ; + IF_LEFT + { IF_LEFT + { DROP ; DUP 8 } + { DROP ; + DUP 8 ; + GET 3 ; + DUP 11 ; + CAR ; + DUP 2 ; + CDR ; + MUL ; + DUP 12 ; + CDR ; + DIG 2 ; + CAR ; + MUL ; + PAIR ; + DUP 9 ; + SWAP ; + UPDATE 3 } } + { DROP ; + DUP 8 ; + GET 3 ; + DUP 11 ; + CDR ; + DUP 2 ; + CDR ; + MUL ; + DUP 12 ; + CAR ; + DIG 2 ; + CAR ; + MUL ; + PAIR ; + DUP 9 ; + SWAP ; + UPDATE 3 } ; + DUP 4 ; + GET 3 ; + IF_LEFT + { IF_LEFT { DROP ; DUP 4 ; CAR ; GET 3 } { DROP ; DUP 4 ; CAR ; CAR } } + { DROP ; DUP 4 ; CAR ; GET 4 } ; + DUP 2 ; + GET 3 ; + DUP 2 ; + INT ; + PUSH int 1 ; + SWAP ; + PAIR ; + DUP 2 ; + CDR ; + DUP 2 ; + CDR ; + MUL ; + DIG 2 ; + CAR ; + DIG 2 ; + CAR ; + MUL ; + PAIR ; + PUSH int 0 ; + DUP 2 ; + CAR ; + COMPARE ; + LT ; + IF { PUSH int -1 ; DUP 2 ; CDR ; MUL ; PUSH int -1 ; DIG 2 ; CAR ; MUL ; PAIR } + {} ; + DUP ; + CDR ; + PUSH nat 1 ; + PUSH nat 0 ; + PUSH nat 10 ; + PAIR ; + PAIR ; + LEFT nat ; + LOOP_LEFT + { UNPAIR ; + UNPAIR ; + PUSH nat 0 ; + DUP 3 ; + COMPARE ; + EQ ; + IF { DROP 2 ; RIGHT (pair (pair nat nat) nat) } + { PUSH nat 1 ; + PUSH nat 1 ; + DUP 4 ; + AND ; + COMPARE ; + EQ ; + IF { DUP ; DIG 3 ; MUL } { DIG 2 } ; + PUSH nat 1 ; + DIG 3 ; + LSR ; + DUP 3 ; + DIG 3 ; + MUL ; + PAIR ; + PAIR ; + LEFT nat } } ; + DIG 2 ; + CAR ; + MUL ; + EDIV ; + IF_NONE { PUSH string "DIV by 0" ; FAILWITH } {} ; + CAR ; + ISNAT ; + IF_NONE { PUSH nat 119 ; FAILWITH } {} ; + DIG 5 ; + DIG 5 ; + DIG 2 ; + DIG 5 ; + DIG 4 ; + PAIR 4 ; + UPDATE 5 ; + SWAP ; + UPDATE 6 ; + DIG 2 ; + DIG 5 ; + DIG 2 ; + DIG 3 ; + PAIR ; + PAIR ; + LEFT (pair timestamp timestamp) ; + LEFT timestamp ; + UPDATE 3 ; + DUP 2 ; + DUP 3 ; + CDR ; + DUP 3 ; + SOME ; + DUP 4 ; + CAR ; + UPDATE ; + UPDATE 2 ; + DIG 2 ; + CAR ; + DUP 3 ; + CAR ; + SOME ; + DIG 3 ; + GET 7 ; + UNPAIR ; + DUP ; + DUP 3 ; + COMPARE ; + GT ; + IF { PUSH string "/" ; CONCAT ; SWAP ; CONCAT } + { SWAP ; PUSH string "/" ; CONCAT ; SWAP ; CONCAT } ; + UPDATE ; + UPDATE 1 } + { DIG 3 ; DROP 2 } ; + DUP 2 ; + DIG 2 ; + CAR ; + DUP ; + CAR ; + DUP ; + CAR ; + DIG 4 ; + UPDATE 2 ; + UPDATE 1 ; + UPDATE 1 ; + UPDATE 1 } } } } } ; + SWAP ; + DIG 2 ; + DIG 3 ; + DIG 4 ; + DIG 5 ; + DROP 5 ; + NIL operation ; + PAIR } } } ; view "get_fee_in_mutez" unit mutez { CDR ; CAR ; CAR ; CDR ; CDR } ; view "redeemable_holdings_available" unit @@ -4612,6 +4741,7 @@ SWAP ; CDR ; CDR ; + CDR ; SWAP ; GET ; IF_NONE diff --git a/batcher/michelson/batcher-storage-ghostnet.tz b/batcher/michelson/batcher-storage-ghostnet.tz index 3ce3c78b..e25fd425 100644 --- a/batcher/michelson/batcher-storage-ghostnet.tz +++ b/batcher/michelson/batcher-storage-ghostnet.tz @@ -2,8 +2,7 @@ (Pair "tz1burnburnburnburnburnburnburjAYjjX" 0) 10 420) - (Pair (Pair "KT1XKvKiTTj8N6WKv3MhnZhFjZopFGQGBTdT" {}) - {} - "KT1SG9z3pU1cNh8dSranm5C5HXWphWi2pLwx") + (Pair (Pair "KT1XKvKiTTj8N6WKv3MhnZhFjZopFGQGBTdT" {}) {} {}) + "KT1SG9z3pU1cNh8dSranm5C5HXWphWi2pLwx" {}) diff --git a/batcher/michelson/marketmaker-ghostnet.tz b/batcher/michelson/marketmaker-ghostnet.tz index f5bdb77f..073afa0f 100644 --- a/batcher/michelson/marketmaker-ghostnet.tz +++ b/batcher/michelson/marketmaker-ghostnet.tz @@ -7,6 +7,37 @@ (address %tokenmanager) (pair %vaults (set %keys string) (big_map %values string address))) ; code { LAMBDA + (pair nat nat nat) + nat + { UNPAIR 3 ; + PAIR ; + PAIR ; + LEFT nat ; + LOOP_LEFT + { UNPAIR ; + UNPAIR ; + PUSH nat 0 ; + DUP 3 ; + COMPARE ; + EQ ; + IF { DROP 2 ; RIGHT (pair (pair nat nat) nat) } + { PUSH nat 1 ; + PUSH nat 1 ; + DUP 4 ; + AND ; + COMPARE ; + EQ ; + IF { DUP ; DIG 3 ; MUL } { DIG 2 } ; + PUSH nat 1 ; + DIG 3 ; + LSR ; + DUP 3 ; + DIG 3 ; + MUL ; + PAIR ; + PAIR ; + LEFT nat } } } ; + LAMBDA (pair int int) int { UNPAIR ; @@ -24,11 +55,12 @@ { PUSH int 1 ; DIG 2 ; SUB ; DUP 3 ; DIG 2 ; MUL ; PAIR ; LEFT int } } ; SWAP ; DROP } ; - SWAP ; + DIG 2 ; UNPAIR ; IF_LEFT { DIG 2 ; - DROP ; + DIG 3 ; + DROP 2 ; IF_LEFT { IF_LEFT { UNPAIR ; @@ -61,25 +93,25 @@ NOT ; IF { DROP 3 ; PUSH nat 163 ; FAILWITH } { DUP 3 ; - CDR ; - CDR ; DUP 4 ; + CDR ; DIG 4 ; CDR ; - DUP 3 ; + CDR ; + DUP ; CAR ; DUP 5 ; MEM ; - IF { DUP 3 ; DIG 3 ; CDR ; DIG 5 ; SOME ; DIG 5 ; UPDATE ; UPDATE 2 } - { DUP 3 ; - DUP 4 ; + IF { DUP ; CDR ; DIG 5 ; SOME ; DIG 5 ; UPDATE ; UPDATE 2 } + { DUP ; + DUP 2 ; CAR ; DUP 6 ; PUSH bool True ; SWAP ; UPDATE ; UPDATE 1 ; - DIG 3 ; + SWAP ; CDR ; DIG 5 ; DIG 5 ; @@ -153,7 +185,8 @@ PAIR } } { IF_LEFT { DIG 2 ; - DROP ; + DIG 3 ; + DROP 2 ; DUP 2 ; CAR ; CAR ; @@ -193,17 +226,17 @@ NOT ; IF { DROP 2 ; PUSH nat 163 ; FAILWITH } { DUP 2 ; - DUP 3 ; CDR ; - DIG 3 ; CDR ; + DUP 3 ; + DIG 3 ; CDR ; - DUP ; + DUP 3 ; CAR ; DUP 5 ; MEM ; - IF { DUP ; CDR ; DIG 4 ; NONE address ; SWAP ; UPDATE ; UPDATE 2 } - { DIG 3 ; DROP } ; + IF { DUP 3 ; DIG 3 ; CDR ; DIG 4 ; NONE address ; SWAP ; UPDATE ; UPDATE 2 } + { DIG 3 ; DROP ; DIG 2 } ; UPDATE 2 ; UPDATE 2 ; NIL operation ; @@ -327,336 +360,313 @@ GET 3 ; DUP 4 ; GET 3 ; - DUP 8 ; - DUP 3 ; - DUP 3 ; + DUP 2 ; + DUP 2 ; COMPARE ; GT ; - IF { DIG 2 ; PUSH string "/" ; CONCAT ; DIG 2 ; CONCAT } - { SWAP ; PUSH string "/" ; CONCAT ; DIG 2 ; CONCAT } ; + IF { SWAP ; PUSH string "/" ; CONCAT ; SWAP ; CONCAT } + { PUSH string "/" ; CONCAT ; SWAP ; CONCAT } ; + DUP 7 ; + DUP 2 ; GET ; IF_NONE - { SWAP ; DIG 2 ; DIG 3 ; DIG 4 ; DROP 4 ; PUSH nat 117 ; FAILWITH } + { DIG 2 ; DIG 3 ; DIG 4 ; DIG 5 ; DROP 5 ; PUSH nat 117 ; FAILWITH } { DUP ; GET 3 ; DUP 2 ; GET 5 ; VIEW "getPrice" (pair timestamp nat) ; - IF_NONE { PUSH nat 122 ; FAILWITH } {} ; - UNPAIR ; - DUP 3 ; - CAR ; - DUP 11 ; - DUP 2 ; - CAR ; - GET ; - IF_NONE { PUSH nat 111 ; FAILWITH } {} ; - DUP 12 ; - DIG 2 ; - CDR ; - GET ; - IF_NONE { PUSH nat 111 ; FAILWITH } {} ; - PUSH nat 1 ; - DIG 2 ; - PAIR ; - PAIR ; - DUP 4 ; - GET 7 ; - DUP ; - DUP 3 ; - CAR ; - CAR ; - GET 7 ; - COMPARE ; - GT ; - IF { DUP 2 ; - CAR ; - CAR ; - GET 7 ; - SUB ; - PUSH int 10 ; - PAIR ; - DUP 15 ; - SWAP ; - EXEC ; - DIG 3 ; - MUL ; - ISNAT ; - IF_NONE { PUSH nat 119 ; FAILWITH } {} ; - DUP 2 ; - CAR ; - CAR ; - GET 7 ; - INT ; - PUSH int 10 ; - PAIR ; - DUP 15 ; - SWAP ; - EXEC ; - SWAP } - { INT ; PUSH int 10 ; PAIR ; DUP 15 ; SWAP ; EXEC ; DIG 3 } ; - INT ; - PUSH int 1 ; - DIG 2 ; - PAIR ; - PUSH int 1 ; - DIG 2 ; - PAIR ; - DUP 2 ; - CAR ; - DUP 2 ; - CDR ; - MUL ; - DIG 2 ; - CDR ; - DIG 2 ; - CAR ; - MUL ; - PAIR ; - DIG 2 ; - SWAP ; - DUP 3 ; - CDR ; - GET 3 ; - DIG 3 ; - CAR ; - CAR ; - GET 3 ; - PAIR ; - PAIR 3 ; - DUP ; - CAR ; - DUP 10 ; - DUP 2 ; - CAR ; - GET ; - IF_NONE { PUSH nat 111 ; FAILWITH } {} ; - DUP 11 ; - DIG 2 ; - CDR ; - GET ; - IF_NONE { PUSH nat 111 ; FAILWITH } {} ; - SWAP ; - GET 7 ; - SWAP ; - GET 7 ; - SUB ; - DUP ; - ABS ; - INT ; - PUSH int 10 ; - PAIR ; - DUP 14 ; - SWAP ; - EXEC ; - PUSH int 0 ; - DUP 3 ; - COMPARE ; - EQ ; - IF { DROP 2 ; PUSH int 1 ; PUSH int 1 } - { PUSH int 0 ; - DIG 2 ; - COMPARE ; - LT ; - IF { PUSH int 1 ; - SWAP ; - PAIR ; - PUSH int 1 ; - PUSH int 1 ; - PAIR ; - DUP 2 ; - CAR ; - DUP 2 ; - CDR ; - MUL ; - DIG 2 ; - CDR ; - DIG 2 ; - CAR ; - MUL } - { PUSH int 1 ; SWAP } } ; - PAIR ; - DUP 2 ; - GET 3 ; - DUP 2 ; - CDR ; - DUP 2 ; - CDR ; - MUL ; - DIG 2 ; - CAR ; - DIG 2 ; - CAR ; - MUL ; - PAIR ; - UPDATE 3 ; + IF_NONE + { EMPTY_BIG_MAP string (pair nat timestamp) ; + NOW ; + DUP 2 ; + DUP 5 ; + GET ; + IF_NONE + { SWAP } + { DROP ; SWAP ; DUP 4 ; NONE (pair nat timestamp) ; SWAP ; UPDATE } ; + SWAP ; + PUSH nat 122 ; + PAIR ; + DIG 3 ; + SWAP ; + SOME ; + SWAP ; + UPDATE ; + NONE (pair timestamp nat) } + { DIG 2 ; DROP ; EMPTY_BIG_MAP string (pair nat timestamp) ; SWAP ; SOME } ; SWAP ; - CAR ; - CDR ; - DUP 5 ; - GET 3 ; - COMPARE ; - EQ ; - IF { DIG 5 ; - INT ; - SWAP ; - GET 3 ; - PUSH int 1 ; - DIG 2 ; - PAIR ; - DUP 2 ; - CAR ; - DUP 2 ; - CDR ; - MUL ; - DIG 2 ; - CDR ; - DIG 2 ; - CAR ; - MUL ; - PAIR ; - PUSH int 0 ; - DUP 2 ; - CAR ; - COMPARE ; - LT ; - IF { PUSH int -1 ; DUP 2 ; CDR ; MUL ; PUSH int -1 ; DIG 2 ; CAR ; MUL ; PAIR } - {} ; - DUP ; - CDR ; - PUSH nat 1 ; - PUSH nat 0 ; - PUSH nat 10 ; - PAIR ; - PAIR ; - LEFT nat ; - LOOP_LEFT - { UNPAIR ; - UNPAIR ; - PUSH nat 0 ; - DUP 3 ; + DROP ; + IF_NONE + { DIG 2 ; DIG 3 ; DIG 4 ; DIG 5 ; DROP 5 ; PUSH nat 122 ; FAILWITH } + { UNPAIR ; + DUP 3 ; + CAR ; + DUP 11 ; + DUP 2 ; + CAR ; + GET ; + IF_NONE { PUSH nat 111 ; FAILWITH } {} ; + DUP 12 ; + DIG 2 ; + CDR ; + GET ; + IF_NONE { PUSH nat 111 ; FAILWITH } {} ; + PUSH nat 1 ; + DIG 2 ; + PAIR ; + PAIR ; + DUP 4 ; + GET 7 ; + DUP ; + DUP 3 ; + CAR ; + CAR ; + GET 7 ; + COMPARE ; + GT ; + IF { DUP 2 ; + CAR ; + CAR ; + GET 7 ; + SUB ; + PUSH int 10 ; + PAIR ; + DUP 15 ; + SWAP ; + EXEC ; + DIG 3 ; + MUL ; + ISNAT ; + IF_NONE { PUSH nat 119 ; FAILWITH } {} ; + DUP 2 ; + CAR ; + CAR ; + GET 7 ; + INT ; + PUSH int 10 ; + PAIR ; + DUP 15 ; + SWAP ; + EXEC ; + SWAP } + { INT ; PUSH int 10 ; PAIR ; DUP 15 ; SWAP ; EXEC ; DIG 3 } ; + INT ; + PUSH int 1 ; + DIG 2 ; + PAIR ; + PUSH int 1 ; + DIG 2 ; + PAIR ; + DUP 2 ; + CAR ; + DUP 2 ; + CDR ; + MUL ; + DIG 2 ; + CDR ; + DIG 2 ; + CAR ; + MUL ; + PAIR ; + DIG 2 ; + SWAP ; + DUP 3 ; + CDR ; + GET 3 ; + DIG 3 ; + CAR ; + CAR ; + GET 3 ; + PAIR ; + PAIR 3 ; + DUP ; + CAR ; + DUP 10 ; + DUP 2 ; + CAR ; + GET ; + IF_NONE { PUSH nat 111 ; FAILWITH } {} ; + DUP 11 ; + DIG 2 ; + CDR ; + GET ; + IF_NONE { PUSH nat 111 ; FAILWITH } {} ; + SWAP ; + GET 7 ; + SWAP ; + GET 7 ; + SUB ; + DUP ; + ABS ; + INT ; + PUSH int 10 ; + PAIR ; + DUP 14 ; + SWAP ; + EXEC ; + PUSH int 0 ; + DUP 3 ; + COMPARE ; + EQ ; + IF { DROP 2 ; PUSH int 1 ; PUSH int 1 } + { PUSH int 0 ; + DIG 2 ; COMPARE ; - EQ ; - IF { DROP 2 ; RIGHT (pair (pair nat nat) nat) } - { PUSH nat 1 ; - PUSH nat 1 ; - DUP 4 ; - AND ; - COMPARE ; - EQ ; - IF { DUP ; DIG 3 ; MUL } { DIG 2 } ; - PUSH nat 1 ; - DIG 3 ; - LSR ; - DUP 3 ; - DIG 3 ; - MUL ; + LT ; + IF { PUSH int 1 ; + SWAP ; PAIR ; + PUSH int 1 ; + PUSH int 1 ; PAIR ; - LEFT nat } } ; - DIG 2 ; - CAR ; - MUL ; - EDIV ; - IF_NONE { PUSH string "DIV by 0" ; FAILWITH } {} ; - CAR ; - ISNAT ; - IF_NONE { PUSH nat 119 ; FAILWITH } {} ; - UNIT ; - RIGHT unit } - { DIG 5 ; - INT ; - SWAP ; - GET 3 ; - PUSH int 1 ; - DIG 2 ; - PAIR ; - DUP 2 ; - CDR ; - DUP 2 ; - CDR ; - MUL ; - DIG 2 ; - CAR ; - DIG 2 ; - CAR ; - MUL ; - PAIR ; - PUSH int 0 ; - DUP 2 ; - CAR ; - COMPARE ; - LT ; - IF { PUSH int -1 ; DUP 2 ; CDR ; MUL ; PUSH int -1 ; DIG 2 ; CAR ; MUL ; PAIR } - {} ; - DUP ; - CDR ; - PUSH nat 1 ; - PUSH nat 0 ; - PUSH nat 10 ; - PAIR ; - PAIR ; - LEFT nat ; - LOOP_LEFT - { UNPAIR ; - UNPAIR ; + DUP 2 ; + CAR ; + DUP 2 ; + CDR ; + MUL ; + DIG 2 ; + CDR ; + DIG 2 ; + CAR ; + MUL } + { PUSH int 1 ; SWAP } } ; + PAIR ; + DUP 2 ; + GET 3 ; + DUP 2 ; + CDR ; + DUP 2 ; + CDR ; + MUL ; + DIG 2 ; + CAR ; + DIG 2 ; + CAR ; + MUL ; + PAIR ; + UPDATE 3 ; + SWAP ; + CAR ; + CDR ; + DUP 5 ; + GET 3 ; + COMPARE ; + EQ ; + IF { DIG 5 ; + INT ; + SWAP ; + GET 3 ; + PUSH int 1 ; + DIG 2 ; + PAIR ; + DUP 2 ; + CAR ; + DUP 2 ; + CDR ; + MUL ; + DIG 2 ; + CDR ; + DIG 2 ; + CAR ; + MUL ; + PAIR ; + PUSH int 0 ; + DUP 2 ; + CAR ; + COMPARE ; + LT ; + IF { PUSH int -1 ; DUP 2 ; CDR ; MUL ; PUSH int -1 ; DIG 2 ; CAR ; MUL ; PAIR } + {} ; + DUP ; + CDR ; + PUSH nat 1 ; PUSH nat 0 ; + PUSH nat 10 ; + PAIR 3 ; + DUP 13 ; + SWAP ; + EXEC ; + DIG 2 ; + CAR ; + MUL ; + EDIV ; + IF_NONE { PUSH string "DIV by 0" ; FAILWITH } {} ; + CAR ; + ISNAT ; + IF_NONE { PUSH nat 119 ; FAILWITH } {} ; + UNIT ; + RIGHT unit } + { DIG 5 ; + INT ; + PUSH int 1 ; + SWAP ; + PAIR ; + SWAP ; + GET 3 ; + DUP ; + CDR ; DUP 3 ; + CDR ; + MUL ; + SWAP ; + CAR ; + DIG 2 ; + CAR ; + MUL ; + PAIR ; + PUSH int 0 ; + DUP 2 ; + CAR ; COMPARE ; - EQ ; - IF { DROP 2 ; RIGHT (pair (pair nat nat) nat) } - { PUSH nat 1 ; - PUSH nat 1 ; - DUP 4 ; - AND ; - COMPARE ; - EQ ; - IF { DUP ; DIG 3 ; MUL } { DIG 2 } ; - PUSH nat 1 ; - DIG 3 ; - LSR ; - DUP 3 ; - DIG 3 ; - MUL ; - PAIR ; - PAIR ; - LEFT nat } } ; - DIG 2 ; - CAR ; - MUL ; - EDIV ; - IF_NONE { PUSH string "DIV by 0" ; FAILWITH } {} ; - CAR ; - ISNAT ; - IF_NONE { PUSH nat 119 ; FAILWITH } {} ; - UNIT ; - LEFT unit } ; - DIG 5 ; - CONTRACT %injectliquidity - (pair (pair (nat %amount) - (pair %from_token - (nat %token_id) - (string %name) - (option %address address) - (nat %decimals) - (option %standard string))) - (or %side (unit %buy) (unit %sell)) - (pair %to_token - (nat %token_id) - (string %name) - (option %address address) - (nat %decimals) - (option %standard string))) ; - IF_NONE { PUSH nat 157 ; FAILWITH } {} ; - PUSH mutez 0 ; - DIG 5 ; - DIG 3 ; - PAIR ; - DIG 5 ; - DIG 4 ; - PAIR ; - PAIR ; - TRANSFER_TOKENS } ; + LT ; + IF { PUSH int -1 ; DUP 2 ; CDR ; MUL ; PUSH int -1 ; DIG 2 ; CAR ; MUL ; PAIR } + {} ; + DUP ; + CDR ; + PUSH nat 1 ; + PUSH nat 0 ; + PUSH nat 10 ; + PAIR 3 ; + DUP 13 ; + SWAP ; + EXEC ; + DIG 2 ; + CAR ; + MUL ; + EDIV ; + IF_NONE { PUSH string "DIV by 0" ; FAILWITH } {} ; + CAR ; + ISNAT ; + IF_NONE { PUSH nat 119 ; FAILWITH } {} ; + UNIT ; + LEFT unit } ; + DIG 5 ; + CONTRACT %injectliquidity + (pair (pair (nat %amount) + (pair %from_token + (nat %token_id) + (string %name) + (option %address address) + (nat %decimals) + (option %standard string))) + (or %side (unit %buy) (unit %sell)) + (pair %to_token + (nat %token_id) + (string %name) + (option %address address) + (nat %decimals) + (option %standard string))) ; + IF_NONE { PUSH nat 157 ; FAILWITH } {} ; + PUSH mutez 0 ; + DIG 5 ; + DIG 3 ; + PAIR ; + DIG 5 ; + DIG 4 ; + PAIR ; + PAIR ; + TRANSFER_TOKENS } } ; CONS } } } } } { SWAP ; IF_NONE @@ -688,342 +698,320 @@ GET 3 ; DUP 4 ; GET 3 ; - DUP 8 ; - DUP 3 ; - DUP 3 ; + DUP 2 ; + DUP 2 ; COMPARE ; GT ; - IF { DIG 2 ; PUSH string "/" ; CONCAT ; DIG 2 ; CONCAT } - { SWAP ; PUSH string "/" ; CONCAT ; DIG 2 ; CONCAT } ; + IF { SWAP ; PUSH string "/" ; CONCAT ; SWAP ; CONCAT } + { PUSH string "/" ; CONCAT ; SWAP ; CONCAT } ; + DUP 7 ; + DUP 2 ; GET ; IF_NONE - { SWAP ; DIG 2 ; DIG 3 ; DIG 4 ; DROP 4 ; PUSH nat 117 ; FAILWITH } + { DIG 2 ; DIG 3 ; DIG 4 ; DIG 5 ; DROP 5 ; PUSH nat 117 ; FAILWITH } { DUP ; GET 3 ; DUP 2 ; GET 5 ; VIEW "getPrice" (pair timestamp nat) ; - IF_NONE { PUSH nat 122 ; FAILWITH } {} ; - UNPAIR ; - DUP 3 ; - CAR ; - DUP 11 ; - DUP 2 ; - CAR ; - GET ; - IF_NONE { PUSH nat 111 ; FAILWITH } {} ; - DUP 12 ; - DIG 2 ; - CDR ; - GET ; - IF_NONE { PUSH nat 111 ; FAILWITH } {} ; - PUSH nat 1 ; - DIG 2 ; - PAIR ; - PAIR ; - DUP 4 ; - GET 7 ; - DUP ; - DUP 3 ; - CAR ; - CAR ; - GET 7 ; - COMPARE ; - GT ; - IF { DUP 2 ; - CAR ; - CAR ; - GET 7 ; - SUB ; - PUSH int 10 ; - PAIR ; - DUP 15 ; - SWAP ; - EXEC ; - DIG 3 ; - MUL ; - ISNAT ; - IF_NONE { PUSH nat 119 ; FAILWITH } {} ; - DUP 2 ; - CAR ; - CAR ; - GET 7 ; - INT ; - PUSH int 10 ; - PAIR ; - DUP 15 ; - SWAP ; - EXEC ; - SWAP } - { INT ; PUSH int 10 ; PAIR ; DUP 15 ; SWAP ; EXEC ; DIG 3 } ; - INT ; - PUSH int 1 ; - DIG 2 ; - PAIR ; - PUSH int 1 ; - DIG 2 ; - PAIR ; - DUP 2 ; - CAR ; - DUP 2 ; - CDR ; - MUL ; - DIG 2 ; - CDR ; - DIG 2 ; - CAR ; - MUL ; - PAIR ; - DIG 2 ; + IF_NONE + { EMPTY_BIG_MAP string (pair nat timestamp) ; + NOW ; + DUP 2 ; + DUP 5 ; + GET ; + IF_NONE + { SWAP } + { DROP ; SWAP ; DUP 4 ; NONE (pair nat timestamp) ; SWAP ; UPDATE } ; + SWAP ; + PUSH nat 122 ; + PAIR ; + DIG 3 ; + SWAP ; + SOME ; + SWAP ; + UPDATE ; + NONE (pair timestamp nat) } + { DIG 2 ; DROP ; EMPTY_BIG_MAP string (pair nat timestamp) ; SWAP ; SOME } ; SWAP ; - DUP 3 ; - CDR ; - GET 3 ; - DIG 3 ; - CAR ; - CAR ; - GET 3 ; - PAIR ; - PAIR 3 ; - DUP ; - CAR ; - DUP 10 ; - DUP 2 ; - CAR ; - GET ; - IF_NONE { PUSH nat 111 ; FAILWITH } {} ; - DUP 11 ; - DIG 2 ; - CDR ; - GET ; - IF_NONE { PUSH nat 111 ; FAILWITH } {} ; - SWAP ; - GET 7 ; - SWAP ; - GET 7 ; - SUB ; - DUP ; - ABS ; - INT ; - PUSH int 10 ; - PAIR ; - DUP 14 ; - SWAP ; - EXEC ; - PUSH int 0 ; - DUP 3 ; - COMPARE ; - EQ ; - IF { DROP 2 ; PUSH int 1 ; PUSH int 1 } - { PUSH int 0 ; - DIG 2 ; - COMPARE ; - LT ; - IF { PUSH int 1 ; - SWAP ; - PAIR ; - PUSH int 1 ; - PUSH int 1 ; - PAIR ; - DUP 2 ; - CAR ; - DUP 2 ; - CDR ; - MUL ; - DIG 2 ; - CDR ; - DIG 2 ; - CAR ; - MUL } - { PUSH int 1 ; SWAP } } ; - PAIR ; - DUP 2 ; - GET 3 ; - DUP 2 ; - CDR ; - DUP 2 ; - CDR ; - MUL ; - DIG 2 ; - CAR ; - DIG 2 ; - CAR ; - MUL ; - PAIR ; - UPDATE 3 ; - SWAP ; - CAR ; - CDR ; - DUP 5 ; - GET 3 ; - COMPARE ; - EQ ; - IF { DIG 5 ; - INT ; - SWAP ; - GET 3 ; - PUSH int 1 ; - DIG 2 ; - PAIR ; - DUP 2 ; - CAR ; - DUP 2 ; - CDR ; - MUL ; - DIG 2 ; - CDR ; - DIG 2 ; - CAR ; - MUL ; - PAIR ; - PUSH int 0 ; - DUP 2 ; - CAR ; - COMPARE ; - LT ; - IF { PUSH int -1 ; DUP 2 ; CDR ; MUL ; PUSH int -1 ; DIG 2 ; CAR ; MUL ; PAIR } - {} ; - DUP ; - CDR ; - PUSH nat 1 ; - PUSH nat 0 ; - PUSH nat 10 ; - PAIR ; - PAIR ; - LEFT nat ; - LOOP_LEFT - { UNPAIR ; - UNPAIR ; - PUSH nat 0 ; - DUP 3 ; + DROP ; + IF_NONE + { DIG 2 ; DIG 3 ; DIG 4 ; DIG 5 ; DROP 5 ; PUSH nat 122 ; FAILWITH } + { UNPAIR ; + DUP 3 ; + CAR ; + DUP 11 ; + DUP 2 ; + CAR ; + GET ; + IF_NONE { PUSH nat 111 ; FAILWITH } {} ; + DUP 12 ; + DIG 2 ; + CDR ; + GET ; + IF_NONE { PUSH nat 111 ; FAILWITH } {} ; + PUSH nat 1 ; + DIG 2 ; + PAIR ; + PAIR ; + DUP 4 ; + GET 7 ; + DUP ; + DUP 3 ; + CAR ; + CAR ; + GET 7 ; + COMPARE ; + GT ; + IF { DUP 2 ; + CAR ; + CAR ; + GET 7 ; + SUB ; + PUSH int 10 ; + PAIR ; + DUP 15 ; + SWAP ; + EXEC ; + DIG 3 ; + MUL ; + ISNAT ; + IF_NONE { PUSH nat 119 ; FAILWITH } {} ; + DUP 2 ; + CAR ; + CAR ; + GET 7 ; + INT ; + PUSH int 10 ; + PAIR ; + DUP 15 ; + SWAP ; + EXEC ; + SWAP } + { INT ; PUSH int 10 ; PAIR ; DUP 15 ; SWAP ; EXEC ; DIG 3 } ; + INT ; + PUSH int 1 ; + DIG 2 ; + PAIR ; + PUSH int 1 ; + DIG 2 ; + PAIR ; + DUP 2 ; + CAR ; + DUP 2 ; + CDR ; + MUL ; + DIG 2 ; + CDR ; + DIG 2 ; + CAR ; + MUL ; + PAIR ; + DIG 2 ; + SWAP ; + DUP 3 ; + CDR ; + GET 3 ; + DIG 3 ; + CAR ; + CAR ; + GET 3 ; + PAIR ; + PAIR 3 ; + DUP ; + CAR ; + DUP 10 ; + DUP 2 ; + CAR ; + GET ; + IF_NONE { PUSH nat 111 ; FAILWITH } {} ; + DUP 11 ; + DIG 2 ; + CDR ; + GET ; + IF_NONE { PUSH nat 111 ; FAILWITH } {} ; + SWAP ; + GET 7 ; + SWAP ; + GET 7 ; + SUB ; + DUP ; + ABS ; + INT ; + PUSH int 10 ; + PAIR ; + DUP 14 ; + SWAP ; + EXEC ; + PUSH int 0 ; + DUP 3 ; + COMPARE ; + EQ ; + IF { DROP 2 ; PUSH int 1 ; PUSH int 1 } + { PUSH int 0 ; + DIG 2 ; COMPARE ; - EQ ; - IF { DROP 2 ; RIGHT (pair (pair nat nat) nat) } - { PUSH nat 1 ; - PUSH nat 1 ; - DUP 4 ; - AND ; - COMPARE ; - EQ ; - IF { DUP ; DIG 3 ; MUL } { DIG 2 } ; - PUSH nat 1 ; - DIG 3 ; - LSR ; - DUP 3 ; - DIG 3 ; - MUL ; + LT ; + IF { PUSH int 1 ; + SWAP ; PAIR ; + PUSH int 1 ; + PUSH int 1 ; PAIR ; - LEFT nat } } ; - DIG 2 ; - CAR ; - MUL ; - EDIV ; - IF_NONE { PUSH string "DIV by 0" ; FAILWITH } {} ; - CAR ; - ISNAT ; - IF_NONE { PUSH nat 119 ; FAILWITH } {} ; - UNIT ; - RIGHT unit } - { DIG 5 ; - INT ; - SWAP ; - GET 3 ; - PUSH int 1 ; - DIG 2 ; - PAIR ; - DUP 2 ; - CDR ; - DUP 2 ; - CDR ; - MUL ; - DIG 2 ; - CAR ; - DIG 2 ; - CAR ; - MUL ; - PAIR ; - PUSH int 0 ; - DUP 2 ; - CAR ; - COMPARE ; - LT ; - IF { PUSH int -1 ; DUP 2 ; CDR ; MUL ; PUSH int -1 ; DIG 2 ; CAR ; MUL ; PAIR } - {} ; - DUP ; - CDR ; - PUSH nat 1 ; - PUSH nat 0 ; - PUSH nat 10 ; - PAIR ; - PAIR ; - LEFT nat ; - LOOP_LEFT - { UNPAIR ; - UNPAIR ; + DUP 2 ; + CAR ; + DUP 2 ; + CDR ; + MUL ; + DIG 2 ; + CDR ; + DIG 2 ; + CAR ; + MUL } + { PUSH int 1 ; SWAP } } ; + PAIR ; + DUP 2 ; + GET 3 ; + DUP 2 ; + CDR ; + DUP 2 ; + CDR ; + MUL ; + DIG 2 ; + CAR ; + DIG 2 ; + CAR ; + MUL ; + PAIR ; + UPDATE 3 ; + SWAP ; + CAR ; + CDR ; + DUP 5 ; + GET 3 ; + COMPARE ; + EQ ; + IF { DIG 5 ; + INT ; + SWAP ; + GET 3 ; + PUSH int 1 ; + DIG 2 ; + PAIR ; + DUP 2 ; + CAR ; + DUP 2 ; + CDR ; + MUL ; + DIG 2 ; + CDR ; + DIG 2 ; + CAR ; + MUL ; + PAIR ; + PUSH int 0 ; + DUP 2 ; + CAR ; + COMPARE ; + LT ; + IF { PUSH int -1 ; DUP 2 ; CDR ; MUL ; PUSH int -1 ; DIG 2 ; CAR ; MUL ; PAIR } + {} ; + DUP ; + CDR ; + PUSH nat 1 ; PUSH nat 0 ; + PUSH nat 10 ; + PAIR 3 ; + DUP 13 ; + SWAP ; + EXEC ; + DIG 2 ; + CAR ; + MUL ; + EDIV ; + IF_NONE { PUSH string "DIV by 0" ; FAILWITH } {} ; + CAR ; + ISNAT ; + IF_NONE { PUSH nat 119 ; FAILWITH } {} ; + UNIT ; + RIGHT unit } + { DIG 5 ; + INT ; + PUSH int 1 ; + SWAP ; + PAIR ; + SWAP ; + GET 3 ; + DUP ; + CDR ; DUP 3 ; + CDR ; + MUL ; + SWAP ; + CAR ; + DIG 2 ; + CAR ; + MUL ; + PAIR ; + PUSH int 0 ; + DUP 2 ; + CAR ; COMPARE ; - EQ ; - IF { DROP 2 ; RIGHT (pair (pair nat nat) nat) } - { PUSH nat 1 ; - PUSH nat 1 ; - DUP 4 ; - AND ; - COMPARE ; - EQ ; - IF { DUP ; DIG 3 ; MUL } { DIG 2 } ; - PUSH nat 1 ; - DIG 3 ; - LSR ; - DUP 3 ; - DIG 3 ; - MUL ; - PAIR ; - PAIR ; - LEFT nat } } ; - DIG 2 ; - CAR ; - MUL ; - EDIV ; - IF_NONE { PUSH string "DIV by 0" ; FAILWITH } {} ; - CAR ; - ISNAT ; - IF_NONE { PUSH nat 119 ; FAILWITH } {} ; - UNIT ; - LEFT unit } ; - DIG 5 ; - CONTRACT %injectliquidity - (pair (pair (nat %amount) - (pair %from_token - (nat %token_id) - (string %name) - (option %address address) - (nat %decimals) - (option %standard string))) - (or %side (unit %buy) (unit %sell)) - (pair %to_token - (nat %token_id) - (string %name) - (option %address address) - (nat %decimals) - (option %standard string))) ; - IF_NONE { PUSH nat 157 ; FAILWITH } {} ; - PUSH mutez 0 ; - DIG 5 ; - DIG 3 ; - PAIR ; - DIG 5 ; - DIG 4 ; - PAIR ; - PAIR ; - TRANSFER_TOKENS } ; + LT ; + IF { PUSH int -1 ; DUP 2 ; CDR ; MUL ; PUSH int -1 ; DIG 2 ; CAR ; MUL ; PAIR } + {} ; + DUP ; + CDR ; + PUSH nat 1 ; + PUSH nat 0 ; + PUSH nat 10 ; + PAIR 3 ; + DUP 13 ; + SWAP ; + EXEC ; + DIG 2 ; + CAR ; + MUL ; + EDIV ; + IF_NONE { PUSH string "DIV by 0" ; FAILWITH } {} ; + CAR ; + ISNAT ; + IF_NONE { PUSH nat 119 ; FAILWITH } {} ; + UNIT ; + LEFT unit } ; + DIG 5 ; + CONTRACT %injectliquidity + (pair (pair (nat %amount) + (pair %from_token + (nat %token_id) + (string %name) + (option %address address) + (nat %decimals) + (option %standard string))) + (or %side (unit %buy) (unit %sell)) + (pair %to_token + (nat %token_id) + (string %name) + (option %address address) + (nat %decimals) + (option %standard string))) ; + IF_NONE { PUSH nat 157 ; FAILWITH } {} ; + PUSH mutez 0 ; + DIG 5 ; + DIG 3 ; + PAIR ; + DIG 5 ; + DIG 4 ; + PAIR ; + PAIR ; + TRANSFER_TOKENS } } ; CONS } } } } { DROP 4 } } } ; SWAP ; DIG 2 ; DIG 3 ; DIG 5 ; - DROP 4 ; + DIG 6 ; + DROP 5 ; PAIR } } } } diff --git a/batcher/storage/batcher_storage_ghostnet.mligo b/batcher/storage/batcher_storage_ghostnet.mligo index 545893b6..bfb6518f 100644 --- a/batcher/storage/batcher_storage_ghostnet.mligo +++ b/batcher/storage/batcher_storage_ghostnet.mligo @@ -1,4 +1,5 @@ #import "../batcher.mligo" "Batcher" +#import "../types.mligo" "Types" let meta : bytes = 0x68747470733a2f2f697066732e6763702e6d617269676f6c642e6465762f697066732f516d56375a534b6358324d4e75656938745a3268723555484d5a66737039476b375675345878766d6246734a4e45 @@ -19,5 +20,6 @@ let f(_:unit) : Batcher.Storage.t = { limit_on_tokens_or_pairs = 10n; liquidity_injection_limit_in_seconds = 420n; deposit_time_window_in_seconds = 600n; + tick_errors = (Big_map.empty: Types.TickErrors.t ); } diff --git a/batcher/types.mligo b/batcher/types.mligo index f7548244..e845ec19 100644 --- a/batcher/types.mligo +++ b/batcher/types.mligo @@ -10,7 +10,6 @@ type side = type tolerance = Plus | Exact | Minus - type mint_burn_request = { name: string; amount: nat; @@ -169,6 +168,11 @@ type user_batch_ordertypes = (address, batch_ordertypes) big_map type market_vault_used = address option +type tick_error = { + time: timestamp; + error: nat; +} + (* Batch of orders for the same pair of tokens *) type batch = [@layout:comb] { @@ -213,6 +217,32 @@ type oracle_source_change = [@layout:comb] { } +module TickErrors = struct + +type t = (string,tick_error) big_map + +let clear_tick_error + (key:string) + (tes:t):t = + match Big_map.find_opt key tes with + | Some _ -> Big_map.remove key tes + | None -> tes + + +let add_tick_error + (key:string) + (error:nat) + (tes:t): t = + let tes = clear_tick_error key tes in + let now = Tezos.get_now () in + let error = { + time = now; + error = error; + } in + Big_map.add key error tes + +end + module ValidTokens = struct type key = string diff --git a/batcher/utils.mligo b/batcher/utils.mligo index b3805ecd..13fbd1d8 100644 --- a/batcher/utils.mligo +++ b/batcher/utils.mligo @@ -977,27 +977,38 @@ module OracleUtils = struct [@inline] let get_oracle_price + (pair:string) (failure_code: nat) - (valid_swap: valid_swap_reduced) : orace_price_update = + (valid_swap: valid_swap_reduced) + (tes:TickErrors.t): orace_price_update option * TickErrors.t = match Tezos.call_view "getPrice" valid_swap.oracle_asset_name valid_swap.oracle_address with - | Some opu -> opu - | None -> failwith failure_code + | Some opu -> Some opu, tes + | None -> None, TickErrors.add_tick_error pair failure_code tes [@inline] let oracle_price_is_not_stale + (pair:string) (deposit_time_window: nat) - (oracle_price_timestamp: timestamp) : unit = + (oracle_price_timestamp: timestamp) + (tes:TickErrors.t): bool * TickErrors.t = let dtw_i = int deposit_time_window in - if (Tezos.get_now () - dtw_i) < oracle_price_timestamp then () else failwith oracle_price_is_stale + if (Tezos.get_now () - dtw_i) < oracle_price_timestamp then + true, tes + else + false, TickErrors.add_tick_error pair oracle_price_is_stale tes [@inline] let is_oracle_price_newer_than_current (rate_name: string) (oracle_price_timestamp: timestamp) - (rates: rates_current): unit = + (rates: rates_current) + (tes:TickErrors.t): bool * TickErrors.t = match Big_map.find_opt rate_name rates with - | Some r -> if r.when >=oracle_price_timestamp then failwith oracle_price_is_not_timely - | None -> () + | Some r -> if r.when >=oracle_price_timestamp then + false, TickErrors.add_tick_error rate_name oracle_price_is_not_timely tes + else + true, tes + | None -> true, tes [@inline] let convert_oracle_price diff --git a/docker-compose.yml b/docker-compose.yml index 3f7d610e..7cc89091 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,5 +5,5 @@ services: container_name: tick-ghostnet build: context: . - dockerfile: Dockerfile.tick.ghostnet - restart: always \ No newline at end of file + dockerfile: Dockerfile.tick.beta.ghostnet + restart: always diff --git a/tick.sh b/tick.sh index 567542cf..cdc7f10b 100755 --- a/tick.sh +++ b/tick.sh @@ -6,14 +6,13 @@ while getopts b:f: flag do case "${flag}" in b) batcher_address=${OPTARG};; + m) market_maker_address=${OPTARG};; f) frequency=${OPTARG};; esac done FREQ=$(($frequency)) -# declare -a TICKERS=("tzBTC-USDT" "EURL-tzBTC") -declare -a TICKERS=("tzBTC/USDT" "tzBTC/EURL") tick_ticker(){ @@ -22,7 +21,20 @@ tick_ticker(){ octez-client transfer 0 from oracle_account to $batcher_address \ --entrypoint tick \ - --arg "\"${1}\"" \ + --arg "\"Unit\"" \ + --burn-cap 2 + + set -e +} + +tick_mm(){ + + set +e + echo "Tick market maker contract - $market_maker_address" + + octez-client transfer 0 from oracle_account to $market_maker_address \ + --entrypoint tick \ + --arg "\"Unit\"" \ --burn-cap 2 set -e @@ -30,12 +42,8 @@ tick_ticker(){ post_op (){ -for i in "${TICKERS[@]}" -do - : - tick_ticker "$i" - sleep 5 -done +tick_ticker +tick_mm }