curl -X GET -H "Content-Type: application/json" -H "x-cosmos-block-height: 17463916" https://rest.cosmos.directory/agoric/cosmos/bank/v1beta1/balances/agoric1u9upew4ndxy5x8hm7kna52t037x26v8f6tm4cc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function decodeBase64(obj) { | |
| for (let key in obj) { | |
| try{ | |
| if (typeof obj[key] === 'object' && obj[key] !== null) { | |
| // If the property is an object or array, recursively decode its properties | |
| decodeBase64(obj[key]); | |
| } else if (key === 'key' || key === 'value') { | |
| // If the property is "key" or "value", decode its base64 value | |
| obj[key] = atob(obj[key]); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // paste into web browser console | |
| const POOL_ID = 1220; | |
| const WALLET_ADDRESS = "YOUR OSMO ADDRESS"; | |
| const REST_ENDPOINT = `https://lcd.osmosis.zone/`; | |
| const ACCEPTABLE_TOKEN_RATIO_THRESHOLD = 0.01; | |
| (async () => { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const BigNumber = require('bignumber.js'); | |
| /** | |
| * Calculate the optimal token input amount for a swap operation within specified constraints. | |
| * | |
| * @param {Object} options - The options for the swap estimate. | |
| * @param {string} options.poolId - The ID of the liquidity pool. | |
| * @param {number} options.tokenInAmount - The initial token input amount to be optimized. | |
| * @param {string} options.tokenInDenom - The denomination of the input token. | |
| * @param {string} options.tokenOutDenom - The denomination of the output token. |
Here are some of my JS & Node.js repos.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Go through all sheets in a spreadsheet, identify and remove all spreadsheet | |
| * import functions, then replace them a while later. This causes a "refresh" | |
| * of the "import" functions. For periodic refresh of these formulas, set this | |
| * function up as a time-based trigger. | |
| * | |
| * Caution: Formula changes made to the spreadsheet by other scripts or users | |
| * during the refresh period COULD BE OVERWRITTEN. | |
| * | |
| * From: https://stackoverflow.com/a/33875957/1677912 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| osmosisd tx concentratedliquidity create-position 1081 "[-100]" 100 1500000000ibc/4ABBEF4C8926DDDB320AE5188CFD63267ABBCEFC0583E4AE05D6E5AA2401DDAB,1500000000ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858 0 0 --from secondary --chain-id osmosis-1 -b block --keyring-backend os --fees 10000uosmo --gas 527420 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Official blogpost: https://osmosis.zone/blog/supercharged-liquidity-and-osmo-2-0-a-revolution-in-decentralized-market-making | |
| A tweet outlining it: https://twitter.com/Flowslikeosmo/status/1668634416204365827 | |
| Official Docs: | |
| https://docs.osmosis.zone/osmosis-core/modules/concentrated-liquidity/ | |
| How incentives work: https://commonwealth.im/osmosis/discussion/11641-supercharged-incentives-model | |
| Migration: https://commonwealth.im/osmosis/discussion/11640-supercharged-liquidity-pools-rollout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Go through all sheets in a spreadsheet, identify and remove all spreadsheet | |
| * import functions, then replace them a while later. This causes a "refresh" | |
| * of the "import" functions. For periodic refresh of these formulas, set this | |
| * function up as a time-based trigger. | |
| * | |
| * Caution: Formula changes made to the spreadsheet by other scripts or users | |
| * during the refresh period COULD BE OVERWRITTEN. | |
| * | |
| * From: https://stackoverflow.com/a/33875957/1677912 |
NewerOlder